on 03-21-2012 3:48 PM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.