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

BAPI BAPI_ALM_ORDER_MAINTAIN ??

Former Member
0 Likes
395

HI all,

I am trying to update the equipment in the order but it is not getting updated in the order ..can u please let me know what changes i need to make in the code based on bapio BAPI_ALM_ORDER_MAINTAIN.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

      input  = v_sub_order

    IMPORTING

      output = v_sub_order.



  wa_mntmethods-refnumber = '000001'.

  wa_mntmethods-objecttype = 'HEADER'.

  wa_mntmethods-method = 'CHANGE'.

  wa_mntmethods-objectkey = v_sub_order.

  APPEND wa_mntmethods TO i_mntmethods.



  wa_mntmethods-refnumber = '000001'.

  wa_mntmethods-objecttype = ' '.

  wa_mntmethods-method = 'SAVE'.

  wa_mntmethods-objectkey = v_sub_order.

  APPEND wa_mntmethods TO i_mntmethods.



  wa_mntheader-orderid = v_suborder.

  wa_mntheader-equipment = v_equipment.

  APPEND wa_mntheader TO i_mntheader.



  wa_mntheader_up-orderid = v_suborder.

  wa_mntheader_up-equipment = 'X'.

  APPEND wa_mntheader_up TO i_mntheader_up.


  CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

    TABLES

      it_methods   = i_mntmethods

      it_header    = i_mntheader

      it_header_up = i_mntheader_up

      return       = i_return.


  PERFORM commit_transaction.



endform.                    " ATTACH_SUBORDER_EQUIP



FORM commit_transaction .



  TYPES : BEGIN OF t_return .

          INCLUDE STRUCTURE bapiret2.

  TYPES : END OF  t_return.





  DATA: li_return TYPE t_return.



*  IF GD_error NE 'X'.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

      EXPORTING

        wait   = 'X'

      IMPORTING

        return = li_return.



endform.                    " COMMIT_TRANSACTION

Thanks in advance

Vinay Nanjappa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
333

the issue got resolved...

sorry for disturbing all you guys..:)

Thanks and Regards

Vinay Nanjappa

1 REPLY 1
Read only

Former Member
0 Likes
334

the issue got resolved...

sorry for disturbing all you guys..:)

Thanks and Regards

Vinay Nanjappa