Skip to Content
avatar image
Former Member

Looping in 2 internal tables in Smartforms

Hi All,

I have a doubt in Smartforms.

I need to loop into 2 different internal tables in the Smartforms and display the data of both the internal tables in the Main Window of the smartforms.

How can this be acheived?

Any pointers or suggestions would be really helpful.

Thanks,

Saher

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 12, 2008 at 09:37 AM

    Hi,

    You can have internal tables ( header and item details.)

    create loop nodes for both the internal tables

    loop node -- header internal table.

    loop node -- item internal table.

    create your text nodes... to display both the details

    make sure that the second loop is under the first loop. ( drag and drop the second loop over the first loop... u get option to place it after or under the loop )

    regards

    padma

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2008 at 09:38 AM

    Hi,

    Create a structure with both internal table fields.

    Pass both the intenal table values to that table, and display it.

    If possible explin it clearly.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2008 at 10:18 AM

    Hi,

    [Looping 2 internal tables|http://www.sap-img.com/smartforms/internal-table-in-smartform.htm]

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      for example : you have to dispaly header data and item data.

      header data like : 4500001234 text amount quantity.

      item data like : 4500001234 000010 some other fileds

      for this you need to create 2 tables .

      first display the header data then you put contditin in item table ..

      in the item data table : with in DATA tab ebeln = wa_header-itab-ebeln.

      first dispaly the 4500001234 and check the item table with same number(4500001234 ) and display the item data and goes to the nex record 4500005678 and disaply the item data for second record.

      the data will display like :'

      4500001234 text amount quantity.

      4500001234 000010 some other fileds

      4500001234 000020 some other fileds

      4500005678 text amount quantity.

      4500005678 000010 some other fileds

      4500005678 000020 some other fileds