Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to restrict repeated values

Former Member
0 Kudos

Hi,

Iam trying to get values from BSAK using logical database.

bsak-lifnr having having 10 records.

code

-


nodes: bsak,bseg.

get bsak.

write bsak-lifnr.

while iam outputting the data it is showing all the 10 records.But i want only one record.Could u pls tell me how to do that...

reward guaranteed.

Kaki

15 REPLIES 15

Former Member
0 Kudos

Not sure for what purpose you are using logical database and you want only one record out of 10. What is your seelction screen like and what values are you putting in that . Depending on your selection criteria on selection screen BSAK will return 10 lines it seems.

You can use "EXIT" statement after WRITE just to output one line.

Cheers.

Sanjay

0 Kudos

Hi Sanjay,

I got the requirement to display vendor line items(tcode:S_ALR_87012103) with complete line items & posting keys for paricular document number.

So i have created one logical database using BSAK & BSEG to get the values...

kaki

0 Kudos

BSAK contains line items and one document can have more than one line line item so you will have multiple lines for same Vendor/ Document . If you want to display first line item only then use EXIT statement.

Cheers.

Message was edited by: Sanjay Sinha

Message was edited by: Sanjay Sinha

0 Kudos

That is the problem sanjay....

I did not find any entries in BSIK in our database.But if i go to logical database of KDF and make entries, iam getting the data.

I did not understand why it is happening.Iam not able to understand SAP programs(KDF)...

I have created the program with BSAK & BSEG for the same output..but performance is very slow....

REPORT Z1F_RFKEPL00 no standard page heading

line-size 140

line-count 65

message-id Z1.

TABLES: LFA1,t005t,bsak,bseg,t001,skat.

data: begin of t_bsak occurs 0,

bukrs like bsak-bukrs, "company code

lifnr like bsak-lifnr, "Vendor acc number

augdt like bsak-augdt, "Clearing date

AUGBL like bsak-AUGBL, "Clearing Document

GJAHR like bsak-GJAHR, "year

belnr like bsak-belnr, "Document number

BUZEI like bsak-BUZEI, "Line Item

budat like bsak-budat, "Posting Date in the Document

bldat like bsak-bldat, "Document date in document

blart like bsak-blart, "Document type

BSCHL like bsak-BSCHL, "Posting key

WAERS like bsak-WAERS, "Currency key

CPUDT like bsak-cpudt, "Accounting Document Entry Date

SHKZG like bsak-shkzg, "Debit/Credit Indicator

DMBTR like bsak-dmbtr, "Amount in local currency

WRBTR like bsak-wrbtr, "Amount in document currency

SGTXT like bsak-sgtxt, "Item Text

SAKNR LIKE bsak-saknr, "G/L Account Number

hkont like bsak-hkont, "General Ledger Account

SKFBT LIKE BSAK-SKFBT, "Amount Eligible for Cash Discount

KOSTL LIKE BSEG-KOSTL, "Cost center

ktopl like t001-ktopl, "chart of accounts

txt20 like skat-txt20, "Short test for the GL acc

name1 like lfa1-name1,

land1 like lfa1-land1,

landx like t005t-landx,

end of t_bsak.

data: begin of t_header occurs 0,

bukrs like bsak-bukrs,

hkont like bsak-hkont,

lifnr like bsak-lifnr,

land1 like lfa1-land1,

name1 like lfa1-name1,

landx like t005t-landx,

end of t_header.

data: begin of t_lfa1 occurs 0,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

landx like t005t-landx,

end of t_lfa1.

data: t_bseg like t_bsak occurs 0 with header line.

data: t_data like t_bsak occurs 0 with header line.

selection-screen begin of block blk1 with frame title text-001.

select-options: s_lifnr for bsak-lifnr,

s_bukrs for bsak-bukrs.

selection-screen end of block blk1.

selection-screen begin of block blk2 with frame title text-002.

parameters s_budat like bsik-budat default sy-datum.

select-options: s_augdt for bsak-augdt.

selection-screen end of block blk2.

selection-screen begin of block blk3 with frame title text-003.

parameters: stand as checkbox default 'X',

park as checkbox.

selection-screen end of block blk3.

start-of-selection.

perform process_data.

top-of-page.

perform set_page_header.

&----


*& Form process_data

&----


  • text

----


