cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with RFC -> FTP scenario

Former Member
0 Kudos

Hi Experts,

i have the following scenario. RFC -> XI -> FTP

The RFC is called within an ABAP program. The call has the destination XI.

When it arrives at the XI it shall read a file from the FTP server and send this informations in this files back to fill the RFC.

RFC -> XI -> Read FTP File -> XI Mapping -> Fill the RFC with the data in the FTP-file

does anyone know how to realize this scenario ?

Thanks in advance!!

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christian,

kindly follow these links for your requirement

for File to RFC

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

/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in

hope this may help you to understand the scenarios clearly

Thanks

sandeep

PS: if helpful kindly reward points

Former Member
0 Kudos

Hi Experts,

thanks for all the answers.

Another question:

i have this case:

http://img81.imageshack.us/img81/1448/unbenanntvw8.jpg

and this error:

http://img100.imageshack.us/img100/8048/unbenannt2wd1.jpg

does anyone know why it doesnt work?

Thanks in advance!

Former Member
0 Kudos

Hi Christian,

in msg mapping, map the MT_DATA_JDBCRECEIVER to a constant blank............then execute your mapping again.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

if i set the constant with blank to my root element, it throws the same error for the next element, if i set this blank it throws again the same error

like here:

http://img225.imageshack.us/img225/742/unbenannt3yz9.jpg

any other ideas?

thanks

Former Member
0 Kudos

Hi Christian,

what mapping you have done for Timestamp field?

Regards,

Rajeev Gupta

Former Member
0 Kudos

Its a 1:1 mapping, if it works ill change it later, but actually its only 1:1.

its the same for PU, MatNr and BankSlot, simple 1:1 mappings.

http://img98.imageshack.us/img98/3461/unbenannt4qr8.jpg

Regards

Christian

Former Member
0 Kudos

Hi Christian,

in msg mapping, just right-click on Data field and set its context level to RecordSet and then map it to Timestamp field.....do this thing for all the fields which are at Timestamp field level....then execute your msg mapping again.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

i did like you said, but mapping fails again. For all of the fields.

http://img81.imageshack.us/img81/8926/unbenannt5kq7.jpg

Thanks

Former Member
0 Kudos

Hi Christian,

i think it is because you have an occurance of 0..unbounded for DATA field and you have only 1..1 occurance for your target fields..........so while executing the mapping, XI finds a mismatch in the structures of your source msg and target msg......

so to get your mapping running, i suggest you to change the source msg structure data type and have for DATA field 1..1 occurance and then re-execute your mapping and then i think your mapping will run.

Regards,

Rajeev Gupta

Former Member
Former Member
0 Kudos

Hi Christian,

change the occurance of DataField also to 1..1 and then test your msg mapping.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

still the same error.

Regards Christian

Former Member
0 Kudos

Hi Christian,

it is strange...............

so now you have everything 1..1 in your source and target msg structures...............

ok just for testing, in msg mapping, map the MT_DATA_JDBCRECIEVER, cvs_test, table, access fields to a constant blank.

now map all the filelds at Timestamp field level to DATA field and change the context of DATA field to DataField again.

now retest your mapping.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

i dont like to say it, but still the same error:

11:26:33 Start of test

Cannot produce target element /ns0:MT_DATA_JDBCRECEIVER/cvs_test/table/access/Timestamp. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element /ns0:MT_DATA_JDBCRECEIVER/cvs_test/table/access/Timestamp. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

11:26:33 End of test

Regards,

Christian

Former Member
0 Kudos

Hi Christian,

just one more try.........in msg mapping after DATA field use standard node function removeContext and then take its output to Timestamp field.......do this thing for all the fields.......have the occurance everywhere as 1..1 in source and target msg struc ....map all remaining fields at header level to constant blank...... re-execute your mapping.

Regards,

Rajeev Gupta

Edited by: RAJEEV GUPTA on Apr 8, 2008 12:37 PM

Former Member
0 Kudos

Hi Rajeev,

got everything you said, and it still says that it cant produce the element Timestamp

com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:MT_DATA_JDBCRECEIVER/cvs_test/table/access/Timestamp. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Regards Christian

Former Member
0 Kudos

Hi all,

the content conversion was the problem,

i forgot the namespace.

now it works.

Thanks Rajeev for all your help!

