6

Pricing Conditions on the PO Flip Invoice sent to the SAP ERP system

 1 year ago
source link: https://blogs.sap.com/2022/12/20/pricing-conditions-on-the-po-flip-invoice-sent-to-the-sap-erp-system/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Pricing Conditions on the PO Flip Invoice sent to the SAP ERP system

One of the requirements we can have in projects when implementing SAP Business Network solutions is the inclusion of custom pricing details on the invoice created in SAP Business Network and sent to the SAP system.

Once the pricing conditions are implemented and available in the SAP Business Network, it is imperative to consider the EDI side related to integrated suppliers. These suppliers create invoices on their end, which must be sent to CIG and SAP systems without errors. It is necessary to configure translations on the IDOC´s KSCHL field available in both Purchase Order and Invoice CIG mapping documents. Those translations must include standard EDI names in the attached MS Excel document. After translations on the KSCHL field are done, suppliers (including integrated ones) will see those names on both the purchase order and the invoice. They must follow those names accordingly in order to avoid errors on the invoice that returns to the SAP system. It is not necessary to configure allowance and charges in the list that is available on the SAP Business Network´s Transaction Rules because the purchase order will contain this information. By doing so, when suppliers PO Flip the invoice, the allowance and/or charges would default automatically and suppliers must follow up accordingly. In cases where new charges become available on the Invoice, suppliers must get in touch with buyers to align on how to book those new charges. It is a common best practice to always follow what´s on the purchase order when creating an invoice in the SAP Business Network.

To get started on the solution in this blog, you must first follow the blog from my coworker Filipe Migueis to get the allowances and/or charges in the purchase order that is available in the SAP Business Network:

https://blogs.sap.com/2020/07/02/pricing-conditions-on-the-purchase-order-sent-to-ariba-network/comment-page-1/

As mentioned in the blog above, the solution presented here shows the mapping of price conditions related to the “Modification Section” on the cXML schema available in CIG. These mapping will be available in both XML segments:  <AdditionalDeduction> and <AdditionalCost> as shown below:

cXML%20Structure

cXML InvoiceDetailRequest Structure – SAP Cloud Integration Gateway

Once all these mappings were done accordingly, then you can proceed to do the mappings on the invoice side by following the steps below.

Before continuing with this mapping, you must have done the mapping in the “OrderRequest” cXML Document Type as mentioned in the previous blog above. When these steps are done successfully within CIG, you must check and confirm that your suppliers will see the custom Allowance and Charges in the SAP Business Network Purchase Order sent from your SAP system. If this is not taking place, then please stop and review your mapping configurations following the blog above before you proceed with the steps below.

The only adjustment needed on the Purchase Order mapping related to these custom allowances or charges is the translation on the KSCHL field, considering the cXML names described in the attached document (“cXML Allowances and Charges”).

When mappings are done on the purchase order side, then test on your end and create an invoice in the SAP Business Network to confirm you see the Allowances and/or Charges in the Invoice screen. If you have achieved this test successfully, then follow the steps below to do the mappings on the invoice side in CIG.

It is critical to consider the integrated suppliers where translations are needed as stated above and shown below.

Steps:

  1. Log into CIG and go to My Configurations -> Mappings.
  2. Find the cXML Document Type “InvoiceDetailRequest” along with the Buyer Document Type “Invoice.” Click on the Pencil icon to get inside the mapping.
CIG%20invoiceDetailRequest%20Mapping

CIG invoiceDetailRequest Mapping- SAP Cloud Integration Gateway

You will be working on the “InvoiceDetailRequest” cXML Document Type with “Invoice” as Buyer Document Type. Click on the “pencil” icon if you have already done mappings here. Otherwise, click on the “plus” sign to configure your mappings.

Once inside, you will see that on the left-hand side, you have the cXML InvoiceOrderDetailRequest document; on the right-hand side, you have the AddOn Invoice. Remember that you will be working on this mapping the opposite way you worked on the OrderRequest mapping.

