Application Development 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: 

Error reading the order header from the documents tables

anvesh_kumar3
Explorer
0 Kudos
1,332

Hi,

I am reading order data using BAPI “BAPI_ALM_ORDER_GET_DETAIL” where order number being passed is “000970000995”.

This return me errors in return table “Error reading the order header 970000995 from the document tables”

What could be the problem? Also this is happening only for a perticulat order type and not for others.

Best regards

Anvesh Kumar

9 REPLIES 9

Sandra_Rossi
Active Contributor
1,206

Is it after creating the order by program?

Which message number is it?

I see many answers in the forum by Google:

BAPI_ALM_ORDER_GET_DETAIL Error reading the order header site:sap.com

anvesh_kumar3
Explorer
0 Kudos
1,206

Hi Sandra,

No this not after creating the order by program but while updating Inspection data back to order from mobile device.

iN code are instansing order object and this fails in constructer on this BAPI.

The message number is 121.

I also find threads but they ar enot relevant or have no solution in th end. Please let me know if you can help. Thanks!

Best regards

Anvesh

anvesh_kumar3
Explorer
0 Kudos
1,206
anvesh.kumar317 seconds ago

Hi Sandra,

No this not after creating the order by program but while updating Inspection data back to order from mobile device.

iN code are instansing order object and this fails in constructer on this BAPI.

The message number is 121.

I also find threads but they ar enot relevant or have no solution in th end. Please let me know if you can help. Thanks!

Best regards

Anvesh

raymond_giuseppi
Active Contributor
0 Kudos
1,206

Are you able to display the order with transaction IW33 (order doesn't exist or wrong type)

0 Kudos
1,206

Yes I am able to display the order with Iw33. Even when I run independently "BAPI_ALM_ORDER_GET_DETAIL" from SE37, I get correct result and no error, only when this BAPI get executed by the code then only it returns error. Also this is for only one order type and for others it work fine.

0 Kudos
1,206

anvesh.kumar3 Are you saying that if you execute BAPI_ALM_ORDER_GET_DETAIL from your program, it returns the error IWO_BAPI121 (Error reading the order header), but if you run it from SE37, it runs well without error? If it's what you say, just debug the parameter values of BAPI_ALM_ORDER_GET_DETAIL passed via SE37, and compare with the values you pass in your program.

0 Kudos
1,206

Some possible causes

  • Wrong value actually passed to the BAPI (manually SE37 will execute conversion exit ALPHA, but not CALL FUNCTION, look for missing leading zeroes, try CONVERSION_EXIT_ALPHA_INPUT) - is this the only PM order type with a numeric range?
  • The PM order is not yet create (e.g. BAPI_ALM_ORDER_GET_DETAI just after BAPI_ALM_ORDER and COMMIT or CALL TRANSACTION IW31, so before database get updated)

Sandra_Rossi
Active Contributor
0 Kudos
1,206

I guess you mean IWO_BAPI121.

Are you sure it's the only error message?

anvesh_kumar3
Explorer
0 Kudos
1,206

Yes, This is the only error I am getting.

Yes IWO_BAPI121.