Regards Christian

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you guys,

i try to realize now an FTP -> DB scenario and catch the data from the DB (RFC -> DB)

is it possible to read this data from one file?

this is the structure of the file:

1206937336 31.03.08/06:22 177 Y010105840586 1281208 409620003 EJ6099J5 1L2_H9_1

1206937876 31.03.08/06:31 103 Y010104692643 1172654 408630004 EJ6099J5 1L2_H9_1

its seperated by tab or comma,

how can I get only several of these informations?

for example, i want only the 1206937336 ... how can i realize this?

i think i have to work with the content conversion of the sender file adapter

Thanks!

Edited by: Christian C. on Apr 3, 2008 3:06 PM

Former Member
0 Kudos

Hi,

> for example, i want only the 1206937336 ... how can i realize this?

it's explained here:

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

Regards

Patrick

Former Member
0 Kudos

Hi again,

its not comma or tab separated, because of this, i want to tell the content conversion to read one complete line.

how can i read one complete row with content conversion?

of this structure:

1206937336 31.03.08/06:22 177 Y010105840586 1281208 409620003 EJ6099J5 1L2_H9_1

1206937876 31.03.08/06:31 103 Y010104692643 1172654 408630004 EJ6099J5 1L2_H9_1

i have a data type which has only one single string to save one complete line.

how can i realize this?

thanks in advance

Former Member
0 Kudos

Hi Christian,

let you have structure of source msg type as MT_REC, RECORD

in File content conversion have:

Record sturcuter: MT_REC, RECORD

MT_REC.endSeparator 'nl'

RECORD.fieldSeparator 'nl'

RECORD.endSepartor 'nl'

then in your source file you will have all your source file lines as single RECORD data in your different RECORD nodes under MT_REC node which is your msg tpe for your data type.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi,

Is it space separated?

Or if the lengths are fixed, then you can try fixed lengths in your content conversion.

Regards,

Sidharth

Former Member
0 Kudos

Hi,

your solution did not work,

i managed it like this.

DataField.fieldSeparator 'nl'

DataField.fieldNames Data

DataField.processFieldNames fromConfiguration

Recordset Struc: DataField,*

MT:

MT_xx

DataField

Data

Thanks anyway!

Former Member
0 Kudos

Hi Peter, Hi Patrick,

thanks for your answers.

Is there a guide how to use this sync/async bridge or a complete guide using the integration process tool ?

This would be helpful.

Or any other work-arounds which can help me?

Thank you

Christian

Former Member
0 Kudos

Hi Christian,

I guess the main problem is the File Adapter, because you can't say I want to read a file right now. You can read a file only in a given poll interval for example every 10 minutes.

So it's not such a easy situation if you need data from a file in a scenario at a given time.

One good way to solve this would to provide the data in the file in an other way (for example with a web service).

Or you have to read the file apart from XI like Peter already mentioned.

If you could explain your scenario a little bit more in detail, then it's maybe easier to find a solution.

Regards

Patrick

Former Member
0 Kudos

Hi,

Christian, it will not work just like you expect.

a, file adapter does not support sync scenarios

b, you can't trigger file adapter; file adapter polls directories and transfers file in them in a time intervals

I think, the easiet way for you is really to transfer file using XI from ftp to local system (this will be done almost immediately - set the polling interval for example to 10secs) and when RFC executed, read the file using abap program.

It can't be done like you described - even using the BPM.

But as Patrick described - if you would develop a web service which could read the file, it changes the situation - SOAP supports sync processing, so you coud create an RFC->SOAP scenario then and it would work fine. - but of course - here you must do some development, while in the first case no additional dev is needed.

Peter

Former Member
0 Kudos

Hi,

maybe it works with an Integration Process.

Starting the process with receiving the RFC then read the file with File Adapter and the answer the RFC (with a Sync/Async Bridge).

Problem will be to trigger the File Adapter

You can only read files in XI with the Sender File Adapter, but you can trigger this adapter only with a poll interval and can't trigger per command.

Regards

Patrick

Edited by: Patrick Koehnen on Apr 2, 2008 5:48 PM

Former Member
0 Kudos

Hi Christian,

the file adapter does not support synchronou scenarios, so this is not possible

Sorry

What you can do is: create FTP->local filesystem scenario and read the file directly from ABAP.

Peter