form process_data.

data: line like t_bsak occurs 0 with header line.

data: l_wrbtr(10) type c.

data: l_debit type bsak-wrbtr,l_credit type bsak-wrbtr,

l_balance type bsak-wrbtr.

data:l_hkont(10) type n.

select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT

CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT

from bsak

into corresponding fields of table t_bsak

where

lifnr in s_lifnr and

BUKRS in s_bukrs and

budat le s_budat and " Open items

augdt in s_augdt order by lifnr.

  • select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUDAT BLDAT CPUDT

  • WAERS BLART SHKZG DMBTR WRBTR SGTXT SKFBT KOSTL BSCHL hkont BUZEI

  • from bsak into corresponding fields of table t_bsak

  • where BUKRS eq '1000' and

  • lifnr = 'AARONWU'.

sort t_bsak by BUDAT.

CHECK NOT t_bsak[] IS INITIAL.

select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR

SHKZG DMBTR WRBTR SGTXT SKFBT KOSTL BSCHL hkont BUZEI

into corresponding fields of table t_bseg from bseg

FOR ALL ENTRIES IN t_bsak

where belnr = t_bsak-belnr and

bukrs = t_bsak-bukrs and

gjahr = t_bsak-gjahr.

loop at t_bsak.

  • to get vendor name

select single * from lfa1 where lifnr = t_bsak-lifnr.

move lfa1-lifnr to t_header-lifnr.

move lfa1-name1 to t_header-name1.

move lfa1-land1 to t_header-land1.

move t_bsak-bukrs to t_header-bukrs.

move t_bsak-hkont to t_header-hkont.

if sy-subrc = 0.

append t_header.

clear t_header.

endif.

  • to get vendor country

loop at t_header.

select single * from t005t where land1 = t_header-land1 and

SPRAS = 'E'.

move t005t-landx to t_header-landx.

if sy-subrc = 0.

modify t_header.

clear t_header.

endif.

endloop.

delete adjacent duplicates from t_header.

loop at t_bseg where belnr = t_bsak-belnr.

l_hkont = t_bseg-hkont.

*To get chart of accounts

select single * from t001 where bukrs = t_bseg-bukrs.

move t001-ktopl to t_bseg-ktopl.

*To get short text for the chart of accounts

select single * from skat where ktopl = t_bseg-ktopl and

saknr = l_hkont and

spras = 'E'.

t_data-bukrs = t_bsak-bukrs.

t_data-lifnr = t_bsak-lifnr.

t_data-augdt = t_bseg-augdt.

t_data-AUGBL = t_bseg-AUGBL.

t_data-GJAHR = t_bseg-GJAHR.

t_data-belnr = t_bsak-belnr.

t_data-BUZEI = t_bseg-BUZEI.

t_data-budat = t_bsak-budat.

t_data-bldat = t_bsak-bldat.

t_data-blart = t_bsak-blart.

t_data-BSCHL = t_bseg-BSCHL.

t_data-WAERS = t_bseg-WAERS.

t_data-CPUDT = t_bsak-cpudt.

t_data-SHKZG = t_bseg-shkzg.

t_data-DMBTR = t_bseg-dmbtr.

t_data-WRBTR = t_bseg-wrbtr.

t_data-SGTXT = t_bsak-sgtxt.

t_data-SAKNR = t_bseg-saknr.

t_data-hkont = t_bseg-hkont.

t_data-SKFBT = t_bseg-SKFBT.

t_data-KOSTL = t_bseg-KOSTL.

t_data-ktopl = t_bseg-ktopl.

t_data-txt20 = skat-txt20.

append t_data.

clear t_data.

endloop.

endloop.

*Display----


*to display header

data: l_buzei type bseg-buzei.

loop at t_header.

write:/1(6) t_header-bukrs color 2,

7(8) t_header-hkont color 2,

18(10) t_header-lifnr color 2.

write:/30(10) t_header-name1.

write:/30(10) t_header-landx.

uline.

loop at t_data where lifnr = t_header-lifnr.

l_wrbtr = t_data-wrbtr.

if t_data-wrbtr = t_data-skfbt.

concatenate l_wrbtr '-' into l_wrbtr.

endif.

write:/15(11) t_data-BUDAT no-zero color 7,

26(5) t_data-BLART color 7,

30(12) t_data-belnr color 7,

