Skip to Content

SAP Scripts

I need to loop through 2 itabs in the main window.

I'm using 2 write_forms. But the contents of the 2nd itab is output below the 1st. Is there any method to make the contents of the 2nd itab to come next to the 1st entry of the first itab?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 09:01 AM

    hi,

    loop at itab1

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'P1'

    WINDOW = 'MAIN'

    loop at itab2

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'P2'

    WINDOW = 'MAIN'

    endloop

    endloop

    is it helpful

    cheers,

    sasi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 09:43 AM

    SAP has provided since long the Smart Forms Tool. In most cases this can replace SAP Script requirements. Smart Forms provide loser integration between your extraction/processing logic and display logic. You can pass complete internal tables to the Smart Form and then display them as you like. It provides far greater control on formatting and positioning. One of the greatest advantage over SAP Script is the provision of a grid like table layout, and cells that can wrap data.

    I will very strongly recommend that you move on to Smart Forms.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 10:06 AM

    Hi

    I think the best solution would be to create a 3rd Internal Table. Let th first loop the first few columns of the internal table and the second loop fill the other remaining columns of the Internal table. Finally u can display the Internal table in just one Main Window.

    Murli

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.