Application Development 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: 

Simple Abap coding required.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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