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

Extract values from IDOC

  • 1.  Extract values from IDOC

    Posted Fri October 08, 2004 09:01 AM

    Hi !

    I am receiving an IDOC from a SAP System. I want to “extract” all values and save them in a database.
    How can i do this ?

    Currently, I am using the “encode” Service to encode to a xmlData-String. With the Service XMLValuesToRecord i sould get a record with all values. But somewhere must be a mistake cause nothing is working.
    Does anybody of you see the problem ?

    thx
    bouml


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


  • 2.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 09:23 AM

    use sap.idoc:transformFlatToHierarchy, and then pub.xml:documentToXMLString and you’ll have a xml file that you can write to your DB


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


  • 3.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 10:10 AM

    I am using SAP Business Connector 4.7.
    I did not find “pub.xml:documentToXMLString”. Where can i find this service ?


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


  • 4.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 10:36 AM

    ah you may still be using the older services in pub.web, therefore you’ll need pub.web:RecordTodocument - we use IS6.01 [where pub.web has been deprecated]
    hth


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


  • 5.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 11:25 AM

    pub.web:RecordTodocument generates a String “xmlData”.
    As i want to save every single value in a DB i need to extract every single xml value.
    Is there also a service or do i need to develop a java service ?


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


  • 6.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 11:44 AM

    When you have the Idoc as string, use it as input for the service “queryDocument”, then start a trace, after this you will be able to take the necessary fields out of it.


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


  • 7.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 12:58 PM

    In that case you’ll need to loop through the boundNode and make sure you concatenate the data into the way you need to best present into your DB.
    Curious why you need to do this in this way, why not save the file to local drive and write location reference to DB logging…?

    bemused


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


  • 8.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 01:44 PM

    Sorry, but i don’t know how to trace ? Which Service do you mean ?
    I only found the tracePipeline service but it writes all fields to the server log. so not what i need.


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


  • 9.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 03:23 PM

    Tracing is a functionality of the webMethods Developer(not a service), you can run a programm, trace it, or go through it step by step

    but more important is the function queryDocuments, there you have to set which fields he should take from the idoc
    for example:
    doc.ORDER[0].IDOC[0].E1ORDER[0].E1EDK01.text


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


  • 10.  RE: Extract values from IDOC

    Posted Fri October 08, 2004 03:30 PM

    bouml,

    Once you have the IDOC string use the transformFlatToHierrachy,documentToRecord services and map the output to a recordReference(IDOC document structure created from SAP IDOC schema) and so this will hold the extracted data from the IDOC string.

    So depends on the IDOC structure loop thru the record and map the individual values to the WmDB service (execSQL)inputs,this will insert to DB.

    Use the Search functionality provided in this site,it will help you to resolve the problems fast,since same issue might have covered earlier.

    HTH,
    RMG.


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