Mapping from flat sql message to nested idoc

Hi,
im trying to map the values from a database select to an idoc. the structure is  like that:
?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="">
   <ns0:Message1>
      <ns1:MT_SQL_Invoice_Req_response xmlns:ns1="">
         <SELECT_STATEMENT_response>
            <row>
               <ID>
               <TYPE>
               <VALUE>
            </row>
            <row>
               <ID>
               <TYPE>
               <VALUE>
            </row>
         </SELECT_STATEMENT_response>
      </ns1:MT_SQL_Invoice_Req_response>
   </ns0:Message1>
</ns0:Messages>
So I'm getting several rows in one message. For every <ID> i want to create a new Idoc. This problem i solved with a sort and split function. (BPE) Now i want to check if the <TYPE> has a specific value "POS" If that value is in the row i want to create a new row for an Item in the idoc. If the <TYPE> is "TAX" i want a new row in the idoc in position/tax. I'm quite new to SAP PI so I am sorry that i can't describe my problem better. Does anybody have an idea how i can solve that problem?
Thank you in advance for your advices

Thank you for your help, but still can't get it working
My target message should have a structure like that:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="">
<ns0:Message1><ZBILLING>
<IDOC BEGIN="Constant">
     <EDI_DC40
     </EDI_DC40>
          <E1FKK_EBS_TOI_HEADER SEGMENT="1">
               <E1FKK_EBS_TOI_ITEMS>          
                     <E1FKK_EBS_TOI_TAX SEGMENT="Constant">
                     <TAX_BASE>Constant</TAX_BASE>
                 </E1FKK_EBS_TOI_TAX>
               </E1FKK_EBS_TOI_ITEMS>
               <E1FKK_EBS_TOI_ITEMS>
                    <E1FKK_EBS_TOI_TAX SEGMENT="Constant">
                     <TAX_BASE>Constant</TAX_BASE>
                </E1FKK_EBS_TOI_TAX>
               </E1FKK_EBS_TOI_ITEMS>          
          </E1FKK_EBS_TOI_HEADER>
</IDOC>
<IDOC BEGIN="Constant">
     <EDI_DC40
     </EDI_DC40>
          <E1FKK_EBS_TOI_HEADER SEGMENT="2">
               <E1FKK_EBS_TOI_ITEMS>
                    <E1FKK_EBS_TOI_TAX SEGMENT="Constant">
                     <TAX_BASE>Constant</TAX_BASE>
                </E1FKK_EBS_TOI_TAX>
               </E1FKK_EBS_TOI_ITEMS>
          </E1FKK_EBS_TOI_HEADER>
</IDOC>
<IDOC BEGIN="Constant">
     <EDI_DC40
     </EDI_DC40>
          <E1FKK_EBS_TOI_HEADER SEGMENT="3">
               <E1FKK_EBS_TOI_ITEMS>
                    <E1FKK_EBS_TOI_TAX SEGMENT="Constant">
                     <TAX_BASE>Constant</TAX_BASE>
                </E1FKK_EBS_TOI_TAX>
               </E1FKK_EBS_TOI_ITEMS>
          </E1FKK_EBS_TOI_HEADER>
</IDOC><
/ZBILLING>
</ns0:Message1>
</ns0:Messages>
What I've done right now is
1.
<ID> --> sort > splitByValue(valuechanged) - > collapseContext> <IDOC>
I will get an <IDOC> for every ID
2.
For <E1FKK_EBS_TOI_HEADER> i use a constant
3.
for <E1FKK_EBS_TOI_ITEMS> i do
<ART> equals CONSTANT "POS" --> ifWithoutElse then <Art> --> <E1FKK_EBS_TOI_ITEMS>
with that mappings i will get an Idoc for every ID but the <E1FKK_EBS_TOI_ITEMS> are all created in the first <IDOC> the others are empty. I tried to use constant'true' in case "then" of the ifWithoutElse but here I need a bool. And what about the contexts, I'm not sure if use them in the right way?
Thank you for any idea

