Skip to Content
author's profile photo Former Member
Former Member

Table within a table in smartforms

Hi everyone-

Sorry for creating the question in ABAP development forum and not in the one for smartforms but I couldnt find one for scripts and smartforms.

Coming to the question, I have a requirement wherein I need to print line item data(EKPO) and below each line item scheduled delivery data(EKET) via a smartform. I can loop at ekpo into an internal table and use that table in a smartform and print it out but what about scheduled delivery data. Is it possible to declare a table inside another table?

To make it a little bit clear this is how it should eventually look

Line Item | Material | Material Desc | Qty | UOM | Unit Cost

0010 | 123 | Box Spring | 5 | EA | 450

Scheduled Delivery | Qty | Components | Unit Cost | Delivery Date

| 2 | Box Spring | 450 | 8/1/2012

| 3 | Box Spring | 450 | 10/1/2012

Line Item | Material | Material Desc | Qty | UOM | Unit Cost

0020 | 125 | Box | 3 | EA | 150

Scheduled Delivery | Qty | Components | Unit Cost | Delivery Date

| 3 | Box | 450 | 8/1/2012

Thanks,

Aneesh.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 21, 2012 at 03:55 PM

    Try the output management space

    http://scn.sap.com/community/output-management

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 21, 2012 at 04:08 PM

    try this approach,

    DATA:

    lw_print TYPE ssfctrlop. " Smart Forms: Control structure

    loop at ekpo into an internal table

    lw_print-no_close = 'X'.

    AT LAST.

    lw_print-no_close = ' '.

    ENDAT.

    Call Smartform FM,

    ( in smartform use table for scheduled delivery data )

    lw_print-no_open = 'X'.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 21, 2012 at 05:41 PM

    Try to manage this situation in the program, you can create an output table with generic fields type char and append it as you want to show including the headers. In the smartforms you'll just need to loop the output table and print the values managing the page breaks.

    Regards,
    Felipe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2012 at 10:44 AM

    Hi,

    you can create a node Table inside the smartform and set EKPO in DATA (you mark the Internal Table flag and put EKPO INTO WA_EKPO). Then you create a row with your EKPO header and one with EKPO data.

    Inside the table you create a node LOOP and set the EKET table as the Internal Table. In the WHERE Condition of the LOOP put

    EBELN = WA_EKPO-EBELN

    EBELP = WA_EKPO-EBELP

    You can sort by ETENR if you need.

    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.