cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting value from RFC

Former Member
0 Kudos

I have a scneario of picking data from database , calling the rfc and writting the output to a file

all my adapaters are showing green and there is no error when i check the messages in sxmb_moni .

but the output file is not getting any value from rfc

to check if my mapping is correct

i created a new field in output text file and mapped it to a constant.

in the text file the constant is displayed but ,

i am not getting any thing from rfc

when i check the rfc program through sap

it shows the output

any idea what can be going wrong

or wht i can check to see if my rfc is being called properly

thanks

amit

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

Just make sure that the information taht you are passuing to the RFC is inthe format that it is expecting it to be and same way, make sure that the RFC response is in the format that you want it to be.

Do not create Message Types for the RFC. Make sure that you have the RFC itself as the Message Type for the Request and Response Interface.

Regards,

Bhavesh

Answers (7)

Answers (7)

Former Member
0 Kudos

hi,

I had a look at the screen shots you sent.

let me try to explain what i meant.

1. before the output file is created, the xml has to be generated.

In sxmb_moni,in the payload, check if the inbound message has the values you are looking for.

2. If the values are present, then, copy the payload.

use this payload as the source message type and keep the target message type untouched.

try doing the mapping.

test the mapping, and check if there are errors.

If there are errors, then there must be some error in the mapping.

If there are no errors, it means, the problem is not concerning the mapping.

one discepency i saw in the screen shots you sent was:

while mapping the source and the target, the headers are to be mapped too.

for example,

SOURCE TARGET

<employee>----


<employee>

<manager>----


<manager>

<name>----


<name>

<age>----


<age>

...

in your message mappings, you have not mapped the headers. i.e, you have missed mapping the headers like <employee> (of SOURCE) to <employee>(of TARGET).

Not only the elements but also the headers need to be mapped.

This might be one of the reasons why the output file has no values.

Former Member
0 Kudos

Hi Amit,

Try to give the values for all RFC input fields and test RFC-File mapping in IR. Still if you don't get the values try to capture RFC Exception msg and see if there is some error in retrieving values.

Thanks

sudhakar.

Former Member
0 Kudos

do i need to have any content conversion in the file reciever channel.to convert a xml structure to a flat file do we need to perform content conversion

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

XI understands only XML content and so, no matter what info you pass to XI, it has to be in the XML format.

If you need your destination file in any format other than XML format, then content conversion will have to be performed by your File adapter.

For info on how content conversion is done in file adapter, I would suggest that you go through these blogs and links,

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Hope this helps,

Regards,

Bhavesh

Message was edited by: Bhavesh Kantilal

Former Member
0 Kudos

Hi Amit,

Like how Bhavesh told XI understands only XML formats. Hence content conversion required at the receiver end to convert this XML structure into a flat file as you want.

For that please go through these links below.It clearly explains your requirement.

<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion receiver with content conversion</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>

Regards,

abhy

Former Member
0 Kudos

flile conversion is required when i want to display file in a text format

right now even in the xml file that i get

i dont see the values from the rfc .

and for d/b to rfc mapping

i dont think we need to map all the fields

just mapping the headder field should be enough

bcoz when i mapped all the fields

my file creation stoped all together

plz understand my problem

file is getting created

but without any values

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

When you execute your rfc from se 37, you give some data to see if it is giving the correct response., ie., the data that you pass to your RFC has to be something that the RFC understands an can provide an output for.

Your data from your DB , should be mapped to the RFC into the corresponding input paramtere fields of the RFC and also, make sure that the data that you pass to the RFC has some response from it.

I think you are going wrong in mapping of the data from your database to the data that is expected by your RFC.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

Have you tried running your function in isolation of XI to see the values are returned as expected ?

If not, I would suggest this as it may be your function module is not defined correctly.

Cheers

Colin.

Former Member
0 Kudos

I run the RFC function in isolatio. it retuns the value .

I have one doubt.

In my IR my mapping is like this and when i test it in IR it works

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

<ns0:MT_DatabaseRequest xmlns:ns0="http://PilotTest/FGDR">

<Statement>

<F5631505>

<QSINTF>a</QSINTF>

<QSFGDR>a</QSFGDR>

<QSPROH/>

<QSVEHD/>

<QSDS40/>

<QSAINW/>

<QSLOTA/>

<QSLOTS/>

<QSEXDT/>

<QSNCKS/>

<QSPACKREAD/>

<QSUPQT/>

<QSIBCA/>

<QSGDATE/>

</F5631505>

</Statement>

</ns0:MT_DatabaseRequest>

