Fonction SAP BAPI_CTRACPSOBJECT_EASYCREATE - PSCD: Create BAPI Contract Object Using Reference Values

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CTRACCOUNT BAPI_CTRACPSOBJECT_ACCOUNT-CTRACCOUNT C 12 X BAPI Accounting Data: Contract Account
PARTNER BAPI_CTRACPSOBJECT_ACCOUNT-PARTNER C 10 X BAPI Accounting Data: Business Partner
PSOBJECTACCOUNT BAPI_CTRACPSOBJECT_ACCOUNTI u 174 X BAPI Accounting Data: Contract Object
PSOBJECTDETAIL BAPI_CTRACPSOBJECT_DETAILI u 65 X BAPI Basic Data: Contract Object
PSOBJECTGUID BAPI_CTRACPSOBJECT_HEAD-PSOB_GUID C 32 X GUID of a Contract Object (CHAR Format)
PSOBJECTKEYEXT BAPI_CTRACPSOBJECT_HEAD-PSOBJECTKEY C 20 X BAPI Header Data: Contract Object Key (for External Numbering)
PSOBJECTTESTRUN BAPI_CTRACPSOBJECT_ADMIN-PSOBJECT_TESTRUN C 1 X Switch to Simulation Mode for Write BAPIs
PSOBJECTTYPE BAPI_CTRACPSOBJECT_HEAD-PSOBJECTTYPE C 4 X BAPI Header Data: Contract Object Type
XUPDATETASK BAPI_CTRACPSOBJECT_ADMIN-XUPDATETASK C 1 'X' X Datenbank-Update with Update Task

Paramètre Reférence Type Long. Description
PSOBJECTACCOUNTOUT BAPI_CTRACPSOBJECT_ACCOUNT u 258 BAPI Accounting Data: Contract Object
PSOBJECTDETAILOUT BAPI_CTRACPSOBJECT_DETAIL u 109 BAPI Basic Data: Contract Object
PSOBJECTGUIDOUT BAPI_CTRACPSOBJECT_HEAD-PSOB_GUID C 32 GUID of a Contract Object (CHAR Format)
PSOBJECTKEY BAPI_CTRACPSOBJECT_HEAD-PSOBJECTKEY C 20 BAPI Header Data: Contract Object Key

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameter ExtensionOut
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameter ExtensionOut
PSOBJECTCORR BAPI_CTRACPSOBJECT_CORR 60 X BAPI Contract Object Correspondence Recipient
PSOBJECTEXMT BAPI_CTRACPSOBJECT_EXMT 45 X BAPI Contract Object Exception Period
PSOBJECTFACTS BAPI_CTRACPSOBJECT_FACTS 144 X BAPI Facts for Public Sector Contract Object
PSOBJECTLOCK BAPI_CTRACPSOBJECT_LOCK 129 X BAPI Contract Object Locks
RETURN BAPIRET2 548 Return Parameters

Functionality
With this method, you can create a contract object easily using samplevalues. You have to specify the contract object type, or for anexternal number assignment, the contract object number that you wantfor a contract object. Standard values defined for a contract objecttype in Customizing are entered for all other data. You can alsooverride these sample values by specifying import data on theinterface.
One or several business partners with a contract account category andcontract account can be assigned to the contract object, however, thedefined sample values are also taken into account. Only the businesspartner and a suitable contract account have to be specifed for thispurpose. Only one dependent record is created for each method call.Blocks are optional.
You can also create several records from different correspondencerecipients and exception periods for the correspondence dunning. Samplevalues are not supported.
The parameter 'Return' can deliver several message numberssimultaneously.

Example

