on 12-29-2009 6:23 AM
i have a header table with 3 records and item with 10 records.. i am passing both of them to the function module ( fm_name) and then in the smartform i have to get 3 pages output. but right now i am getting only one page..
to display the header data i am using secondary windows and for displaying the item data i am using tables node in the main window ( in the data tab of the tables node i am giving it as loop it_item1 into wa_item1 ). before the header row of that table node i have created a table node and in that i am prearing the item table it_item..as
describe table i_hdr line h_lines.
if h_idx LE h_lines.
READ TABLE i_hdr into wa_hdr index h_idx.
if sy-subrc eq o.
loop at it_item into wa_item where belnr = wa_item-belnr.
move wa_item to wa_item1.
append wa_item1 to i_item1.
clear wa_item1.
endloop.
endif.
this is what i am doing it right now.. and at the last row in the footer of table node i have created a command node and in that i have selected the option go to page : first page.
please correct me if my approach is wrong
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Dec 29, 2009 12:03 PM
Hi,
You try ur logic in
do ---endo.
after describing the table .
Do the loop for the number of records available.
i.e. as per your logic.
describe table i_hdr line h_lines.
do h_lines times.
------
-----
put your above code and enddo.
Hope this will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the footer section of the line item table you just need to put the command line for go to new page and that to pointing on next page. I guess that will be enough to break the page for next header data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't get clear idea about what u did in the code but we can get item data in smartform.
I think what u did is correct. i.e
READ TABLE i_hdr INTO wa_hdr INDEX h_idx.
IF sy-subrc EQ o.
LOOP AT it_item INTO wa_item WHERE belnr = wa_hdr-belnr
MOVE wa_item TO wa_item1.
APPEND wa_item1 TO i_item1.
CLEAR wa_item1.
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 |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.