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

Problem with ADDRESS in Sapscript

Former Member
0 Likes
1,786

Hi all,

i have Problem with the ADDRESS in sapscript. i try to use

STREET_HAS_PRIORITY 'X'

But i get the Error

Command between ADDRESS-ENDADDRESS not allowed

Here my ADDRESS-Entry in Sapscript:

  • with STREET_HAS_PRIORITY

/: ADDRESS PARAGRAPH AH

/: STREET_HAS_PRIORITY 'X'

/: ADDRESSNUMBER '0000012345'

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

  • without STREET_HAS_PRIORITY

/: ADDRESS PARAGRAPH AH

/: ADDRESSNUMBER '0000012345'

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

Has anyone an idea?

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,084

Hi,

You can not use the street_has_priority directly in the SCRIPT(SE71), you need to use that in the function module ..

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).

This FM will print the address according to the Standard address format of the sender_country. So the address format will change depends upon the sender country.

CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'

EXPORTING

address_type = '1'

address_number = adrnr

sender_country = sender_country

number_of_lines = 10

<b>street_has_priority = 'X'</b>

IMPORTING

address_printform = wa_address.

Regards

Sudheer

4 REPLIES 4
Read only

Former Member
0 Likes
1,084

Hi,

Here is the SAPSCRIPT address format

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

<b>/: STREET street name HOUSE house number</b>

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

You need to write ..

/: ADDRESS PARAGRAPH AH

/: STREET <b>Street_name</b> HOUSE <b>house_no</b>

/: ADDRESSNUMBER '0000012345'

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

Regards

Sudheer

Read only

0 Likes
1,084

Hi Sudheer,

thanks for your answer.

My Problem is, why brings

STREET_HAS_PRIORITY 'X'

an Error, and what is the correct syntax to use STREET_HAS_PRIORITY

in sapscript.

regards, Dieter

Read only

Former Member
0 Likes
1,085

Hi,

You can not use the street_has_priority directly in the SCRIPT(SE71), you need to use that in the function module ..

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).

This FM will print the address according to the Standard address format of the sender_country. So the address format will change depends upon the sender country.

CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'

EXPORTING

address_type = '1'

address_number = adrnr

sender_country = sender_country

number_of_lines = 10

<b>street_has_priority = 'X'</b>

IMPORTING

address_printform = wa_address.

Regards

Sudheer

Read only

0 Likes
1,084

Hi Sudheer,

How to check standard address format for any country ?

Thanks