5

Brazil Enabled PR creation from SAP Ariba B&I for Nota Fiscal requirements.

 1 year ago
source link: https://blogs.sap.com/2022/11/15/brazil-enabled-pr-creation-from-sap-ariba-bi-for-nota-fiscal-requirements./
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.
November 15, 2022 4 minute read

Brazil Enabled PR creation from SAP Ariba B&I for Nota Fiscal requirements.

Mapping the SAP Ariba Brazilian procurement fields!

While working with a client rolling out SAP S/4HANA and SAP Ariba products to all their plants globally I found that in order to use SAP Ariba Buyer solutions I would have to enhance the Requisition process.  This is necessary to create a Purchase Requisition with SAP Ariba Buyer and Invoicing product connected to SAP S/4HANA.

SAP S/4 HANA already has fields enabled for Brazil, but these fields were not available in SAP Ariba (or mapped 1:1 in the Cloud Integration Gateway, CIG).  Indirect procurement leaders were not too happy about using SAP S/4HANA for indirect buys just for Brazil, so I had to try to save the day. So, I found a way!

First you will have to create a Service Request with SAP Ariba to create these field in B&I.  They can be Flex Master Data but they will have to also refer to a CUSTOMSTRING so you will be able to MAP the loaded data to CIG/Addon.   Once SAP Ariba completes this step and your company loads the Flex Master Data Fields, its necessary to map them via the CIG.  The next ask was to make sure these fields are used for Brazilain Company Codes (BUKRS).  (Could also use Plant)

Note* For testing your CIG consultant can Hard Code the data within these fields to allow the PR to create the PO using the FM ARBCIG_BAPI_PO_CREATE1

Note* Another consideration is for Contracts, these fields can be enabled in the ICM for Contract buys or Catalog buys..

Note* Another option is to make sure only certain Material Groups are used to pull the correct data from the Brazilian tables, (mapping in Sap S/4) but to allow the Buyer to pick the exact one, (since Brazilian Rules and Government regulations are so strict), its best to allow the Buyer to select the Correct data in the PR.

These are the fields I had created in SAP Ariba (below)

Tax%20Control%20Ariba%20Buyer%20PR%20Fields

Tax Control SAP Ariba Buyer PR Fields

Below is my mapping in CIG

CIG%20MAP

CIG MAP

The fields below are from the Target that can be used to help Material and Service PR creation.

BRAS_NBM

MATL_USAGE

MAT_ORIGIN

INDUS3

IN_HOUSE

Add Target Variable = Add Position Variable to PurhcaseOrderExportRequest (Note: DO THE SAME FOR CHANGE PO TOO) at Item (under PO_Items)

Note* Since the NCM data from the PR can be either service or material they share the same field, its necessary to map them each.  I wanted to try to group them but decided to create a duplicate line item and map the service only.  This was the easiest way for me.  *shown below

The add Source Condition to Item in cXML structure. USE Position Variable…

This needs to be done for EACH line item connected so do the same to MATL_USAGE/MAT_ORIGIN/INDUS3 (I am not mapping the IN_HOUSE item, we don’t use).

Position%20Variable

Position Variable

CIG-COND-3.png
CIG-CON-4.png
CIG-CON-5.png
CIG-CON-6.png

Insert Duplicate Line Item

Created%20New%20Item%20Line%202

Created New Item Line 2

Item2%20Mapped%20as%201%20above%20either%20Service%20or%20Material

Item2 Mapped as 1 above either Service or Material

NOW that the Data is Mapped, check the data being pushed in TEST Implement your solution…

SELECT%20ACTIVE%20TEST

SELECT ACTIVE TEST

TEST%20IT....

TEST IT….

Once the data is pushed to the NEW fields in your TEST PO you should be able to review with the ABAP team to validate the fields are being used in the PO.  Below is the Brazilian Tab from SAP Ariba being loaded.  (it might be necessary to enhance your Badi to get these working!)

pocreated-1.png

S/4 Hana PO Brazilian Fields

*SAP S/4HANA 2020 FIELDS ILLUSTRATED BELOW

BRAS_NBM  = J_1BNBMC01

MATL_USAGE  = J_1BMATUSE

MAT_ORIGIN = J_1BMATORG

INDUS3 = J_1BINDUS3

IN_HOUSE = J_1BOWNPRO

ABAPVIEW.png

When the ABAP team reverted some code to the BAPI and made sure I are selected the correct Company Code, I was successful in creating a PO from SAP Ariba Buyer.

NOTE* (For Testing I had the ABAP team configure Structure data from PO_EXTENSIONIN Valuepart1/Valuepart2 as a default from the CIG Mapping, this was just to test before I added the custom fields).

If you have any comments or suggestions on how your company pushed Purchase Request to SAP from SAP Ariba let us know in the comments.

Respectfully,

Rob Demchuk


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK