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: 

ADDRESS ENDADDRESS command in SAPScript

Former Member
0 Kudos

Hi Gurus,

How does address endaddress command works in SAPscript.

I want to use it in SAPscript as

ADDRESS

ADDRESSNUMBER <LFA1-ADRNR>

FROMCOUNTRY 'US'

ENDADDRESS.

I have gone through the documentation of ADDRESS_INTO_PRINTFORM but still not clear of the sequence.

Want to know, what will be the sequence in which address will be printed from above command and how does it determine this.

Appreciate your help.

Thanks,

Kartavya

5 REPLIES 5

KK07
Contributor
0 Kudos

hi,

for setting the country type address.

set country 'us'.

0 Kudos

Hi,

Read Below documentation

____________________________________________________

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. The address data are formatted for output according to the data in the following parameters:

TYPE

FROMCOUNTRY

COUNTRY

LANGUAGE

PRIORITY

DELIVERY

LINES

If DELIVERY is not specified and if a POBOX is specified, then the POBOX is used in an address instead of a STREET.

_____________________________________________________

Regards

Bala Krishna

Former Member
0 Kudos

hi ,

Check this commands in sap scripts

/: ADDRESS PARAGRAPH ZB LINES 9

/: ADDRESSNUMBER &VBDKA-ADRNR(K)&

/: FROMCOUNTRY &VBDKA-SLAND&

/: ENDADDRESS

Thanks

satyajit_mohapatra
Active Contributor
0 Kudos

THE ADDRESS-ENDADDRESS command internally calls ADDRESS_INTO_PRINTFORM to print the address. But, in scripts it's better to use ADDRESS-ENDADDRESS as to call the FM you need to create a subroutine.

The sequence of the fields in address depneds on the country formatting and other options specified like delivery address specified by you in ADDRESS-ENDADDRESS command. If your address is not coming properly using ADDRESS-ENDADDRESS, you can try it fetching it from the FM as it has outputs different formats.

Could you please let us know in which format the address is required?

0 Kudos

Thanks, this info is very helpful even after how many years from this post. But breakpoint at FM ADDRESS_INTO_PRINTFORM if any doubts about address calls in sapscript