Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

issue with page-break in smartforms

Former Member
0 Likes
950

i m displaying output using select-option for purchase number.when i put value we display header and items. means for each purchase number i have to display header and item on seperate page means if i put po number 4151503425 then only for that we display header and item and on next page next po number will come and so on. i use command for header and it sucessfully

executed.but problem with item i cant break a page for item what should i do?

i m displaying output using select-option for purchase number.when i put value we display header and items. means for each purchase number i have to display header and item on seperate page means if i put po number 4151503425 then only for that we display header and item and on next page next po number will come and so on. i use command for header and it sucessfully

executed.but problem with item i cant break a page for item what should i do?

6 REPLIES 6
Read only

Former Member
0 Likes
836

Hi,

If its a custom program and the smartform, you can add another column to the internal tables meant for passing header data and

the item of type char1(flag). In the program logic, you would be looping through these internal tables. Inside that loop using at new

ebeln and at new ebelp, mark the flag as 'X' for all the new PO Numbers and the first line Item of the PO. Use this column as the

page break condition for the command in the smartform. But make sure, once you pass mark the flag 'X', the internal table does not

get sorted or the sequence of the records is not changed in any case.

Alternatively, you can also use a variable in the smartform to store the previous PO Number and compare the curent PO Number

of the loop to check if its new and then trigger a page break. But not sure if this woul actually wrk in all the scenarios and

conditions.

Regards,

Sagar

Read only

0 Likes
836

hi sir,

sorry sir i tried but it is not sucessfully executed .i got output which i want but now error is it display last item details on all pages.i check all condition can u tell me in command node which condition satisfy in smartforms.

Read only

0 Likes
836

Hi,

By last item, do you mean last item of the last PO or anything else. Check your internal table in the debug mode, if all the new PO's

and all the first line items of the respective PO's have been flagged to 'X'.

Also could you please explain me what is happening now. I was not able to understand it correctly.

Regards,

Sagar

Read only

0 Likes
836

hi,

actually what happened last po no's item is dispaly on all pages.i check out in debugging mode it is working properly.can u tell me in smartform which condition i put that satisfy.i put ebeln of item eq to ebeln of header.

Read only

0 Likes
836

Hi,

What approach are you using. Is it the flag one which I told you or anything else? If I am not mistaken, you are checking EBELN of

the header with the EBELN in the item table. I think even this should work, if there is no problem in implementing the logic. Try tpo

debug the smartform and check if is fine. Else try and work it out with the flag thing.

Regards,

Sagar

Read only

0 Likes
836

hi,

i m not using internal table.i take database views for header and item. in driver program i use two seperate select query. and passing this table into function module.i m nt using any flag as u told me.conditoin is right which i have taken.problem is that if i put endselect of header at end it show me all the item that i dont want.and if not put then it dispaly last po no's item for each header on all pages.how to page break for item.aur any another way?