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 query

Former Member
0 Likes
763

Hi,

In a case statement having the code sample below,

CAse v_xausz.

when '1'.

v_xausz = '2'.

when others.

6 REPLIES 6
Read only

Former Member
0 Likes
738

what is a problem in it???

Read only

Former Member
0 Likes
738

this is the sample code for case statement.

CASE TEST.

WHEN TEST = '1'.

WRITE / TEST.

WHEN TEST = '2'.

WRITE /TEST.

OTHERS.

WRITE /'WRONG INPUT'.

END CASE.

Read only

Former Member
0 Likes
738

Hi,

it is same as like this.


if v_xausz = '1'.
  v_xausz = '2'.
else.
*some code.
endif.

rgds,

bharat.

Read only

Former Member
0 Likes
738

this is changing the 'v_xausz' value to 2 when it's 1 ...

Read only

Former Member
0 Likes
738

When u use case statement

U have to write ENDCASE. u might have missed that. Use like following

CAse v_xausz.

when '1'.

v_xausz = '2'.

when others.

some code

ENDCASE.

Read only

Former Member
0 Likes
738

not complete text