cancel
Showing results for 
Search instead for 
Did you mean: 

Need Mapping Help

Former Member
0 Kudos

Hi Experts,

I am doing Proxy to JDBC scenario. in Mapping i have 3 filed ids at sender and one id filed at receiver. below give the structures for both sender and receiver.

Sender:

Main              1:1

Records         0:unbound

   Data ID       1:1

   G_ID           0:1

    P_ID           0:1

    F_ID           0:1

    ADD            0:1

Receiver:

Main

   statement Name

       DBname

          action

          table

          access

            data_id           1:1

             result_id         0:1

             add                 0:1

          key

             data_id           1:1

one to one mapping for data_id and  add .G_ID,P_ID and F_ID mapp to result_id. if i am sending G_ID  from sender, target side it will  create one record with G_ID. if i am sending G_ID and P_ID target side it will create 2 records and sending G_ID, P_ID and F_ID target side it will create 3 records. if 3 records should be blank create one record with rest of the filed values.

Please help me on this. your support and help highly appreciated.

Best Regards

Sanjay.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sanjay,

The simplest way would be to duplicate subtree on target side to create 4 statement nodes.

Then put four conditions to create each of these nodes using createif function:

1. Create Node if G_ID exists and map result_id to G_ID.

2. create second node if P_ID exists and map result_id to P_ID

3. create third node if F_ID exists and map result_id to F_ID

4. create fourth node if none of them exists

Regards,

Beena

Former Member
0 Kudos

Hi Beena,

Thanks for prompt reply. i did same you mentioned above if i am passing value it create record and not passing record also create record with the nodes.

Please help me, how we can achive. Appricate you support.

Best Regards,

Ganesh.

Former Member
0 Kudos

Hi Ganesh,

Please see this link for example of createif function.

http://help.sap.com/saphelp_nwpi711/helpdata/en/e6/e6ae42e0fac911e10000000a1550b0/content.htm

Please check the min occurrence of statement node is 0 and not 1..

You can use this condition:

If G_ID is not equal to blank --> createif --> statement

Also check this blog for example:

http://scn.sap.com/people/yukai.shi/blog/2006/06/02/b2b-mapping-techniques-using-the-graphical-mappi...

Regards,

Beena

gagandeep_batra
Active Contributor
0 Kudos

Hi Sanjay,

did you test with blank value or without tag?

if you test with blank value then it will create all three... Test with without tag means remove the tag in source structure.

Regards

Gagan

Former Member
0 Kudos

Hi,

Based on above logic i can create three record and blank records also if more than 3 records not getting created at target side only one record is created. please help on this.

best regards,

Sanjay

Former Member
0 Kudos

Hi,

Please change context of G_id/P_ID/F_ID to main while mapping it to statement node using creteif function.

Or try putting removecontext after createif.

Regards,

Beena

Answers (0)