42(16) t_data-BLDAT color 7,

58(5) t_data-buzei color 7,

63(12) t_data-BSCHL color 7,

75(9) t_data-AUGDT color 7,

84(35) t_data-AUGBL color 7,

119(7) t_data-WAERS color 7,

126(12) l_wrbtr color 7.

write:/55 t_data-sgtxt.

write:/60(10) t_data-kostl,

70(10) t_data-hkont,

80(20) t_data-txt20.

clear l_wrbtr.

endloop.

uline.

write:/1(6) t_data-bukrs color 2,

7(8) t_data-hkont color 2,

18(10) t_data-lifnr color 2.

uline.

*endloop.

  • write:/1(6) t_data-bukrs color 2,

  • 7(8) t_data-hkont color 2,

  • 18(10) t_data-lifnr color 2,

  • 105(5) t_data-waers color 2.

line[] = t_data[].

loop at line where lifnr = t_header-lifnr.

if line-shkzg = 'H'.

l_debit = l_debit + line-wrbtr.

endif.

if line-shkzg = 'S'.

l_credit = l_credit + line-wrbtr.

endif.

endloop.

l_balance = l_debit - l_credit.

write:115(15) l_debit color 3. write:135(1) 'D' color 3.

write:/115(15) l_credit color 3. write:135(1) 'C' color 3.

  • for balnce

write:/90(25) 'Bal.:' color 3.

write:115(15) l_balance color 3.

clear: l_debit,l_credit,l_balance.

uline.

endloop.

endform. "process_data

&----


*& Form set_page_header

&----


  • text

----


FORM set_page_header.

call function 'Z_REPORT_TITLE'

EXPORTING

line_size = sy-linsz

sy_title = 'List of Vendor Line Items'

uline = 'X'

first_page_only = ' '.

write :1(15) 'Allocation' color col_heading,

15(10) 'Pstng' color col_heading,

25(5) 'Do' color col_heading,

30(10) 'Documnet' color col_heading,

40(10) 'Doc' color col_heading,

50(8) 'BusA' color col_heading,

58(5) 'LIm' color col_heading,

63(4) 'PK' color col_heading,

67(4) 'S' color col_heading,

71(4) 'P' color col_heading,

75(7) 'Clrg' color col_heading,

82(10) 'Clearing' color col_heading,

92(20) 'D/c discount Amnt' color col_heading,

112(5) 'Rsn' color col_heading,

117(2) 'G' color col_heading,

119(7) 'Curr-' color col_heading,

126(12) 'Amount in' color col_heading,

138(2) 'T' color col_heading.

write space.

write :1(15) 'number' color col_heading,

15(10) 'date' color col_heading,

25(5) 'ty' color col_heading,

30(10) 'number' color col_heading,

40(18) 'date' color col_heading,

58(5) '' color col_heading,

63(4) '' color col_heading,

67(4) 'I' color col_heading,

71(4) 'K' color col_heading,

75(7) 'date' color col_heading,

82(24) 'doc.no' color col_heading,

105(20) 'in LC' color col_heading,

112(5) 'code' color col_heading,

117(2) 'L' color col_heading,

119(7) 'ency' color col_heading,

126(12) 'doc.curr.' color col_heading,

138(2) 'X' color col_heading.

write space.

uline.

ENDFORM. " set_page_header

0 Kudos

Just remove BUZEI from definition of T_BSAK and also from the select statement. It will return only one line from BSAK .

For performance in where clause of both selects bring BUKRS as first field ( i.e. the order in which it is maintained in databse table ).

Btw I dont see any logical databse ( Get statement used in your code ).

Cheers.

Sanjay

Message was edited by: Sanjay Sinha

0 Kudos

hi sanjay,

Iam developing another program using logical database to improve the performance....if above code performance is good then no need to go for LDB.

cheers

kaki

0 Kudos

Sorry I was editing my earlier message .

For performance in where clause of both selects bring BUKRS as first field ( i.e. the order in which it is maintained in databse table ).

Cheers.

0 Kudos

Hi Kaki,

You have to remember that BSAK is <b>cleared</b> vendor items whereas BSIK is not. So they both does not have the same data. You have to know which ones you want to read.

Next BSAK has an index, apart from the primary key index, the following fields.

LIFNR

BUKRS

AUGDT

