cancel
Showing results for 
Search instead for 
Did you mean: 

scripts

Former Member
0 Kudos

hi all

i hav an a script in which i need 2 put fields name1 city1 city2 city_code from the table ADRC so i used an perform statement and now in the se38 code i should access the values through the select statement which should be equal to T001-ADRNR...please help...if possible please post the code..am also giving the code in se38 below biut am getting some errors..please help....

REPORT ZF140.

TABLES: ADRC ,T001.

FORM ADDR.

SELECT NAME_1 CITY1 CITY2 CITY_CODE FROM ADRC WHERE ITAB-adrnr EQ ADRC-ADDRNUMBER.

ENDSELECT.

ENDFORM.

with regards

vijay

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hh

Former Member
0 Kudos

Hi,

sample code for routines in script.

/: PERFORM FORM_TEST IN PROGRAM ZTEST

/: USING &VAR1&

/: USING &VAR2&

/: USING &VAR3&

/: .............

/: USING &VARN&

/: CHANGING &VAR_OUT1&

/: ................

/: CHANGING &VAR_OUTN&

in the program ZTEST...

FORM FORM_TEST tables in_tab structure itcsy

out_tab structure itcsy.

  • Get value of VARN

data: varn like ....

read table in_tab with key name = 'VARN'.

if sy-subrc = 0.

move in_tab-value to varn.

endif.

  • Update the value of VAR_OUTN

read table out_tab with key name = 'VAR_OUTN'.

if sy-subrc = 0.

move <value> to out_tab-value.

modify out_tab index sy-tabix.

endif.

ENDFORM.

you modify this according to your requirement.

rgds,

former_member673464
Active Contributor
0 Kudos

hi..

You need not use perform statement to get the address values.Please refer to the below document for your solution.

The ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. The reference fields are described in the structures ADRS1, ADRS2, or ADRS3, depending on the type of address. Either direct values or symbols may be assigned to the parameters.

Syntax:

/: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l]

/: TITLE title

/: NAME name1[,name2[,name3[,name4]]]

/: PERSON name of natural person [TITLE form of address]

/: PERSONNUMBER number of the personen

/: DEPARTMENT department

/: STREET street name HOUSE house number

/: LOCATION additional location information

/: POBOX po box [CODE post code / zip code] [CITY city]

/: POSTCODE post code / zip_code

/: CITY city1[,city2]

/: NO_UPPERCASE_FOR_CITY

/: REGION county / state

/: COUNTRY recipient country [LANGUAGE language code]

/: COUNTRY_IN_REC_LANG

/: LANG_FOR_COUNTRY language key

/: FROMCOUNTRY sender country

/: ADDRESSNUMBER address number

/: ENDADDRESS

The parameter values contain both formatting and address information.

regards,

veeresh