but in sxmb_moni this is the mapping.which when i paste in IR it fails

can any provide pointers 4m this

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

- <ns:MT_DatabaseRequest xmlns:ns="http://PilotTest/FGDR">

- <row>

<QSINTF>Y</QSINTF>

<QSFGDR>U243146</QSFGDR>

<QSPROH>100338</QSPROH>

<QSDS40>ALAXAN NEW TAB 500</QSDS40>

<QSVEHD>ULI42334</QSVEHD>

<QSAINW>24043350</QSAINW>

<QSLOTA>24043350</QSLOTA>

<QSEXDT>20080831</QSEXDT>

<QSLOTS>X</QSLOTS>

<QSNCKS>10</QSNCKS>

<QSPACKREAD>15</QSPACKREAD>

<QSUPQT>150</QSUPQT>

<QSIBCA>UL</QSIBCA>

<QSGDATE>20060310</QSGDATE>

</row>

</ns:MT_DatabaseRequest>

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Amit,

the structure of your source mapping and the one that is produced in SXMB_mOni during your actual exectuion is different and that is the reason.

The JDBC sender adapter will send the data in the format shown in your SXMB_MONI. Please change the DataType of your request message to the corresponding fromat that comes in SXMB_MONI.

Regards,

Bhavesh

Former Member
0 Kudos

I have changed the mapping , but still no luck .

File is getting cretaed but no o/p from RFC

Former Member
0 Kudos

Finally problem got solved . wld

write on the forum wht my problem was and also award points for all your helpfull answers .

Thanks a lot to each one of you for all your help

Amit

Former Member
0 Kudos

There were couple of reason why i was not getting value from rfc

first was my datat type structure . it was different from wht rfc was expecting . it should be like

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

<ns0:MT_DatabaseRequest xmlns:ns0="http://PilotTest/FGDR">

<row>

<QSINTF>a</QSINTF>

<QSFGDR>b</QSFGDR>

<QSPROH/>

<QSVEHD/>

<QSDS40/>

<QSAINW/>

<QSLOTA/>

<QSLOTS/>

<QSEXDT/>

<QSNCKS/>

<QSPACKREAD/>

<QSUPQT/>

<QSIBCA/>

<QSGDATE/>

</row>

</ns0:MT_DatabaseRequest>

then the row should be mapped with multiple headers of rfc .

3 reason was the rfc was not giving message bcoz test data was in correct. i know it sounds stupid now but sometimes we need to look at the test data also . i was not getting o/p from rfc as my test data was incorrect .

thks again to every one 4 contributing .

i now have a doubt on the update query .

i have already posted that question on the forum . hoping to get a reply for it from you folks pretty soon

Former Member
0 Kudos

hi,

Is SXMB_MONI, check your inbound message. Is it genenrated properly there? If not, there is some error in the mapping.

If the inbound message is generated properly(in SXMB_MONI), then copy the inbound message generated into the IR (as source) and check if the mapping is working fine.

Regards,

Smitha

Former Member
0 Kudos

Hi amit,

if ur mapping is successful,then goto SXMB_MONI and check if the payload which u hav recieved as output.thus u can verify whether the mapping has been sucessfully performed.

if the mapping is sucessful then ther has to be some problem with ur communication channel.so plss check the content conversion parameters.

check if u have given the same recordset structure name as given in the source rfc and if u hav specifed the <b>endseperator and fieldseparator</b> parameters properly.

i think if the mapping is suceesful,then there has to be some problem with ur content conversion parameter in communicaton channel.

Former Member
0 Kudos

I have captured the screen shot of my entire scneario. if any one would like to look at it

plz send me a mail at amit_20_jun@yahoo.com

Former Member
0 Kudos

hi,

Have you tested the mapping in the integration repository? Was it successful?

Regards,

Smitha

Former Member
0 Kudos

yes ,

the mapping is sucessful in IR . the file is also getting created but the outupt from the rfc is not shown .

STALANKI
Active Contributor
0 Kudos

So there is some problem in your mapping from rfc to file.

Is your RFC synchronous or asynchronous?

What is the source of the RFC payload in the inbound message of the content..Is the payload shown..

Did you try testing the mapping through IR?

Former Member
0 Kudos

Hi Amit,

To add to what Bhavesh has said, check whether u are giving the import parameters to RFC exactly. For example the RFC may expect a input with zeroes appended('0000001234') and u may give it as just '1234' and it may not return the correct value.So check the Data characteristics of RFC import parameters and give it exactly as it requires.

Regards,

Sudharshan