Application Development and Automation 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: 
Read only

SAP_SCRIPT_Address_Query

Former Member
0 Likes
589

Hi..

I am writing the ship-to and sold-to party address in the sapscript by using standard ADDRESS-ENDADDRESS command

Example:--

ADDRESS PARAGRAPH AS

NAME &SADR-NAME2&, &SADR-NAME3&

STREET &*SADR-STRAS&

HOUSE &*SADR-HAUSN&

POBOX &SADR-PFACH& CODE &SADR-PSTL2& CITY &*SADR-PFORT&

CITY &SADR-ORT01&, &SADR-ORT02&

POSTCODE &*SADR-PSTLZ&

COUNTRY &*SADR-LAND1&

FROMCOUNTRY &T001-LAND1&

ENDADDRESS

But a strange thing is happening, for some customers the full country name is coming and for some only Shortforms ie. (say UZ for Uzbekistan)is coming.

Can anyone please tell me the reason behind this strange phenomenon?

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
550

HI

CHK THIS

ADDRESS: Formatting of addresses

The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the

destination country defined in the parameter COUNTRY. The reference fields are described in the

structure ADRS. Both constants and symbols can be assigned to the parameters.

Syntax:

/: 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

Both formatting data and address data are given as parameters. Address data is formatted for output in accordance with the parameters COUNTRY, PRIORITY and LINES. If available, the P.O. box is used instead of the street as the default.

•DELIVERY: Defines the street address. If this parameter is selected, the system prints the street address on the layout output instead of the P.O. box.

•PARAGRAPH: Defines in which paragraph format the address is output. If the parameter is not defined, the address is output in the default paragraph format.

•PRIORITY: Defines which address lines can be omitted if necessary. You can enter a combination of the following values:

A form of address

P mandatory blank line 1

Q mandatory blank line 2

2 name2

3 name3

4 name4

L name of country

S line for the street

O line for the city

•LINES: Defines how many lines are available for formatting the address. If all the address data cannot be formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a layout set window whose type is not MAIN, the lines available for the address layout are then calculated automatically by means of the current output line item and window size.

•TITLE: Required form of address.

•NAME: Up to four separate names, separated by commas, can be defined.

•STREET: Street specification including address number.

•POBOX: Post Office box number.

•CODE: P.O. box Postal or ZIP code if it is different from the postal code of the city.

•POSTCODE: Postal or ZIP code of the city.

•CITY: Up to two place names can be defined.

•REGION: Determines the administrative area.

•COUNTRY: Specifies the country according to whose specific postal standards the address is formatted.

•FROMCOUNTRY: Defines in which language the name of the destination country is formatted. In EC countries, only the international country identification letter is put before the postal code with a hyphen.

Example:

/: ADDRESS

/: TITLE ‘Company’

/: NAME ‘Widget Technology, Inc.’, ‘All Kind of Widgets’

/: STREET ‘1005 Lido Lane’

/: POBOX ‘2935’ CODE ‘94400’

/: POSTCODE ‘94404’

/: CITY ‘Foster City’

/: REGION ‘CA’

/: COUNTRY ‘USA’

/: FROMCOUNTRY ‘USA’

/: ENDADDRESS

Generates the following address:

Company

Widget Technology, Inc.

All Kind of Widgets

PO box 2935

Foster City, CA 94400

If the supplement DELIVERY is specified for the command ADDRESS, then the street is entered instead of

the PO box.

Company

Widget Technology, Inc.

All Kind of Widgets

1005 Lido Lane

Foster City, CA 94404

<b>SAPscript calls the function module ADDRESS_INTO_PRINTFORM for

formatting the address. If the display is not in the required form, please

check the settings valid for this function module (see the documentation on

the function module).</b>

Read only

Former Member
0 Likes
550

hii Subhash,

i guess it is beacuse for countries of long length texts it is not bale to accomodate and it is passing its short key..check this case..by probabbly increasing the length

You can as well refer to <b>T005</b> which is the check table of <b>SADR</b>

check this

<b>/:ADDRESS PARAGRAPH AS

/: TITLE &VBLKK-ANRED&

/: NAME &VBLKK-NAME1&, &VBLKK-NAME2&, &VBLKK-NAME3&, &VBLKK-NAME4&/: Street ‘115’

/: POBOX &VBLKK-PFACH& CODE &VBLKK-PSTL2& CITY &VBLKK-PFORT&

/: CITY &VBLKK-ORT01&, &VBLKK-ORT02&

/: POSTCODE &VBLKK-PSTLZ&

/: COUNTRY &VBLKK-LAND1&

/: REGION &VBLKK-REGIO&

/: FROMCOUNTRY &TVST-ALAND&

/: End Address</b>

Regards

Naresh

Read only

Former Member
0 Likes
550

Hi Subhas,

check the country specific formatting in OY01..here for every country, there is an address formatting..also an option to print the complete country name...

this shud help u..

Regards

Read only

Former Member
0 Likes
550

hi

good

check out the length of the variable that printing the country field.if it less than increase the length.

thanks

mrutyun