cancel
Showing results for 
Search instead for 
Did you mean: 

script analysis

Former Member
0 Kudos

Hi,

I am analysing a script where a perform is used and in the print program form and end form is defined.

FORM get_goodsaddress TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

READ TABLE in_tab WITH KEY 'EKPO-EBELN'.

IF sy-subrc = 0.

pdoc = in_tab-value.

ENDIF.

i want to what this read does step does?

in_tab is of structure itcsy.

help appreciated.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

this ITCSY is a structure contain two fields name and value.

itcsy-name

itcsy-value

In the script you call this get_goodsaddress with the program name:

ex: perform get_goodsaddress

in program ztest

using 'EKPO-EBELN'

changint zvaribale.

this case table in_tab contains ekpo-eblen as a record.

when you read the table in_tab with key ekpo-ebeln, it will check the table with record EKPO-EBELN(in_tab-name = ekpo-ebeln) as record .

if found do the next actions.

Former Member
0 Kudos

Hi,

The read statement here will help you fetch the value of 'EKPO-EBELN' from your script. this value gets saved in in_tab-value.

Thanks

Nayan

Former Member
0 Kudos

Hi,

In the SapScript you will find a statement

/: PERFORM get_goodsaddress IN PROGRAM .... USING &EKPO-EBELN&

In the FORM parameter EKPO-EBELN is passed with its value in table IN_TAB. Using this READ statement you are able to get the value of EKPO-EBELN and to determine additional data.

Regards,

John.

Former Member
0 Kudos

hi,

here it is checking if script is passing the EKKO-EBELN , i.e if the script is passing any PO no to the perform he is moving it to a variable.

In_tab contains all the fields passed from Script and outtab contains all the values passed back to the script.

Raj