‎2005 Mar 21 6:47 AM
I am making payment advice layout which is called from the transaction f-58. I do not need to change the standard program, since all information is available in the standard layout, but I need to display line items in the new layout I am preparing!
So to display line items, I have copied the layout and used perform statement and called another se38 prog to retrieve line items.
The following is written in se71-
*********************************************************************
PERFORM FORM_GET_DATA IN PROGRAM ZFR005_PAYMENT_ADVICE
USING &VV_VBLNR& (this is my header data)
CHANGING &V_XBLNR1&
CHANGING &V_BLDAT1&
CHANGING &V_BELNR1&
This works fine if I just have to retrieve one line item , but to get multiple , I need to declare multiple changing parameter and print it, because perform is called only once.
*********************************************************************
PERFORM FORM_GET_DATA IN PROGRAM ZFR005_PAYMENT_ADVICE
USING &VV_VBLNR& (this is my header data)
CHANGING &V_XBLNR1&
CHANGING &V_BLDAT1&
CHANGING &V_BELNR1&
CHANGING &V_XBLNR2&
CHANGING &V_BLDAT2&
CHANGING &V_BELNR2&
.................3
.................4
How do I call this perform multiple times so that I do not have to create multiple changing parameters to retrieve line items?
‎2005 Mar 21 10:55 AM
Hi,
In the SAPSCRIPT , we can write abap code if the tag column has '/:' command line....
So, any looping operation can be done to retrieve the data.
Pass the item no. also (in the 'USING' part), for which the details are required.
Hope this helps.
Regards,
Renjith
‎2005 Mar 21 12:05 PM
Hi
You can try to find an Element (probably in MAIN window), which is being called from within the loop through the items in your print program. Once you have found it place your PERFORM into that Element of your sapscript and add line number as a parameter.
I believe that if your PERFORM is called only once then you placed it when the document header is being processed (and not items).
Thanks,
Wojtek