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

CASE statement in Sapscript

Former Member
0 Likes
3,597

Hi Gurus!

Is <b>WHEN OTHER</b> in a <b>CASE</b> statement applicable in sapscripts?

6 REPLIES 6
Read only

Former Member
0 Likes
1,735

HI

YES YOU CAN USE IT

Read only

Former Member
0 Likes
1,735

Hi

<b>Yes You can use them in Scripts</b>

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
1,735

Thanks for the quick reply guys.

Read only

Former Member
0 Likes
1,735

to my knowledge one can't use CASE statements within a script. we need to use If statements within a script.

CASE statement can be written in the driver program. Here we can use When Other...

Read only

Former Member
0 Likes
1,735

hi Babu,

Good Day. I think you can use CASE statement in Sapscripts just don't know if WHEN OTHERS was applicable that's why I post it here, i was having doubts on using it. Thanks for replying.

Best Regards,

JP

Read only

0 Likes
1,735

Hi John,

You can use CASE statement in scripts with OTHERS clause.

CASE: It is similar to ABAP/4 editor command ‘CASE’ only symbol can be queried.

Syntax:

/: CASE SYMBOL

/: WHEN 1

/: 'In Block1'

/: WHEN 2

/: 'In Block2'

/: WHEN OTHERS

/: 'In OtherBolck'

/: ENDCASE

Check this link from help.sap.com

http://help.sap.com/saphelp_47x200/helpdata/en/d1/802ec5454211d189710000e8322d00/frameset.htm

Thanks,

Vinay