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
Expand all | Collapse all

Error while reading IDOC as string using decodeString

  • 1.  Error while reading IDOC as string using decodeString

    Posted Wed April 28, 2004 06:19 PM

    Hi,

    I am trying to read an IDOC (in string format) with multiple records using the service “decodeString”, but the result seems to be erroneous as some fields in the idoc are wrongly parsed.

    Any ideas/comments/suggestions will be highly appreciated.

    Tx in advance,

    ONS


    #Integration-Server-and-ESB
    #webMethods-Upgrade
    #webMethods-General
    #webMethods


  • 2.  RE: Error while reading IDOC as string using decodeString

    Posted Wed April 28, 2004 06:25 PM

    ons,

    you should use this service pub.sap.idoc:transformFlatToHierrachy (SAP AdapterService)which will parse the IDOC to IDATA structure based on the IDOC document structure reference.And I believe you have the particular IDOC DTD/Schema downloaded from SAP site the one that you are trying to parse.

    HTH,


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB
    #webMethods-Upgrade


  • 3.  RE: Error while reading IDOC as string using decodeString

    Posted Thu April 29, 2004 08:23 AM

    Hi RMG,

     Thanks a lot for ur immediate response.I am using decodeString in the following sequence, 
    

    getFile
    bytestoString
    decodeString
    decodeSdata
    transformFlatToHierrachy

     I found the decodeString seems to be erroneous in reading multiple record IDOCS.Have you worked in similar scenario ? 
    
    Would appreciate and welcome to share your ecxperience in this regard. 
    

    Tx,

    ONS


    #webMethods-General
    #webMethods
    #webMethods-Upgrade
    #Integration-Server-and-ESB


  • 4.  RE: Error while reading IDOC as string using decodeString



  • 5.  RE: Error while reading IDOC as string using decodeString

    Posted Tue May 04, 2004 08:53 AM

    Hi RMG,

    I greatly appreciate your responses.I have gone through all the postings related to reading IDOC string.My probs is actually reading MULTIPLE record idocs.When used all the above discussed services to decode the input IDOC string from an MQ output, the decoded data does not have all the records in the IDOC.Hope now you have a clear picture about my issue. 
    

    Would appreciate any comments/ideas/suggestions regarding this.

    Tx,
    ONS


    #webMethods-Upgrade
    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 6.  RE: Error while reading IDOC as string using decodeString

    Posted Tue May 04, 2004 10:54 AM

    Hi RMG,

    I would like to have your contact mail address, so that we can discuss this issue in detail.Hope you don’t mind for this.

    Tx in advance,

    ONS


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB
    #webMethods-Upgrade


  • 7.  RE: Error while reading IDOC as string using decodeString

    Posted Tue May 04, 2004 02:47 PM

    ons,

    Oops,i may not be helpful to solve this issue,but if i have any clue surely i will post it to you.

    Regards,
    RMG


    #webMethods
    #webMethods-Upgrade
    #Integration-Server-and-ESB
    #webMethods-General


  • 8.  RE: Error while reading IDOC as string using decodeString

    Posted Mon December 13, 2004 08:44 AM

    Hi ons,
    Did you find the solution to your problem. Currently I have exactly the same problem you had.
    Regards,
    Sathya


    #webMethods-Upgrade
    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Error while reading IDOC as string using decodeString

    Posted Tue December 14, 2004 05:33 PM

    This sounds suspiciously like a “conformsTo” issue. In the transformFlatToHierarchy call make sure the conformsTo parameter is set appropriately.


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods-Upgrade


  • 10.  RE: Error while reading IDOC as string using decodeString

    Posted Fri December 16, 2005 05:16 PM

    Hello Everyone,

    I also am running into some “issues” with the “pub.sap.idoc:decodeString” service.

    I receive an “Idoc String” from another application (not SAP). In this string, the DOCNUM, SEGNUM, PSGNUM values are not properly valued resulting in the corresponding values in the “IDOC_DATA” documents created in the pipeline not being correct. A subsequent execution of the “pub.sap.idoc:transformFlatToHierarchy” will understandably create an IS document with data “missing” and the structure inconsistent with the “true” IS doc type for the Idoc.

    However, I know the “pub.sap.idoc:decodeString” works correctly. That is because if I take an outbound SAP document, convert it to a string using the “pub.sap.idoc:idocToString” service, I can then use that resulting string (it has valid DOCNUM, SEGNUM, PSGNUM values) as input to the “pub.sap.idoc:decodeString” and subsequently execute “pub.sap.idoc:transformFlatToHierarchy” to create a valid/correct IS doc type for the Idoc (including multiple Idoc situations).

    It appears to me that the “Idoc string” MUST contain valid DOCNUM, SEGNUM, PSGNUM values. If they are not supplied or are not correct, is there a way to “fix” the “Idoc string” other than brute force (e.g. parsing through the string, fixing up the values which in turn requires knowledge of the specific Idoc structure)?

    Thanks in advance for any assistance/thoughts on this question.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-Upgrade
    #webMethods-General