Skip to Content
avatar image
Former Member

Idoc 2 File with RFC

Hello,

I'm trying to send an idoc to xi with R/3 in order to create a file. But before creating the file, I want to use a RFC to get some data to put into the file.

But I don't exactly know how RFC works in Xi...

I imported an idoc (let's call it idocMAT) where I'll take an id number.This id number will be the key to take data with the RFC called RFC_READ_TABLE.

So I imported RFC_READ_TABLE too.

I created a datatype DTtarget_file, the message type MTtarget_file and the message interface MItarget_File.

I also did a DTSource_File,MTSource_File and MISource_File to take the value from the idoc (because later,I can't use the idoc).

<u>Data Types:</u>

DTSource_File

DTtarget_file

<u>Message Types:</u>

MTSource_File

MTtarget_file

<u>Message Interfaces:</u>

MISource_File_OUT

MItarget_file_IN

MISource_File_ABS

MItarget_file_ABS

MI_RFC_Synchro

<u>message mappings:</u>

MM_idoc_2_MTSource_File

MM_MTSource_File_2_RFC_READ_TABLE

MM_RFC_READ_TABLE.Response_2_MTtarget_file.

<u>interface mappings:</u>

MI_idoc_2_MTSource_File

MI_MTSource_File_2_RFC

MI_RFC_2_MTtarget_file

<u>Integration Process (BPM):</u>

receive--->change_into_source(MI_idoc_2_MTSource_File)

-


> sender synchronous --->sender asynchronous.

<b><u>In the integration Builder:</u></b>

<u>Business Systems:</u>

BS_SAP01 (send the idoc)

BS_PC (where the file will be saved)

I also did the receiver determinations, interface determination and the receiver agreements but I think they're wrong...

<b>Can someone help me?

Is all I did right?

Is my BPM right?

How must be the receiver determinations, interface determination and the receiver agreements?</b>

Message was edited by: Christophe FERREIRA

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 23, 2005 at 04:19 PM

    Here is the flow you might wanna use.

    Receive IDoc step --> Transformation 1 for your message into RFC message --> Send Synch (RFC call) --> Transformation of 2 messages into 1 --> Send Asynch to File.

    Transformation 1: Map your Key field to the RFC_READ_TABLE exporting structure Then use this message to send step of RFC call

    Transformation 2: Create a message map for 2 source messages (One is IDoc, other one is RFC response) to one target (file structure).

    hope this helps.

    regards

    SKM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thank you to both of you. I'll try this, I hope I well understood what you explained to me...

      But the send synch, in the integration process, asks me an exception...which interface is it? how does it work?

  • avatar image
    Former Member
    Aug 24, 2005 at 07:33 PM

    Sounds to me like you need data from an IDoc and from some other SAP tables to build your target file.

    This may sound somewhat inelegant, but it seems to me, as an old ABAP developer, that the easy way to handle this is to write an ABAP that collects all the data you need in SAP, both from the IDoc and your other tables, and then spit out a flat file in your target structure.

    All you need to do then is move the flat file to your target destination, which could be through XI. Unless there is a critical business need to do it through an IDoc and an RFC call back into SAP from XI, the shortest distance between two points is a straight line. Good luck!

    Add comment
    10|10000 characters needed characters exceeded