Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_ALM_ORDER_MAINTAIN: how to set technical complete

Hello experts,

I want to set an service order with the bapi 'BAPI_ALM_ORDER_MAINTAIN'

to technical complete.

I've following programm, but is does not work.

Has anybody an idea ?

REPORT ZBAPI_ALM_ORDER_MAINTAIN.

DATA: IT_METHODS TYPE BAPI_ALM_ORDER_METHOD OCCURS 0 WITH HEADER LINE,

IT_HEADER TYPE BAPI_ALM_ORDER_HEADERS_I OCCURS 0 WITH HEADER LINE,

IT_HEADER_UP TYPE BAPI_ALM_ORDER_HEADERS_UP OCCURS 0 WITH HEADER LINE,

IT_PARTNER TYPE BAPI_ALM_ORDER_PARTN_MUL OCCURS 0 WITH HEADER LINE,

IT_PARTNER_UP TYPE BAPI_ALM_ORDER_PARTN_MUL_UP OCCURS 0 WITH HEADER

LINE,

IT_OPERATION TYPE BAPI_ALM_ORDER_OPERATION OCCURS 0 WITH HEADER LINE,

IT_OPERATION_UP TYPE BAPI_ALM_ORDER_OPERATION_UP OCCURS 0 WITH HEADER

LINE,

*IT_SRULE TYPE BAPI_ALM_ORDER_SRULE OCCURS 0 WITH HEADER LINE,

*IT_SRULE_UP TYPE BAPI_ALM_ORDER_SRULE_UP OCCURS 0 WITH HEADER LINE,

RETURN TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE,

ET_NUMBERS TYPE BAPI_ALM_NUMBERS OCCURS 0 WITH HEADER LINE.

IT_METHODS-REFNUMBER = 1.

IT_METHODS-OBJECTTYPE = 'HEADER'.

IT_METHODS-METHOD = 'TECHNICALCOMPLETE '.

IT_METHODS-OBJECTKEY = '000007092117'.

APPEND IT_METHODS.

*IT_METHODS-REFNUMBER = 1.

*IT_METHODS-OBJECTTYPE = ''.

*IT_METHODS-METHOD = 'SAVE'.

*IT_METHODS-OBJECTKEY = '000000020664'.

*APPEND IT_METHODS.

IT_HEADER-ORDERID = '000007092117'.

*IT_HEADER-CONTROL_KEY = 'SM01'.

*IT_HEADER-WORK_CNTR = 'M1A1'.

*IT_HEADER-PLANT = '110A'.

*IT_HEADER-STANDARD_TEXT_KEY = 'C2-'.

*IT_HEADER-DESCRIPTION = 'Description 1'.

*IT_HEADER-LANGU = 'E'.

APPEND IT_HEADER.

*IT_OPERATION-ACTIVITY = '0040'.

*IT_OPERATION-CONTROL_KEY = 'SM01'.

*IT_OPERATION-WORK_CNTR = 'M1A1'.

*IT_OPERATION-PLANT = '110A'.

*IT_OPERATION-STANDARD_TEXT_KEY = 'ZSTAND'.

*IT_OPERATION-DESCRIPTION = 'Description 2'.

*IT_OPERATION-LANGU = 'E'.

*APPEND IT_OPERATION.

*IT_OPERATION_UP-ACTIVITY = 'X'.

*IT_OPERATION_UP-CONTROL_KEY = 'X'.

*IT_OPERATION_UP-WORK_CNTR = 'X'.

*IT_OPERATION_UP-PLANT = 'X'.

*IT_OPERATION_UP-STANDARD_TEXT_KEY = 'X'.

*IT_OPERATION_UP-DESCRIPTION = 'X'.

*IT_OPERATION_UP-LANGU = 'X'.

*APPEND IT_OPERATION_UP.

*APPEND IT_OPERATION_UP.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

IT_METHODS = IT_METHODS

IT_HEADER = IT_HEADER

IT_HEADER_UP = IT_HEADER_UP

*IT_HEADER_SRV =

*IT_HEADER_SRV_UP =

*IT_USERSTATUS =

IT_PARTNER = IT_PARTNER

IT_PARTNER_UP = IT_PARTNER_UP

IT_OPERATION = IT_OPERATION

IT_OPERATION_UP = IT_OPERATION_UP

*IT_RELATION =

*IT_RELATION_UP =

*IT_COMPONENT =

*IT_COMPONENT_UP =

*IT_OBJECTLIST =

*IT_OBJECTLIST_UP =

*IT_OLIST_RELATION =

*IT_TEXT =

*IT_TEXT_LINES =

*IT_SRULE = IT_SRULE

*IT_SRULE_UP = IT_SRULE_UP

*IT_TASKLISTS =

*EXTENSION_IN =

RETURN = RETURN

ET_NUMBERS = ET_NUMBERS.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

Thanks Gerd

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question