cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Script Transfer Order Change

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196280
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member585060
Active Contributor
0 Kudos

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 &LTAP-MATNR&

/:CHANGING &LIPS-POSNR&

/:ENDPERFORM

Create a subroutine program with the name given in Perform statement.

former_member585060
Active Contributor
0 Kudos

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& ,, &LTAP-MATNR&

Regards

Krishna

former_member196280
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Sai ram,

I dont have a smartform, I have a sapscript form and sap driver program for it.

sapscript is Z_TO_PICK_DEL and driver program is SAPLLTOP.

I got this from TTXFP table by giving the sapscript name.

Regards,

B

Former Member
0 Kudos

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

former_member585060
Active Contributor
0 Kudos

Yes u have to create a seperate program of Subroutine type, and u have to specify that program in the PERFORM statement of the SAPscript.