on 08-13-2008 11:04 PM
Hello Gurus,
I have a sapscript for Pick For delivery (Transfer Order pick List) once the transfer order created from the delivery is confirmed.
In the current form, material number is being printed on the form from the transfer order table LTAP.
Now the change need to be made is to print the delivery item number (before the material number like delivery_item_number space material_number) of the corresponding material number. I need to write a logic in order to extract the delivery item position number. do you have any idea how I can do that.
Please help me out.
the sapscript is closest to sap form LVSTALISTE.
Regards,
B
Edited by: Balu on Aug 13, 2008 6:26 PM
Create a sub-routine pool extract the required information in sub-routine poll and concatinate the values and pass back to the form.
Go through this example
Ex.
/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>
/:USING &<field name>&
/:CHANGING &<field name1&
/:ENDPERFORM
Then create subroutine pool program and you have to write the code.
FORM ><subroutine name> tables int_cond structure itcsy
outt_cond structure itcsy.
data : value(20), value1(20). "do your own declarations
Read int_cond table index 1.
value = int_cond-value.
value1 = value1 + value.
Read outt_cond table index 1.
outt_cond-value = value1.
Modify outt_cond index 1.
ENDFORM.
Just rough idea given above.
Rgds,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai Ram,
Thanks for your reply. Can you explain me in little more detail.
There is already a smartform for the confirmed transfer order. The smart form gives the list of material name, transfer order item number and other details. I need to do 2 tasks for this -
One is to add the delivery_position_number (LIPS-POSNR) field before the material number (LTAP-MATNR). The material number is extracted from the transfer order table.
The driver program for the sapscript is SAPLLTOP. I found this from table TTXFP giving the sapscript form name as input.
Please let me know in more detailed way, how I can do this.
Regards,
B
In SAPScript look for ELEMENT where u wanted to add the field LIPS-POSNR.
Just look in SAPScript debugger wether the field is declared in SAPScript or Print program, u can do it by giving the field value in debugger of SAPScript. If not there just define using DEFINE statement.
Then u write a Perform statement s below
/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>
/:USING <AP-MATNR&
/:CHANGING &LIPS-POSNR&
/:ENDPERFORM
Create a subroutine program with the name given in Perform statement.
Subroutine program
FORM CALC_NETPRICE TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
Data : w_matnr type LTAP-MATNR,
w_posnr type LIPS-POSNR.
READ TABLE in_tab INDEX 1.
w_matnr = in_tab-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_matnr
IMPORTING
OUTPUT = w_matnr.
SELECT SINGLE POSNR FROM LIPS INTO W_POSNR WHERE MATNR EQ W_MATNR.
READ TABLE out_tab INDEX 1.
MOVE W_POSNR TO out_tab-value.
MODIFY out_tab INDEX sy-tabix.
ENDFORM. "CALC_NETPRICE
-
Now add the Field &LIPS-POSNR& where u required.
Just make sure that the PERFORM statement is before the fields output. i.e, &LIPS-POSNR& ,, <AP-MATNR&
Regards
Krishna
If my understanding is correct, you have a smartform and you are using driver program of SAPscript and calling smartform. Now you want to add additional field in your smartform.
If that is the case, ita can be done in two ways.. Either you can modify your driver program, extract the new field in your driver program and pass it to the smartform for display.
Other and easy way, create command lines in your smartform and extract the new field information and display it in your smartform.
Close thread once your question is answered.
Regards,
SaiRam
Hi Krishna,
Thanks for ur reply. But where should I create the subroutine program. do I need to create it separately. Because the print program being used for this script form is an SAP program. let me know where I should create the subroutine, either in the script itself or separately.
Assigned points.
Regards,
B
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.