cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ALM_ORDER_MAINTAIN Settlement Rules ( urgent )

Former Member
0 Kudos

Hello all ,

I am able to create and change , header , operation and components using BAPI_ALM_ORDER_MAINTAIN , but i am not able to create , change Settlement Rules ( SRULE) .

Can any one help me on this .

It is very urgent .

Thanks and regards ,

Prem

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this:

*For the method table

MOVE:'SRULE' TO lw_method-objecttype,

'1' TO lw_method-refnumber,

'CREATE' TO lw_method-method,

'nnnnnnnnnnnn' TO lw_method-objectkey.(nnnn....=order number)

APPEND lw_method TO it_method.

CLEAR lw_method.

MOVE:'1' TO lw_method-refnumber,

'SAVE' TO lw_method-method,

'nnnnnnnnnnnn' TO lw_method-objectkey.(where nnn.. = order number)

APPEND lw_method TO it_method.

  • for the settlement rule

MOVE:'1' TO lw_method-refnumber,

'WBS Number' TO lw_srule-wbs_element,

'settlement rule type' TO lw_srule-settl_type,

APPEND lw_srule TO lt_srule.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

it_srule = lt_srule

return = gt_return2.

  • this is required to save the data to the database.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = gv_return2.

Answers (0)