04-02-2009 3:13 PM
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
04-02-2009 3:27 PM
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
a®
04-02-2009 3:15 PM
04-02-2009 3:20 PM
No I cannot do that
The ADDRESS tag is used to format the address, taking it out will cause a lot of issues.
04-02-2009 3:24 PM
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.
04-02-2009 3:27 PM
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
a®
04-02-2009 3:45 PM
Should &COUNTRY& not be part of ADDRESS. Have you missed something?
04-02-2009 4:08 PM
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
a®