Skip to Content

sapscrits line items

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Feb 21, 2007 at 05:14 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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,

  • avatar image
    Former Member
    Feb 21, 2007 at 05:06 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 22, 2007 at 02:52 PM

    thanx narendran and ravi,

    i solved my problem.

    Add comment
    10|10000 characters needed characters exceeded