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

Error with BAPI BAPI_ALM_ORDER_MAINTAIN to release

Former Member
0 Likes
1,429

Hi,

I need to release a PM order with the BAPI:

BAPI_ALM_ORDER_MAINTAIN with the table T_METHODS

CLEAR T_METHODS.

T_METHODS-REFNUMBER = 1.

T_METHODS-OBJECTTYPE = 'HEADER'.

T_METHODS-METHOD = 'RELEASE'.

T_METHODS-OBJECTKEY = ORDERID.

APPEND T_METHODS.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

IT_METHODS = T_METHODS

RETURN = MES.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

and it gives the following error me :

"BAPI call must have a SAVE or DIALOG method"

Please help me,

regards

Dayana

2 REPLIES 2
Read only

Former Member
0 Likes
663

Hello,

It seems like you need to execute this fm on a dialog program, so you should look for another FM.

You can also check the FM code to find where is giving you that error and change it before calling the function. Sometimes on the sy structure there is a flag that says if the FM is called from a dialog. Maybe is that.

Bye,

gabriel

Read only

Former Member
0 Likes
663

I think you have to append one more row to your table T_METHODS where the object type should be ' ' and method should be 'SAVE'.

The BAPI documentation has explanation on how to save the data.

> Hi,

> I need to release a PM order with the BAPI:

>

> BAPI_ALM_ORDER_MAINTAIN with the table T_METHODS

>

> CLEAR T_METHODS.

> T_METHODS-REFNUMBER = 1.

> T_METHODS-OBJECTTYPE = 'HEADER'.

> T_METHODS-METHOD = 'RELEASE'.

> T_METHODS-OBJECTKEY = ORDERID.

> APPEND T_METHODS.

>

> CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

> TABLES

> IT_METHODS = T_METHODS

>

> RETURN = MES.

> CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

>

> and it gives the following error me :

> "BAPI call must have a SAVE or DIALOG method"

>

> Please help me,

>

> regards

>

> Dayana