cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need Sample Code- Help

Former Member
0 Likes
268

Hi Gurus,

I want some help with ABAP coding for an update routine please. I am looking for the code in right syntax...i am not an ABAP'er

This is what i want

IF COMM_STRUCTURE- FIELD1 IS Initial

Result= "yes"

ELSE

IF NOT COMM_STRUCTURE- FIELD1 IS Initial AND IF NOT COMM_STRUCTURE- FIELD2 is initial

Result="no"

Else

RESULT= "abc"

Thank you

Southie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi

here is a quick demo:

DATA: a,b, result(10).

IF a IS Initial.

Result = 'yes'.

ELSEIF NOT a IS Initial AND NOT b is initial.

Result = 'no'.

Else.

RESULT = 'abc'.

ENDIF.

Former Member
0 Likes

Hi EDAN,

When u declare the data , (like in ur code a & b), should that be my field1 and field 2?? what does rse?ult(10) mean?? see this question maybe dumb, but i am writing my first ABAP code!!!!

Former Member
0 Likes

no

you can use the the structores that are passed to the routine (the COMM_STRUCTURE- FIELD1 ) and also the Result.

I just created these var for the example.

Edan

Former Member
0 Likes

Thanks EDAN, i have given u full poits...with ur help i wrote my first ABAP code..........Yahoo......and it worked........

Answers (0)