Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripts-address

Former Member
0 Kudos

Hello experts,

I need get international remit to and domestic remit to:

To get address I need to display the company code address from table t001e in the remit to bank information based on customer country.How can I write perform statements. Give me some suggestion.Please explain clearly I am new to scripts.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rahul.

In the driver program you can write the perform like

form abcddd tables itab structure itcsy

otab structure itcsy.

*get the address number from t001e

*get the address details from ADRC comparing the <b>address-number.</b>

endform. "abcddd

In the script

/: DEFINE V_NAME1 = ' '

/: DEFINE V_NAME2 = ' '

/: DEFINE V_CITY1 = ' '

/: DEFINE V_CITY2 = ' '

/: PERFORM ABCDDD IN PROGRAM ZSCRIPT

/: USING &IT_T001E-BUKRS&

/: CHANGING &V_NAME1&

/: CHANGING &V_NAME2&

/: CHANGING &V_CITY1&

/: CHANGING &V_CITY2&

/: ENDPERFORM

Hope this helps.

Regards,

Richa

7 REPLIES 7

Former Member
0 Kudos

Based on which field should I get address.

please explain me

Former Member
0 Kudos

Hi Rahul.

In the driver program you can write the perform like

form abcddd tables itab structure itcsy

otab structure itcsy.

*get the address number from t001e

*get the address details from ADRC comparing the <b>address-number.</b>

endform. "abcddd

In the script

/: DEFINE V_NAME1 = ' '

/: DEFINE V_NAME2 = ' '

/: DEFINE V_CITY1 = ' '

/: DEFINE V_CITY2 = ' '

/: PERFORM ABCDDD IN PROGRAM ZSCRIPT

/: USING &IT_T001E-BUKRS&

/: CHANGING &V_NAME1&

/: CHANGING &V_NAME2&

/: CHANGING &V_CITY1&

/: CHANGING &V_CITY2&

/: ENDPERFORM

Hope this helps.

Regards,

Richa

0 Kudos

Hi Richa,

I have to get not only name and city but also zip ,state for domestic .

for international I have to get name city , country,zip.

How can I write Shall I define country and zip also in script.And can you please explain.how perform statement works

0 Kudos

Domestic address is US address and International address depend on country and company code.

so how can i do that.

0 Kudos

hi Rahul,

Goto ADRC table and you will find a long list with address fields.. i have chosen name1,name2,city1,city2.. similary you can add any number of fields you want as per your requirement like

POST_CODE1 which is City postal code

POST_CODE2 which is PO Box postal code

PO_BOX which is PO_BOX

PO_BOX_REG which is Region for PO Box (Country, State, Province, ...)

STREET which is STREET

COUNTRY which is COUNTRY

NATION which is International address version ID

etc.

and define them in script.

Use these as changing paramters of the perform in script.

<b>how perform statement works?</b>

when the control comes to the perform -endperform statemetn in the script it calls the form which is defined in the main driver program.

the paramter that you pass with using gets into the table itab.

the paramter that you pass with changing gets into the table otab.

These tables itab and otab have the structure of ITCSY which is name value pair.

so suppose you paas BUKRS with using that has value '1000', then in the form table itab has following value

itab-name = 'BUKRS'

itab-value = '1000'

now using this value you can select the data in your form(in driver program)

and modify the otab like..

you seleted some ADDRNUMBER that has value '1234567890'.

then otab-name = 'ADDRNUMBER'

otab-value = '1234567890'

    OTAB-VALUE = X_T001E-NAME1.
    MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'NAME1'.
    OTAB-VALUE = X_T001E-NAME2.
    MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'NAME2'.

Hope this clearifies your doubt.

Regards,

Richa

0 Kudos

Hi Richa,

I have one doubt.Will I get address from addrnumber instead of writing all name city and all.I wrote in smartforms using address node.Is there any chance to print address number so that total address will come as output.Is there any address node in script like smartform.

0 Kudos

hi Rahul,

You need to get the address details like name1,city1,country etc. You cannot use only the address number to print all the details on the layout. Once you have all this you can use address-endaddress.

This is used for formatting address as per country address standards.

The syntax for this is :

/: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]
/: TITLE title
/: NAME name1[,name2[,name3[,name4]]]
/: STREET street
/: POBOX PO box [CODE zip code]
/: POSTCODE zip code
/: CITY town1[,town2]
/: REGION region
/: COUNTRY country
/: FROMCOUNTRY from country
/: ENDADDRESS

Hope this clearifies your doubt.

Regards,

Richa