IDOC-XI-JDBC: mapping error

Hi sap gurus...
        I had a problem in IDOC mapping to JDBC.
If any body have mapping template or any blog.. related to MATMAS.. please help me..
I don't know how to map the idoc structure to JDBC structure..
points will be given immediately..
Kumar

Hi sheetal
My IDOC structure is----
MY JDBC Struc is
as................................................................MT_MATMAS_MSSQL(Msg type name)
This struc...is common----
STATEMENTNAME(0..1)
............................................................................TEST (1..1)
.................................................................................ACTION ..REQUIRED
.................................................................................TABLE...(MATMAS TABLE IS CREATED IN MSSQL)
.................................................................................ACCESS(1..1)
......................................................................................BEGIN ...REQUIRED
......................................................................................EDI_DC40..1...1
......................................................................................E1MARAM...1...9999
......................................................................................E1UPSLINK..1...1
THIS IS MY JDBC STRUCTURE..
I sent the screen shorts to your company email id..please check it and help me..
i am able to get the idoc from sap r3 to Xi ,,, now i want to send that idoc to database..
help me please.
Kumar..
[email protected]

Similar Messages

  • Idoc - to - JDBC mapping..

    Can any one help me on  step-by-step   Idoc to JDBC  mapping ..

    Check this link for jdbc receiver adapter. and follow the instructions. If you need more assistance let us know with your requirement
    For configuring JDBC adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    For creating jdbc structure on the inbound side
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

  • IDOC to JDBC Scenario error

    Hi All,
    I am doing a IDOC to JDBC Scenario.I am done with IR and ID.
    The Table in the DB is TABLE1 with Field1 and Field2.
    Now when I run thescenario it throws an error ,
    2009-03-19 12:41:06 Success INSERT INTO  TABLE1 (Field1, Field2) VALUES (KM247850, FINJTIA)
    2009-03-19 12:41:06 Error Unable to execute statement for table or stored procedure. 'TABLE1' (Structure 'Statement') due to java.sql.SQLException: [EUDNT038]The name "KM247850" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
    But it has successfully generated the SQL Query which I think is perfect.
    But whats the error which follows that?
    How do I resolve it?
    Thanks,
    Venu

    Hi,
    It could be due to wrong structure of JDBC, compare your target structure with this blog..
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Regards,
    Sarvesh

  • IDOC Serialization(EOIO) using IDOC Adapter throwing Mapping error

    Hello SDN Gurus,
    The scenario I am working on is IDOC(PAYEXT & EUPEXR) --> XI (ABAP Mapping) --> Flat File (IDOC Structure).
    The IDOCS produced in Appl system may be in the following order
    PAYEXT
    PAYEXT
    EUPEXR
    PAYEXT
    PAYEXT
    PAYEXT
    EUPEXR
    I need them to be processed in the same order into flat file.
    The scenario is working good except for the serialization. So I did the following
    Created two entries in IDXQUEUE one for each message type with the same Queue name in XI system.
    Created a new rule for the queue and an associated function module. Used this rule in partner profile for both the message types.  I used the following link to create the above two steps.
    /people/community.user/blog/2006/11/04/how-to-serialize-idoc-xml-messages-fed-into-xi
    The SAP system in based on WAS 6.4.
    I can see the queue name & EOIO in the inbound message header.
    I am getting a mapping error in ABAP program. If I inactivate the queue(in Appl system SAP ECC), I don't get any error.
    Does anybody had this problem earlier? Please advice.
    Thanks
    Srini Vaidyam

    I found an OSS note to resolve my issue. The note number is 1057573.
    Whenever the queue is activated, the sender system will not send the <TABNAM> field value in EDI_DC40 structure. This note addresses this problem.
    I found out this by comparing the results from SXI_MAPPING_TEST individually for the message that failed after queue is activated and the message that was successful if the queue is inactivated.
    Only thing I noticed now is even if you selected the radio button "Trasfer Immediately" in Partner profile of Appl. system, the messages are not sent. They are getting collected. So we need to manually push them out using WE14.
    This forum Rocks.
    Thanks. 
    Srini Vaidyam

  • IDOC to JDBC - mapping test versus actual run

    Hi
    When I test the message mapping for the idoc-to-jdbc sender scneario, where one sales order idoc has multiple line items in segment E1EDP01, the statement => access structures repeat properly for 2 line items. Here I am giving the idoc xml file (data file) in the payload in the test tab of message mapping)
    However in the communication channel log (with sql statement log = true), when I try to process an actual idoc from ECC, in the sql log of the processed message, I can see an insert statement only for the first line item of the sales order.
    Please can somebody guide me as to what must be the problem?
    Statement occ is 1.
    tablename occ is 1.
    Access structure occ is 0...unbounded.
    The segment E1EDP01 is currently mapped to acess node.
    The sales order number is repeated over the 2 line items using below mapping -:
    E1EDP01 (with context as root) => "useasmany" => split by value => Item no.
    Please advise.

    Hello Gary,
    Make the statement 0..unbounded or 1..unbounded then make the access 0..1. One statement is needed per action
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm
    If the statements are so complex, you  can also opt to use SQL_QUERY instead.
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm
    Hope this helps,
    Mark

  • XI Flat File to JDBC Mapping Error

    Hi,
    I have been trying to insert some records from a flat file into a sybase database using the FILE adapter (with file content conversion) as a sender and the JDBC adapter as a reciever, but I keep getting mapping errors like:
    RuntimeException during appliction Java mapping com/sap/xi/tf/_mm_hh_file__hh_sybase_nombres_</Trace>
      <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:mt_hh_sybase_nombres/STATEMENTNAME. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    I have read through some blogs and I still can't figure out what is wrong.
    Flat pipe separated file:
    Hans|Robert|Hahn|Gallegos
    Karina|Maria|Cordoba|Gutierrez
    Datatype for this file looks like this:
       Record                         1
          Row                          1...Unbounded
             Nombre                  1
             SegundoNombre     1
             ApPaterno              1
             ApMaterno             1
    Because the FILE adapter uses Content conversion, the file translates to:
      <?xml version="1.0" encoding="utf-8" ?>
      <ns:hh_test xmlns:ns="http://me.com">
      <Record>
         <Row>
          <Nombre>Hans</Nombre>
            <SegundoNombre>Robert</SegundoNombre>
            <ApPaterno>Hahn</ApPaterno>
            <ApMaterno>Gallegos</ApMaterno>
         </Row>
         <Row>
           <Nombre>Karina</Nombre>
           <SegundoNombre>Maria</SegundoNombre>
           <ApPaterno>Cordoba</ApPaterno>
           <ApMaterno>Gutierrez</ApMaterno>
         </Row>
        </Record>
      </ns:hh_test>
    My database table looks like this:
    Nombres
    ApPaterno
    ApMaterno
    Datatype for this table looks like this:
    STATEMENTNAME    1..Unbounded
      nombres                  1
        action                    optional
        TABLE                  1
        access                  1
          Nombres             1
          ApPaterno           1
          ApMaterno           1
    MAPPINGS as follows:
    Record ------> no mapping
    Row ------> STATEMENTNAME
    Constant ------> action
    Constant ------> TABLE
    Nombre + SegundoNombre ------> Nombres
    ApPaterno ----> ApPaterno
    ApMaterno ----> ApMaterno
    How do I do the mapping ? I've been through a lot of blogs and threads but I haven't found an example like this, a flat pipe separeted multiline file with records to be inserted in a database.
    Message was edited by:
            Hans Hahn

    Hans,
    The error shows you have an error in mapping. Also you have mapped constant for ACTION and TABLE. Here you have to hardcode the value INSERT or UPDATE etc for ACTION and the name of the table for TABLE.
    Check this weblog where he has mentioned everything what you are looking for:
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Also once when you are done with mapping try to execute it in the test tab of mapping editor.
    ---Satish

  • Idoc to jdbc mapping duplicate source node to target structure

    Dear all,
    I am working on PI 7.1
    My sceniro
    IDOC to JDBC  [sap to mssql ]  where the target is a table structure shown below: I execute a stored procedure to insert the below message type into sql table.
    <ns0:MT_SP_LFBK xmlns:ns0="http://test.com">
    - <Statement_Name>
    - <storedProcedureName action="EXECUTE">
      <table>spr_test</table>
      <BANKS type="Char">BOA</BANKS>
      <BANKL type="char">122207</BANKL>
      <BANKN type="char">4555--0</BANKN>
      <LIFNR type="char">1100000218</LIFNR>
      <KOINH type="char">varchar</KOINH>
      <BKONT type="char">01</BKONT>
      <BANKA type="varchar">S.A.</BANKA>
      </storedProcedureName>
      </Statement_Name>
      </ns0:MT_SP_LFBK>
    The mapping is between source CREMAS02 and the above target structure. Everything works fine.
    The problem is when the  vendor has more than one bank account number the IDOC CREMAS02 replicates the below segment E1LFBKM for each BANK account information. Since target and source are mapped one to one how can i map the second bank account information to the same target structure or genereate a new target Message type for the second bank account  information and send it to sql ?
    <E1LFBKM SEGMENT="1">
      <MSGFN>005</MSGFN>
      <LIFNR>110000021</LIFNR>
      <BANKS>BOA</BANKS>
      <BANKL>122207</BANKL>
      <BANKN>4555-0</BANKN>
      <BKONT>02</BKONT>
      <BANKA>S.A.</BANKA>
      <BNKLZ>3000000</BNKLZ>
      </E1LFBKM>
    Thank you ,
    Teresa

    Hi Teresa,
    which segment have you mapped with <storedProcedureName action="EXECUTE"> ?
    Because according to me , if you send <E1LFBKM> to <storedProcedureName action="EXECUTE">
    , you will be able to use your stored procedure several times, in fact each times that you have a <E1LFBKM>.
    Reminds: inside <Statement_Name> you can do several SQL actions like execute one or several stored procedures (could be different).
    Of course, after that your table should accept to have several bank account for a same customer.
    So to have something like that:
    <Statement_Name>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    <storedProcedureName action="EXECUTE">
    </storedProcedureName>
    </Statement_Name>
    regards
    mickael

  • Sender JDBC Mapping error

    Can some one help me with the following error please?
    I just want to read store column from Oracle database table SA_BO_SALES_TEST and create a Flat File. I have JDBC-XI-FILE scenario. I use the same Data Type for Sender(JDBC) and receiver(FILE) Message Type.
    the data type is
       DT_STSSales_SA_BO_SALES
          resultset
            row
              STORE
    The message type is
    MT_STSSales_SA_BO_SALES         
       resultset
            row
              STORE
    The message mapping is between the same message type(MT_STSSales_SA_BO_SALES) for source interface and destination interface.
    The sender JDBC Adapter has
    Query SQL Statement -
    SELECT STORE FROM SA_BO_SALES_TEST WHERE PROCESS_DATE IS NULL
    Update SQL Statement -
    UPDATE SA_BO_SALES_TEST SET PROCESS_DATE='01-JAN-2006' WHERE PROCESS_DATE IS NULL
    Document Name -
      resultset
    When i execute this scenario, The payload from any pipeline steps is
    <?xml version="1.0" encoding="utf-8" ?>
    - <resultset>
    - <row>
      <STORE>1021</STORE>
      </row>
    - <row>
      <STORE>1021</STORE>
      </row>
    - <row>
      <STORE>1021</STORE>
      </row>
      </resultset>
    and it updates the Oracle table with PROCESS_DATE='01-JAN-2006' . But
    One of the pipe line step "Request Message Mapping" is failed with the error.
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_STSSales_IDOC_BAPI_POSTR_CREATE~</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_MM_STSSales_IDOC_BAPI_POSTR_CREATE~ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Hi Prasad,
    <i>converted into the following XML wihtout any errors</i>
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_STSSales_SA_BO_SALES xmlns:ns0="http://zalecorp.com/sts_posdm_sales_10"><resultset><row><STORE>1021</STORE></row><row><STORE>1021</STORE></row><row><STORE>1021</STORE></row></resultset></ns0:MT_STSSales_SA_BO_SALES></i>
    If you have given the name for your Datatype as "<ns0:MT_STSSales_SA_BO_SALES xmlns:ns0="http://zalecorp.com/sts_posdm_sales_10">", then the RESULTSET tag is not to be used.
    You will have to enter this Value <b>MT_STSSales_SA_BO_SALES</b>  in the SENDER JDBC ADAPTER > DOCUMENT NAME and <b>http://zalecorp.com/sts_posdm_sales_10</b> in SENDER JDBC ADAPTER> DOCUMENT NAMESPACE and then <b>Remove the Result Set tag.</b>
    just take a look at the Document Name part of the JDBC adapter in this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    Bhavesh

  • Idoc error mapping error for segment "E1EDT13 006" in DESADV idoc

    Hi SAP Gurus,
    DESADV IDOC for few articles is not getting passed from SAP to legacy system. It is missing one segment"E1EDT13 006" for goods issue.
    Why is this mapping error happening. How can this be resolved.
    Regards.
    Sumi

    Hi Nsangle/SAP gurus,
    Thanks for  that. But, I have already compared the failing idoc with the successful one. It's the segment E1EDT13 006 missing in the wrong idoc. I have already added that idoc and reprocessed it.
    But, I wanted to know why such kind of idoc segment missing/ mapping error happens.
    Regards.
    Sumi

  • MAPPING ERROR with IDOC

    Hi Friends,
           I am working on IDOC to JDBC scenario. Here i am using DEBMAS06 IDOC . when i tried to trigger an IDOC from BD12 T code its triggering an idoc but when i see it in MONI of XI, its giving mapping error. when i test my mapping program its executing successfully. even i tried to execute  with the incoming data in the sxmb_moni, i mean that i filles my mapping test with the same data coming into MONI  by filling all the segments coming into XI its executing successfully in mapping test.
       but  when i tried to trigger an idoc from we19 or from bd54 i am facing this error. can any one please let me know what else i can do for running  this scenario. let me know your comments.
    Thanks
    Ramana.

    Hi friends, I am getting the following error. On the sender side we dont need to take care of the structure because we will be importing the IDOC from the application system directly. on the receiver side i have created the structure for the data base. the mapping is running  fine in my mapping test. still i am not getting what else i need to do. please comment on this.
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MessageMapping_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MessageMapping_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • IDOC to JDBC error

    hi experts,
    i have to scenario IDOC to JDBC asyncrhonous, give me the follow error:
    Error occurred during back-routing Error in communication channel
    CO_TXT_ROUTING_BACK_ERROR
    can somebody help me please?,
    very thanks,

    Hi
    I had a similar issue. I have IDOC->file and IDOC scenario.
    I was getting CO_TXT_ROUTING_BACK_ERROR only for file.
    Then I noticed in the reciever agreement i had mentioned wrong sender for header mapping.
    I corrected the header mapping in Receiver agreement and that fixed my issue.
    i hope thi would help anyone having similar issue
    Thank you
    Shaku

  • Very strange error : IDOC to jdbc scenario

    Hi
    I am getting a very strange error when I see the log for the idoc to jdbc scenario that I am building.
    The mapping test shows the header record and line item record properly in the mapping result.
    insert, access nodes, fields with access nodes are all formed correctly.
    However the communication channel log shows below error.
    Could not execute statement for table/stored proc. "tblTestItem" (structure "Item") due to com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
    JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'tblTestItem' (structure 'Item'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ')'.
    The message status was set to WAIT.
    The query that I see in the log is :INSERT INTO  tblTestItem () VALUES ()
    However mapping tool shows that all nodes are correctly formed.
    Please assist.

    Hi
    I am still getting this issue even after the below steps so kind of stuck - actually very much stuck.
    1. Restart of the dev environment
    2. Tried with a new extension of the idoc
    In the communication channel log for the JDBC receiver channel I still see
    INSERT INTO tblItem () VALUES ()
    The payload that I see in the message content tab is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_XXX_XXXX xmlns:ns0="http://capita.com/pi/XXXX">
    - <Statement>
    - <dbTableName action="INSERT">
      <table>tblItem</table>
      </dbTableName>
    - <access>
      <InvoiceNo>0000000009293467</InvoiceNo>
      </access>
      </Statement>
      </ns0:MT_XXX_XXXX>
    How do I debug the jdbc adapter to see how it converts the above xml output from the mapping step (note that this output is from an actual run and not test tool) to a sql query.
    Very strange that the column names are present in the target payload but it is not reflecting in the query.
    I have other tables being populated with the same jdbc receiver communication channel which makes this more and more confusing.
    PLEASE ADVICE.

  • 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

  • Mapping issue in idoc to JDBC scenario

    mapping issue in idoc to JDBC scenario
    source structure
    E1KNB1M
      BUKRS = 1000
    E1KNB1M
      BUKRS=  9000
    E1KNB1M
      BUKRS=  2000
    THE NODE E1KNB1M is repeated many times and the field BUKRS is also repeated with E1KNB1M as above
    TARGET field : ISFRANCHISE
    if any where value of BUKRS =9000 we have to pass Y to the target filed, else N
    if BUKRS = 9000   THEN ISFRANCHISE= Y
                   ELSE
                ISFRANCHISE=N
    I've done the mapping as below
    BUKRS = 9000--> IF THEN Y ELSE N--
    > ISFRANCHISE
    BUT everry time the target value is N only
    pl suggest
    rgds
    mojib

    mapped like this
    BUKRS--->SORT---->
                                                 EQUALS --------IF---THEN    Y
    9000------------------------>                                               ----------------->ISFRANCHISE
                                                                  ELSE   N
    context of BUKRS set to parent node
    its worked
    thanks to all for valuable suggestions
    rgds
    mojib

  • Mapping Error- In IDoc to File scenario

    Hi Experts,
    Got the Mapping error for one interface (IDoc to file). After comparing with successful message found that the field value (TDLINE) is not availbale in first segment (E1EDT10) in idoc for this failed one.
    Mapping is :
    TDLINE -- Exists --- Creatif --- Receiver field(in the file)
    But here due to the the empty value in first segment the message is failed in XI system, next segment values is not trasmitted to the recever end(maping is the same above). To overcome this issue please suggest the suitable mapping design in IR.
    Regards
    Mahesh

    Hi,
    After your CreateIf, use a "IfWithoutElse" by selecting the properties "Keep SUPPRESS Values". To do that, do a right click on IfWithoutElse, choose "Properties".
    With this option, you will keep the fact that you have nothing in the source, and so the target context will have a "SUPPRESS" line.  I have not THE solution, so do your own test.
    If it's not enough, see also about the "mapWithDefault" (but that depends of your real rule).
    Regards.
    Mickael

Maybe you are looking for