Mappping%20Detail%201

Mapping Detail Step 2- SAP Cloud Integration Gateway

  1. Moving on, you need to go to the left-hand side and find where the Allowance or Charge is allocated. Below is the allocation:
Mapping%20Detail%202

Mapping Detail Step 3- SAP Cloud Integration Gateway

  1. Under the “InvoideDetailItem” segment, scroll down until you get here:
Mapping%20Detail%20Step%204

Mapping Detail Step 4- SAP Cloud Integration Gateway

You will be doing your mappings under the “Modifications” segment. Remember that you may have either an “AdditionalDeduction” or an “AdditionalCost.” It is up to you where you will do the mappings based on your SAP system Materials Management (MM) configuration. It is not true that you must do configurations for Allowance and configurations for Charges. All depends on the MM solution implemented on your end.

This is strongly related to the Materials Management Configuration done on the Purchase Order Pricing in your SAP System. Before mapping here, you must understand what´s working there in your SAP System, and you must have tested those line-item conditions successfully in both the Purchase Order and the Invoice in your SAP system. If this is not working correctly in your SAP system, then these mappings will not work as well when integrating your MM solution into SAP Business Network.

  1. Moving on with the mapping, let´s find out the four segments we need to work with. We will follow what was done on the “OrderRequest” mapping following the blog mentioned above by Filipe Migueis. Therefore, we need to see the right-hand side of the screen and find in the IDOC what we need to map to our SAP system.

On the IDOC, remember that you will go to the line-item level and find the right segment there. By doing so, you need to go to E1EDP01 (I would like to call this the “line-item father”) and then E1EDP05 (I would like to call this the “line-item child”).

IDOC%20Segment%20E1EDP05

IDOC Segment E1EDP05 – SAP IDOC Segment Definition

Below is how the final mapping would look like:

Mapping%20Detail%20Step%205

Mapping Detail Step 5- SAP Cloud Integration Gateway

  1. You can see above that I have triplicated the child because I do not want to touch the original E1EDP05. Instead, I will copy this segment two times because I need to map two situations: Additional Deduction and Additional Charge.
  1. Following the initial thought above, we need to find the four fields we need to map. Therefore, open the E1EDP05 #2:
Mapping%20Detail%20Step%207

Mapping Detail Step 7- SAP Cloud Integration Gateway

  1. Scroll down:
Mapping%20Detail%20Step%208

Mapping Detail Step 8- SAP Cloud Integration Gateway

The four fields we need to map are:

KSCHL

KOTXT

BETRG

KOEIN

  1. Map KSCHL to related cXML segment to work for Additional Deduction fields:
Mapping%20Detail%20Step%209

Mapping Detail Step 9- SAP Cloud Integration Gateway

  1. This mapping above is done on E1EDP05 #2 and E1EDP03 #3 because remember that you need to compensate possibilities on either (1) allowance or (2) charge.
Mapping%20Detail%20Step%2010

Mapping Detail Step 10- SAP Cloud Integration Gateway

Steps to do this mapping. The steps below are shown on the E1EDP05 #2 IDOC segment:

  1. Map line from left to right (blue line shows as below):
Mapping%20Detail%20Step%2011

Mapping Detail Step 11- SAP Cloud Integration Gateway

  1. Right-click on the blue line to add the “Position Variable”:
Mapping%20Detail%20Step%2012.1

Mapping Detail Step 12.1- SAP Cloud Integration Gateway

Mapping%20Detail%20Step%2012.2

Mapping Detail Step 12.2- SAP Cloud Integration Gateway

  1. The yellow line shows above – scroll up until you find the child’s father: E1EDP01
Mapping%20Detail%20Step%2013

Mapping Detail Step 13- SAP Cloud Integration Gateway

  1. Click on it
Mapping%20Detail%20Step%2014

