Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

  1. Account
  2. Overdue
  3. 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). 

...

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

...

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.

...

 
Role CodeRole DescriptionExplanation  
   
   









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

...

Embedded Google Drive File
docid1FprVpmGbCH79ceoo_FaaOsGkrlq_F1wAOLOfYlBtvWA

Scheduling Time

Embedded Google Drive File
docid1HsT2ykx-Ty01J7xNzxIgASHeHHGxD7Wgc2VXUROd0Yc

Reporting documentation drive folder:

https://drive.google.com/drive/u/1/folders/0B4Zuc7NikGJITjFERFNuVlpFbkU1U515rmYzjIK8woYba1bUs0-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

...

There are 4 steps (Operations) :
  1. Operation U (P_TYPE = S (salesforce))
    1. WM (WebMethods) extract from SF (Salesforce) the account list that are already synchronized and send it ton BW through the FM. 
    2. 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.
    3. IE_ACKID = 'OK'. And set ZSF_LOG text filed as 'ACCEPTED'.
    4. 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. if can't find, it means there is new account from SF, it will find detail from table ZSF_TRANS_SIMU in WBP(Now the new data will have only SF_ID and Sold_to ID)
    5. IE_ACKID = 'KO'. And set ZSF_LOG text filed as 'REJECTED'.
  2. Operation N : 
    1. WM extract from SF the account list that are not yet synchronized (new) and send it to BW. 
    2. BW gets information by running 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)
  3. Operation T :
    1. Check loading duplicate
    2. Call function Z_ZSF_CHECK_UPDATE_TIME in PF1_050 (PRS) table020 table ZZR_CUST_CRM to map SFDC ID with Sold to. 
    3. 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.
    4. Fills BW tables ZSF_ACCOUNTS and ZSF_SOLDTOS
    5. Marks entries as ‘must be sync’. 
    6. Table ZSF_PRODUCT is filled in with SFDC Products.
  4. Operation S : 
    1. BW reads entries from table ZSF_ACCOUNTS with flag ‘must be sync’ and where 'deleted' is null. 
    2. Get the detail of account for name text and  vat_reg_no from C_CUSTID
    3. SF receives response from BW (through WM) and include entries that are included in the temporary mapping to be updated. 
    4. Sends the Ack to WBP (via WM) starting operation ‘A’. 
  5. Operation A : 
    1. Clear MUSTBE_SYNC field, when AckID is present.
    2. BWP updates 'last sync' field of ZSF_ACCOUNTS and SF updates entries.

...

      • 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 date (Variables :  IE_ACKID)
      • Operation G :  Change entries in DB for test purpose (No variables)

...

➔Check if SAP table ZSF_ACCOUNTS has records to sync.Field ‘MUSTBE_SYNC’ = ‘X’ and DELETED = empty.

 


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 :

      1. Process Chain : PC_SFDC_OVD_01 load the overdues in DSO DBFIAR22. At the end of the PC, FM is triggered with Operation U : 
      2. Operation U: 
        1. Empty the 3 tables ZSF_OVD_INVC,  ZSF_OVD_INVC_MAT and  ZSF_OVD_INVC_PO
        2. Then those tables are filled from DBFIAR22 DSO + Data from PF1 by calling function

...

        1. module Z_ZSF_GET_OVD

...

        1. _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.
        2. Update X on field 'Must be sync' flag on ZSF_OVD_INVC when returncode = 00 and SF_ID <>""
          1. Returncode of the function module meaning

            Return CodeMeaning
            00OK
            01Can't find information of FI document header (BKPF)
            02FI doc does not have type VBRK (BKPF)
            03Can't find information in billing document (VBRK)
            04Can't find information from the items of the billing doc (VBRP)
            06Can't find information from PO order (VBAK)
      1. Operation S : 
        1. BW send ZSF_OVD_INVC when  returncode = 00 and SF_ID <> '' and MUSTBE_SYNC = 'X' to SF by table TI_DATA  as parameter
        2. BW update ACKID fields = current date and time on table  ZSF_OVD_INVC
        3. WM deletes all the overdues in SF and update data in SF
        4. Once WM synchronize completed with SF. WM call operation A
      2. Operation A : 
        1. BW update the  LAST_SYNC field in the overdues table ZSF_OVD_INVC (from current date of BW).
        2. BW clear MUSTBE_SYNC on table ZSF_OVD_INVC
      3. 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
      4. Operation P : BWP send to SF informations about material & PO.
        1. BW send ZSF_OVD_INVC_MAT when SF_ID_OVD <>'' and ID_SF_MATGROUP <> '' and to SF by table TI_MATKL  as parameter
          1. 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.
        2. BW send ZSF_OVD_INVC_PO   when SF_ID_OVD <>'' and BSTNK  <> '' to SF by table TI_PO  as parameter

Other Operations : 

    • Operation J :  Update  by job (No variables)

    • Operation H :  Init the synchronization for 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

Image Added

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.

Image Added

Loading frequency:

The process chain is running every day at 2AM.

3. Pending Orders : New solution by WebMethod

iCARe - Sold & Pending


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) :

  1. Program  Z1F_ZSF_PEND_ORDERS_DATA_V3 with variant PRODUCTION is schedule on PF1 (22:15) to 
    1. Delete table  table  ZSF_OPEN_ORDS_DB
    2. Find pending order and fill ZSF_OPEN_ORDS_DB table in PF1  
    3. Update log on table ZSF_LOGS in PF1. The job is finished around 01:xx and last log will display total of record
    4. Create control record to have number of record on the first line of the table   ZSF_OPEN_ORDS
    5. Update BW table by calling FM ZFM Z_ZSF_GET_PENDING_ORDERS operation ORDERS operation C in BW
    6. Operation C:
      • Fill table  ZSF_OPEN_ORDS in BW from table ZSF_OPEN_ORDS_DB in PF1
      • Mark MUSTBE_SYNC = 'X' on table  table  ZSF_OPEN_ORDS 
  2. 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
  3. Operation A : 

      • BW update MUSTBE_SYNC flag  = '' and update LAST_SYNC = today on table ZSF_OPEN_ORDS when ACKID = ACKID from WM

...

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.

...

Image Removed

 


Function Module Variables :

...

WebMethods : is the middleware which triggers the step from SAP and SF.

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.

Image Removed

Loading frequency

The process chain is running every day at 2AM.

Average performance

 

...

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

...


Z_ZSF_CHECK_UPDATE_TIME