07-23-2005 3:03 PM
Dear Gurus....
I have a report which is to be integrated with smart form. I want each PO should start from a new page. I have tried putting an alternative and command in main window but it doesnot solve my problem. Please help me out as i need the solution very urgently...
please mail me the solution here or to my mail id ajayjha_1@rediffmail.com.
Thanks in advance.
07-23-2005 4:42 PM
Hi Ajay,
Are you using Table or Loop to display your data?
Page break can be acheived using the 'Command node'. In this you have to select the 'Go to next page' check box and give the next page in the adjusant field.
But this cannot be used inside the Table node. The solution for this could be like;
Hope you are displaying the line items. Then get the unique POs in one internal table. Then use the LOOP node to loop thru these POs. Inside the LOOP, use a TABLE node to loop thru its items. Once the TABLE node is processed (after the table node) call the command option.
Hope this will help you. Should you require more clarifications please let me know.
Thanks
Vinod
07-23-2005 4:42 PM
Hi Ajay,
Are you using Table or Loop to display your data?
Page break can be acheived using the 'Command node'. In this you have to select the 'Go to next page' check box and give the next page in the adjusant field.
But this cannot be used inside the Table node. The solution for this could be like;
Hope you are displaying the line items. Then get the unique POs in one internal table. Then use the LOOP node to loop thru these POs. Inside the LOOP, use a TABLE node to loop thru its items. Once the TABLE node is processed (after the table node) call the command option.
Hope this will help you. Should you require more clarifications please let me know.
Thanks
Vinod
07-26-2005 3:16 PM
hi vinod,
thx for the reply.. i m using table control..i hav tried tht option... i hav crewated a mail loop in tht i put the item loop and at end i hav added the alternative it_ekpo-ebeln <> it_ekko-ebeln and in tht i put the checked the move to next page...
it works well but it displays 1 page extra at the end with no data... i wish to knw how shd i get the correct no of pages..
Ajay
07-26-2005 3:22 PM
Hi ajay,
below links might help you.
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms_detail.htm
http://www.sap-basis-abap.com/sapsf001.htm
regards,
venu.
07-27-2005 9:28 AM
Hi Ajay,
This can be done using a variable. Pls follow these steps.
1. Get the number of distinct POs in a variable, say w_pocnt. (type i).
2. Just before the page break add a program line node and in that write a code to subtract one from this variable. (w_pocnt = w_pocnt - 1).
3. In the condition of the page break give, w_pocnt > 0.
For example if there are 3 PO's. First time when the page break happens the value of w_pocnt become 2 (because of step 2). Second time it will become 1 and third time 0. Becuase we have given a condition (step 3) there that w_pocnt must be greater than zero to execute this node, you will not get an extra page.
Thanks
Vinod