cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding JDBC receiver adapter select query.

Former Member
0 Kudos

Dear Experts,

Scenario is Proxy to JDBC synchronous scenario, where I need to SELECT records based on some "KEY" field value search criteria & obtain response back in to PI.

Present Structure below for receiver JDBC adapter:


Statement

  TableName

    action

    table

    access (0 to unbounded)

      FLD1

      FLD2

    KEY  (0 to unbounded)

      FLD1

      compareOperation(attribute)

      FLD2

      compareOperation(attribute)

For instance If we have 3 records sent from source then output is getting generated as below

RESULT/OUTPUT:

Statement

  TableName

    action

    table

    access1

    access2

    access3

    KEY1

    KEY2

    KEY3

As per structure specified in help.sap "access" node & "KEY" nodes were maintained at same level

Link:http://help.sap.com/saphelp_srm40/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.html

But during generation of SELECT statement for multiple records as specified above under RESULT/OUTPUT , I hope there will not be differentiation of which "KEY" field node belongs to which "access" node. Hence If "KEY" field node is made as sub node to "access" node will this work ? result output will be in below format

Statement

  TableName

    action

    table

    access1

      KEY1

    access2

      KEY2

    access3

      KEY3

Can you please let me know whether above SELECT format works correctly for receiver JDBC SELECT query OR how should I change my structure.  Do I need to change the structure in such way like, for each record one "Statement" node need to be generated ELSE one Statement with multiple "access" nodes & "KEY" node as sub node to it will work.

Kindly provide your inputs.


Regards,

Vivek.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hello Vivek,

  • Is the select query the same for each 3 records or different?
    • If Same, then you need to have your mapping such that 3 STATEMENT level tags are created one for each Record.
    • If different, you would need 3 different types of statements created as per your SELECT query

If you had an example, that would be easier to explain and validate.

Regards

Bhavesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bhavesh,

Thanks for your reply. Its a same SELECT query for all records. Hence can I consider that 3 different Statement records need to be created separately or one Statement node with multiple "access" nodes (& Key field node as sub node to each access node) under it will work ?

Regards,

Vivek.

bhavesh_kantilal
Active Contributor
0 Kudos

Hello Vivek,

The way the JDBC adapter works is that each statement is equal to one query when the clause is select clause. Hence, you would need to create muktiple statement tags through your mapping and then each statement will have one set of access and key level tags.

regards

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

You may also refer to the same scenario where the mapping is done for select as per my blog :

Former Member
0 Kudos

Thanks for your reply, I will change my structure accordingly & post an update If I face any issues during testing phase.

Regards,

Vivek.