AUGBL

GJAHR

BELNR

BUZEI

So have your where clause containing these fields or some of these fields, but in the same order. If you have any other fields that you are selecting on, keep them out the where clause and do a delete later as follows.

DELETE itab WHERE non-indexed field not in value list.

Then when you go to BSEG, use the BELNR, GJAHR and BUZEI. Keep the BUKRS out of it and do the following delete later.

DELETE itab WHERE NOT bukrs IN s_bukrs.

Srinivas

0 Kudos

Hi Srinivas

this is syntax giving error...can u give me right syntax..

DELETE itab WHERE non-indexed field not in value list.

cheers

kaki

0 Kudos

Hi Kaki,

Srinivas gave the concept and not the code.

Change this

<b>select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT

CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT

from bsak

into corresponding fields of table t_bsak

where

lifnr in s_lifnr and

BUKRS in s_bukrs and

budat le s_budat and " Open items

augdt in s_augdt order by lifnr.

<b></b></b>

to

<b>select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR

BLDAT

CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT

from bsak

into corresponding fields of table t_bsak

where

BUKRS in s_bukrs and

lifnr in s_lifnr.

Sort t_BSAK by lifnr.

delete t_bsak where NOT budat IN s_budat.

delete t_bsak where NOT augdt IN s_augdt.</b>

Cheers.

Sanjay

0 Kudos

This is the syntax. What is your exact statement you used?

It should be

DELETE itab WHERE <condition>.

Srinivas

0 Kudos

can u check this one

REPORT Z1F_RFKEPL00 no standard page heading

line-size 140

line-count 65

message-id Z1.

TABLES: LFA1,t005t,bsak,bseg,t001,skat.

data: begin of t_bsak occurs 0,

bukrs like bsak-bukrs, "company code

lifnr like bsak-lifnr, "Vendor acc number

augdt like bsak-augdt, "Clearing date

AUGBL like bsak-AUGBL, "Clearing Document

GJAHR like bsak-GJAHR, "year

belnr like bsak-belnr, "Document number

BUZEI like bsak-BUZEI, "Line Item

budat like bsak-budat, "Posting Date in the Document

bldat like bsak-bldat, "Document date in document

blart like bsak-blart, "Document type

BSCHL like bsak-BSCHL, "Posting key

WAERS like bsak-WAERS, "Currency key

CPUDT like bsak-cpudt, "Accounting Document Entry Date

SHKZG like bsak-shkzg, "Debit/Credit Indicator

DMBTR like bsak-dmbtr, "Amount in local currency

WRBTR like bsak-wrbtr, "Amount in document currency

SGTXT like bsak-sgtxt, "Item Text

SAKNR LIKE bsak-saknr, "G/L Account Number

hkont like bsak-hkont, "General Ledger Account

SKFBT LIKE BSAK-SKFBT, "Amount Eligible for Cash Discount

KOSTL LIKE BSEG-KOSTL, "Cost center

ktopl like t001-ktopl, "chart of accounts

txt20 like skat-txt20, "Short test for the GL acc

name1 like lfa1-name1,

land1 like lfa1-land1,

landx like t005t-landx,

end of t_bsak.

data: begin of t_header occurs 0,

bukrs like bsak-bukrs,

hkont like bsak-hkont,

lifnr like bsak-lifnr,

land1 like lfa1-land1,

name1 like lfa1-name1,

landx like t005t-landx,

end of t_header.

data: begin of t_lfa1 occurs 0,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

landx like t005t-landx,

end of t_lfa1.

data: t_bseg like t_bsak occurs 0 with header line.

data: t_data like t_bsak occurs 0 with header line.

selection-screen begin of block blk1 with frame title text-001.

select-options: s_lifnr for bsak-lifnr,

s_bukrs for bsak-bukrs.

selection-screen end of block blk1.

selection-screen begin of block blk2 with frame title text-002.

parameters s_budat like bsak-budat default sy-datum.

select-options: s_augdt for bsak-augdt.

selection-screen end of block blk2.

selection-screen begin of block blk3 with frame title text-003.

parameters: stand as checkbox default 'X',

park as checkbox.

selection-screen end of block blk3.

start-of-selection.

perform process_data.

top-of-page.

perform set_page_header.

&----


*& Form process_data

&----


  • text

----


form process_data.

