on 08-29-2017 6:47 AM - last edited on 02-04-2024 1:42 AM by postmig_api_4
Here's some test code for changing operations:
*&---------------------------------------------------------------------*
*& Report ZPJA0008 *
*&---------------------------------------------------------------------*
*& BAPI_ALM_ORDER_MAINTAIN Test *
*&---------------------------------------------------------------------*
report zpja0008.
data : methods type standard table of bapi_alm_order_method,
operations type standard table of bapi_alm_order_operation,
zreturn type standard table of bapiret2.
data : xmethod like bapi_alm_order_method,
xoperations like bapi_alm_order_operation,
xaufnr like aufk-aufnr,
xreturn like bapiret2.
xoperations-activity = '0010'.
xoperations-constraint_type_finish = '3'.
xoperations-FIN_CONSTR = sy-datum.
xoperations-description = 'OP10A'.
append xoperations to operations.
xoperations-activity = '0030'.
xoperations-constraint_type_finish = '2'.
xoperations-description = 'OP30A'.
append xoperations to operations.
refresh: methods.
xaufnr = '000004000497'.
clear: xmethod, xoperations.
xmethod-refnumber = 1.
xmethod-objecttype = 'OPERATION'.
xmethod-method = 'CHANGE'.
xmethod-objectkey(12) = xaufnr.
append xmethod to methods.
xmethod-refnumber = 2.
xmethod-objecttype = 'OPERATION'.
xmethod-method = 'CHANGE'.
xmethod-objectkey(12) = xaufnr.
append xmethod to methods.
clear xmethod.
xmethod-refnumber = 1.
xmethod-method = 'SAVE'.
xmethod-objectkey(12) = xaufnr.
append xmethod to methods.
call function 'BAPI_ALM_ORDER_MAINTAIN'
tables
it_methods = methods
it_operation = operations
return = zreturn.
call function 'BAPI_TRANSACTION_COMMIT'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide your coding on the BAPI-logic ... This will give us a better clue as to what is happening ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.