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

Simple Abap coding required.

Former Member
0 Likes
556

Hi Gurus,

Can somebody advise me how to make changes to existing coeds,

Existing code:

<b>DATA: leve10 type STRING,

REST type STRING.

split costcenter1 at '-' into level10 REST.

CASE LEVEL1.

WHEN 'CK'.

RESP = 'Z'.

WHEN 'JK'.

RESP = 'Y'.

WHEN NONE.

MRU = 'NONE'.

ENDCASE.

ENDFUNCTION.</b>

I want to Insert

<b>WHEN 'FK' or 'MK' or 'SK'

RESP = 'NIL'</b>

can you pelase advise me how to do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

See the below code and modified in bold :

DATA: leve10 type STRING,

REST type STRING.

split costcenter1 at '-' into level10 REST.

CASE LEVEL1.

WHEN 'CK'.

RESP = 'Z'.

WHEN 'JK'.

RESP = 'Y'.

<b>WHEN 'FK' or 'MK' or 'SK'.

RESP = 'NIL'.</b>

WHEN NONE.

MRU = 'NONE'.

ENDCASE.

ENDFUNCTION.

Thanks

Seshu

2 REPLIES 2
Read only

Former Member
0 Likes
523

See the below code and modified in bold :

DATA: leve10 type STRING,

REST type STRING.

split costcenter1 at '-' into level10 REST.

CASE LEVEL1.

WHEN 'CK'.

RESP = 'Z'.

WHEN 'JK'.

RESP = 'Y'.

<b>WHEN 'FK' or 'MK' or 'SK'.

RESP = 'NIL'.</b>

WHEN NONE.

MRU = 'NONE'.

ENDCASE.

ENDFUNCTION.

Thanks

Seshu

Read only

Former Member
0 Likes
522

Hi,

Try the following

DATA: leve10 type STRING,

REST type STRING.

split costcenter1 at '-' into level10 REST.

CASE LEVEL10.

WHEN 'CK'.

REST = 'Z'.

WHEN 'JK'.

REST = 'Y'.

WHEN 'FK' or 'MK' or 'SK'.

REST = 'NIL'.

WHEN NONE.

MRU = 'NONE'.

ENDCASE.

ENDFUNCTION.

Regards,

Lijo Joseph

Message was edited by:

Lijo Vazhappilly