Skip to Content
0
Feb 14, 2011 at 09:06 AM

Not able to save second operation from file

11 Views

Hi,

Im using below code to load Operations in IW32, my problem is , it is updating 1st operation from file but when it comes to 2nd operation it is giving error message as already exists, can any body help me on this ?

IF IT_OPERATION IS NOT INITIAL.
  call function 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
      it_methods   = it_methods
      it_operation = it_operation
      return       = i_return.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
  DATA: TEXT(200) TYPE C.
  clear wa_return.
  LOOP AT I_RETURN INTO WA_RETURN.
    IF WA_RETURN-TYPE ='E'.
      CONCATENATE SOURCE-AUFNR '|' SOURCE-VORNR '|'WA_RETURN-MESSAGE
                                                       INTO TEXT.
      WRITE:/ TEXT.
    ENDIF.
  ENDLOOP.
ENDIF.