Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_ALM_ORDER_MAINTAIN Settlement Rules ( urgent )

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

Former Member
Former Member replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question