cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI- K_SRULE_SAVE_UTASK

former_member374929
Active Participant
0 Likes
4,186

Hi All,

I am using the BAPI K_SRULE_SAVE_UTASK for updating the settlement parameters and inserting the settlement rule in maintenance order operation. For this I am using the BAPI structures,  T_COBRA_UPDATE & T_COBRB_INSERT respectively.

After execution of BAPI, the settlement parameters and settlement rule is getting updated in order operation when I am seeing the order in change mode but when I am opening the same order in display mode, I am getting themessage that, settlement rule does not exist.

But then if I am going in the change mode and saving the order again manually , the same is replicating to the display order mode.

Also if I am doing all the above steps manually, everything is working OK.

Please let me know, if anybody faced the same situation.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

former_member374929
Active Participant

Hi All,

We tried all possible things but with no success. Finally decided to go for BAPI: K_SRULE_SAVE_UTASK followed by the BDC for the save part.

Npw closing the thread, thankyou all for you replies.

Regards,

Asheesh Aswal

Answers (3)

Answers (3)

ThomB
Newcomer
0 Likes

You have to make sure that you also set system status I0028 (=SETC=Settlement rule created) active. I.e. INACT=' '. Otherwise SAP assumes that no COBRA COBRB exists in the database.

peter_atkin
Active Contributor
0 Likes

Are you using the following syntax: CALL FUNCTION 'K_SRULE_SAVE_UTASK' IN UPDATE TASK?

PeteA

jarus
Participant
0 Likes

Hi Pete

we have tried in update task also but did not get succeed. Also do we need to call some other FM after this FM.

Thanks,

Sooraj

Former Member
0 Likes

Hi Sooraj ,

Please check below link may help.

Thanks

Ashu

jarus
Participant
0 Likes

Hello Ashu

We already tried those thing but still same issue.

Thanks,

Sooraj

Ziv_Marcovich
Contributor
0 Likes

Hi Sooraj,

You can try this : Call bapi :BAPI_ALM_ORDER_MAINTAIN

create implementation of BAdi : WORKORDER_UPDATE - > AT SAVE which should be triggered by the BAPI call.

inside the implementation call FM :K_SRULE_SAVE_UTASK

Regards,

Ziv

jogeswararao_kavala
Active Contributor
0 Likes

Try using fm BAPI_TRANSACTION_COMMIT in sequence.

former_member374929
Active Participant
0 Likes

Thanks for the prompt reply but we have already tried commit BAPI but no success.