on 12-23-2009 4:12 AM
I am passing the header and item data in two internal tables to the smartfrom interface under tables option, now i am not able to handle the header and as well as item data in the smartform, when ever i am trying to run the smartform it is displaying only one page output, even when i am having 3 hearder records in the internal table ( i need 3 pages to be printed) and also when there are more items for a particular header data then the content should be flowed to the next page, which now i am not able to control in the smartform. can any body tell me what exactly i need to follow to get a proper output
thanks in advance
copy the same page again to a new page..
and make page 2 as next page of page 1... and page2 as next page of page 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the helpful replies
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you checked whether the next page option in the general attributes tab of the first page is defined properly(Is set to trigger the next page) ?
Regards,
Swarna Munukoti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No i am not doing any loop on the on the internal table... the scenario is like this
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
From your explanations, the picture that I gathered is that you are populating the item level internal table inside the table of main window.
And also you are looping that table node according to the item internal table which is being prepared inside the table.
I suggest you to populate the internal table in the Initialization tab of the smartform if you are using a local internal table that is being declared and populated inside the smartform.
If your internal table is from the print program then prepare the item level internal table before calling the FM for the smartform.
On What conditions you are having a dynamic page break ??
That is on what conditions the Conditions tab will be triggered ???
I think the page break may also creating a problem...
If this doesn't solve the problem then sendl me your smarform XML and i will try to have a look in my system.
Regards
Abhinab Mishra
Hi Abaper,
I think the problem is with the loop that you coded.
Check this one:
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_hdr-belnr "wa_item-belnr. change the where condition of loop
move wa_item to wa_item1.
append wa_item1 to i_item1.
clear wa_item1.
endloop.
endif.
Now try.
Also you gave condition h_idx is LE h_lines: That means teh code inside the if conition will execute only once irrespective of teh number of header records in i_hdr.
I guess your intention is to get all items for all header items.
if so use do enddo.
describe table i_hdr line h_lines.
do h_lines times.
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 "wa_item-belnr. change the where condition of loop
move wa_item to wa_item1.
append wa_item1 to i_item1. " Now i_item1 contains all the lien iems of all header records
clear wa_item1.
endloop.
enddo.
Regards,
Swarna Munukoti.
Edited by: Swarna Munukoti on Dec 23, 2009 8:16 AM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.