Application Development 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: 

Not able to save second operation from file

former_member342013
Contributor
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member195402
Active Contributor
0 Kudos

Hi,

please watch the content of your internal tables IT_METHODS and IT_OPERATION for remaining data in 2nd Operation!

Maybe there is a missing refresh ...

Regards,

Klaus

Edited by: Klaus Babl on Feb 14, 2011 1:38 PM

2 REPLIES 2

kesavadas_thekkillath
Active Contributor
0 Kudos

Not sure about the values mapped in the structure but first i would say to pass WAIT = 'X' to bapi_transaction_commit and check it.

former_member195402
Active Contributor
0 Kudos

Hi,

please watch the content of your internal tables IT_METHODS and IT_OPERATION for remaining data in 2nd Operation!

Maybe there is a missing refresh ...

Regards,

Klaus

Edited by: Klaus Babl on Feb 14, 2011 1:38 PM