Mapping Detail Step 14- SAP Cloud Integration Gateway

  1. The yellow line disappears. Scroll back down again on the same field KSCHL and click on the blue line again:
Mapping%20Detail%20Step%2015

Mapping Detail Step 15- SAP Cloud Integration Gateway

  1. Right-click and select “Source Condition” now:
Mapping%20Detail%20Step%2016

Mapping Detail Step 16- SAP Cloud Integration Gateway

  1. The yellow line is on the left. Scroll up until you find its father, “InvoiceDetailItem”:
Mapping%20Detail%20Step%2017

Mapping Detail Step 17- SAP Cloud Integration Gateway

  1. Click on it:
Mapping%20Detail%20Step%2018

Mapping Detail Step 18- SAP Cloud Integration Gateway

  1. Select Position Variable:
Mapping%20Detail%20Step%2019

Mapping Detail Step 19- SAP Cloud Integration Gateway

  1. Click Ok to accept this mapping.

Mapping%20Detail%20Step%2020.1
 

Mapping Detail Step 20.1- SAP Cloud Integration Gateway

The yellow line disappears above. You have done the 1st mapping leg. This is what the work done so far must look like:

Mapping%20Detail%20Step%2020.2

Mapping Detail Step 20.2- SAP Cloud Integration Gateway

If not, then stop and redo the steps above.

  1. Do the 2nd mapping leg related to the actual segment on the child where the field value will be allocated.
  1. Back to the KSCHL field, place your cursor on top of the blue line, right-click, and 2nd Position Variable:
Mapping%20Detail%20Step%2022

Mapping Detail Step 22- SAP Cloud Integration Gateway

  1. Select its father, which is E1EDP05 #3:
Mapping%20Detail%20Step%2023

Mapping Detail Step 23- SAP Cloud Integration Gateway

The yellow line appears above, and now select its father, E1EDP05 #3.

  1. The yellow line disappears. Do the Source Condition on its father on the left:
Mapping%20Detail%20Step%2024.1

Mapping Detail Step 24.1- SAP Cloud Integration Gateway

Mapping%20Detail%20Step%2024.2

Mapping Detail Step 24.2- SAP Cloud Integration Gateway

  1. A yellow line on the left appears, and now you need to find its father, which is the “Modification” segment.
  2. Click on it:
Mapping%20Detail%20Step%2026

Mapping Detail Step 26- SAP Cloud Integration Gateway

  1. Select Position Variable.
  2. And now, select the 2nd variable name from the list above and click Ok. Once you do that, the mapping should show as below:
Mapping%20Detail%20Step%2028

Mapping Detail Step 28- SAP Cloud Integration Gateway

  1. To see it with more details, right-click on the blue line and Show Conditions:
Mapping%20Detail%20Step%2029.1

Mapping Detail Step 29.1- SAP Cloud Integration Gateway

This is what the work done so far must look like:

Mapping%20Detail%20Step%2029.2

Mapping Detail Step 29.2- SAP Cloud Integration Gateway

  1. Finally, you must select the father and click on Create/Replace Node:
Mapping%20Detail%20Step%2030.1

Mapping Detail Step 30.1- SAP Cloud Integration Gateway

Once you do that, a green light appears on it, making sure you have created the Node and its related mappings:

Mapping%20Detail%20Step%2030.2

Mapping Detail Step 30.2- SAP Cloud Integration Gateway

Done. You can save now and continue with the other fields where you will do the same steps mentioned above for each Modification Segment on the cXML “InvoiceDetailRequest” document.

Once you have done all mappings in all four fields, you need to test your mappings in CIG with a PO Flip Invoice cXML you saved from the SAP Business Network. Remember that the PO must contain the allowance and/or charge allocated following the blog mentioned above. Otherwise, these mappings here will not work. Once tested, you must make sure that you see the same codes and values as shown in the PO. When this test is done, you can activate your mappings in CIG and then proceed with further testing with your users.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK