Ansicht
Dokumentation

BAPI_PPR_MAINTAIN - Method "Maintain Partner/Product Ranges (PPRs)"

BAPI_PPR_MAINTAIN - Method "Maintain Partner/Product Ranges (PPRs)"

BAL Application Log Documentation   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This method allows the independent maintenance (create/change) of the following objects of Partner/Product Ranges (PPRs):

  • Headers (input table HeaderData),
  • Header descriptions (input table HeaderDescription),
  • Header organizational data (input table HeaderOrganisationalData),
  • Items (input table ItemData)
  • Item descriptions (input table ItemDescription),
  • Item business partner data (input table ItemBusinessPartnerData),
  • Item product data (input table ItemProductData),
  • Item validity period data (input table ItemTimeStampData) and
  • Item rule parameter data (input table ItemRuleParameterData).

All input parameters and input tables are optional, except the success/error message Log Return.

An authority check is performed using the authorization object CRM_PRP_BP. Depending on the PPR types defined in the Customizing of the CRM Online System, it is checked, which activities (Create and/or Change) are allowed.

General Remarks

  • Each line of the below mentioned input data tables must contain a valid PPR type defined in the CRM Customizing. If, at least, one wrong PPR type is contained, all input data is rejected and nothing will be posted to the database.
  • For each PPR type used within this method, an authorization profile using the authorization object CRM_PRP_BP must be maintained in the CRM system. Possible activities are 'Create' and/or 'Change'.
  • For each line of the below mentioned input data tables, the fields
  • Reference_Kind and

  • Processing_Mode

mustbe filled.
For the field Reference_Kind, the values
  • 'A' (referenced object is a PPR header; used for input of header data, header description data, header organisational data and for item data),

  • 'B' (referenced object is a PPR item; used for input of item description data, item business partner data, item product data and item validity period data),

  • 'D' (referenced object is a PPR item extension, i. e. business partner, product, validity period; used for input of PPR rule parameter data)

and for the field Processing_Mode, the values
  • 'A' (for creating data),

  • 'B' (for changing data) and

  • 'D' (for deleting data)

are possible.
  • If PPR data is to be created in the database,
  • each input table line must contain a value for the field Handle to identify it.

  • for each input table line - except header data -, the field Reference_Handle or Reference_Guidmust be filled with the value of the respective field Handleor GUID(Globally Unique ID) of the related PPR header or item.

  • If existing PPR data is to be changed/deleted in the database,
  • each input table line must contain the value of the respective field Guidof the related entry in the database in the input table field Guid.

  • each input table line must contain the value of the respective field Guidof the related PPR header or item in the input table field Reference_Guid.

  • If existing PPR Data is to be changed, only those fields of the respective input data line are to be filled, whose values are to be changed in the database.
  • Note that false input data is reported in the error message log Return, but the data is nevertheless posted to the database. Therefore, the error message log must be carefully considered and checked to recognize wrong data. The erroneous lines have to be corrected and posted again, so that the data in the database is correct and consistent.
  • For defined and allowed input values, have a look at the data elements contained in the Data Dictionary structures BAPIBUS1195_<OBJECT>_COMwith
    • PRPADM_H (for PPR Headers),

    • PRP_DESCR_H (for PPR Header Descriptions),

    • PRP_ORG_H (for PPR Header Organisational Data),

    • PRPADM_I (for PPR Items),

    • PRP_DESCR_I (for PPR Item Descriptions),

    • PRP_BUPA_I (for PPR Item Business Partners),

    • PRP_PROD_I (for PPR Item Products),

    • PRP_TS_I (for PPR Item Validity Periods)

    • PRP_PAR_I (for PPR Rule Parameter Data).

    Import Parameters

    • For the parameter CheckMode, the values 'X' (= 'Yes' or 'True') or ' ' (= 'No' or 'False') are possible. If this flag is set equal to 'X', the input data is only checked and contained errors are then reported in the Error Message Log (table Return), but no data is posted to the database.
    • If PPR header or item descriptions are to be entered into the system, it is necessary that the related language is specified. This can be done via the input parameter Language for a language key or - alternatively - via the input parameter LanguageIso for the ISO code of a language key. Furthermore, a language is necessary to retrieve the text of the messages of the Success/Error Message Log Return in the desired language.
    If both import parameters Languageand LanguageIso are not specified, there will be a corresponding message in the Succes/Error Message Log.

    Import Tables

    HeaderData

    With this table, the data of Partner/Product Ranges (PPRs) at header level can be entered. When the provided PPR type has no internal PPR ID generation (defined in the CRM Customizing), a PPR ID must be provided if the processing mode is equal to 'A' (create), otherwise a message is created and stored in the Error Message Log Return. The respective input data line is ignored.

    Either the field Guid(Globally Unique ID) or the field Handlemust be filled, depending on the value of the field Processing_Mode.

    The field Reference_Kind must be equal to 'A' (header data).

    The PPR status (structure field PPR_Status) can have the values

    • '1' (In Process),

    • '2' (Active),

    • '3' (To be Deleted) or

    • '4' (To be Archived and Deleted).

    Status changes are allowed

    • from 'In Process' to 'Active',

    • from 'In Process' or 'Active' to 'To be Deleted' or 'To be Archived and Deleted' and

    • from 'To be Deleted' to 'To be Archived and Deleted'.

    Status changes are notallowed

    • from 'Active', 'To be Deleted' or 'To be Archived and Deleted' to 'In Process' ,

    • from 'To be Deleted' or 'To be Archived' to 'Active' and

    • from 'To be Archived and Deleted' or 'To be Archived' to 'Active' .

    HeaderDescriptionData

    The field Reference_Handle must contain the value of the field Handle of the related PPR header to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR header, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'A' (Reference_Handle or Reference_Guid refer to a PPR header).

    HeaderOrganisationalData

    The field Reference_Handle must contain the value of the field Handle of the related PPR header to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR header, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'A' (Reference_Handle or Reference_Guid refer to a PPR header).

    ItemData

    The field Reference_Handle must contain the value of the field Handle of the related PPR header to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR header, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'A' (Reference_Handle or Reference_Guid refer to a PPR header).

    The possible and allowed item types ('1': 'Combination of Business Partners, Products and Validity Periods' or '2': 'Reference other PPRs') depend on the CRM Customizing Settings of the respective PPR type and are entered in the structure field PPR_Item_Type.

    ItemDescriptionData

    The field Reference_Handle must contain the value of the field Handle of the related PPR item to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR item, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'B' (Reference_Handle or Reference_Guid refer to a PPR item).

    ItemBusinessPartnerData

    The field Reference_Handle must contain the value of the field Handle of the related PPR item to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR item, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'B' (Reference_Handle or Reference_Guid refer to a PPR item).

    The possible business partner reference types (e. g. '1': 'Business Partner', '2': 'Business Partner Group Hierarchy', '88': 'Rule', etc.) depend on the CRM Customizing Settings of the respective PPR type and are entered in the structure field Reference_Type.

    ItemProductData

    The field Reference_Handle must contain the value of the field Handle of the related PPR item to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR item, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'B' (Reference_Handle or Reference_Guid refer to a PPR item).

    The possible product reference types (e. g. '1': 'Product', '2': 'Product Category', '88': 'Rule', etc.) depend on the CRM Customizing Settings of the respective PPR type and are entered in the structure field Reference_Type.

    ItemTimeStampData

    The field Reference_Handle must contain the value of the field Handle of the related PPR item to be created, if the field Processing_Mode is equal to 'A' (create).

    The field Reference_Guid must contain the value of the Guid of the related, existing PPR item, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    The field Reference_Kind must be equal to 'B' (Reference_Handle or Reference_Guid refer to a PPR item).

    The possible validity period reference types (e. g. '1': 'Date: From / To', '88': 'Rule', etc.) depend on the CRM Customizing Settings of the respective PPR type and are entered in the structure field Reference_Type.

    ItemRuleParameterData

    With the help of this table, values for PPR Rule Parameter Objects (defined in the CRM Customizing) can be entered.

    • If the parameters belong to a PPR Business Partner Rule,
    • the field Reference_Handle must contain the value of the field Handle of the related PPR item business partner entry defining the rule to be created, if the field Processing_Mode is equal to 'A' (create).

    • the field Reference_Guid must contain the value of the Guid of the related, existing PPR item business partner entry defining the rule, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    • an input line for the corresponding PPR Business Partner Rule must be contained in the input table ItemBusinessPartnerDatawith the same value for the field Processing_Modeof this input line.

    • the field Rule_ID must be filled.

    • the field Object_Type must be equal to 'PA'.

    • If the parameters belong to a PPR Product Rule,
    • The field Reference_Handle must contain the value of the field Handle of the related PPR item product entry defining the rule to be created, if the field Processing_Mode is equal to 'A' (create).

    • The field Reference_Guid must contain the value of the Guid of the related, existing PPR item product entry defining the rule, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    • an input line for the corresponding PPR Product Rule must be contained in the input table ItemProductDatawith the same value for the field Processing_Modeof this input line.

    • the field Rule_ID must be filled.

    • the field Object_Type must be equal to 'PB'.

    • If the parameters belong to a PPR Validity Period Rule,
    • The field Reference_Handle must contain the value of the field Handle of the related PPR item validity period entry defining the rule to be created, if the field Processing_Mode is equal to 'A' (create).

    • The field Reference_Guid must contain the value of the Guid of the related, existing PPR item validity period entry defining the rule, if the field Processing_Mode is equal to 'A' (create), 'B' (change) or 'D' (delete).

    • an input line for the corresponding PPR Validity Period Rule must be contained in the input table ItemTimeStampData with the same value for the field Processing_Modeof this input line.

    • the field Rule_ID must be filled.

    • the field Object_Type must be equal to 'PC'.

    The field Reference_Kind must be equal to 'D' (Reference_Handle or Reference_Guid refer to a PPR item extension).

    InputFieldData

    This table is used to specify

    • which field values of an input data line are to be entered into the database and checked by the system for validity and consistency, if the processing mode is equal to 'A' (create).
    • which field values of an input data line are changed/modified with respect to the current values in the database and whose entered values must be checked by the system, if the processing mode is equal to 'B' (change) or 'D' (delete).

    Such a line of the table InputFieldData must be available for each field of an object (PRPADM_H, PRP_DESCR_H, PRP_ORG_H, PRPADM_I, PRP_DESCR_I, PRP_BUPA_I, PRP_PROD_I, PRP_TS_I and PRP_PAR_I) to be created/changed of an existing PPR Header / Item or a PPR Header / Item to be created.

    If this line is not provided by the user as an input line, it is automatically created by the system, but only for non-zero input values. If, e. g. the value ' ' is to be entered for the exclusion flag at PPR header level, this cannot be recognized by the Method and therefore, for such a case an input line must be created by the user.

    • For the objects PRPADM_H, PRP_DESCR_H, PRP_ORG_H and PRPADM_I,
    • the field Reference_Handle of an input line for table InputFieldData must contain the value of the field Handle of the related PPR header to be created, if the field Processing_Mode is equal to 'A' (create).

    • the field Reference_Guid of an input line for table InputFieldDatamustcontain the value of the Guid of the related, existing PPR header, if the field Processing_Mode is equal to ''B' (change) or 'D' (delete).

    • For the objects PRP_DESCR_I, PRP_BUPA_I, PRP_PROD_I, PRP_TS_I and PRP_PAR_I,
    • the field Reference_Handle of an input line for table InputFieldData must contain the value of the field Handle of the related PPR item to be created, if the field Processing_Mode is equal to 'A' (create).

    • the field Reference_Guid of an input line for table InputFieldDatamustcontain the value of the Guid of the related, existing PPR item, if the field Processing_Mode is equal to 'B' (change) or 'D' (delete).

    The field Reference_Kind must be filled according to the PPR Object to which it refers:

    • 'A' for PPR headers, descriptions and header organisational data as well as for PPR items,
    • 'B' for PPR item descriptions, 'item business partner data, item product data, item validity period data and item rule parameters.

    The field Fieldname must contain the name within the respective SAP-internal structures of a field to be created/changed, to which the structures BAPIBUS1195__COM (see above) refer:

    • BAPIBUS1195_PRPADM_H_COM refers to CRMT_PRPADM_H_COM,
    • BAPIBUS1195_PRP_DESCR_H_COM refers to CRMT_PRP_DESCR_H_COM,
    • BAPIBUS1195_PRP_ORG_H_COM refers to CRMT_PRPADM_H_COM,
    • BAPIBUS1195_PRPADM_I_COM refers to CRMT_PRPADM_I_COM,
    • BAPIBUS1195_PRP_DESCR_I_COM refers to CRMT_PRP_DESCR_I_COM,
    • BAPIBUS1195_PRP_BUPA_I_COM refers to CRMT_PRP_BUPA_I_COM,
    • BAPIBUS1195_PRP_PROD_I_COM refers to CRMT_PRP_PROD_I_COM,
    • BAPIBUS1195_PRP_TS_I_COM refers to CRMT_PRP_TS_I_COM,
    • BAPIBUS1195_PRP_PAR_I_COM refers to CRMT_PRP_PAR_I_COM.

    Success / Error Message Log

    The Success / Error Message Log of the method Maintain will be returned in the output table Return.

    Example

    Notes

    Further information





    Parameters

    CHECKMODE
    HEADERDATA
    HEADERDESCRIPTION
    HEADERORGANISATIONALDATA
    INPUTFIELDDATA
    ITEMBUSINESSPARTNERDATA
    ITEMDATA
    ITEMDESCRIPTION
    ITEMPRODUCTDATA
    ITEMRULEPARAMETERDATA
    ITEMTIMESTAMPDATA
    LANGUAGE
    LANGUAGEISO
    RETURN

    Exceptions

    Function Group

    CRM_PRP_BAPI

    ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
    This documentation is copyright by SAP AG.

    Length: 27076 Date: 20240523 Time: 173011     sap01-206 ( 308 ms )