cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Scripts

Former Member
0 Kudos

Hi All,

I am developing a script here everything is ok but I want to display address as follows:

Address: &I_FINAL-stras&&I_FINAL-HSNMR&

&I_FINAL-POSTA&&I_FINAL-LOCAT&

&I_FINAL-ort01&&I_FINAL-PSTLZ&

1) Suppose for &I_FINAL-stras&&(Street1) data is there it is coming if there is no data means then &I_FINAL-HSNMR&(House number) has to be displayed in place of &I_FINAL-stras&&(Street1).

2) Suppose &I_FINAL-POSTA&(Street) and &I_FINAL-LOCAT& are INITIAL(no data) then &I_FINAL-ort01& and &I_FINAL-PSTLZ& has to be displayed in place of 2nd line.

Actually this is very easy in smartforms but in scripts is this possible. If possible please help me on this as this is very urgent.

Thanks & Regards

Venu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venu,

Try this out once...

Keep a IF condition like

IF &I_FINAL-stras& <> SPACE " try out with not initial if SPACE does't work

Address: &I_FINAL-stras&&I_FINAL-HSNMR&

ELSEIF

Address: &I_FINAL-HSNMR&

ENDIF.

same logic for the remaining also...

If u got the output.. let me know

Regards points if usefull..

Thanks

Dinakar

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

Hi Venu,

I guess this will help to solve your issue.

If &I_FINAL-stras& <> SPACE.

&I_FINAL-stras& &I_FINAL-HSNMR&

ELSE.

&I_FINAL-HSNMR&

ENDIF.

Rest is similar as above.

Regards,

SaiRam

Former Member
0 Kudos

Hi,

We have standard address format in the SAPSCRIPT , Use that format, if any field is blank then it will ignore that field

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

Regards

Sudheer