IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  SAP BC 4.6 transformFlatToHierarchy problem

    Posted Wed January 14, 2009 06:15 PM

    [FONT=Helv][SIZE=2]I have a small problem with the SAP service pub.sap.idoc:transformFlatToHierarchy in SAP BC 4.6. Once this service is called, the fields (segnum, psgnum, hlevel, mandt, docnum) are not present in any of the data segments in the hierarchical structure returned, but only mandt and docnum are correctly populated in the EDI_DC40 segment in the returned structure… is there a particular reason why these 5 fields are not present in the data segments of hierarchical structure returned by the service transformFlatToHierarchy ? what I find strange is that these 5 fields are present in all data segments in the IDOC_DATA_REC_40 that SAP send to the connector, so I don’t see any reason why they are not replicated in the hierarchical structure…

    Thanks in advance for your help,

    Ricardo
    [/size][/font]


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Thu January 15, 2009 04:23 PM

    Ricardo,

    As far as I know these fields indicate the relation between the segments in the data records in the flat IDoc structure. They are used by the transformFlatToHierarchy service to correctly create the hierachical IDoc structure, and you do not need them anymore.

    Is there a specific reason why you would need these fields in the hierarchical structure?

    Kind regards,

    Koen


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Thu January 15, 2009 06:49 PM

    I’m not sure if they are really needed… but the SAP people doing the validation are asking for these fields to be populated… cuz when these files are generated directly within SAP, all these fields are present…

    Much thanks for your help,

    Ricardo


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Thu January 15, 2009 07:26 PM

    Why do SAP care about this fields in the order as the IDOC was sent outbound from SAP which you would be doing transformation to some other format routing logic that destination is expecting??Any good reason behind like you need to extract that info and map to another document??

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Thu January 15, 2009 09:48 PM

    Don’t know if this is the best solution, but somehow it seems to work…

    I found out that the IDOC_DATA_REC_40 that contains all the data segments, that SAP sends us, is a document list structured like this:

    IDOC_DATA_REC_40
    IDOC_DATA_REC_40[0]
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    SDATA
    ALL DATA FIELDS OF THE SEGMENTS
    IDOC_DATA_REC_40[1]
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    SDATA
    ALL DATA FIELDS OF THE SEGMENTS

    Only the fields in the SDATA are mapped in the bound document returned by the transformFlatToHierarchy… so I decided to replicated and copy the 5 fields in the SDATA part… so I created a document type similar to the IDOC_DATA_REC_40, but that includes also the 5 fields in the SDATA part, and to map it the values of same fields found in the parent, and to use this document when calling the transformFlatToHierarchy… this is what the new document type looks like:

    IDOC_DATA_REC_40
    IDOC_DATA_REC_40[0]
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    SDATA
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    ALL DATA FIELDS OF THE SEGMENTS
    IDOC_DATA_REC_40[1]
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    SDATA
    SEGNAM
    MANDT
    DOCNUM
    SEGNUM
    PSGNUM
    HLEVEL
    ALL DATA FIELDS OF THE SEGMENTS

    This works! the Bound Document returned contains all 5 fields in all segments…

    Thanks again,

    Ricardo


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Thu January 15, 2009 11:30 PM

    Its not bad idea though…you got everything in the boundNode and it resolved your issue…what if you give the actual IDOC recordReference the doctype that will have control/data rece IDOC/EDI_DC40,ORDERS03 (as an example)…were you able to see all the required segments/fields??

    HTH,
    RMG


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Fri January 16, 2009 02:59 PM

    Not sure I completely understood your question… I have no choice but to use the IDOC_DATA_REC_40 and IDOC_CONTROL_REC_40 structures that my service receives from the SAP BC 4.6… my service is defined as a routing rule in Patner Manager for a particular IDOC msgtype (INVOIC, ORDRSP, CARNOT, etc…).

    Regards,

    Ricardo


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 8.  RE: SAP BC 4.6 transformFlatToHierarchy problem

    Posted Fri January 16, 2009 04:39 PM

    “what if you give the actual IDOC recordReference the doctype that will have control/data rece IDOC/EDI_DC40,ORDERS03 (as an example)…were you able to see all the required segments/fields”
    I was asking in the o/p of flattohierarchy step by mapping the boundNode to recordReference(assign actual IDOC record type) is not populating all the fields ie EDI_DC40 with control fields ,INVOIC02 data fields?? Well it should at this point.

    Anyways lets close the issue,as it was got resolved.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods