cancel
Showing results for 
Search instead for 
Did you mean: 

sapscrits line items

SantoshKallem
Active Contributor
0 Kudos

i have 2 z*** tables.

1 is header and 1 is item.

header table consists of

VOUCHER NO,

PAID TO,

DATE CREATED,

TOTAL,

VERIFIED BY,

APPROVED BY,

And item table consist of (TABLE CONTROL)

VOUCHER NO,

SERIAL NO,

PARTICULARS,

ACC GROUP,

AMOUNT.

when iam displaying the contents it is showing all the line items under a same voucher(last) number.

how should i handle this one.

should i use control break events, if so where? in the driver prgram or text elements.

post the sample code plzzz.

points will be assured.

regards.

santhosh

Accepted Solutions (0)

Answers (3)

Answers (3)

SantoshKallem
Active Contributor
0 Kudos

thanx narendran and ravi,

i solved my problem.

SantoshKallem
Active Contributor
0 Kudos

Yes i gave voucher number and its details in non main window

and all the line items in main window.

right now i don't have acces to the sap system.

so i have to change the header details to <b>main</b> and line items in <b>main</b> window.

will this solve my prb for sure.

regards

Former Member
0 Kudos

All the line items and the header details should be in the main window.

Header details should have a text element and the line items should have a seperate text element.

In the print program the header write_form with the header text element should be triggered first.

Then then in the loop of line items u can place the write_form of the item text element.

Check in the above manner and let me know if u face any problem.

Regards,

Former Member
0 Kudos

Hi,

If you want to display the Voucher no and its details..Display the voucher number in the main window..

I believe you would have to given the header voucher number in a non main window..And then you have called within a loop..

To make it work..

In the main window...Have a text element for the header voucher number..

Have another text element for line item details..

Ex.

LOOP AT T_HEADER.

  • Print the header..

CALL FUNCTION 'WRITE_FORM'

WINDOW = 'MAIN'

ELEMENT = 'HEADER'.

LOOP AT T_ITEMS WHERE VOUCHER_NO = T_HEADER-VOUCHER_NO.

  • Print the item details.

CALL FUNCTION 'WRITE_FORM'

WINDOW = 'MAIN'

ELEMENT = 'ITEM'.

ENDLOOP.

ENDLOOP.

Hope this is what you want..

Thanks

Naren