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

problem with Loop

Former Member
0 Likes
575

Hi,

Good evening guys.

ct_claim_item table got two records as well as lt_afvc also got two records. as per condtion, ct_claim_item frist record should be changed. but ct_claim_item two records are changing..plz let me know the where iam doing wrong.


Loop at ct_claim_item into wa_ct_claim_item.
 Loop at lt_afvc into wa_afvc.
   if wa_afvc-wty_ind = 'X'.
     if wa_afvc-larnt = 'HM'.
       wa_ct_claim_item-ITEM_TYPE = 'FR'.
       modify ct_claim_item Index lv_idx from wa_ct_claim_item.
        endif.
      endif.
      clear:wa_afvc,
            wa_ct_claim_item.
    ENDLOOP.
Endloop.

Regards

chandu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

Hi,

It´s not clear what do you want... but if you need to change only the first record of ct_claim_item , insert a EXIT command between ENDLOOPs.

And what is lv_idx variable??? Is equal to 1 ??? Take a look on this.

Best regards,

Leandro Mengue

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
552

Hi ,

Solution is within yourself

Please debug and solve it of your own

Read only

Former Member
0 Likes
553

Hi,

It´s not clear what do you want... but if you need to change only the first record of ct_claim_item , insert a EXIT command between ENDLOOPs.

And what is lv_idx variable??? Is equal to 1 ??? Take a look on this.

Best regards,

Leandro Mengue

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
552

This message was moderated.