cancel
Showing results for 
Search instead for 
Did you mean: 

how do i print a single purchase requisition per page?

Former Member
0 Kudos

In the Smart Forms driver program in select-options, I can select a range of purchase requisition numbers. Now where in the smartform do I write a loop condition so that I can print a single purchase requisition per page?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sagar,

To printing each Purchase requisition in seperate page,

1) First Create a LOOP. You can also use TABLES, i have done the explanation with LOOP.

2) In the Loop, specify the Internal Table say suppose IT_PURORD and work area say suppose WA_PURORD in the Data Tab.

3) Then create a Text Element and COMMAND inside the loop. See to that COMMAND is after Text Element.

4) In the Text Element, give which ever u want to print in the page.

5) In the COMMAND, in the General Attributes give next page as same page itself.

6) The underlying concept is For each loop all the details regarding the purchase requisition will be printed through text element and next page will be called through COMMAND stmt. For the next Loop, info gets printed in next page.

Reward Points if useful.

Thanks,

karthik

Former Member
0 Kudos

Hi,

Get the purchase requisition in a internal table and sort the same based on the purchase requisition numbers, now, loop the internal table, and write an At new statement in the loop and call the function for the smartform.

PS: Please do make a note that this requirement is only valid if the one purchase requisition data does not exceed a single page.

Pseudo code:

*get the all the purchase requisitions in the internal table

*now loop the header for all the purchase requisitions.

loop at t_purchase_requisition.

at new purchase_requisition.

call function "smartform"

endat.

endloop.