General presentation
Objective of the application
To transfer data between BW and Salesforce (iCare) which is CRM tool of Specialty Polymers. It will be used only Specialty Polymers GBU. There are 3 main areas, which are:
- Account
- Overdue
- Pending orders
These data will be sent to Salesforce by WebMethod weekday.
The iCare application was migrated from PQ1 to WBP in October 2017 by PQ1 decommissioning project and consist in developing a BW flow and Function Modules, regarding Accounts, Pending Orders and Overdues to be sent to Salesforce (SF).
Function Modules(FM) are used, through multiple type of operations, to synchronized Salesforce & BW.
WebMethods (WM) is used as a Middleware between both .
Tool and IT leaders of the application are:
- BW RtR : Guillaume Thevenet (Process Chain & Overdue's DSO)
- BW OtC : Craig Wanamake (Pending orders & Account on BW)
- Salesforce : Emmanuel Gaheri / Dina Mendes
- WebMethods : Reiner Hellstern / Nikhil Bhosle
- PF1 program: ??
- Project manager : Anon Kasemvilas
- Developer: Dan Messas
Usage information
This project have only Salesforce users and only Specialty Polymers GBU
History
This project consist on a migration of existing Function Modules and BW objects from PQ1 to WBP.
Roles & Access
Roles and access
List of application role + menu role and explanation if we have several applications role with specials rules.
| Role Code | Role Description | Explanation |
|---|---|---|
Authorization objects
Authorization to access report is managed by Salesforce because the reports are in salesforce platform. For BW, it is only preparing data on tables and DSO in order to load to SF
Dataflow overview
Scheduling Time
Reporting documentation drive folder:
https://drive.google.com/drive/folders/1U515rmYzjIK8woYba1bUs0-zJUWMozfm
Functional and Technical rules on Workbench + Reporting
Rules & Explanations
As WebMethods is used as a Middleware, it triggers every steps of each application (BW, SF), and send data from a side to the other.
The document of SF and WM team is here
1. Accounts : FM Z_ZSF_GET_ACCOUNT_DATA
- Operation U (P_TYPE = S (salesforce)):
- WM (WebMethods) extract from SF (Salesforce) the account list that are already synchronized and send it ton BW through the FM.
- Check in table ZSF_LOG if accounts from the previous list have been called less than 30 minutes ago. If no → go to c., if yes go to e.
- IE_ACKID = 'OK'. And set ZSF_LOG text filed as 'ACCEPTED'.
- Fill ZSF_ACCOUNTS field DELETED as 'X' when SOLDTO is not empty. If the SF_ID is matched from data sent by SF, the deletion flag is cleared.
- IE_ACKID = 'KO'. And set ZSF_LOG text filed as 'REJECTED'.
- Operation N :
- WM extract from SF the account list that are not yet synchronized (new) and send it to BW.
- BW create a job S_SF_UPDATE_TIME (Program ZSF_GET_ACCOUNT_DATA) in WBP with user WMTH_BW (it called FM Z_ZSF_GET_ACCOUNT_DATA operation T)
- Operation T :
- Check loading duplicate
- Call function Z_ZSF_CHECK_UPDATE_TIME in PF1_020 table ZZR_CUST_CRM to map SFDC ID with Sold to.
- PF1 Function will get Credit information (CDHDR, KNVP,KNVV,KNA1) to be inserted in BW table ZSF_ACCOUNTS and then Copy PF1 table ZZR_CUST_CRM to BW table ZSF_SOLDTOS.
- Fills BW tables ZSF_ACCOUNTS and ZSF_SOLDTOS.
- Marks entries as ‘must be sync’.
- Table ZSF_PRODUCT is filled in with SFDC Products.
- Operation S :
- BW reads entries from table ZSF_ACCOUNTS with flag ‘must be sync’ and where 'deleted' is null.
- Get the detail of account for name text and vat_reg_no from C_CUSTID
- SF receives response from BW (through WM) and include entries that are included in the temporary mapping to be updated.
- Sends the Ack to WBP (via WM) starting operation ‘A’.
- Operation A :
- Clear MUSTBE_SYNC field, when AckID is present.
- BWP updates 'last sync' field of ZSF_ACCOUNTS and SF updates entries.
Other operations :
- Operation D : Delete the table content (No variables)
- Operation I : Init the synchronization for an ACKID (Variables : IE_ACKID) → to reload data to SF.
- Operation H : Init the synchronization for a date (Variables : IE_ACKID)
- Operation G : Change entries in DB for test purpose (No variables)
Monitoring :
2. Overdues : FM Z_ZSF_GET_OVD_INVOICES
The aim of the interface is to daily load the invoices in overdues from SAP into Salesforce CRM.
The scope is limited to the invoices and will present the purchase orders and the materials associated to the invoice for GBU Specialty Polymers.
The data will be automatically refreshed once a day (during the night) starts in SFDC at 02:00 CET.
Every day, all overdues data are deleted from SFDC and loaded from SAP into SFDC.
There are 5 steps :
- Process Chain : PC_SFDC_OVD_01 load the overdues in DSO DBFIAR22. At the end of the PC, FM is triggered with Operation U :
- Operation U:
- Empty the 3 tables ZSF_OVD_INVC, ZSF_OVD_INVC_MAT and ZSF_OVD_INVC_PO
- Then those tables are filled from DBFIAR22 DSO + Data from PF1 by calling function module Z_ZSF_GET_OVD_INVOICES (program ZSF_GET_OVERDUES_DATA). July 2022, request to remove material group Z60* (Product hierarchy RW* XL Compounds on WO0000000040369). Add program to filter selection from DBFIAR22 to exclude this material group.
- Update X on field 'Must be sync' flag on ZSF_OVD_INVC when returncode = 00 and SF_ID <>""
Returncode of the function module meaning
Return Code Meaning 00 OK 01 Can't find information of FI document header (BKPF) 02 FI doc does not have type VBRK (BKPF) 03 Can't find information in billing document (VBRK) 04 Can't find information from the items of the billing doc (VBRP) 06 Can't find information from PO order (VBAK)
- Operation S :
- BW send ZSF_OVD_INVC when returncode = 00 and SF_ID <> '' and MUSTBE_SYNC = 'X' to SF by table TI_DATA as parameter
- BW update ACKID fields = current date and time on table ZSF_OVD_INVC
- WM deletes all the overdues in SF and update data in SF
- Once WM synchronize completed with SF. WM call operation A
- Operation A :
- BW update the LAST_SYNC field in the overdues table ZSF_OVD_INVC (from current date of BW).
- BW clear MUSTBE_SYNC on table ZSF_OVD_INVC
- Operation I : SF send ID of overdue to BW the couple ID/External ID and BW will map ID with they key to update SF_ID of 3 tables ZSF_OVD_INVC, ZSF_OVD_INVC_MAT and ZSF_OVD_INVC_PO
- Operation P : BWP send to SF informations about material & PO.
- BW send ZSF_OVD_INVC_MAT when SF_ID_OVD <>'' and ID_SF_MATGROUP <> '' and to SF by table TI_MATKL as parameter
- Jul 2022, a user request to remove material group Z60* (Product hierarchy RW* XL Compounds on WO0000000040369). Add program to delete internal table of ZSF_OVD_INVC_MAT.
- BW send ZSF_OVD_INVC_PO when SF_ID_OVD <>'' and BSTNK <> '' to SF by table TI_PO as parameter
- BW send ZSF_OVD_INVC_MAT when SF_ID_OVD <>'' and ID_SF_MATGROUP <> '' and to SF by table TI_MATKL as parameter
Other Operations :
Operation J : Update by job (No variables)
Operation H : Init the synchronization for a date (Variables : IE_ACKID)
Operation R : Delete table contents (No variables)
Monitoring :
In BW:
- Check job of process chain PC_SFDC_OVD_01
- Table ZSF_OVD_INVC has to be
- LAST_SYNC and ADCKID have to be updated for the date of sending/loading
- MUSTBE_SYNC has to be empty
- Return code should be 00 for some records
See 'Dependencies with other applications > Salesforce' Chapter.
Validation :
Table ZSF_OVD_INVC will keep detail of billing document from PF1_020 and PI1_020. In case of source from PI1_020, there will be possible to check on both systems but the billing number will be different
Billing document (PF1-FB03) will be on field BELNR, BUZEI, BUKRS,and GJAHR
Billing document (PI1-FB03) will be on field ORIG_BELNR, ORIG_BUZEI, ORIG_BUKRS, and ORIG_GJAHR
Data loadings:
Info providers and objects loaded
There is only one process chain on this project. It's for the overdues : PC_SFDC_OVD_01. It loads data from DSOs DBFIAR02 & DBFIAR16 to the newly created DSO : DBFIAR22.
Loading frequency:
The process chain is running every day at 2AM.
3. Pending Orders : New solution by WebMethod
Record Keeping
Reporting
Queries End User Documentation
The reports are available only on Salesforce
Main queries
Main functionalities
Broadcast
Maintenance
Known bugs
Recurring procedure
Planned Evolution
We modify pending orders to use WebMethod instead
3. Pending Orders : FM Z_ZSF_GET_PENDING_ORDERS (OBSOLETE)
This interface has been done to provide Sold and Pending information from SAP and link it with Salesforce Accounts.
The Scope is limited to Specialty Polymers Customers.
The data will be automatically refreshed once a day (during the night) - start in SAP at 22:15 CET (00:00 CEST) and starts in SFDC at 22:00 CET (11:00 CEST).
There are 3 steps (Operations) :
- Program Z1F_ZSF_PEND_ORDERS_DATA_V3 with variant PRODUCTION is schedule on PF1 (22:15) to
- Delete table ZSF_OPEN_ORDS_DB
- Find pending order and fill ZSF_OPEN_ORDS_DB table in PF1
- Update log on table ZSF_LOGS in PF1. The job is finished around 01:xx and last log will display total of record
- Create control record to have number of record on the first line of the table ZSF_OPEN_ORDS
- Update BW table by calling FM Z_ZSF_GET_PENDING_ORDERS operation C in BW
- Operation C:
- Fill table ZSF_OPEN_ORDS in BW from table ZSF_OPEN_ORDS_DB in PF1
- Mark MUSTBE_SYNC = 'X' on table ZSF_OPEN_ORDS
Operation S :
BW send table ZSF_OPEN_ORDS where mustbe_sync = 'X' to WM via parameter TI_DATA
- WM reads entries from table ZSF_OPEN_ORDS to check if the control record contains number of records. If yes, WM delete all entries of pending order in SF
- Then, WM receives response and insert new entries
- BW update ACKID field = current date and time on table ZSF_OPEN_ORDS
Operation A :
BW update MUSTBE_SYNC flag = '' and update LAST_SYNC = today on table ZSF_OPEN_ORDS when ACKID = ACKID from WM
Other Operations :
- Operation J : Update by job (Variables : i_origin)
- Operation U : Update data from the query (Variables : i_origin)
- Operation H : Init the synchronization for a date (Variables : IE_ACKID)
- Operation I : Put entries for the be synch (Variables : i_origin)
- Operation B : Copy Backup Table to S&P Table (No variables)
Monitoring :
In SAP PF1_020 :
➔Check the job status in transaction SM37. Job name: ‘SF_PEND_ORDERS’
➔Check table ZSF_LOGS it must have this line
In SAP WBP_400 :
➔Check in table ZSF_OPEN_ORDS if there are entries to synchronize (MUSTBE_SYNC = ‘X’)
*Remark: In case table ZSF_OPEN_ORDS has no new data from PF1(check on LAST_SYNC date), it needs to run job SF_PEND_ORDERS or program Z1F_ZSF_PEND_ORDERS_DATA_V3 with variant PRODUCTION again. The user to run this job/program has to setup the decimal notation as 1.234.567,89 otherwise, the program will be error since there is a conversion number in the routine.
Function Module Variables :
I_ORIGIN - Possible values are : 'P' (Perform actions) and 'S' (Simulation)
I_OPERATION : Different operations previously explained ('S', 'A', 'I', 'P' for Overdues)
Dependencies with other applications
Salesforce : is the CRM which receives data from SAP (PF1 → BWP → SF)
Monitoring :
- Check if SFDC job is complete with success : Setup → Jobs → Apex Jobs → Apply View: [Select a View]
- For more detailed info, please refer to Document : IS - Appl - CRM - Monitor Interfaces
- In case of failure : please contact : fas-salesforce@solvay.com
WebMethods : is the middleware which triggers the step from SAP and SF.
- Technical document of WM process is here
- In case of failure : create a freshdesk ticket and assign it to IS-CAPG-ERP group
Z_ZSF_CHECK_UPDATE_TIME

