Skip to Content
0
Feb 18, 2011 at 06:11 AM

how to get the Count for no.of.errors

42 Views

HI

BELOW IS MY CODE

LOOP AT I_RETURN INTO WA_RETURN.
  IF WA_RETURN-TYPE ='E'.
    CONCATENATE SOURCE-AUFNR '|' SOURCE-VORNR '|'WA_RETURN-MESSAGE
                                                     INTO TEXT.
    WRITE:/ TEXT.
    COUNTER = COUNTER + 1.
  ENDIF.

IM GETTING BELOW O/P

000090001366 0020 Enter another operation number
000090001366 0020 Error  during processing of BAPI methods
000090001366 0050 Item categories in agreement and requisition incompatible
000090001366 0050 Error  during processing of BAPI methods

NO.Of records In Error          4

My Requirement is if AUFNR and VORNR value is same then the count should be 1 , Like the o/p should be

NO.Of records In Error          2

because AUFNR and VORNR is same for 2 records , can any one tel me the logic to do this,

AUFNR and VORNR value is there in Internal Table