cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing Routine creation

SAPSupport
Employee
Employee
0 Kudos
189

Dear Team,

Business Requirement: 

Early Bird discount should apply in the invoices for domestic customer invoice for whom invoice document created before certain cutoff date of each month and these invoices should not having preceding document of contract. As the contract is already given with discounted price , there should not be applied any additional discounts.

To achieve this we are trying to create a new routine by Using Badi PRCG_DOCUMENT_ITEM_REQUIREMENT with a condition as below

  • Should trigger only for document category = M
  • Distribution channel = 10 (Domestic)
  • Sales order without proceeding document category = G (Contract)
  • Invoice date check < Cut off date of last PERSON_NAME via new Custom Object.

However in the said BADI, we could not find the sales document field to use to get or check if there is any reference document (type=G, contract) is used for validation, where this discount should not apply.

My questions here:

Could you please confirm if we are using the correct BADI or not, If not please help with correct BADI?

Is there a way we can enhance BADI to add additional required fields? Please help.

If there is any other process to be followed for such kind of requirements in Public cloud environment, please help with details for all our future enhancements.

 

Thank you.


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.

Accepted Solutions (1)

Accepted Solutions (1)

SAPSupport
Employee
Employee
0 Kudos

Dear customer,

This issue falls in to a how-to query which is out of the scope of standard Support.

Please you can review the following 2 documentations:

  1. Help portal - https://help.sap.com/docs/SAP_S4HANA_CLOUD/a376cd9ea00d476b96f18dea1247e6a5/82e0fb545ab4495ea83511ba...
  2. BADI Documentation of PRCG_DOCUMENT_ITEM_REQUIREMENT:

Use

This Business Add-In (BAdI) is used in the Pricing (SD-BF-PR) component. You can use this BAdI to check the fields of the document item for pricing requirements.

The method IS_PRCG_REQUIREMENT_FULFILLED allows you to check if the pricing requirement is fulfilled for the step in the pricing procedure or the access in the access sequence.

Parameters

Import Parameters

  • DOC_ATTRIBUTES
    Contains several attributes of the document for which pricing is executed. For example, the local currency or the document currency can be accessed.
  • DOC_DATES
    The pricing date of the document condition is transferred to the method.
  • ITEM_ATTRIBUTES
    Contains several attributes of the document for which pricing is executed. For example, the division, plant, or the material can be accessed.
  • ITEM_QUANTITIES
    Weights, volumes, and quantities associated with the condition item can be read using this parameter. Here, the ordered quantity and the ordered quantity unit are retrieved from this parameter.

Changing Parameters

  • PRICINGREQUIREMENTISFULFILLED
    This parameter specifies whether the requirement is fulfilled. If the parameter is initial, the requirement is not fulfilled, and the corresponding condition type is not considered in the pricing calculation.

Activities

Once you have implemented the BAdI, you must configure the following:

      1. In the 

Define Requirement in Pricing

       activity, you assign a routine number to the 

Requirement used in Pricing 

    (PRICING_REQUIREMENT) process enhancement option.
      2. In the same activity, you assign the filter value of the BAdI implementation as enhancement identifier (ID) for the 

Requirement for Document Item 

    (PRCG_RQMT_FOR_DOCUMENT_ITEM) process enhancement option task.
      3. In the 

Set Pricing Procedures

       or 

Maintain Access Sequences 

      activity, you assign the routine number to your custom pricing procedure or custom access sequence in the 

Requirement

     field.

Caution: You should use the statement RAISE EXCEPTION only for critical business errors or programming runtime errors. This statement causes a pricing error and therefore might block the processing of business documents.

Answers (0)