cancel
Showing results for 
Search instead for 
Did you mean: 

insert condition to sapscript

Former Member
0 Kudos

Hi, Im new in sapscript development, I need put a condition in a window page.

If mseg-lgort eq '4040'

street X

Elseif mseg-lgort ne '4040'

street Y

endif.

I dont know If I can do that, and how??

I've found that a field most be inside "&"?? And I can insert comand, but I dont know the diference between symbols, command and text element.

Please, something about this.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks, It helps a lot, I've solve mi problem by other path but, is important for me to know how i can add code to my form in other cases.

Former Member
0 Kudos

Could you please share with us how you fix it?

Thanks

Former Member
0 Kudos

I haven't tested this, but you can give it a try:

/:   IF &mseg-lgort& = '4040'             
P1   &STREET_X&
/:   ELSE             
P1   &STREET_Y&
/:   ENDIF                           

Rob