cancel
Showing results for 
Search instead for 
Did you mean: 

RFC to JDBC Scenario: Multiple Records insertion

Former Member
0 Kudos

Hi All,

I am working with RFC->XI->JDBC to update a single table on an Oracle db.

When I import RFC I get multiple Records.

Here is the sender XML Structure:

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

- <rfc:Z_I2_SAP2MDM_VM xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

+ <I_LFA1>

</I_LFA1>

<T_XLFAT />

- <T_XWYT3>

- <item>

<MANDT>800</MANDT>

<LIFNR>0000009962</LIFNR>

<EKORG>1000</EKORG>

<LTSNR />

<WERKS />

<PARVW>LF</PARVW>

<PARZA>000</PARZA>

<ERNAM>ARUCHI</ERNAM>

<ERDAT>2006-05-26</ERDAT>

<LIFN2>0000009962</LIFN2>

<DEFPA />

<PERNR>00000000</PERNR>

<PARNR>0000000000</PARNR>

<KZ>I</KZ>

</item>

- <item>

<MANDT>800</MANDT>

<LIFNR>0000009962</LIFNR>

<EKORG>1000</EKORG>

<LTSNR />

<WERKS />

<PARVW>RS</PARVW>

<PARZA>001</PARZA>

<ERNAM>ARUCHI</ERNAM>

<ERDAT>2006-05-26</ERDAT>

<LIFN2>0000009962</LIFN2>

<DEFPA />

<PERNR>00000000</PERNR>

<PARNR>0000000000</PARNR>

<KZ>I</KZ>

</item>

</T_XWYT3>

</rfc:Z_I2_SAP2MDM_VM>

It takes only the first <item> record. How do i take the second record and insert in the oracel DB.

Seems to me this should be a pretty simple process.

Regards,

Ruchi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Moorthy,

I changed the Statement occurrence to 1 to UB, still its not working.

Is it bcoz,out of so many tables on the sender side , only one of the structure has got multiple records.

Regards,

Ruchi

moorthy
Active Contributor
0 Kudos

HI Ruchi,

After changing the occurence, are you able to see the multiple mapped data in the Mapping..

Go to IR and test the mapping with input xml from sxmb_moni and check are you geting required result(multiple records ).

Thanks,

Moorthy

Former Member
0 Kudos

Hi,

I tested by giving input xml from sxmb_moni , it doesnt show multiple records on the target side, it takes only the first record.

Though on the source side it shows both the records as

<WYT3>

-<item>

-<item>

<-/WYT3>

Regards,

Ruchi

moorthy
Active Contributor
0 Kudos

Now there is a problem with mapping , Try to get the multiple line items in the Target Side- try to do the mapping once again.. Is your target sturcture is reflected after changing the occurence of the data type.. Refresh Message type so that it will reflect in teh Message Mapping...

Check the context etc.

Thanks,

Moorthy

Former Member
0 Kudos

Hi,

Thanks for all your help.

I refreshed the Message Type, its showing 0 to UB for Statement occurrence, i am really not getting whts wrong with my mapping.

I mapped the source struct to target like we do the normal mapping.It doesnt show the multiple records when i test in the mapping.

Regards,

Ruchi

moorthy
Active Contributor
0 Kudos

Check the context of the Item while mapping into Target structure.

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

But this blog is for one record.. Check the mapping .

Even you can check with the thread I have given in my first reply .. Also check with making Access as multiline..

Thanks,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Ruchi,

Might sound stupid, but did you activate your Dataype after you made the change?

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

I tried changing the Access as multiline..still not working..

I am not being able to change the context of the item on the sender side, its the structure name <WYT3> right now...

Regards,

Ruchi

moorthy
Active Contributor
0 Kudos

Hi ,

You need to handle this with the occurence of the Target Structure of the JDBC Adapter..

Check this help-

http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Hope this helps,

Regards,

Moorthy