Skip to Content

problem in sap script

Hi All,

I am working on check printing. I am working on RFFOUS_C and my form name is F110_PRENUM_CHECK.

I copied the both to Z programs.

My requirement is to print the line items twice. LIke below

Line Item1

Line Item2

Line Item3

Line Item4

-


Gap

-


Gap

-


Gap

-


Gap

Line Item1

Line Item2

Line Item3

Line Item4

Items logic is there in main window.

I am able to print the line items only once.

Wht I have to do now to print the items second time?.

Please help me....

Regards,

vinod.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 20, 2008 at 03:27 PM

    Hi,

    Call the Line items twice in the Driver program, you have WRITE_FORM function module in the driver program which will call the data in the Layout, call the Elements(which are in the Layout) in the Driver program twice

    Regards

    Sudheer

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2008 at 03:59 PM

    Hi Vinod,

    Since it has to be printed like

    Line Item1

    Line Item2

    Line Item3

    Line Item4

    -


    Gap

    -


    Gap

    -


    Gap

    -


    Gap

    Line Item1

    Line Item2

    Line Item3

    Line Item4

    Use the code as shown below:

    In the SE38 Driver Program:

    Loop at it_items into wa_items.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    element = OPER1

    window = MAIN

    Endloop.

    Loop at it_items into wa_items.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    element = OPER2

    window = MAIN

    Endloop.

    In the SAP SCRIPT:

    Inside main window:

    /E OPER1

    &wa_items-line1&

    &wa_items-line2&

    &wa_items-line3&

    &wa_items-line4&

    *

    *

    *

    *

    /E OPER2

    &wa_items-line1&

    &wa_items-line2&

    &wa_items-line3&

    &wa_items-line4&

    The reason im calling two elements inside the Main window is to bring the space between the two line items.

    please REWARD Points if useful.

    Thanks,

    karthik

    Add comment
    10|10000 characters needed characters exceeded