cancel
Showing results for 
Search instead for 
Did you mean: 

JDBc /XML

Former Member
0 Kudos

Hi

I want to insert records into Database table from a ABAP proxy.

one of the fields to be inserted needs to be an xml document : cocatenated from various fields of ABAP proxy.how to make one of the fields in database column which is coming from 4 other fields in abap proxy as an xml document insert into one of the columns on the table?

Please suggest.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can create simple UDF to concatenate from 4 input to build xml document and return as string to 1 of the database column.

Regards

Fernand.

Former Member
0 Kudos

try with udf

Edited by: pi_question on Sep 30, 2010 3:58 AM

Former Member
0 Kudos

Hello,

could someone tell the java udf for below :

source

<details> 1 to unbounded

< name > lee </name>

<age> 10 < / age>

<street> XYZ </street>

<zipcode> 889 </zipcode>

</details>

target

Statement 1 to unbounded mapped to details tag

name is mapped to name field on table

age is mapped to age field on table

i want a udf for address field on table : address field should have value : < street> XYZ </street> <zipcode> 889 < /zipcode>

in above example only 2 field xml document including the xml tags has been created for address field , but in reality i will be needing xml document created for around 20 fields.

how to achieve this with a udf?

Please suggest.

Thnx

Former Member
0 Kudos

Hi,

If u r using PI7.1 then u can achieve this using graphical mapping only:

Street(Right click and choose "Return as XML)

-


Concat -


ReplaceString(Mapping shown below)----


Address

ZipCode(Right click and choose "Return as XML)

ReplaceString mapping:

Output of Conact----


Constant(<?xml version="1.0" encoding="UTF-8"?>)----


Replace String

Constant(keep it as blank)----


Thanks

Amit

former_member208856
Active Contributor
0 Kudos

You can use UDF for this purpose.

You can also achive this in ABAP coding, when you are updating the record in ABAP table using Proxy.

Make changes in ABAP code for Inbound Proxy.

If you have large data for this interface, I will suggest you to handle the same in ABAP proxy code.