Prepare SAP S/4HANA On-Premise for the integration

Activate services

Setup in Cloud Connector

SAP Integration Suite configuration

Integration package configuration

These steps are typically done by a SAP Consultant or developer - they will be able to help you prepare SAP S4/HANA for the integration with Pleo.


Step 1: Activate services

Service name
Type

Description

Documentation

JournalEntryCreateRequest

Confirmation_In



SOAP

Service for synchronous journal entry processing in S4/HANA



Journal Entry API

API_CV_ATTACHMENT_SRV

ODATA
Service for document attachment management
Attachments API

API_COMPANYCODE_SRV

ODATAService for reading Company dataCompany code API
API_COSTCENTER_SRVODATAService for reading Cost CentersCost Center API
API_PROJECT_V2 /
API_PROJECT_V3
ODATAService for reading WBS elementsWBS elements API



1. SOAP services
  1. Run soamanager transaction
  2. Log in to the web-wizard
  3. Click Web Service Configuration
  4. Search for:
    • Object type is All
    • Object name is JOURNALENTRYCREATEREQUESTCONFI
  5. Select the service found
  6. Click Create Service
  7. Add the following details:
    • Service Name: JournalEntryPost
    • New Binding Name: JournalEntryPost
  8. Maintain Provider Securityby selecting the following options:
    • Transport Level Security: None (http)
    • Transport Channel Authentication: User ID/Password
  9. In the SOAP protocol stage, keep the default value and click Next
  10. Click Finish in Operation settings
  11. Make sure the State on the details screen is Active



 2. OData services 
  1. Document Attachment
    1. Run /n/IWFND/MAINT_SERVICE transaction
    2. Filter by External Service name: API_CV_ATTACHMENT_SRV
    3. Within ICF notes, make sure the status is Active
      • If the status is not active - Click ICF Node and select Activate
  2. Read company information
    1. Run /n/IWFND/MAINT_SERVICE transaction
    2. Click Add Service
    3. Filter by Technical Service name: API_COMPANYCODE_SRV
    4. Select the row with the service and click Add Selected Services
    5. Make sure that Technical Service name equals API_COMPANYCODE_SRV 
    6. Under Creation information click Local Object
    7. Enter the Package Assignment 
    8. Save the changes
  3. Read WBS elements V2 or V3
    1. Run /n/IWFND/MAINT_SERVICE transaction
    2. Filter by External Service name:
      • API_PROJECT_V2 - if version of the system is less than 2021 fsp00
      • API_PROJECT_V3
    3. Within ICF notes, make sure the status is Active
      • If the status is not active - Click ICF Node and select Activate
  4. Read Cost Center
    1. Run /n/IWFND/MAINT_SERVICE transaction
    2. Filter by External Service name: API_COSTCENTER_SRV
    3. Within ICF notes, make sure the status is Active
    4. If the status is not active - Click ICF Node and select Activate


3. Set up Authentication 


  For Basic authentication: Create technical user for services authentication 
  1. Run /nsu01 transaction
  2. Enter the name of the User
  3. Click Technical User
  4. Select User type: System
  5. Enter the password
  6. Click Confirm
  7. Run PFCG transaction
  8. Enter the name of the role
  9. Click Single Role
  10. Go to the Menutab
    1. Within From Menu, select From the SAP Menu followed by Local
    2. Tick the Accounting check box 
    3. Click Transfer 
    4. Save the changes
  11. Change to the Authorisationstab
    1. Click Change Authorization Data
    2. Click on Manually
    3. Enter the following authorisation objects in the empty fields:
      • C_PROJ_KOK
      • C_PRPS_KOK
      • F_BKPF_BED
      • F_CLM_BAM
      • F_FAGL_LDR
      • F_KNA1_BED
      • F_KNA1_GEN
      • F_LFA1_BEK
      • F_SKA1_BUK
      • M_MATE_MAN
      • V_VBAK_AAT
      • F_BKPF_BUP
    4. Click Full authorisation 
    5. Generate an updated user profile by click on
  12. Change to the Roles tab
  13. Assign the role created in the previous step and SAP_BC_WEBSERVICE_CONSUMER to this technical user


  For Client Certificate authentication: Upload SSL certificate  
  1. Run STRUST transaction
  2. Go to SSL Standard Server tab
  3. Click Import certificate
  4. Choose the SLL file and click Add to certificate list



Step 2: Setup in Cloud Connector

  1. Connect to BTP Subaccount
    Use the official SAP documentation:
  2. Create mappings to the S/4HANA
    1. Go to Cloud to On-Premise
    2. Add 2 rows to the Mapping Virtual to Internal System within Access control
      • HTTPS protocol to access SOAP and OData web services 
      • RFC protocol to access BAPIs


Good to know:

  • Port and host should be provided by your SAP Basis administrator.
  • HTTPS Resources for the DEV environment can be specified as /. 
  • For the production it should be restricted to the specific web service paths.


Step 3: SAP Integration Suite configuration

 1. Maintain Credentials 
  1. Create CPI API Credentials
    1. Within the SAP BTP subaccount level click Services and navigate to Instances and Subscriptions 
    2. Click on cf-api
    3. Right click View Credentials 
    4. Copy the values for clientid, clientsecret, takenurl and url
    5. Navigate to Security Material
    6. Click Create and choose OAuth2 Client Credentials in the dropdown
    7. Paste the values previously copied in the pop-up window
    8. Click Deploy
  2. Deploy credentials 
    1. Navigate to Security Material 
    2. Click Create and choose User credentials
    3. Fill in the needed information


 2. Integration package 
  1. Install the integration package
    1. Click Design and navigate to Integrations and APIs 
    2. Click Import and choose the Pleo Integration with SAP S/4HANA package


 3. Create a destination for BAPI access 
  1. Click Connectivity and navigate to Destinations
  2. Click Create destination
  3. Provide the necessary information:
    • Name: BAPI_INTERNAL_ORDER_GETLOST
    • Type: RFC
    • Description: Get list of Internal Orders from S4H
    • Proxy Type: On-Premise
    • User/Password: credentials of the user available in S/4HANA
    • Authorisation Type: CONFIGURED_USER
    • Additional properties- Add 3 new values by clicking New Property
      • jco.client.ashost: Virtual host of Cloud connector configured in step 2
      • jco.client.client: S/4HANA client number
      • jco.client.sysnr: S/4HANA instance number


Step 4: Integration package configuration

1. Within Pleo Integration with SAP S4/HANA, navigate to Artifacts 


2. Click the icon and choose configure for Create Parameter in Value mapping
  1. For Receiver, enter the following details:
    • CPI_API_HOST: URL value from step 3.1
    • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
  2. Click Deploy


3. Click the icon and choose configure for Create Company settings in Value mapping
  • Under Receiver
    1. For R_CPI_API_Flowreceiver, Enter the following details 
      • CPI_API_HOST: URL value from step 3.1
      • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
    2. For R_Pleo, enter the URL to the Pleo API Integration
  • Under More, provide the necessary company settings:
    • CompanyID_S4: Company code from S4/HANA
    • CompanyName: Name of company in Pleo
    • CreatedBy_S4: Name of technical user in S4/HANA configured in step 1.3
    • Token: API token generated for S4/Hana in the Pleo Account settings
  • Click Deploy


4. Click the icon and choose configure for Create Account Settings in Value mapping
  1. Under Receiver, for R_CPI_API, enter the following details:
    • CPI_API_HOST: URL value from step 3.1
    • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
  2. Under More, provide the necessary company settings:
    • Account_AccountsPayable: Vendor reconciliation account used in invoice and invoice payment journal entries
    • Account_DefaultSupplier: Default Account ID for supplier vendor in SAP
    • Account_Pocket: General ledger account used for out-of-pocket, mileage and per diem journal entries
    • Account_Reimbursement: General ledger account used for external and direct reimbursement journal entries
    • Account_Wallet: General ledger account used for card purchase, refund and chargeback journal entries
    • CompanyName: Name of the company in Pleo
    • Type_Atm_Withdrawal: Type of journal entry in S4 for ATM withdrawals
    • Type_Card_Invoice: Type of journal entry in S4 for card invoice
    • Type_Card_Purchase: Type of journal entry in S4 for card purchases
    • Type_Cashback: Type of journal entry in S4 for cashbacks
    • Type_Chargeback: Type of journal entry in S4 for chargebacks
    • Type_Direct_Reimbursement: Type of journal entry in S4 for direct reimbursements
    • Type_External_Reimbursement: Type of journal entry in S4 for external reimbursements
    • Type_Invoice: Type of journal entry in S4 for invoices
    • Type_Invoice_Payment: Type of journal entry in S4 for invoice payments
    • Type_Mileage: Type of journal entry in S4 for mileage claims
    • Type_Out_Of_Pocket: Type of journal entry in S4 for out-of-pocket expenses
    • Type_Per_Diem: Type of journal entry in S4 for per diem
    • Type_Refund: Type of journal entry in S4 for refunds
  3. Click Deploy


