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

itab small logic

Former Member
0 Likes
269

hello abap gurus,

in my requirement, i have to check, that in one internal table ITAB,

i should make sure that one field A is not empty, and one field B should be empty in all the records.

if this condition is not satisfied it should through an error.

wat is the best way of coding this.

thank you.

hello abap gurus,

in my requirement, i have to check, that in one internal table ITAB,

i should make sure that one field A is not empty, and one field B should be empty in all the records.

if this condition is not satisfied it should through an error.

wat is the best way of coding this.

thank you.

1 REPLY 1
Read only

Former Member
0 Likes
252

data : begin of itab occurs 0,

fld1 type c,

fld2 type c,

end of itab.

data v_flag type c.

loop at itab.

clear v_flag.

if not itab-fld1 is initail .

if itab-fld2 is initial.

v_flag = 'X'

exit.

endif.

endif.

endloop.

if v_flag = 'x'.

message.

endif.

Reward Points if it is helpful

Thanks

Seshu

Message was edited by:

Seshu Maramreddy