‎2007 Oct 22 3:12 PM
Hi all
i am collecting all the data into an internal table in the print program of the Script, now i want to pass that internal table under the text element DELPOS. so my internal table contain item data, so i want every item to be printed on the form
‎2007 Oct 22 3:17 PM
Hi,
You need call the element in your main window of the script.
/E DELPOS
Under this thing you need to specify the internal table fields like
&itab-matnr& &itab-erdat&, whatever fields you have.
So that all the items line sof your internela table will be displayes in your form.
‎2007 Oct 22 3:17 PM
Hi,
You need call the element in your main window of the script.
/E DELPOS
Under this thing you need to specify the internal table fields like
&itab-matnr& &itab-erdat&, whatever fields you have.
So that all the items line sof your internela table will be displayes in your form.
‎2007 Oct 22 3:18 PM
can i use write_form in the loop of the print program, as i want it for every item Number of that particular delivery number.
‎2007 Oct 22 3:19 PM
Yes, you can.
LOOP AT ITAB.
CALL FUNCTION WRITE_FORM.
ENDLOOP.
ashish
‎2007 Oct 22 3:22 PM
my previous FORM editor contains like this
LI &VBPLP-POSNR(I6)&,,&MATERIAL&,,&BOXES&,,&VBPLP-VEMNG(11.0)&
= &VBPLP-VEMEH&,,&ITEM_WEIGHT& &GROSS_WEIGHT_UNIT&
can i replace them with the data from the internal table..wont there be any problem.
‎2007 Oct 22 3:28 PM
It depends upon your requirement. Looks like this layout is related to Delivery.
Currently it is printing Item data such as Item no, Material, No of Box, Quantity, unit etc.
If you want to comment existing lines and call your internal table, you can do that or you can create a new text element and call the same in your program. Just make sure that why code mentioned is not going to work for you and if you comment that, it should not create any problem to any data printing in layout.
ashish
‎2007 Oct 22 3:29 PM
Hi,
You can comment it out and place your code instead of replacing....
for commenting use syntax /*
‎2007 Oct 22 3:34 PM
If i create a new text element will that not affect the other data which i want to display. i mean if the print program uses other form also.
and also i want to know one thing if i created that a element that will be specific to the form itself ?.
‎2007 Oct 22 3:37 PM
You need to make sure that the associated print program is only used to print this layout. If this print program is used to print multiple layouts, then you need to add condition something like IF FORM_NAME = "ZXXX" then call this text element.
If you create a text element, that will be specific to this form only, as you will be creating it in that form.
Hope this helps.
ashish
‎2007 Oct 22 3:40 PM
Hi,
As you will be calling the specific form only which you want, as you will be passing in the OPEN_FORM function module, it will not effect the other form.
You will not have any issues with data, as data is in main window. If it exceeds it will overflow to next page.
‎2007 Oct 22 3:18 PM
Check if this helps.
Create an element in SAP Script window which will print internal table data.
In your print program, LOOP at your internal table and inside loop call WRITE_FORM function module to print the text element.
In this way you can print all records of internal table to a form.
ashish