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

Address window in SAPSCRIPT

0 Likes
647

Hi,

    In address window, I am displaying customer title, name1, name2, street1, street2, postal code and country code.

My requirement is if Street1 or street2 has no value then that line will not be printed as blank. Instead postal code and country code will go to that place .

Regards

PP

2 REPLIES 2
Read only

arthur_alvesteixeira
Active Participant
0 Likes
601

Pujarini,

usually we insert the logic in main program,
but for simple conditions (IF) it's possible to make in sapscript:

Example, check if some field(s) has value, or check if some field is blank...to determine the fields printed:

/: IF &street1& = ' ' or &street2& = ' '

   postal code, country code

/: ELSE

   title, name1, name2, street1, street2, postal code and country code

/: ENDIF

Read only

Former Member
0 Likes
601

Hi,

Pujarini,

In the code it can easily be accomplished by using conditional statements.

Here is the logic :-

(PI is the paragraph format)

PI     &title&

PI     &name1&

PI     &name1&

😕      IF &street1& NE ' ' OR  &street2& NE ' '                      "the negetion logic is correct one

PI     &street1&

PI     &street2&

PI     &country_code&

PI     &postal_code&

😕      ELSE

PI     &country_code&

PI     &postal_code&

😕      ENDIF.

Based on the requirement you can print in a single line also like this

PI     &name1&,,&name2&