‎2007 Apr 30 7:33 PM
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
‎2007 Apr 30 7:44 PM
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
‎2007 Apr 30 8:47 PM
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