cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching value in SAP SCRIPT

Former Member
0 Kudos

Hi Friends,

I m working on script of purchase order , medruck and its driver program SAPFM06P. i had copied both of them and made zmedruck and zSAPFM06P. Now i wan to show some values in script that is not provided by drivr program. so please provide me suggestion

Accepted Solutions (1)

Accepted Solutions (1)

former_member585060
Active Contributor
0 Kudos

Hi,

Use Subroutines in ur SAPScript for the fields u want to data.

Ex:-

/:PERFORM GET_COMCODE IN PROGRAM ZM_RFQ_REJECTION

/:USING &EKKO-BUKRS&

/:USING &EKKO-SPRAS&

/:CHANGING &SADR-NAME1&

/:CHANGING &SADR-NAME2&

/:CHANGING &SADR-NAME3&

/:CHANGING &SADR-PSTLZ&

/:CHANGING &SADR-NAME4&

/:ENDPERFORM

U don't need to copy standard program if the standard program not giving u the values. Just creat a subroutine program.

Regards

Bala Krishna

Edited by: Bala Krishna on Aug 11, 2008 6:52 PM

Former Member
0 Kudos

hi bala krishna,

thanks for ur reply, also tell me how can i declare variables in script? can i make use of data statement?

Edited by: brijesh soni on Aug 11, 2008 3:24 PM

former_member585060
Active Contributor
0 Kudos

We Use DEFINE statement to declare variables in Script.

What is the data u need to get can u elobarate.

Former Member
0 Kudos

in P.O print i need to give contact person,its tel.no., email address of contact person

former_member585060
Active Contributor
0 Kudos

U can pass the EKKO-EBELN value in Using Parameter and Contact person(VERKF) details in Changing parameter.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks all

Former Member
0 Kudos

Hi,

you can also write a normal perform in the program.

Put a select query for the values that you want for the particular tables and display those variables in the SAP script

as follows:

eg:

Select lifnr

name1

from table lfa1

into (v_lifnr,v_name1)

where <condition>.

endselect.

in SAP script:

&v_lifnr&

&v_name1&.

You will get the values displayed.

Thanks,

Sneha.

Former Member
0 Kudos

Hi Sneha,

Can you tell me how to use Define is SAP Script, actualy i had not woked much on script .