data: line like t_bsak occurs 0 with header line.

data: l_wrbtr(10) type c.

data: l_debit type bsak-wrbtr,l_credit type bsak-wrbtr,

l_balance type bsak-wrbtr.

data:l_hkont(10) type n.

select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT

CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT

from bsak

into corresponding fields of table t_bsak

where

lifnr in s_lifnr and

BUKRS in s_bukrs and

budat le s_budat and " Open items

augdt in s_augdt.

*DELETE t_bsak WHERE non-indexed field not in value list.

  • for parked items

if park = 'X'.

select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT

CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT

from bsak

into corresponding fields of table t_bsak

where

lifnr in s_lifnr and

BUKRS in s_bukrs and

budat le s_budat and " Open items

augdt in s_augdt and

bstat = 'V'.

endif.

sort t_bsak by BUDAT.

CHECK NOT t_bsak[] IS INITIAL.

select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR

SHKZG DMBTR WRBTR SGTXT SKFBT KOSTL BSCHL hkont BUZEI

into corresponding fields of table t_bseg from bseg

FOR ALL ENTRIES IN t_bsak

where belnr = t_bsak-belnr and

gjahr = t_bsak-gjahr and

bukrs = t_bsak-bukrs.

  • to get vendor name

loop at t_bsak.

select single * from lfa1 where lifnr = t_bsak-lifnr.

move lfa1-lifnr to t_header-lifnr.

move lfa1-name1 to t_header-name1.

move lfa1-land1 to t_header-land1.

move t_bsak-bukrs to t_header-bukrs.

move t_bsak-hkont to t_header-hkont.

if sy-subrc = 0.

append t_header.

clear t_header.

endif.

endloop.

  • to get vendor country

loop at t_header.

select single * from t005t where land1 = t_header-land1 and

SPRAS = 'E'.

move t005t-landx to t_header-landx.

if sy-subrc = 0.

modify t_header.

clear t_header.

endif.

endloop.

sort t_header by bukrs.

delete adjacent duplicates from t_header.

loop at t_bsak.

loop at t_bseg where belnr = t_bsak-belnr.

l_hkont = t_bseg-hkont.

t_data-bukrs = t_bsak-bukrs.

t_data-lifnr = t_bsak-lifnr.

t_data-augdt = t_bseg-augdt.

t_data-AUGBL = t_bseg-AUGBL.

t_data-GJAHR = t_bseg-GJAHR.

t_data-belnr = t_bsak-belnr.

t_data-BUZEI = t_bseg-BUZEI.

t_data-budat = t_bsak-budat.

t_data-bldat = t_bsak-bldat.

t_data-blart = t_bsak-blart.

t_data-BSCHL = t_bseg-BSCHL.

t_data-WAERS = t_bseg-WAERS.

t_data-CPUDT = t_bsak-cpudt.

t_data-SHKZG = t_bseg-shkzg.

t_data-DMBTR = t_bseg-dmbtr.

t_data-WRBTR = t_bseg-wrbtr.

t_data-SGTXT = t_bsak-sgtxt.

t_data-SAKNR = t_bseg-saknr.

t_data-hkont = t_bseg-hkont.

t_data-SKFBT = t_bseg-SKFBT.

t_data-KOSTL = t_bseg-KOSTL.

t_data-ktopl = t_bseg-ktopl.

t_data-txt20 = skat-txt20.

append t_data.

clear t_data.

endloop.

endloop.

sort t_data by budat.

*To get Chart of accounts

loop at t_data.

select single * from t001 where bukrs = t_data-bukrs.

move t001-ktopl to t_data-ktopl.

if sy-subrc = 0.

modify t_data.

clear t_data.

endif.

endloop.

*To get short text for the chart of accounts

loop at t_data.

l_hkont = t_data-hkont.

select single * from skat where ktopl = t_data-ktopl and

saknr = l_hkont and

spras = 'E'.

t_data-txt20 = skat-txt20.

if sy-subrc = 0.

modify t_data.

clear t_data.

endif.

endloop.

*Display----


*to display header

  • data: l_buzei type bseg-buzei.

loop at t_header.

write:/1(6) t_header-bukrs color 2,

7(8) t_header-hkont color 2,

18(10) t_header-lifnr color 2.

write:/30(10) t_header-name1.

write:/30(10) t_header-landx.

