cancel
Showing results for 
Search instead for 
Did you mean: 

File to RFC without BPM

Former Member
0 Kudos

hey guys

plese let me know how to do file-to-RFC scenario,i dont wanna use BPM(asynchronous) right now,please give me step by step solution as i m new to XI .

i would really appreciate any help

thanx

amir

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

It is just like File to File Scenario.

1) Import the RFC created in the R/3 into the Integration Repository

2) Create Data Type, Message Type, Message Interface required for the File structure

3) Create Message Mapping/Interface mapping between File structure and RFC structure.

4) Configure all integrtaion directory objects like Configuration Scenario, Communication Channel ( File- Sender, RFC - Reciever), Sender/Receiver Agreement, Interface Determinations.

Assuming there is a RFC(SM59- TCP/IP connection) destination created in the XI to connect to R/3 . Also RFC is in place in the R/3 system.

Note this doc may help u in RFC programming-http://help.sap.com/saphelp_nw04/helpdata/en/22/0424ba488911d189490000e829fbbd/content.htm

Hope this helps,

Regards,

moorthy

null

Former Member
0 Kudos

thanx Krishna

i did all the four steps u asked me to do,now the file which i m sending from the sender side,does it has to be a xml file or it can be any .txt file?and how should i check if my scenario worked fine?

appreciate ur help

thanx

amir

Former Member
0 Kudos

Hi,

For monitoring log in to abap stack for Xi and type transaction

SXMB_MONI or SXI_MONITOR.

Thanks,

Tuhin

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

XI can also understand .txt files but you would need to perfrom content conversion in the file adapter to convert the txt to XML.

As you are just starting upon XI, you can use a .XML file. Create an XML file corresponding to the source strucutre ( or) copy the Source XML from the test bad of your mapping.

To check if your scenario worked fine,

1. See if file is picked up.

2. use Transaction SXMB_MONI and see if there is a success message in the inbound side and outobund side in MONI.

3. Log on to the R3 system where the RC is triggered and see if there is any dump in ST22 .

Regards,

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

does it has to be a xml file or it can be any .txt file?

>>>>

Depends.... you can use a XML file and thus avoid doing File Content conversion (FCC). Else in case it is a text file then you would have to do FCC to create the XML file.

FCC:

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

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

Former Member
0 Kudos

hey

the file is being picked up properly but in SXMB_moni, there is an error which says "no receiver found"

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

- <!-- Receiver Grouping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>No receiver could be determined</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

what might cause the problem

thanx

amir

Former Member
0 Kudos

Hi,

Please check you directroy objects.

Please check receiver determination and receiver agreement.

Thanks,

Tuhin

bhavesh_kantilal
Active Contributor
0 Kudos

Aamir,

Looks like you have not congiured the recieevr determiantion proeprly / or forgot to activate the same .

Check your receievr determination.

Regards,

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

in your ID check the receiver determination you have created. The error that you have got is because a suitable receiver could not be identified.

Make sure you have created a Recv. determination and its corresponding Interf. determination. Also make sure all the ID activities have been completed which includes adapters, sender agreement, recv. agreement etc

Former Member
0 Kudos

Hey in my Receiver determination under the "Configuration overview for Receiver determination" the mapping column says 'not specified' in red.even though i did the mappin in IR and it seems to be working fine there,also since i m doin File to RFC i dont have Receiver interface in the interface determination,hope i m not wrong there.

thanx

amir

Shabarish_Nair
Active Contributor
0 Kudos

<i> the mapping column says 'not specified' in red.</i>

>>>

you need to specify the interface mapping in IR here.

<i>also since i m doin File to RFC i dont have Receiver interface in the interface determination,hope i m not wrong there.</i>

>>>>

your RFC itself will be your inbound interface here

Former Member
0 Kudos

Hi,

You need to create Receiver Determination.

Sender system your file system,sender interface ,sender namespace.

Mention SAP system in configured receivers.

And then create interface detremination between your file interface and RFC(will be receiver Interface).

Add Interface Mapping which you have created in repository in Interface Mpaiing section of Interface determination.

Thanks,

Tuhin

Former Member
0 Kudos

Hey guys

that receiver determination error is resolved,i waz messin up the outbound and inbound interfaces.

