cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_CONDITION_CONTRACT_CREATE

former_member461047
Participant
0 Kudos
5,740

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,

Naresh

View Entire Topic
former_member208149
Participant
0 Kudos

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):

CONDITIONKEYDATAIN-STATUS = blank.

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

Hope this solves your second issue.

Regards.

former_member461047
Participant
0 Kudos

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.

former_member208149
Participant
0 Kudos

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.

Sapeksh.

former_member494960
Discoverer
0 Kudos

Hi Sapeksh!

Do you have a sample code for BAPI_CONDITION_CONTRACT_CREATE?

Thanks!