uline.

loop at t_data where lifnr = t_header-lifnr.

l_wrbtr = t_data-wrbtr.

if t_data-wrbtr = t_data-skfbt.

concatenate l_wrbtr '-' into l_wrbtr.

endif.

write:/15(11) t_data-BUDAT no-zero color 7,

26(5) t_data-BLART color 7,

30(12) t_data-belnr color 7,

42(16) t_data-BLDAT color 7,

58(5) t_data-buzei color 7,

63(12) t_data-BSCHL color 7,

75(9) t_data-AUGDT color 7,

84(35) t_data-AUGBL color 7,

119(7) t_data-WAERS color 7,

126(12) l_wrbtr color 7.

write:/55 t_data-sgtxt.

write:/60(10) t_data-kostl,

70(10) t_data-hkont,

80(20) t_data-txt20.

clear l_wrbtr.

endloop.

uline.

write:/1(6) t_data-bukrs color 2,

7(8) t_data-hkont color 2,

18(10) t_data-lifnr color 2.

uline.

write:/1(6) t_data-bukrs color 2,

7(8) t_data-hkont color 2,

18(10) t_data-lifnr color 2,

105(5) t_data-waers color 2.

*for totals

line[] = t_data[].

loop at line where lifnr = t_header-lifnr.

if line-shkzg = 'H'.

l_debit = l_debit + line-wrbtr.

endif.

if line-shkzg = 'S'.

l_credit = l_credit + line-wrbtr.

endif.

endloop.

l_balance = l_debit - l_credit.

write:115(15) l_debit color 3. write:135(1) 'D' color 3.

write:/115(15) l_credit color 3. write:135(1) 'C' color 3.

*for balnce

write:/90(25) 'Bal.:' color 3.

write:115(15) l_balance color 3.

clear: l_debit,l_credit,l_balance.

uline.

endloop.

endform. "process_data

&----


*& Form set_page_header

&----


  • text

----


FORM set_page_header.

  • call function 'Z_REPORT_TITLE'

  • EXPORTING

  • line_size = sy-linsz

  • sy_title = 'List of Vendor Line Items'

  • uline = 'X'

  • first_page_only = ' '.

write :1(15) 'Allocation' color col_heading,

15(10) 'Pstng' color col_heading,

25(5) 'Do' color col_heading,

30(10) 'Documnet' color col_heading,

40(10) 'Doc' color col_heading,

50(8) 'BusA' color col_heading,

58(5) 'LIm' color col_heading,

63(4) 'PK' color col_heading,

67(4) 'S' color col_heading,

71(4) 'P' color col_heading,

75(7) 'Clrg' color col_heading,

82(10) 'Clearing' color col_heading,

92(20) 'D/c discount Amnt' color col_heading,

112(5) 'Rsn' color col_heading,

117(2) 'G' color col_heading,

119(7) 'Curr-' color col_heading,

126(12) 'Amount in' color col_heading,

138(2) 'T' color col_heading.

write space.

write :1(15) 'number' color col_heading,

15(10) 'date' color col_heading,

25(5) 'ty' color col_heading,

30(10) 'number' color col_heading,

40(18) 'date' color col_heading,

58(5) '' color col_heading,

63(4) '' color col_heading,

67(4) 'I' color col_heading,

71(4) 'K' color col_heading,

75(7) 'date' color col_heading,

82(24) 'doc.no' color col_heading,

105(20) 'in LC' color col_heading,

112(5) 'code' color col_heading,

117(2) 'L' color col_heading,

119(7) 'ency' color col_heading,

126(12) 'doc.curr.' color col_heading,

138(2) 'X' color col_heading.

write space.

uline.

ENDFORM. " set_page_header

0 Kudos

The code seems to be syntax error free and also is working. What exactly is your problem ???

Cheers.

Sanjay

0 Kudos

Hi Sanjay...

This code is working fine.My worry is about performance.

If i give vendor FROM A TO Z.. it is taking lot of time.

Or if i give only comp code also it is taking time...

Is there any way to improve the speed...!!!

Or is there any way to do this code with Logcial database...

cheers

kaki

Former Member
0 Kudos

Kaki - rather than using transaction S_ALR_87012103 as you model, why not use FBL1N? I think it has all the fields that you want and it is a SAP standard program.

Rob