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

INTERNAL TABLE FIELD

naveen_inuganti2
Active Contributor
0 Likes
449

Hi all...

Iam having one internal table with some entries of one database table....one of those field is flag....

now i want to add one extra....field into that..... internal table.....that shouul to have oppsite entries of flag....

like: 'x' for space.

space for "x".

later iam going to use that field in chain end chain oprator of pai module....

just send me how to collect reverse entries of that flag into our new field?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
430

Hi,

loop at itab.

itab-newfield = 'X'.

modify itab.

endloop.

Regards

Nicole

3 REPLIES 3
Read only

Former Member
0 Likes
431

Hi,

loop at itab.

itab-newfield = 'X'.

modify itab.

endloop.

Regards

Nicole

Read only

Former Member
0 Likes
430

Do like the code below

loop at it_tab.

if it_tab-flag = 'X'.

it_tab-field = ' ' .

elseif it_tab-flag = ' '.

it_tab-field = 'X' .

endif.

modify it_tab index sy-tabix.

endloop.

reward if helpful

Read only

Former Member
0 Likes
430

data:

begin of itab occurs 10,

field1,

,,

,,

flag,

newflag,

end of itab.

select field1 field2 ....

flag from dbtable

into corresponding fields of itab.

if itab-flag eq 'x'.

itab-newflag eq ' '.

else

itab-newflag = 'x'.

endif.

append itab.

endselect.