5. Click the icon and choose configure for Create Tag Export Settings in Value mapping
  1. Under Receiver, for R_CPI_API, enter the following details:
    • CPI_API_HOST: URL value from step 3.1
    • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
  2. Under More, provide the necessary company settings:
    • CompanyName: Name of company in Pleo
    • S4_CostCenter_Category: Category codes for CostCenter separated by ,
    • S4_InternalOrder_ControllingArea: Code for InternalOrder Controlling Area (1 value only)
    • S4_InternalOrder_OrderType: Code for InternalOrder Order Type (1 value only)
    • S4_WBS_Project: Filter value for project assignments separated by ,
  3. Click Deploy


6. Click the icon and choose configure for Create Tag Group in Pleo
  1. Under Receiver
    1. For R_CPI_API_Flowreceiver, Enter the following details 
      • CPI_API_HOST: URL value from step 3.1
      • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
    2. For R_Pleo, enter the URL to the Pleo API Integration
  2. Under More, provide the necessary company settings:
    • CompanyName: Name of company in Pleo
    • TG_CostCenter: Name of tag group for CostCenter in Pleo
    • TG_InternalOrder: Name of tag group for InternalOrder in Pleo
    • TG_WBS: Name of tag group for WBS element in Pleo
  3. Click Deploy


7. Click the icon and choose configure for Export Expenses from Pleo to S4
  1. Under Receiver
    • For R_PLEO_JOBS_API, enter the URL to the Pleo API Integration
    • For R_S4_CREATE_ENTRY, enter the following details:
      • Address: URL address of SOAP API - {Cloud_Connector URL}/{service path}/{service name}/{service binding}
        • Cloud connector from step 2.1
        • Service name from step 1.1
        • Service binding from step 1.1
      • Proxy Type: On-Premise / Internet (depending on target system)
      • Location ID: ID of associating Cloud Connector from step 2.1
      • Authentication: Basic / Client Certificate
        • For Basic Credential Name: Name of User Credential from Security Store from step 3.1
        • For Client Certificate Private key alias: Name of certificate Alias from Keystore from step 3.1
    • For R_S4_PING, provide S4_URL parameter as an address to Cloud connector from step 2.1
  2. Click Deploy


8. Click the icon and choose configure for Export Tags from Pleo to S4
  1. Under Receiver
    1. For R_PLEO API, enter the URL to the Pleo API Integration
    2. For R_S4, enter the following details:
      • S4_Host: URL of Cloud Connect setup step 2.1
      • Proxy Type: On-Premise / Internet (depending on target system)
      • Location ID: ID of associating Cloud Connector from step 2.1
      • Authentication: Basic / Client Certificate
        • For Basic Credential Name: Name of User Credential from Security Store from step 3.1
        • For Client Certificate Private key alias: Name of certificate Alias from Keystore from step 3.1
  2. Under More, provide the necessary company settings:
    • DateTimeFormat_S4: date/time format value
    • WBSODataV2: True (indicator that S4/HANA system version is less than 2021 FPS01)
  3. Click Deploy


9. Click the icon and choose configure for Schedule Expenses Export from Pleo to S4
  1. Under Receiver
    1. For R_CPI_APIreceiver, Enter the following details 
      • CPI_API_HOST: URL value from step 3.1
      • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
    2. For R_Pleo, enter the URL to the Pleo API Integration
  2. Under More, provide the necessary company settings:
    • BypassTransactionDate: True / False (Indicator shows the requirement to update the transaction date in S4/HANA)
    • UploadReceipts: True / False (Indicator shows the requirement to upload attachments to S4/HANA)
    • ClosingPeriodDay: Specific day of the month (1-31) after which past expenses will be updated
  3. Under Timer, select a regular execution for the export of expenses - by default this is only done when the schedule is deployed.
  4. Click Deploy


10. Click the icon and choose configure for Schedule Tags Export from Pleo to S4
  1. Under Receiver
    1. For R_CPI_APIreceiver, Enter the following details 
      • CPI_API_HOST: URL value from step 3.1
      • Credential Name: Name of the OAuth2 Client Credentials deployed in step 3.1
  2. Under Timer, select a regular execution for the export of tags - by default this is only done when the schedule is deployed.
  3. Click Deploy




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article