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 Sapscript should always print country

Former Member
0 Kudos

I am using ADDRESS in sapscript. How can I make changes such that the Country is always printed. If the address is within US, the country US does not print in the document.

ADDRESS DELIVERY PARAGRAPH IF
  NAME   &VBDKR-NAME1_WE&, &VBDKR-NAME2_WE&, &VBDKR-NAME3_WE&, &VBDKR-NA
  STREET   &VBDKR-STRAS_WE&
  POBOX    &VBDKR-PFACH_WE& CODE &VBDKR-PSTL2_WE&
  POSTCODE &VBDKR-PSTLZ_WE&
  CITY     &VBDKR-ORT01_WE&, &VBDKR-ORT02_WE&
  REGION   &VBDKR-REGIO_WE&
  COUNTRY  &VBDKR-LAND1_WE&
  FROMCOUNTRY 'US'
LANG_FOR_COUNTRY &SET_COUNTRY&
ENDADDRESS

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Try this roundway solution

Set country


/: DEFINE &COUNTRY& = &VBDKR-LAND1&                                          
AS &COUNTRY&

then

ADDRESS DELIVERY PARAGRAPH IF
   NAME   &VBDKR-NAME1_WE&, &VBDKR-NAME2_WE&, &VBDKR-NAME3_WE&, &VBDKR-NA
   STREET   &VBDKR-STRAS_WE&
   POBOX    &VBDKR-PFACH_WE& CODE &VBDKR-PSTL2_WE&
   POSTCODE &VBDKR-PSTLZ_WE&
   CITY     &VBDKR-ORT01_WE&, &VBDKR-ORT02_WE&
   REGION   &VBDKR-REGIO_WE&
   COUNTRY  &VBDKR-LAND1_WE&
   FROMCOUNTRY 'US'
 LANG_FOR_COUNTRY &SET_COUNTRY&
 ENDADDRESS

6 REPLIES 6

former_member156446
Active Contributor
0 Kudos

remove the address .... endaddress tags, in the layout

0 Kudos

No I cannot do that

The ADDRESS tag is used to format the address, taking it out will cause a lot of issues.

0 Kudos

HI,

You can use the IF condition and check whether the Address is with in US or not if US donot print the Country. If it is not US then print the conuntry Print US.

former_member194669
Active Contributor
0 Kudos

Try this roundway solution

Set country


/: DEFINE &COUNTRY& = &VBDKR-LAND1&                                          
AS &COUNTRY&

then

ADDRESS DELIVERY PARAGRAPH IF
   NAME   &VBDKR-NAME1_WE&, &VBDKR-NAME2_WE&, &VBDKR-NAME3_WE&, &VBDKR-NA
   STREET   &VBDKR-STRAS_WE&
   POBOX    &VBDKR-PFACH_WE& CODE &VBDKR-PSTL2_WE&
   POSTCODE &VBDKR-PSTLZ_WE&
   CITY     &VBDKR-ORT01_WE&, &VBDKR-ORT02_WE&
   REGION   &VBDKR-REGIO_WE&
   COUNTRY  &VBDKR-LAND1_WE&
   FROMCOUNTRY 'US'
 LANG_FOR_COUNTRY &SET_COUNTRY&
 ENDADDRESS

0 Kudos

Should &COUNTRY& not be part of ADDRESS. Have you missed something?

0 Kudos

possible options

1.Your window will be too short to display country

or

2. Check whether the country text maintained in T005T

or

3. Do a PERFORM and get country in SAP Script Form

and also check

http://help.sap.com/saphelp_47x200/helpdata/en/d1/803238454211d189710000e8322d00/content.htm