Specify Keys in Data Type for receiver JDBC adapter

Hi guys,
I have the following issue:
In a proxy to JDBC scenario, I want to specify somehow the key values for the SQL statement in the data type that I define for the receiver JDBC adapter. Thus, I am using the following structure in data type:
root
    Statement
           dbTable
           action
           table
           access
                  CustomerID
                  Name
                  HouseNo
           Key
                  CustomerID
But in the SQL statement that is produced (I can see that in RWB, CC Monitoring, Audit Log), the "Key" segment is translated into "OR". E.g. UPDATE_INSERT ("A100" "Evaggelos Gkatzios" "El Alamein 19") OR ("A100")
Do you have any ideas ?

Hi,
Its clear from the statement in RWB (in CC monitoring's auditlog) you are using UPDATE_INSERT as the action.
Please correct me if this is OK. Now the interpretation of input xml file will be like this,
If the input XML is in the following format
<root>
<Statement>
<dbTable action=UPDATE_INSERT>
<table>EXAMPLE</table>
<access>
  <CustomerID>ABC</CustomerID>
  <Name>xyz</Name>
  <HouseNo>123</HouseNo>
</access>
<key>
  <CustomerID>DEF</CustomerID>
</key>
</dbTable>
</Statement>
</root>
Resultant SQL after parsing the XML file will be,
1. It will first check with the condition WHERE CustomerID = DEF. If it finds the record with this condition then it will update the record with CustomerID=ABC, Name =xyz & HouseNo=123.
2. If it doesn't find any record with that CustomerID then, it will insert a new record with the same details.
In auditlog, you will find two SQL statements like,
1.UPDATE EXAMPLE SET CustomerID=ABC, Name =xyz & HouseNo=123 WHERE CustomerId=DEF
2.INSERT INTO EXAMPLE VALUES(ABC,xyz,123)
hope this has given clear information about your query,
Regards,
Soorya

Similar Messages

  • Structure for Receiver Jdbc adapter for multiple tables

    Hi,
    For Receiver JDBC adapter,Standard structure
    structure as
    Statement
       Tablename(TABLE1)
            Action
            Access
    Can i make a structure like
    Statement
         Tablename(TABLE1)
            Action
            Access
                fields....
         Tablename(TABLE2)
            Action
            Access
                fields......
    As i am using tables and I want to insert or update both of them or one based on some conditions.
    Will Insert be possible in single Statement or I have to create separate statements for each table. Can you please help me on this?
    Thanks in advance
    Best Regards,
    Harleen Kaur Chadha

    Hi Harleen,
            As already said by Dharanveer, all that you need to do is replicate the Statement level, so, istead of using this structure:
    Statement
    Tablename(TABLE1)
       Action
       Access
         fields....
    Tablename(TABLE2)
       Action
       Access
         fields......
            You will construct something like this:
    Statement1
    Tablename(TABLE1)
       Action
       Access
         fields....
    Statement2
    Tablename(TABLE2)
       Action
       Access
         fields......
           And this structure will be created in a single Data Type, that will be used to create a single Message Type, that you will use in your Message Mapping, and, the 2(or more tables that you need to manipulate) will be inserted/updated without problems using this approach.
           Thank you, and best regards,
           Wilson

  • What are the Batch mode parameters for Receiver JDBC Adapter

    Hi All,
             Could some pls tell me how to set bacth mode in receiver JDBC adapter and what are its parameters and how to configure them. i beleive there is something like max count parameters etc..
    Regards,
    Xier

    Hi,
    Check this for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Regards
    Seshagiri

  • Datatype structure for receiver jdbc adapter

    what is the datatype structure while using a receiver jdbc adapter

    XML Document Format for the Message Protocol XML SQL Format
    You can modify one or more database tables by means of a message. Depending on the content of the message, you can either insert (INSERT), update (UPDATE), or delete (DELETE) the data. Results from queries (SELECT) can also be included in the response in XML format for synchronous messages. The XML document must have the following schema in this case:
    <root>
      <StatementName1>
    <dbTableName action=”UPDATE” | “UPDATE_INSERT”>
              <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName1>
      <StatementName2>
    <dbTableName action=”INSERT”>
    <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2</col2>
    </access>
    <access>
    <col1>val11</col1>
    </access>
    </dbTableName> 
      </StatementName2>
      <StatementName3>
    <dbTableName action=”DELETE”>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>     
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName> 
      </StatementName3>
      <StatementName4>
    <dbTableName action=”SELECT”>
              <table>realDbTableName</table>
    <access>
    <col1/>
    <col2/>
    <col3/>     
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName> 
      </StatementName4>
      <StatementName5>
    <storedProcedureName action=” EXECUTE”>
              <table>realStoredProcedureeName</table>
    <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName > 
      </StatementName5>
      <StatementName6>
    <anyName action=” SQL_QUERY” | “SQL_DML”>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>          
    </key>
    </anyName > 
      </StatementName6>
    </root>
    Mudit

  • Acknowledgement from third party data base using receiver jdbc adapter

    Hi ,
    I've a scenario where I'm sending material master data to third party database  using an automated scheduled  prgram in R/3 , i've used asynchronous abap proxy to receiver JDBC scenario. But now they are asking to design in such a way that there should be an acknowledgement to the sender  if data has not been updated in database.
    pl help me how to design the above .
    pointe will be rewarded
    thanks
    mojib

    Hi mohammad,
       In the design (IR) when u r specifying the messages interface define it has synchronous message there u will get the reponse message tag below the actual message interface. Here you can define the reponse message frm the thrid party if the message got failed.
    Try do this with help of integration senario in which u can define the reponse(which is failed) also..............
    Regards
    Sai
    READ RULES OF ENGAGEMENT
    DON'T ASK FOR POINTS
    Edited by: Prateek Raj Srivastava on Mar 26, 2010 2:17 PM

  • Structure for Receiver JDBC Adapter.............

    Hi
    Can anyone explain the receiver structure mapping of JDBC Adapter.......
    I am having Proxy to JDBC scenario
    Regards,
    Sudheer

    Hi...
    ThanQ for your quick respones....Can you please explain the Mapping to be done for the receiver structure.
    I can find so many documents for receiver structure. But I cannot find mapping documents so that I can map the
    source and destination structures.
    There is confusion for me regarding Statement,Action,Access,Table, Key fields....
    Please clarify my doubt....
    Thanks,
    Sudheer

  • Special Characters for Receiver JDBC Adapter

    Hi,
    Our Scenario is Proxy -PI-JDBC (SQLServer ). We have special characters in the payload and we are abel to see the special characters in PI.According to JDBC Faq we used haquot attribute and concatenated with Prefix N'<Value>'. But still when the data is posted in the database we cannot see the special characters.
    Please let me know your inputs.
    Thanks,
    Sainath

    Reference following thread, add a attribute of "hasQuot", map constant "No" to it, to see solve your problem or not:
    Re: how to use todate function in JDBC adapter
    Regards.
    Liang

  • How to create the Data Type for the receiver end?

    Hello Expertise
    I wanted to Create a Data type for  Receiver end in PI.
    Sender end is ECC.
    Receiver end is SRM
    Here's the Data type for Sender end  as
    Can anyone help to create the Data type for Receiver end i.e SRM.
    Thanks in advance.
    Regards
    karan

    Hi Karan,
    Please don't call Sir, we are just trying to help each other.
    Please go through below scenario's and check your configuration.
    ABAP Client Proxy to ABAP Server Proxy Scenario - Process Integration - SCN Wiki
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0ac1a33-debf-2c10-45bf-fb19f6e15649?overridelayout=true
    http://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
    regards,
    Harish

  • Date Formatting error in JDBC adapter

    Hi,
    While inserting date using a Receiver JDBC Adapter i am getting a "Month not valid" error can anyone please tell me how do i pass date in the required format. Database is Oracle.

    Hi Vinay,
    Oracle's default format for DATE is "DD-MON-YY"
    With the functions to_char and to_date, a date format can be used. Example:
    select to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') from dual;
    will return something like: 24/03/2006 14:36:43
    Regards,
    Prateek

  • Labview How to specify 1d array of clusters as data types for variant to data

    Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?

    First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
    I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
    Connect that constant to the data type input of the Variant To Data function.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Efficiency of data type for surrogate keys

    Hi all
    In my fact table I have a foreign key of data type NUMBER and in my dimension I have a primary key of type NUMBER(12,0).
    In my understanding, these two columns are stored in the same way and there will be NO conversion that needs to take place when the database joins these two columns? My belief was that the 12,0 acted simply as a constraint. My DBA says otherwise though I am not convinced. Can someone please weigh in on this?
    Is it more efficient in any way at query time to have both columns declared as NUMBER?
    Thanks,
    Wrifster

    The above link does answer your question.
    "Oracle stores numeric data in variable-length format. Each value is stored in scientific notation, with 1 byte used to store the exponent and up to 20 bytes to store the mantissa. The resulting value is limited to 38 digits of precision. Oracle does not store leading and trailing zeros."
    So an integer will be stored the same in "number" as "number(12,0)
    You may also find this of use :- http://it.toolbox.com/blogs/oracle-guide/oracle-data-types-5-faqs-about-number-30525

  • Cannot get the correct data type in Oracle JDBC

    Dear ALL:
    I used JDBC ResultSetMetaData to get the column data type for Oracle Database. I created a table including 2 columns AAA, which is NUMBER type, BBB which is FLOAT type.
    However, I found a problem that either NUMBER or FLOAT data types are reported as NUMBER type in JDBC.
    IN SQL 2000, it is okay. SMALLINT, INT, TINYINT, etc..can be reported correctly.
    Can anybody tell me that what's wrong here? I will be very appreciated.

    hi,
    i guess its a bug which is fixed with 10i.
    Elango.

  • Data Type for a Longitude/Latitude Column in an Oracle dB Table?

    Greetings All,
    What is the recommended data type for a Longitude(Lon) or Latitude(Lat) Column of an Oracle dB Table? I am creating a signs inventory table in our Oracle database to be used as a data warehouse for our signs inventory. The Lon and Lat fields along with some other data will be populated from a MS access file exported from our Geodatabase. Currently the data type for the Lon and Lat fields of the MS access file is defined as "Double". A couple of Examples of the Lon and Lat data are as follows:
    Lat                       Lon
    59.4564555909     -135.3133542922
    64.841125            -148.01808
    ...What data type should these two columns be defined in the new Oracle database table??? Should the data type be defined as FLOAT(126), NUMBER(10, 6), or else? Any suggestions/help on this would be greatly appreciated.
    If the data type is defined as NUMBER(10,6), the first example of Lon "-135.3133542922" will be truncated to "-135.313354" or would I receive an error while trying to import the data from an access file to the Oracle dB?
    Thanks in advance for any/all the help.

    Orchid,
    Is SDO_GEOMETRY available in Oracle 10g?Yup. I'm still on 10g as well; there's no shame in that.
    How do I format my lat/long's into WKT and use the SDO_GEOMETRY constructor?The March 16th example shows the steps, but I take it you're trying to get your data from MS Access into Oracle. Is that right? If so, consider these options:
    OPTION 1, When you have < 50k records
    Simply write a query that returns INSERT statements that you can run against Oracle.
    For example, let's say you have a table in MS Access defined as msaCoords (ID, LongX, LatY).
    Let's say, your destination table in Oracle is named oraCoords(ID NUMBER, Geometry MDSYS.SDO_GEOMETRY). Then,
    SELECT "INSERT INTO oraCoords (ID, Geometry) VALUES (" & ID & ", SDO_GEOMETRY('POINT (" & LongX & "," & LatY & "'), 8307);" FROM msaCoords;
    -- "MS-ACCESS QUERY RESULTS"
    INSERT INTO oraCoord (ID, Geometry) VALUES (1, SDO_GEOMETRY('POINT (-135.3133542922,59.4564555909'), 8307);
    INSERT INTO oraCoord (ID, Geometry) VALUES (2, SDO_GEOMETRY('POINT (-148.01808,64.841125'), 8307);Save those MS-ACCESS QUERY RESULTS to a text-file (D:\MyPts.sql). Launch SqlPlus and type @D:\MyPts.sql
    Once it's done, type Commit into SqlPlus and you're done.
    OPTION 2, when you have > 50k records
    Use SqlLoader. There's an example posted { here | http://forums.oracle.com/forums/thread.jspa?messageID=9412123&#9412123 }
    Cheers,
    Noel

  • Data Type for Process Flow... PB with Date?

    I've got a problem by passing parameters in process flow.
    I have a mapping with a parameter DATE_EXEC (data type : DATE) and a default value that is TO_DATE('20/01/2007' , 'dd/mm/yyyy') . My mapping is working good when i launch it.
    I have a process flow which contains the mapping. This process has a parameter DATE_EXEC (data type : DATE). I bind the 2 DATE_EXEC. But when i launch my mapping the value is not recognized, I try with :
    - TO_DATE('20/01/2007' , 'dd/mm/yyyy')
    - 20/01/2007
    - 2007.01.20
    - 2007-01-20
    My question is what are the data type in process flow? They are not ORACLE TYPE.
    For example , a parameter in a mapping which is a VARCHAR2 must be input between quotes but if you bind it to a parameter of a process flow which is a STRING (not ORACLE Data type) , you must input it without quotes?
    Anybody has some rules about that?
    I apologize for my english, i'm a french people.

    Here is some information on the literal quote or not quote query and what I think you need to do at the end, hope it helps. Not exactly intuitive...since the flow designer (you) have to know what is a PLSQL object and what is not.
    1. Literal = FALSE
    When Literal = FALSE is set then the value entered must be a valid PL/SQL expression which is evaluated at the Control Center e.g.
    'Hello World!'
    22 / 7
    2. Literal = TRUE
    When Literal = TRUE then the value is dependent on the the type of Activity. If the activity is a PL/SQL object i.e. Mapping or Transformation, then the value is PL/SQL snippet. The critical difference here is that the value is macro substituted into the call for the object. The format of the value is identical to that entered as default value in the Mapping editor. e.g.
    'Hello World!'
    sysdate()
    If the activity type is not a PL/SQL object then the value is language independent. e.g.
    Hello World
    3.1427571
    What you should try......
    Check the map activity parameter in your process flow to see if literal is false (an expression), set it to false and then try using your TO_DATE('20/01/2007' , 'dd/mm/yyyy') expression, deploy your flow and execute. Alternatively the user guide defines the DATE type for flow with the format YYYY-MM-DD so you can have the parameter value as '2007-01-20' use literal equal to true and remember and quote your value.
    Cheers
    David

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

Maybe you are looking for

  • How to suppress default alert in form 6i

    Hi all I am Working on form 6i Help me ... How can i Suppress default alert with my alerts??? thanks....

  • Cash Sale 106 has been saved (no delivery created)

    Dear Team,                while Saving the Cash Order i am facing a error called Cash Sale 106 has been saved (no delivery created) and also when i check the pricing In pricinh Condition value is also showing 0 Can u help me out Regards VP

  • TS4006 I can't see my sons iPhone 3 on "find my iPhone "

    I don't know what I'm doing wrong but I put my son on my iTunes and then tried to add him to find my phone but I don't get his device in my list???? Plz help!!!

  • Need sort child record in "start.. connect by"

    MY SQL IS LIKE select parent_item,compon_item,qty_ass,level from m1 start with parent_item = 'E.29-401' connect by parent_item = PRIOR compon_item i want resul in order of compon_item in EACH Level

  • How to update 2G-Nano MANUALLY ?

    Hi all, how am I able to update my 2G-Nano if my notebook (with iTunes 7.02) has no connection to the Internet at all? I've downloaded iTunes via a separate PC and installed it on my (offline) notebook via USB-stick. iTunes states that my Nano has go