Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Convert input structure into String and Store it in DB2

Former Member
0 Likes
572

Hello All

My requirement is I want to convert total input structure into string then stored into database single field as clob. Can anyone suggest me how will i retive input structor, is there any user defined function will i write or is there any inbuilt functionality in SAP PI. Plese suggest me

Thanks&Regards,

VenkatK

4 REPLIES 4
Read only

Former Member
0 Likes
518

data:string(100).

than concatenate str-field1 str-fiels2......into string.

than use insert command where ever you want to insert.

Amit.

Read only

0 Likes
518

Hi Amit,

Can you explain little bit more step by step. I have to send Total input structure of xml message(not onely values). Please guide me step by step.

Thanks&Regards

VenkatK

Read only

0 Likes
518

say if you have any structure with field 10.than you may concatenate their each field like a suggest above and collect in one string field and finally pass this to DB2.

Read only

Former Member
0 Likes
518

Hi,

You can do by making an internal table using that structure then fill that internal table with the values and then concatenate all the values into a single string then update the ztable from this internal table..

here is a piece of code which may be helpful to u..

LOOP AT it_empdetail.

CONCATENATE it_empdetail-r_type

it_empdetail-ssn

it_empdetail-dob

it_empdetail-fname

it_empdetail-lname

it_empdetail-r_code

it_empdetail-stras

it_empdetail-locat

it_empdetail-ort01

it_empdetail-state

it_empdetail-pstlz

it_empdetail-land1

it_empdetail-dat

INTO wa_enrollee SEPARATED BY ' '.

append wa_enrollee INTO it_enrollee .

ENDIF.

ENDLOOP.

here it_enrollee is the final internal table having all the values in a string form and the wa_enrollee is the work area of type string,,,

Now from this internal table u update ur ztable

I hope this help u..

Thanks & Regards

Ashu Singh.