Skip to Content

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

BAPI_ALM_ORDER_MAINTAIN

Hi,

I have a problem when i want to create maintenance orders using the Bapi BAPI_ALM_ORDER_MAINTAIN. When i want to create more than one order an error is enhanced: "Error reading the order header %000000000001 from the document tables". The orders are created but the next time that i call to the Bapi, that's not working.

[code]Data:

i_method

REFNUMBER OBJECTTYPE METHOD OBJECTKEY

000001 HEADER CREATE %00000000001

000001 OPERATION CREATE %00000000001

000001 PARTNER CREATE %00000000001

000001 SAVE %00000000001

000002 HEADER CREATE %00000000002

000002 OPERATION CREATE %00000000002

000002 PARTNER CREATE %00000000002

000002 SAVE %00000000002

i_header

Orderid Order_type plantplant mn_wk_ctr pmacttype Start_date

%00000000001 zpm2 1004 zpm_gene z01 sy-datum

%00000000002 zpm2 1004 zpm_gene z01 sy-datum

i_partner

Orderid Partn_role Partn_role_old Partner Partner_old

%00000000001 ZT 00460447

%00000000002 ZT 00460447

i_operation

Activity Control_key

0010 PM01

0010 PM01

Code:

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

IT_METHODS = i_method

IT_HEADER = i_header

IT_PARTNER = i_partner

IT_OPERATION = i_operation

RETURN = i_bapiret

ET_NUMBERS = i_numbers

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Thanks and sorry by my english.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question