now the file is being picked up but i m getting a red flag in SXMB_moni.

and the error is

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

-


Invalid at the top level of the document. Error processing resource 'file:///C:/WINDOWS/Temp/22d4008HTML000003.xml'. Line ...

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

i dont know why buy i get the very same error in message mapping irrespective of any scenario is do.is it something wrong with my server(as this server is for educational purpose only) or my mapping is getting wrong all the time?

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Looks like the input file is not a valid XML.

Please download the XML and open it in a browser and see if it opens. If it does, then mapping is an issue.

Else, the source file is not a valid XML.

Regards,

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

open your XML file in a xml editor like XML spy or open it in Internet explorer to check if it is a valid xml file.

Former Member
0 Kudos

thanx Bhavesh

i might sound a bit stupid but i m not sure how and from where i can download the XML and how to check it over the browser.

do u mind tellin me that

thanx

amir

Former Member
0 Kudos

moreover this is the error message in m getting in payload

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

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_file_RFC_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_file_RFC_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

hope this might give u a better idea of the problem

thanx

amir

Shabarish_Nair
Active Contributor
0 Kudos

check if the XML file you are using as source message is valid. open that XML file in IE and see if it opens. If it doesnt then it means that it is not valid.

if the xml is valid, then check your message mapping by using that XML message.

bhavesh_kantilal
Active Contributor
0 Kudos

Aamir,

Open you source XML or source file in a browser like Intrernet Explorer. If it opens it is a valid XML else it is invalid.

Take a look at this blog to see how to download source file from the message in MONI and test your mapping,

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Regards,

Bhavesh

Former Member
0 Kudos

hey guys

yes my xml is opening fine in IE,even though the webpage is showing the whole xml code but its opening without any error.

how should i check my message mappings for error as when i check in the test tab in the message mapping,it is working fine

thanx

amir

Former Member
0 Kudos

HI,

Instead of giving your own file for testing the scenario, it is always better to get the payload from message mapping test tab from repository.

Regards,

Sudheer.

Former Member
0 Kudos

Hey

yes there is some error in mapping,i copied my source xml instance form payload and got the following error.

Messages:

03:00:49 Start of test

Cannot produce target element /ns0:BAPI_COMPANY_GETDETAIL. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

03:00:49 End of test

i really appreciate help of u guys.do u guys know where is the problem?

appreciate ur immense help

thanx

aamir

Shabarish_Nair
Active Contributor
0 Kudos

check you mapping. You should map all mandatory elements of your target (ie all nodes and elements with occurance as 1 or more). Do recheck all the mapping that you have given.

Former Member
0 Kudos

Hey

my sender data type is something like dis:

MT_RFC_sender

Recordset

Row

Company

Street

Address

and my receiver data type is

BAPI_COMPANY_GETDETAILS

COMPANYID

the way i have mapped them is as follows

MT_RFC_sender <----


>BAPI_COMPANY_GETDETAILS

Recordset

Row

Company<----


>COMPANYID

Street

Address

do i need to do any other mapping too?

thanx for ur help

amir

Shabarish_Nair
Active Contributor
0 Kudos

do one thing ...

test the mapping by giving values in the test tab. if it is a success,

take the source of that and save as a xml file. Then use that to test your scenario.

I assume that your current xml file being used and the MT defined in XI does not match.

Paste your current XML file and the XML source generated by giving values in test here. if we compare the both it can lead to some conclusion.

Former Member
0 Kudos

Hi,

OK ,Go to message mapping ,click on test tab ,populate values and execute so you are getting test successful.Now for same data in test tab there is src button click on it .This will give you xml payload .Use this xml for testing.

Thanks,

Tuhin

Former Member
0 Kudos

Hey Shabarish

you were 101% right my current XML file and the one generated by the test tab were not matching, and now once i have the same one at both places,its workin perfect

really really appreciate ur help.

thanx again

amir

Answers (1)

Answers (1)

former_member192798
Active Contributor
0 Kudos

Hi Aamir,

As said by Moorthy follow the steps which he had stated.

But if you want the response from RFC to be handled, then you can use BPM. You can refer to this blog which gives step by step procedure for File to RFC scenario.

/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit

As you are new to XI, first try what Moorthy has suggested. Later try the above.

I hope this helps.

Regards.

Praveen