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 value update based on id into main internal table

hossain_rajib55
Participant
0 Likes
983

Hello !!!

In my abap program I am having a problem.I am getting data based on work area and keep it to itab, and I have another internal table where I am getting multiple row against an Id. The problem is, I am unable to update those multiple row against an Id. In the bellow i am given my data.

itab value:

Id A
489 0
853 0
1919 0
1938 0
2684 0
3132 0

and from another internal table getting value against those id:

Id A
489 161.00-
489 147.00-

using below loop:

LOOP AT itab INTO wa_final.


LOOP AT it_ftab INTO wa_ftab WHERE pernr = wa_final-pernr.
wa_final-er_leave = wa_ftab-anzhl.
wa_final-er_ded = wa_ftab-kverb.
wa_final-er_tot = wa_ftab-anzhl - wa_ftab-kverb.
wa_final-lbegda = wa_ftab-begda.
wa_final-lendda = wa_ftab-endda.

ENDLOOP.

Could you please help me to resolve the issue.

Hello !!!

In my abap program I am having a problem.I am getting data based on work area and keep it to itab, and I have another internal table where I am getting multiple row against an Id. The problem is, I am unable to update those multiple row against an Id. In the bellow i am given my data.

itab value:

Id A
489 0
853 0
1919 0
1938 0
2684 0
3132 0

and from another internal table getting value against those id:

Id A
489 161.00-
489 147.00-

using below loop:

LOOP AT itab INTO wa_final.


LOOP AT it_ftab INTO wa_ftab WHERE pernr = wa_final-pernr.
wa_final-er_leave = wa_ftab-anzhl.
wa_final-er_ded = wa_ftab-kverb.
wa_final-er_tot = wa_ftab-anzhl - wa_ftab-kverb.
wa_final-lbegda = wa_ftab-begda.
wa_final-lendda = wa_ftab-endda.

ENDLOOP.

Could you please help me to resolve the issue.

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
881

First, run your program in debug and see how the data flows. Then read the ABAP Help on the keywords MODIFY and INSERT.

Read only

DoanManhQuynh
Active Contributor
0 Likes
881

Try field-symbol instead of work area. you should read more document.