cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Data from MDKP Table into Oracle

Former Member
0 Kudos

Hi All,

I am trying get the data from SAP Database table "MDKP" and insert into the oracle database.

I am doing in this way....

Can you all check and let me know if there is any thing wrong in my logic

What I did is I took the plant number and put into the repeater

Add JCO as a second action and give the RFC_READ_TABLE

1.SAPJCOInterface_0.Request{/RFC_READ_TABLE/INPUT/QUERY_TABLE}="MDKP"

2.SAPJCOInterface_0.Request{/RFC_READ_TABLE/INPUT/DELIMITER}=","

3.SAPJCOInterface_0.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item/TEXT}="PLWRK EQ ' #Transaction.Plant# ' "

4.SAPJCOInterface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS}=Local.FILEDS

and then I added StringListtoXML

Links are 1.StringListToXml_0.Input=SAPJCOInterface_0.Response{/RFC_READ_TABLE/TABLES/DATA/item/WA}

2.StringListToXml_0.Delimiter=","

and the next Action is SQl Qury to insert the data

IllumSQLQuery_0.Param.1=StringListToXml_0.Output{/Rowsets/Rowset/Row[1]/Item}

IllumSQLQuery_0.Param.2=StringListToXml_0.Output{/Rowsets/Rowset/Row[2]/Item}

Thanks

R M

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

RM,

It depends on ther Xpath you configured with the Repeater.

For example, "PLWRK EQ '#Repeater_0.Output{/Item/Plant}#'"

If the RFC is returning multiple records and if you want to post all of them, you should use another Repeater action block with Xpath as 'Response{/RFC_READ_TABLE/TABLES/DATA/item}' and

then

StringListToXml_0.Input= '<<your WA repeater>>.Repeater.Output{/item/WA}'

StringListToXml_0.Delimiter=","

Then the SQL Query action block.

Mike, "PLWRK EQ ' #Transaction.Plant# ' " would work. Please correct me if there is any disadvantage.

John

Former Member
0 Kudos

Hi John,

Thanks for the reply.

I did not get in the link editor. StringListToXml_0.Input= '<<your WA repeater>>.Repeater.Output{/item/WA}'

I have only StringListToXml_0.Input= Repeater.Output{/item/WA} and I dont have the First repeater <<your WA repeater>>.

Could you please let me know what is that.

Thanks

Raghav

Former Member
0 Kudos

In the previous post, you said you have another repater at the upper level for the plant that will pass the parameter to RFC?

You are correct in your assignment with

StringListToXml_0.Input= Repeater.Output{/item/WA}

Thats what I intended by '<<your WA repeater>>'

Sorry for the confusion.

Former Member
0 Kudos

Hi John,

I got the data into the Oracle Database.

Thanks for your help.

Raghav

Former Member
0 Kudos

Hi Mike,

I got the Data.

Thanks for your idea.

Raghav

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Since you are working in the link editor, you should probably change:

"PLWRK EQ ' #Transaction.Plant# ' "

to this:

"PLWRK EQ " & singlequote & Transaction.Plant & singlequote

Other than that, I didn't see anything which wouldn't work. And I don't know that what you had wouldn't work. I didn't test it. It just looks awkward.

If you have problems, you may want to see what the inputs in the Request segment are being defaulted to by using a tracer. You may need to remove some of the Request segments if the defaults are affecting your results.

Good luck,

Mike

Former Member
0 Kudos

Hi Mike,

Thanks for the reply.

I am using not the transaction Parameter. I am using the repeater for the Plants as inputs.

Here is my Xpath Expression...."PLWRK EQ '#Repeater_0.Output{/Rowset}#'" Could you please correct and reply back.

Thanks

Raghav