Similar Messages

  • Message Mapping from flat XML to a Record structure

    Hi All,
    We have a scenario in which the input message is a PDF document. we are following below the blog to convert PDF to XML format which uses <b>PDF box utitlity</b>.
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    We are able to convert the PDF doc to a flat XML file.
    Now we have the following queries...
    what are the different ways to map the flat XML to our record structure?
    Do we have any utitlity in PDF box to do that?
    Regards,
    Rakesh.

    Hi Rakesh,
    You have Graphical mapping, Java mapping, ABAP mapping and XSLT mapping. The choice depends on the scenario and what target result you require.
    <b>Message mapping using graphical mapping editor:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    <b>XSLT mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    <b>Java Mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>ABAP mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    As said earlier, graphical mapping is the simplest and quite a few built in options are available with it, explore it and see which is suitable for your scenario.
    Regards,
    Chandra

  • Message mapping from 0..1 to 1 (IDoc to JDBC)

    Hi,
    My Scenario is IDoc to JDBC. I have a field in IDoc which is optional, this optional filed is mapped to a mandatory field in JDBC.
    If the optional filed in IDoc doesn't exist, then mapping between Optional field and mandatory field is not happening and hence the mandatory field is becoming null which is throwing error in JDBC.
    Can any one guide me in how to map these fields and even if optional field in IDoc doesn't exits, a constant 'false' should be filled in mandatory field.

    Hi
    Use mapwithdefault standard function. so even if your optional field does not occur then a blank value will still be pased to your target field.
    Also you can check if your optional field exitst, if it does not then pass a blank constant else pass your value.
    You can use any of the above 2
    FIELDNAME->MAPWITHDEFAULT->TARGET
    Hope this solves your issue
    THanks
    Saiyog

  • Create IDoc from flat file - How to do the message mapping

    Hi everybody,
    I want to create an IDoc from a flat file.
    The file structure looks like this:
    MT_XYZ
    - Node001       0...1
      - Leaf001
    - Node002       0...unbounded
       - Node003    0...1
          - Leaf002
          - Leaf003
       - Node004    0...1
          - Leaf004
       - Node005    0...1
          - Leaf005
    I have created a mapping and all the other stuff to set up the IDoc adapter.
    Now when I try to test the interface the IDoc is created properly but obviously no information from the nodes "Node003" to "Node005" is inserted in the IDoc. Only the information kept in the elements (leafs) of "Node001" are inserted.
    All IDoc segments and their "Segment" elements are linked to the root node of the file structure "MT_XYZ". I tried to link some IDoc segments only to "Node002" but then this segment is not created.
    So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
    Thanks in advance for all answers!
    Regards,
    Torben
    Edited by: Torben Hönemann on Dec 14, 2009 4:26 AM

    Hi Torben,
    >>I want to create an IDoc from a flat file.
    So you are using File content Conversion on the sender side. Right?
    >>no information from the nodes "Node003" to "Node005" is inserted in the IDoc.
    Are these information available in the source XML (you can check in transaction SXMB_MONI-> Input Payload).. There is a limitation in File Content Conversion of File adapter and it is that I can make an XML structure of 3 level.. Since these nodes details are in level 4 and 5 they should be missing in Source XML structure itself (after content conversion of File adapter). check that
    >>So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
    So you need to take an alternate approach where you do File Content Conversion and make 3 level structure.. then using a mapping convert this three level structure to your 5 level one and then try to map with the idoc.
    Check this blog for an idea
    http://www.riyaz.net/blog/xipi-file-content-conversion-for-complex-structures/
    http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping/
    Regards
    Suraj

  • Mapping from nested to one table (sales order) XML to IDOC

    Hello,
    I have to map a xml file to the IDOC SALESORDER_CREATEFROMDAT2.SALESORDER_CREATEFROMDAT202.
    How I can map the the longtext from the XML file to the IDOC struktur.
    Part of the XML file, there could be n times BPosition with n times longtext. The longtext must be map with a table. I some case its a mapping from nested to mornal table.
        <BPosition>
             <lpos>1</lpos>
             <bbl_sap_nr/>
             <milvonr/>
             <kurztitel/>
             <anzbest/>
             <anzliefer/>
             <kostenpflichtig/>
             <longtext>
                <line>pos1 zeile1</line>
                <line>pos1 zeile 2</line>
             </longtext>
          </BPosition>
    thanks for your help.

    Hi, I have to map this 1 XML to 1 IDOC
    XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Milver xmlns:ns0="http://ccssap.bfi.admin.ch/milver">
       <bestellung>
          <besteller>
             <bestellnr/>
             <auftragdefit/>
             <wempfdebit/>
             <bestelldat/>
             <lieferdat/>
             <anzpos/>
             <language/>
             <adrzeile1/>
             <adrzeile2/>
             <adrzeile3/>
             <adrzeile4/>
          </besteller>
          <Kopf>
             <Lkopf>Kopf1 zeile1</Lkopf>
             <Lkopf>Kopf1 zeile2</Lkopf>
          </Kopf>
          <BPosition>
             <lpos>1</lpos>
             <matnr/>
             <milvonr/>
             <kurztitel/>
             <anzbest/>
             <anzliefer/>
             <kostenpflichtig/>
             <bemerkung>
                <line>pos1 zeile1</line>
                <line>pos1 zeile 2</line>
             </bemerkung>
          </BPosition>
          <BPosition>
             <lpos>2</lpos>
             <matnr/>
             <milvonr/>
             <kurztitel/>
             <anzbest/>
             <anzliefer/>
             <kostenpflichtig/>
             <bemerkung>
                <line>pos2 zeile1</line>
                <line>pos2 zeile 2</line>
             </bemerkung>
          </BPosition>
       </bestellung>
    </ns0:MT_Milver>
    IDOC:
    The Idoc have a segment for the longtext (table).I have to map, lpos, line into  E1BPSDTEXT from SALESORDER_CREATEFROMDAT2. Its now more clear?

  • MESSAGE MAPPING FROM SQL TO RFC(BAPI)

    Hello Guys,
    Im just new here in SAP XI version 7.0 . Can anyone teach me how to map objects using IR (design) between sender (data coming from sql 2005) and receiver (using Bapi_Salesorder_Createfromdat2)?
    there are only specific fields i need to transfer the data like the followings :
    do i need to map all fields from sender to receiver?tell me how..
    *ORDER_HEADER_IN
    -DOC_TYPE = ZTRV
    -SALES_ORG =4000
    -DISTR_CHAN =40
    -DIVISION=41
    -SALES_OFF=4101
    -SALES_GRP=411
    -PURCH_NO_C='TEST TPL1' (MUST BE UNIQUE)
    -PMNTTRMS =Z015
    -PURCH_DATE=09/04/2008
    *ORDER_PARTNERS
    -PARTN_ROLE= AG
    -PARTN_NUMB=1100074
    Thanks in advance
    aVaDuDz

    Hi,
    Create :
    1. Source & Target Data Types
    2. Messge Type (for source & target data types)
    3. Two Message Interface for using above message types
    4. One Message mapping using source & target message Type
    5. One Interface mapping.
    In message mapping just map those field which you require. You can leave rest of the fileds un mapped at source which are not required to map.
    Regards,
    Sarvesh

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

  • Send Idoc flat file message in JMS receiver adapter

    Hello,
    I am working on a scenario where we send Delvry 03 idoc from ECC to external system. To external system, we send the whole Idoc in flat file structure through JMS queue. I have used Idoc to flat file program in my interface mapping and have configured JMS receiver adapter with just default Module configs but, I am getting an error in communication channel monitoring for the messages.
    Please note that Idoc xml to flat file structure conversion is already done in the mapping, I need to just pass this idoc flat structure in the jms adapter. Hence ther eis no content conversion i nthe adapter..
    Please give some inputs..Here are the modules in my receiver adapter and nothing else..
    SAP XI JMS Adapter/ConvertMessageToBinary
    SAP XI JMS Adapter/SendBinarytoXIJMSService
    The error I get is in audit log
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_R:ca336a6689f837da8bd3387140fc4447
    in turn the message has this error if I open the message
    Whitespace is not allowed at this location. Error processing resource 'http://host:port/mdt/messageconten...
    and it shows one of the lines from idoc..flat file
    Any idea is greatly appreciated..Thank you..Thanujja

    The difference in what I suggest is that it is way simpler.
    Maybe you did not understand this, so will try to explain it better. Its not the best thing to do, but if JMS adapter doesn't budge then you can give it a shot.
    1. You continue to use the ABAP mapping in your interface mapping to map the Idoc xml to Idoc flat.
    2. Write a Java Map that will take the output of the ABAP mapping ; and then create a XML output which would be something like,
    <Root>
    <Idoc_Flat>
    <Data>ABAP Mapping Output<Data>
    </Idoc_Flat>
    </Root>
    3. Now use the simple content conversion in the JMS adapter to convert this to flat file.
    Regards
    Bhavesh

  • How to upload data from  flat to ztables with in the same client by idocs

    Hi Experts,
                   I have a requirement in IDOCS, I need to create a custom IDOC .I  am working on IDES 4.6c. The reqirement is , there  are ztables with header and item data. say for example Authors and Books. I need to upload data from flat file which is available in presentation  server of the same client, which will updated in ztables by using idocs.  For this i need to do ale settings also. The client is 800. There is no other client available. With in the same client i need to do the above stuff.
                    For this requirement how to approach (step by step) to accomplish.
    Thanks in Advance.
    Regards
    J.S.Varma

    Hi,
      This is the procedure.
    create segments using we31. <b>don't forget to relaese it</b>
    create idoc using above segments using we30 <b>don't forget to relaese it</b>
    create message type using we81
    create function module to upload data using se37
    maintain process code using we42
    create  partner profiles we20.
    In the fm module itself write the code for downloading the data from presentation server by GUI_DOWNLOAD.
      Then update the database tables directly by insrt through other internal table in the same client itself.
    Thanks
    Manju

  • Mapping from File to IDoc with multiple Idocs and multiple line items?

    Hi All,
    Need some help with mapping, requirement as below: I have a flat file with multiple records, need to create multiple idocs per each separate order in flat file with as many line items.
    Order_1 field-1 field-2 field-3 field-4
    Order_1 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    I have imported IDoc changed to 1:Unbounded, able to create multiple Idocs based on separate order from flat file.
    Order_No - removeContexts - splitByValue(ValueChanged) - collapseContexts - exists - creatIf - IDOC
    Now I am having hard time creating a line item segment E1EDP01. I want to have Idoc created below way:
    IDoc-1 (Order_1)
    E1EDP01
    E1EDP01
    IDoc-2 (Order_2)
    E1EDP01
    E1EDP01
    IDoc-3 (Order_3)
    E1EDP01
    E1EDP01
    I am getting multiple IDocs created. Please help me to create mutlieple line items under each Idoc. Please be speficic about the node funtions to be used, because I tried many times with different combinations, didn't work.
    Regards,
    N@v!n

    Hi Navin,
    Create your source structure like below
    <Order>1 to unbounded
        <Order_No>
        <field1>
        <field2>
        <field3>
        <field4>
    </oder>
    to create mutiple IDocs based on order number,use below logic
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)--->collapsecontext-->Idoc
    use below logic for E1EDPO1,
    Order----->removecontexts------>
                                                                                    formatByexample------>E1EDP01
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)-------->
    try above logic and let me know if you any issues.
    Regards,
    Raj

  • Advanced mapping from IDOC to SOAP with reversed 3 level context change

    Hi everyone.
    I am having a though time mapping the HRMD_A01 IDOC into a SOAP message. The reason is that the reciever expects an xml structure where the root node is cost center instead of employee which is the case in the IDOC.
    Mapping from:
    IDOC (1..1)
       E1PLOGI (1..unb)
         SEGMENT (String)
         OBJID (String)
         E1PITYP (1..unb)
           E1P0001 (1..unb)
             SEGMENT (String)
             KOSTL (String)
    To this structure:
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above  
    I expect several occurances of E1PLOGI which states multiple employees sent in the IDOC. I also expect several occurences of E1P0001 containing cost centers.
    My conclusion is that I need an advanced mapping and I have created one which collects all KOSTL for the IDOC context, deletes duplicates, and creates the CostCenters segment. This is now working. But my problem is that I can't create the employees segment in the right place. They are only created once under the first CostCenters node.
    Here's the java-code for mapping between KOSTL and CostCenters/KOSTL:
    public void costCenters(String[] var1, ResultList result, Container container) throws StreamTransformationException{
      Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Any ideas on how to proceed?
    Best Regards

    Hi,
      Do the mapping like below.
      UDF should be select as context.
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above
    Mapping:
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--Removecontext--CostCenters
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--SplitbyValue(Each Value)--KOSTL
    constant---Employees
    OBJID----------------------------------------------Use One As Many---SplitByValue (EachValue)----------OBJID
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    Regards,
    Prakasu.M
    Edited by: prakasu on May 20, 2009 3:28 PM

  • Mapping from PEXR2002 iDoc to EDI 820

    We are planning to use XI to map from the payment advice (PEXR2002) iDoc to EDI 820. 
    We have 2 options: (1) Use XI and an EDI adapter (e.g. Seeburger); or (2) Use XI's own mapping functionality.
    If you have done iDoc to EDI mapping with either of the above 2 options, please briefly advise about your experiences and how much efforts it took to develop the mapping.
    Thank-you
    Bac Quan

    Hi Bac,
    Although it is possible to create an EDI message in an XI mapping (or XSLT), this is not very nice.  The use of an EDI adapter (iWay or SeeBurger) is strongly recommended.
    The other way around (rom EDI to XML) is hardly feasiable without an EDI adapter.  Although I haven't worked the SeeBurger adapter, it looks quite nice.
    Kind regards, Guy Crets

  • Creating JCo IDoc from flat file structure

    Hi,
    I need to send an IDoc into SAP using JCo.
    The input to my program is a string containing lines representing a flat file idoc, e.g.
    Line 1="EDI_DC40                           2   ORDERS04.."
    Line 2="E1EDK01                                          00000100000001    USD..."
    Line 3="E1EDK14                                          0000030000000...."
    Is there a simple way to use JCo to create & send the IDoc? 
    i.e.
    1) If I use JCo and RFC IDOC_INBOUND_ASYNCHRONOUS, what would be all the steps/calls to SAP (create TID, call IDOC_INBOUND_ASYNCHRONOUS, confirm TID..?)
    And can IDOC_INBOUND_ASYNCHRONOUS be called using the flat file structures (without having to map to all the JCo ParameterList fields)?  Since the flat file structures are  in the format required by the RFC, just in one long string.
    Line 1=>IDOC_CONTROL_REC_40
    Lines 2..n=>IDOC_DATA_REC_40
    2) Similarly, if I were to use JCo plus the JCO IDoc library, is there a way to pass the flat file structures without having to do all the mapping to segment fields?
    3) Other options..?
    I want to use ALE to SAP, not files, even though the input is in the flat file structure.

    Your reply gives a link to the general JCo documentation.
    It doesn't give ideas on how to call an RFC or IDoc from JCO without mapping each and every field from a flat file structure.
    I'm looking for a way to do something like this:
    Function IDOC_INBOUND_ASYNCHRONOUS has table parameters
          IDOC_CONTROL_REC_40 STRUCTURE  EDI_DC40
          IDOC_DATA_REC_40 STRUCTURE  EDI_DD40
    Since I have the flat file representation of the IDoc, the first line should overlay exactly onto the EDI_DC40 structure.  And the subsequent lines should overlay onto EDI_DD40.  (all fields in this RFC are strings)
    However JCO and JCO IDoc library seem very strongly typed, so it looks like I would have to map each field from the flat file structure to a field in the JCO Function or JCO IDoc object. 
    This could be done in a generic way using the function/idoc metadata, however there would still be some overhead.
    Is there a way to get round this, and build the function/idoc treating its parameters as one long string?

  • How To use External Message To Send IDOC From XI To R/3

    we need to split one source message to several IDOC To
    R/3,But Standard Imported r/3 idoc contains only one idoc per message,so we export the standart idoc to a
    xsd file and change it to a  multi "IDOC" segment structure and import back to xi again,after that,we create a message interface use the imported
    message type and use it to send IDOC to r/3 via idoc adapter,but at the "call atapter" step it gernarate a
    error:"Unable to interpret IDoc interface MI_IDOC_IN".
    what we should pay attention to when use external message
    to send idoc to r/3?
    (when use the imported idoc message to send  single idoc per message,it is no probelm)
    thx

    The way this works is:
    1. In your Message Mapping use the External WSDL defintion that you loaded after tweaking the "IDOC" Occurance.
    2. Then in your INTERFACE MAPPING use the orginal IDOC Name that you imported from R/3.
    3. Use the original IDOC Name in Integration Builder too.
    This should work.
    Thanks
    Ashish

  • How to Create PR from exeternal SQL Server through IDOC

    Dear all,
    I am in trouble while creating PR from exeternal SQL Server through IDOC . although I have created PR from TCODE we19 giving input as well as from function writen below
    My scnerio is from external system(Sql) want to send data to sap to create PR return PR No to SQl Server
    Not having idea how to do
    Basic Type for Idoc : PREQCR01
    Message Type       : PREQCR
    Function Module    : BAP_Idoc_Input1
    Thanxs in Advance

    if you have XI installed,
    than it would be easy,
    just use JDBC channel->XI->SAP IDOC.
    otherwise,
    you can export the table from the SQL to CSV file,
    and import it with LSMW with IDOC PREQCR01.

