Skip to Content
author's profile photo Former Member
Former Member

Mapping - JDBC Scenario

Hi friends

Scenario:

File-- >PI --->Database ( jdbc)

In the above scenario while designing the mapping :

We are using TableName , Access , Key nodes

Under Access node : I have all the fields

I am not sure whether to use andy fields under Key node

Kindly guide me what is signifance of Key and whether i need to use this key node.

My Requreiment :

If there are multiple entries for same product id with <PurchaseMode>New Contract</PurchaseMode> value, then overwrite value in DB with the last product idu2019s value

Hoe to achieve the above requreiemnt ?

Renu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 08, 2010 at 06:55 AM

    > Kindly guide me what is signifance of Key and whether i need to use this key node.

    When you look in online help, this is explained very clearly.

    You need key for update so that DB knows which row you want to update.

    The key can be generic.

    > If there are multiple entries for same product id with <PurchaseMode>New Contract</PurchaseMode> value, then overwrite value in DB with the last product idu2019s value

    When you use PurchaseMode as key, then all entries with same PurchaseMode are updated at once.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 08, 2010 at 07:05 AM

    Hi Renu,

    >>If there are multiple entries for same product id with <PurchaseMode>New Contract</PurchaseMode> value, then overwrite value in DB with the last product idu2019s value

    I guess you cannot do this using a single Query in Database. Right? So you may need to have a Stored Procedure in receiver side.

    Check this link for your futher query on Key, Access etc.

    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

    Regards

    Suraj

    Add a comment
    10|10000 characters needed characters exceeded

    • When we are using JDBC as Receiver System

      using Action INSERT, UPDATE & INSERT_UPDATE

      We need to use KEY only for UPDATE, as we will update a record which is exists in Table.

      we will pass the value of that KEY, so that we can pick that first from table & update the same.

      In the case of INSERT_UPDATE, we will pass the value for UPDATE Action, for INSERT Action KEY value will be blank.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.