Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem in At new

Hi

i have written below code

CLEAR : wa_final.

LOOP AT it_final INTO wa1_final.

idx1 = sy-tabix.

at new LICNO.

CLEAR : vcount.

ENDAT.

vcount = vcount + 1.

wa1_final-NOM = wa_final-NOM.

modify it_final FROM wa1_final INDEX idx1.

ENDLOOP.

my requirement is

if i have 3 same "NICNO" then NOM should be displayed only once

EG :

NICNO          NOM
1               M1
1
1
2               M2
3               M3

what is wrong in my above code ?

Former Member replied
CLEAR : wa_final.
 LOOP AT it_final INTO wa_final.
        idx1 = sy-tabix.
        at new LICNO.
          CLEAR : vcount.
        ENDAT.
        
       vcount = vcount + 1.
 
      if vcount gt 1
       clear wa_final-NOM.
      endif.
 
       modify it_final FROM wa_final INDEX idx1.
ENDLOOP.
0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question