Maybe you are looking for

  • HT5637 2 apple ID's on one computer

    Hi, I want to be able to set up iMatch for two apple ID's using the same computer, (Mac OSX 10.6.8) so both my husband and I can have our itunes library on our phones using imatch, but we keep our other icloud data separate (contacts etc). I've set i

  • Current official Lion bug list URL?

    I am looking to upgrade to Lion, but only when I can determine that the bugs that will affect me most have been eliminated.  Is there any web site (at Apple or elsewhere) that maintains a current bug list for Lion?  I don't mean an aggregator of unsu

  • MS Active Directory and iPlanet 4.1.x

    Can someone tell me if it is possible to use a Microsoft Active Directory Server as the LDAP server for implementing client authentication with iPlanet 4.1.x? My interest is in mapping information contained in client certificates to user information

  • Plug-in container has stopped working. No printing from web

    Went to print a receipt from a web page and got firefox 'not responding'. Then error message after I click to close..."plug-in container has stopped working". I have reset ff, i have uninstalled and reinstalled. flash is up to date. I have EWPS plug

  • Program units (Package) as global variable

    Hi all, Report 10g, generate PDF on the web. I need to manage some informations as rowtype. So, I defined a program unit as Package Spec VAR and defined v1 tablename%rowtype. When fired the trigger After Parameter Form run a procedure that populate t