on 2024 Oct 13 7:00 AM
Hello Experts,
We have a requirement to trigger the workflow based on pricing communication data. We created the workflow and implemented Badi SD_APM_SET_APPROVAL_REASON but it doesn't have pricing communication as importing and even standard CDS available for pricing will not return the pricing data during first time create of sales order as it is not created yet. There are blog that says about the data to be transferred from Order Item to Pricing, however is there any business process that would pass on the data from pricing communication to item of the order. Just FYI, order item has subtotal fields available to aggregate the values from the pricing procedure but all of them are occupied. Unfortunately, I couldn't find any solution for this yet. Have anyone came across such requirement and able to crack, request your inputs on it.
Best,
HP
Request clarification before answering.
Hello,
Given the scenario you've described, where standard CDS views do not provide access to pricing data at the time of sales order creation, and existing subtotal fields within order items are already utilized, you might consider a few potential approaches:
1. **Custom CDS View and Enhancement**: Develop a custom CDS view that can aggregate and fetch the required pricing communication data at the time of sales order creation. This might involve collaborative efforts between ABAP and functional teams to ensure that the view can access relevant pricing tables and fields. After creating the custom CDS view, you could adapt the BAdI `SD_APM_SET_APPROVAL_REASON` or implement another BAdI that better fits the timing and data requirements for starting the workflow.
2. **Data Transfer via User Exits or BAdIs (Before Save)**:
- You might explore using a User Exit or a BAdI that triggers before the sales order is saved, allowing you to manipulate or pass data into the pricing communication. For instance, you might use `USEREXIT_PRICING_PREPARE_TKOMK` (from the old ERP pricing user exits, if relevant and available in your current system context) to pass custom pricing-related data.
- This may provide a pathway to integrate pricing communication data into the sales order at an appropriate step, where the workflow trigger can effectively access this data.
3. **Workflow Condition Enhancements**:
- Modify the workflow start conditions to include additional checks that can indirectly determine if the necessary pricing data is present or meets certain criteria. This might not directly use the pricing communication data but can use correlated fields or flags set by previous enhancements during order processing.
4. **Post-Save Data Fetch and Asynchronous Workflow Start**:
- Consider an approach where you initially save the sales order without triggering the workflow, then run a background job or a real-time event-based trigger (if such mechanisms are acceptable and feasible) that checks the newly created or updated sales orders for the required pricing conditions and subsequently starts the workflow. This approach separates data checking and workflow initiation into two distinct steps, allowing complete data availability during the workflow check.
Each of these approaches has its complexities and would need detailed exploration and testing. Make sure to evaluate the impact on system performance, especially if real-time data processing is involved, and ensure that the solution aligns with SAP best practices for extensions and custom developments.
Best regards,
Dequan Xu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 9 | |
| 8 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.