Skip to Content
avatar image
Former Member

BAPI_CONDITION_CONTRACT_CREATE

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 03 at 01:27 PM

    Hi,

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

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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,

    Naresh

    Add comment
    10|10000 characters needed characters exceeded

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

    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.

    Add comment
    10|10000 characters needed characters exceeded