Skip to Content


Jan 03 at 12:53 PM


avatar image

Hello Everyone,

I am currently working on one requirement w.r.t., T-Code WCOCO, where I have to perform the following:

1. Release Condition Contract

2. Create/Update Header Text

3. Create/Update User Statuses

I am using the BAPI: BAPI_CONDITION_CONTRACT_CREATE for creation and BAPI_CONDITION_CONTRACT_CHANGE for updating the condition contracts.

To achieve release condition contract, I am passing blank value to field CONDITIONKEYDATAIN-STATUS

To achieve header text creation, I am passing the below values to structure HEADTEXTIN: LINE_NUMBER = 000001, TEXT ID = Z001, LANGU and TEXT_LINE

But the BAPI creates a contract with no header text and the contract is still not released. Please help me out with this as I am not able to figure it out on my own. Also please advice on approach to create/update the user statuses.


Thanks and Best Regards,


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
SAPEKSH GUPTA Jan 03 at 01:27 PM


Have you tried passing the field Update Indicator (HEADTEXTIN-UPDATEFLAG) = 'I' or 'U'. Passing this should resolve your first issue.


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes, you are right. Thanks a lot Sapeksh :) Header text got updated.

Naresh Chandan N R Jan 04 at 02:21 AM

Hi All,

After digging further I was able to accomplish the contract Release scenario via., FM: WCB_CONDITION_CONTRACT_RELEASE and was able to create/change user statuses by using FM: WCB_CONDITION_CONTRACT_USTATUS.

On this note, I will be closing this thread, thank you so much for your support.


Best Regards,


10 |10000 characters needed characters left characters exceeded
SAPEKSH GUPTA Jan 03 at 01:35 PM

And for the second issue related to Release, you have to pass CONDITIONKEYDATAINX-STATUS = 'X' along with CONDITIONKEYDATAIN-STATUS = blank.

Please do notice the difference in both parameters (both are different parameters):


CONDITIONKEYDATAINX-STATUS = 'X' (Do pass the ORDER_KEY and other necessary/available fields of this parameter as well)

Hope this solves your second issue.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Yes, Since it is CREATE, the order number will not be generated so I am not passing anything there. I have passed X to all other fields including CONDITIONKEYDATAINX-STATUS but the contract is not getting released.

Any suggestions ? I will check if I am able to update via., CHANGE BAPI.


I believe it won't release the condition in first go. You first have to create the Contract using CREATE BAPI and then you have to release using CHANGE BAPI and passing the parameters as I suggested.

Hope this works.