Notes
The BAPI uses the customer enhancement concept with 'BAPI TableExtensions', for which you can use the following structures:

  • BAPI_TE_DPSOB, BAPI_TE_DPSOB_BP_ACC

  • BAPI_TE_DPSOB, BAPI_TE_DPSOB_BP_ACC_COR

  • BAPI_TE_DPSOB_BP_ACC_COR

  • Customer enhancement P510 is called so that the data transferredfrom the BAPI can be checked by you and, if applicable, additonal datadetermined.
    Customer enhancement P515 is called at the end of the method inorder to fill the output extension.
    You can find an overview of all customer enhancements in Customizingunder Financial Accounting -> Contract Accounts Receivable andPayable-> Program Enhancements -> Define Customer-Specific FunctionModules.

    Description
    This export parameter contains all the accounting data of a contractobject you have created.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

    Description
    This export parameter contains all the basic data of a contract objectyou have created.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

    Value range
    The administrative data, for example, the creation date is notdisplayed. However, this data is stored in the database and can bedisplayed using the method readcontract object.

    Description
    This export parameter contains the CHAR32 GUID of the contract objectthat you have created or for which you have created more contractaccount data.

    Description
    This export parameter contains the key of a contract object that youcreated or for which you created additional contract account data.

    Description
    In this import parameter, enter the contract account
    of the contract object to be created.

    Description
    In this import parameter, enter the business partner
    of the contract object to be created.

    Description
    This import parameter contains the accounting data that is assigned to acontract object or that can be created or changed. If this importparameter was filled with data, these specifications take precedenceover the default values made in Customizing.
    INCLUDE BAPI_PARAM_PSOBJECTACCOUNT OBJECT DOKU ID TX

    Description
    This import parameter contains the basic data and administrative datathat is assigned to a contract object or can be created or changed. Ifthis import parameter was filled with data, the specifications takeprecedence over the default values defined in Customizing.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

    Description
    In this import parameter you define the GUID of a contract object to becreated.

    Description
    You determine a contact object's key in this import parameter.
    Creating Basic Data
    This parameter's value entry is only transferred by the system if the
    contract object type assigned to the contract object is marked forexternal number assignment. In the case of an internal numberassignment, the import parameter that you entered is not processed bythe system.The system determines the new contract object keyautomatically.
    Creating Accounting Data (Contract Account Data)
    If you want to create a new accounting data (contract account data)
    record for an existing contract object, the contract object to be addedis selected using the key number that you specified. According to theseprerequisites, this import parameter's value entry is not justprocessed with contract objects with externally assigned keys, but isalso processed by contract objects with internally assigned keys.

    Value range
    Determine an alphanumeric key for the contract object.

    Description
    This function module is used to check the instance specifications in thewriting BAPIs before the object instance is actually created in thedatabase. The object instance is merely simulated and the data is notupdated (posted).
    The following values are possible:

    • ' ' (no value)

    • No value means that the update takes place. This is the standard settingand meets the expectations of the person calling the program.
      • 'X'

      • This value means that the BAPI is called in simulation mode only andtherefore no update occurs when it is called.

        Description
        In this import parameter, you define the contract object type of acontract object that is to be created. Default values are entered forthe contract object when a contract object type isassigned.
        Contract object types are defined in Customizing.

        Description
        With this import parameter, you can define whether the new/changed datais written with an update module or directly in the database.
        In both cases, database changes in the Logical Unit of Work (LUW)
        still open can be reversed using a ROLLBACK WORK. Thedifference is that with the update task, the data to be written forsystem checks (for example, when creating a document that should referto a contract object just created) will not be regarded until aCOMMIT WORK has occurred.

        Default
        The parameter is set to 'X' by default which means an update module isused for the database update.

        Description
        In this import parameter, additional data can be transferred to themethod, for example if you want to create customer-specific data for acontract object with customer enhancement P510.

        Description
        In this export parameter, additional data processed by the method canbe transferred, for example, when you process customer-specific datausing customer enhancement P515.
        Customer enhancement P515 is called up at the end of the method inorder to fill the output extension.

        Description
        You can define additional or different correspondence recipients for acontract object in this table.
        The control data for correspndence in a contract object is onlyincluded by the system if the indicator correspondence parameter hasbeen set to active. Otherwise, the control data of the assignedcontract account is included.
        INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

        Description
        You can define an exception period for a contract object's inboundcorrespondence in this table.
        INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

        Description
        In this table you can set locks for the processing of assignedaccounting data in a contract object . The contract object has the locktype 51.
        Lock entries in the contract object are only included by the system ifthe indicator Payment Data Active for Contract Object orCorrespondence Parameter Active for Contract Object is set.Otherwise, the control data of the assigned contract account isincluded.
        INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

        Value range
        The following processes can be locked in a contract object:
        Type,,Process
        01,,Dunning
        02,,Incoming Payment
        03,,Outgoing Payment
        05,,Invoice Creation
        07,,Correspondence Dunning
        INCLUDE BAPI_TABLE OBJECT DOKU ID TX

1584250BAPI enhancement for creation of virtual BP/CA/CO