Skip to Content
avatar image
Former Member

script analysis

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 12, 2008 at 07:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 12, 2008 at 07:55 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 12, 2008 at 08:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 13, 2008 at 10:56 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded