cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver: Only one row created

former_member296836
Participant
0 Kudos

Dear all,

we have 7.4 (Java only) PI system  where we try to split one source message to several database tables.

In general, the messags get processed and tables get filled.

We are using action UPDATE_INSERT.

This is the part of one table where I expected multiple entries in database table, but only

one is created.

Because of one KEY segment for each row, I expected an AND logic for the keys.

Any ideas why only one row is created?

In this example only the first entry (GLOB / LF / 000) is created.

.....

<InsertParterVendor>

    <PARTNER_VENDOR action="UPDATE_INSERT">

      <table>"DBNAME"."PARTNER_VENDOR"</table>

      <access>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>LF</FUNCTION_ID>

        <PARTNER_COUNTER>000</PARTNER_COUNTER>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </access>

      <key>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>LF</FUNCTION_ID>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </key>

    </PARTNER_VENDOR>

    <PARTNER_VENDOR action="UPDATE_INSERT">

      <table>"DBNAME"."PARTNER_VENDOR"</table>

      <access>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>RS</FUNCTION_ID>

        <PARTNER_COUNTER>000</PARTNER_COUNTER>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </access>

      <key>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>RS</FUNCTION_ID>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </key>

    </PARTNER_VENDOR>

    <PARTNER_VENDOR action="UPDATE_INSERT">

      <table>"DBNAME"."PARTNER_VENDOR"</table>

      <access>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>WL</FUNCTION_ID>

        <PARTNER_COUNTER>000</PARTNER_COUNTER>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </access>

      <key>

        <VENDOR_CODE>0007060000</VENDOR_CODE>

        <PURCHASING_ORG>GLOB</PURCHASING_ORG>

        <FUNCTION_ID>WL</FUNCTION_ID>

        <REFERENCE_VENDOR>0007060000</REFERENCE_VENDOR>

      </key>

    </PARTNER_VENDOR>

  </InsertParterVendor>

.....

Thanks

Chris

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Christian,

You need create multiple statements as per this below help document.

Defining an UPDATE_INSERT Statement - Advanced Adapter Engine - SAP Library

You must create only one <access> element in one statement.


Enter the new column values in the <access> element.

Enter exactly one <access>element.


First statement

<StatementName>

<dbTableName action="UPDATE_INSERT">

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2new</col2>

</access>

<key1>

<col2>val2old</col2>

<col4>val4</col4>

</key1>

</dbTableName>

</StatementName>

Second Statement

<StatementName>

<dbTableName action="UPDATE_INSERT">

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2new</col2>

</access>

<key1>

<col2>val2old</col2>

<col4>val4</col4>

</key1>

</dbTableName>

</StatementName>

You need to create the structure like below.

Regards,

Praveen.

former_member296836
Participant
0 Kudos

Dear Praveen,

thanks for your feedback.

After adjusting the structure, it is working.

In the documentation you added (and that I used to create the structure) it was

not that obvious to me which occurrence we have to use.

But thanks a lot for your support. 🙂

bye

Chris

Answers (0)