cancel
Showing results for 
Search instead for 
Did you mean: 

modifying data from one internal table to other

Former Member
0 Kudos

Hi,

1. I am getting the selected elements from the node.

2.loop at lt_temp INTO LO_EL_ZRES_DIS_NEW.

3.in this loop getting the static attributes.

4. iam checcking the condition.

and MODIFY LT_ZRES_DIS_NEW FROM LS_ZRES_DIS_NEW TRANSPORTING statusr.

5.endloop.

i am getting the error abp4 syntex error.

********************************************************************************************************

For that i changed code:

1. I am getting the selected elements from the node.

2.loop at lt_temp INTO LO_EL_ZRES_DIS_NEW .

3.in this loop getting the static attributes with one internal table type of node.

4. if wa_selected-statusr = '1'.<n>

  • wa_selected-statusr = '2'.<n>

  • else.<n>

  • wa_selected-statusr = '2'.<n>

  • endif.<n>

  • append wa_selected to itab_selected.<n>

5. loop at LT_ZRES_DIS_NEW into LS_ZRES_DIS_NEW.<n>

  • loop at itab_selected into wa_selected.</n>

  • LS_ZRES_DIS_NEW-statusr = wa_selected-statusr.<n>

  • MODIFY LT_ZRES_DIS_NEW FROM LS_ZRES_DIS_NEW TRANSPORTING statusr.<n>

  • endloop.<n>

  • ENDLOOP.<n>

Here i am getting the output but all the table data is updating.I want to update in the user selected rows only???

Help me please

Thanks

Ramkumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try using the Index clause along with modify and store sy-tabix of loop in some variable, use tha variable as Index parameter

Hope this helps..

Answers (0)