on 10-28-2008 9:26 AM
Hi,
Scenario: proxy table - sql table update_insert
I am passing an internal table (example below 2 records). if the sql table is empty, the data is inserted (both records). If one record already exists, the first record i.e. vendor 8 is updated, however the second vendor is not inserted? Can someone help me?
The access and key fields are 1...unbounded - these fields I have mapped to the internal table records.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_Vendor xmlns:ns0="urn:www.bcx.co.za:SS:outbound:Vendors">
- <SAPVendor>
- <SAPVendor action="UPDATE_INSERT">
- <access>
<VENDOR>8</VENDOR>
<NAME>u</NAME>
<CITY />
<DISTRICT />
<POSTCODE />
<STREET />
<CONTACT />
<TELEPHONE />
<FAX />
<EMAIL />
<STATUS />
<COREG />
<COTAX />
<WEBADDR />
<POBOX />
<POCODE />
<CURRENCY />
<SAPIND>Y</SAPIND>
<SAPDATETIME>2008-10-28 11:02:04</SAPDATETIME>
</access>
- <access>
<VENDOR>9</VENDOR>
<NAME>y</NAME>
<CITY />
<DISTRICT />
<POSTCODE />
<STREET />
<CONTACT />
<TELEPHONE />
<FAX />
<EMAIL />
<STATUS />
<COREG />
<COTAX />
<WEBADDR />
<POBOX />
<POCODE />
<CURRENCY />
<SAPIND>Y</SAPIND>
<SAPDATETIME>2008-10-28 11:02:04</SAPDATETIME>
</access>
- <key>
<VENDOR>8</VENDOR>
</key>
- <key>
<VENDOR>9</VENDOR>
</key>
</SAPVendor>
</SAPVendor>
</ns0:MT_Vendor>
Thanks,,
Leanne
Leanne,
Duplicate the whole <Statement> level tag (SAP Vendor in your case) and have a single access/key with in each <SAPVendor> tag.
Your target XML should look some thing like this
<SAPVendor>
<access>
<f1></f1>
</access>
<key>
<f2></f2>
</key>
</SAPVendor>
<SAPVendor>
<access>
<f1></f1>
</access>
<key>
<f2></f2>
</key>
</SAPVendor>
Regards,
Jaishankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.