cancel
Showing results for 
Search instead for 
Did you mean: 

Include a message-id in database

Former Member
0 Kudos

Hi,

I have created a JDBC to FILE scenario in sap-xi.

i just want to put message id in database field corresponding to each records which is picked up by the jdbc adapter and send it to receiver adpater.

Plz help me out.

Thanks & regards,

Vanita Jain

Accepted Solutions (1)

Accepted Solutions (1)

former_member204873
Contributor
0 Kudos

hi,

If u want to add one more field(which will have message id) to the payload that is sent to receiver adapter, then you can use StreamTransformationConstants and create a UDF to fetch Message ID and later on map it to Message ID field of target structure.

http://help.sap.com/javadocs/NW04/current/pi/constant-values.html#com.sap.aii.mapping.api.StreamTran...

Use UDF given in this blog:

/people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm

Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

by mistake i have clicked as answered

abhay_rajhans2
Contributor
0 Kudos

Hi Vanita,

You seems to be having two requirements

1) To update database with message id for the records which has been selected by JDBC Adapter.

For this as mentioned in above post use the UDF function. Get particular Message id in Message Mapping. To update database you have to option.

a) Call RFC UDF in message mapping which will update database with message ID.

b) Create another receiver system in receiver determination.This will be JDBC receiver which will update the Database with the message ID.

2) Passing Message ID in target structure:

This will be easy once you get Message id in above step. Pass it to the corresponding target field in target structure.

Former Member
0 Kudos

Thanks for your reply.

can u plz provide a example to do that as i m new to it.

and can't i put message id in database using update query option in jdbc adpater.

plz provide me a example or supported link to do it.

Thanks and regards,

Vanita Jain

Edited by: vanitajain on Mar 14, 2010 3:21 AM

abhay_rajhans2
Contributor
0 Kudos

Hi Vinita,

It will be simple JDBC to JDBC scenario. below blog will help you out to create scenario of update.

In database table you need use one field to update with Message ID.

http://wiki.sdn.sap.com/wiki/display/XI/JDBCTOJDBC

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a04cd6f9-9eb0-2a10-07b8-a0fc6e88f4d4

Former Member
0 Kudos

I think My requirement is not cleared to all of you...,

I want to create a scenario where records with status n is picked up by jdbc adpater and flat file is generated on other sys (JDBC TO FILE) but file should be generated with the message-id and once the file is generated i have to update a filename column of database with that message-id.

as per above answer i can create two receiving system(Other sys and database-sys) of sender jdbc adpater, but how would i synchronize the both because my requirement is to update filename field of database only if file is generated on other sys.

Plz help me in respect to this

Thanks & regards,

Vanita Jain

abhay_rajhans2
Contributor
0 Kudos

Hi Vanita,

Hope so your requirement has been satisfied.

If not then following scenario will help.

Read data from JDBC then create 2 files on target ftp system it means two File adapter. One as per standard requirement(Message ID) and another one with the data picked up by JDBC along with Message id. Keep name of second file other than first file. Read the second file using another file adapter. Pass that data to JDBC receiver adapter and update file name column with the message id. This will ensure the synchronization.