on 07-15-2011 9:48 AM
how to use bapi_alm_order_maintain to update the work order.......
Hi Raju,
You can use SERVICE CALL for this. OR
You can use your BAPI/FM using CALL FUNCTION like in normal ABAP.
Define your requred context and design your layout and bind.
For example...code like this.. using this i am updating VL02 ( Change Delivery ).
* WS_DELIVERY_UPDATE_2 Declarations
DATA: lw_vbkok TYPE vbkok,
lt_vbpok TYPE TABLE OF vbpok,
lw_vbpok TYPE vbpok,
l_vbeln TYPE vbeln_vl.
l_vbeln = ls_it_lips-vbeln.
DATA : VERKO_TAB TYPE TABLE OF VERKO,
WA_VERKO_TAB TYPE VERKO,
VERPO_TAB TYPE TABLE OF VERPO,
WA_VERPO_TAB TYPE VERPO.
loop at lt_pack_mat into ls_pack_mat.
WA_VERKO_TAB-VENUM = ls_pack_mat-INT_HAND_UNIT.
WA_VERKO_TAB-EXIDA = 'E'.
WA_VERKO_TAB-EXIDV = ls_pack_mat-HANDLING_UNIT.
WA_VERKO_TAB-VSTEL = '2000'.
APPEND WA_VERKO_TAB to VERKO_TAB.
endloop.
loop at lt_pack_mat into ls_pack_mat.
WA_VERPO_TAB-VENUM = ls_pack_mat-INT_HAND_UNIT.
WA_VERPO_TAB-TMENG = ls_pack_mat-PACKING_QTY.
APPEND WA_VERPO_TAB to VERPO_TAB.
endloop.
lw_vbkok-vbeln_vl = ls_it_lips-vbeln.
lw_vbkok-vbeln = ls_it_lips-vbeln.
loop at lt_it_lips into ls_it_lips.
lw_vbpok-vbeln_vl = ls_it_lips-vbeln.
lw_vbpok-pikmg = ls_it_lips-PICK_QTY.
lw_vbpok-SPE_INB_ITM_UPD = 'X'.
APPEND lw_vbpok TO lt_vbpok.
endloop.
* WS_DELIVERY_UPDATE_2 To change Delivery
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
VBKOK_WA = lw_vbkok
COMMIT = 'X'
DELIVERY = ls_it_lips-vbeln
* UPDATE_PICKING = 'X'
TABLES
VBPOK_TAB = lt_vbpok
VERKO_TAB = VERKO_TAB
VERPO_TAB = VERPO_TAB.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.