Application Development and Automation 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: 
Read only

BAPI_ALM_ORDER_GET_DETAIL : Using Error ?

Former Member
0 Likes
1,549

When I call this BAPI throw se37 + test - all is OK , I enter order number , smth like 900003 and obtain result tables.

But When I write the same in ABAP:

**********************************************************

DATA:

BRET LIKE TABLE OF BAPIRET2,

BRETREC LIKE BAPIRET2.

START-OF-SELECTION.

ORDNUM = '900003'.

CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'

EXPORTING

NUMBER = ORDNUM

TABLES

RETURN = BRET.

LOOP AT BRET INTO BRETREC.

WRITE: / BRETREC-TYPE , BRETREC-MESSAGE.

ENDLOOP.

*******************************************************************

I obtain error : BRETREC-TYPE = 'E' ,

BRETREC-MESSAGE = 'Error reading the order in document tables'

We have only 2 non-optional params , but I try to propose all - the result was th same.

What's the problem ?

3 REPLIES 3
Read only

Former Member
0 Likes
635

u have to send data in Full Length Format.

If order field length is 10 , then u have to pass Order = '0000900003'.

Regards

Peram

Read only

Former Member
0 Likes
635

I think the order number is not exissting or the format is wrong..

try the conversion functionmodule

DATA:

BRET LIKE TABLE OF BAPIRET2,

BRETREC LIKE BAPIRET2.

START-OF-SELECTION.

ORDNUM = '900003'.

<b>call function 'conversion_exit_alpha_input'

exporting

input = ordnum

importing

output = ordnum.</b>

CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'

EXPORTING

NUMBER = ORDNUM

TABLES

RETURN = BRET.

LOOP AT BRET INTO BRETREC.

WRITE: / BRETREC-TYPE , BRETREC-MESSAGE.

ENDLOOP.

Read only

Former Member
0 Likes
635

Thanks ) all is ok.