SAP IDOC filtering RRS feed

  • Question

  • Hi.

    We want to update 3rd party systems with person/user information from SAP HR.

    I have created an integration between SAP HR and Biztalk Server 2010, using the WCF SAP adapter v2010. On the SAP side SAP consultants have created a custom IDOC based on the HRMD_A07 message type, and activated change pointers for the new message type so we will receive an IDOC when a change has occurred for users (ex: mobile number changed, email updated, new location, new hiring etc.).

    The challenge is to determine from the received IDOC what really changed...because it contains a lot of information and info types,  despite the filters applied on the SAP side. It is hard to determine what could have changed...

    Any one who has experienced something similar and could direct me in the right direction on what to look for or how??

    Thanks in advanced.

    Thursday, July 5, 2012 1:55 PM

All replies

  • I have 2 thoughts. It might help you.

    Could make some logic in SAP side whenever the IDOC particular important column data’s are changed then could generate some IDOC number that needs to be sending to BizTalk side tracking purpose.

    Try with WE19 testing tool for IDOC. This allows the BizTalk developer to have the SAP resource create an initial IDoc and have the BizTalk developer re-submit that IDoc however many times they would like. Another benefit of this is process that involved deltas. We have a process where SAP will provide a “dump” of employee data that we need to update a downstream system with. We don’t need to process this data every day so we will just send the differences, or deltas, on a regular basis.

    Thanks, Raja MCTS BizTalk Server 2010, MCC If this answers your question please mark it accordingly

    Thursday, July 5, 2012 2:19 PM
  • If you're writing to a table using stored procedure and you want to detect whether the data/row is updated you can try the following:

    Code NVARCHAR(50),
    [Description] NVARCHAR(50),
    Mobile NVARCHAR(50)
    --Prepopulate Table
    INSERT INTO @YourTable
    SELECT '0001', 'First Customer', '05656565656' UNION ALL
    SELECT '0002', 'Second Customer', '998989-89898' UNION ALL
    SELECT '0003', 'Third Customer', '912989-89898' 
    DECLARE @ParamDescription NVARCHAR(50)
    DECLARE @ParamMobile NVARCHAR(50)
    DECLARE @ParamCode NVARCHAR(50)
    SET @ParamCode = '0001'
    SET @ParamMobile = 'First Customer'
    SET @ParamDescription = '05656565656'
    --Binary Check Sum of the Row
    SELECT CHECKSUM_AGG(BINARY_CHECKSUM(Code,Description,Mobile)) AS BinaryCheckSumInTable FROM @YourTable
    WHERE Code = @ParamCode
    --Binary Check Sum of the Parameters
    SELECT CHECKSUM_AGG(BINARY_CHECKSUM(@ParamCode,@ParamMobile,@ParamDescription)) AS BinaryCheckSumFromParam
    --If the parameter is different from what's in the table
    SET @ParamDescription = 'UpdatedValue'
    --Binary Check Sum of the Parameters
    SELECT CHECKSUM_AGG(BINARY_CHECKSUM(@ParamCode,@ParamMobile,@ParamDescription)) AS BinaryCheckSumFromParamUpdated

    Or use HASHBYTES

    Randy Aldrich Paulo

    MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD | My Blog

    BizTalk Message Archiving - SQL and File
    Automating/Silent Installation of BizTalk Deployment Framework using Powershell >
    Sending IDOCs using SSIS

    Friday, July 6, 2012 6:38 AM
  • Hi Raja,

    Thank you for your suggestions.

    As Kent Weare suggests in his blog, I only need the deltas/differences in the data. The question is how do I know what changed once I have received the IDOC containing the deltas/differences in my integration?

    Our SAP system is setup to send changes to BizTalk in a "near real-time" fashion, as soon as a change has occurred in one of the underlying info types that the IDOC uses. I don't know if you are familiar with IDOCs, but they are a mess!! Since they are built up of several different info types and sub types, the structure and size of the IDOC will change drastically depending on the action taken, or update that happened to one of the underlying info types. 

    For example when I created a new dummy user in SAP the IDOC I received contained 15 kb of data. Then when I updated the user and added his phone number the IDOC I received contained 30 kb of data, because this update effected a sub type!! Because this happens all the time within IDOCs, it is very hard to determine the "real" change that would be relevant for downstream systems, since so much information is added/updated for such a small thing as an updated phone number.

    I hope this clarifies the matter a little bit more.

    Saturday, July 7, 2012 2:29 PM
  • Hi Moses,

    Have you looked into the Context of the incoming Message from SAP?

    It could be helpful in getting more info of the changes.

    Regards, NISHIL. MCT,MCTS BizTalk Server,MS BI. Http://

    Sunday, July 15, 2012 8:12 PM