File to Idoc ( RFC lookup )
Hi,
I need to create File to Idoc scenario with the use of RFC lookup. Need to do some currency lookups based on country specific values in file and pass this information to IDoc. what are the steps I need to follow to complete this scenario?
a) Do I need to create RFC function module for this or not?
b) Where do I need to store these lookup info ( country -- currency values )?
c) Do I need to create RFC Comm channel and RFC Receiver agreements?
Can anybody help me out!
-Esha
Hi,
>a) Do I need to create RFC function module for this or not?
U can use a RFC Module RFC_READ_TABLE to read data from table in data dictionary.
>b) Where do I need to store these lookup info ( country -- currency values )?
Receiver RFC Communication channel is required for RFC Lookup, but there is no no need of Receiver Agreement.
>c) Do I need to create RFC Comm channel and RFC Receiver agreements?
U can store the lookup info ( country -- currency values ) in a Z table.
Regards,
Chandra
Similar Messages
-
Regarding RFC connection in File to IDOC Scenario
Hi everyone,
I was configuring file to Idoc Scenario, i have made all the required configurations in SLD, IR and ID, in XI system and in R/3 System. i have created RFC connection from XI to R/3 system, and its working fine. i have created an Partner profile in WE20 with sender file system name with inbound parameters. <i>But still i am getting error as EDI Partner Profile not defined in WE05- iDOC ADDED WITH ERRORS. </i><b>Do we need to create an RFC connection from R/3 system to XI for file to Idoc Scenario</b>
<b>!!! Note: RFC connection from R/3 system to XI is not working, will this be a problem for file to idoc scenario. !!!</b>
Regards,
Varun Reddy.KHi Varun
Follow these steps
First - Maintain the Sender R/3 System:
SM59 : Create a RFC destination to XI
WE21 : Create a TRFC Port ->Specify the RFC Destination Created
BD54 : Create a Logical System for the Idoc Receiver
WE20 : Create Partner Profile ->Maintain Outbound and the Inbound Parameters
Second - Log on to XI System:
SM59 : RFC Destination for Sender System
IDX1 : Create the port to get Idoc Metadata from Sender System ( The Port Name must match the port name in the idoc header - Usually in format SAP<System ID>. eg. SAPID1 [Optional Step. Not mandatory]
IDX2 : Maintain the Idoc Metadata. This is needed only by XI, and not by other SAP systems. IDX2 is needed because XI needs to construct IDoc-XML from the IDoc. No other SAP system needs to do that.
Regards,
Santosh -
Lookup issue for File to Idoc scenario-- Urgent Pls.
Hi All,
Iam doing File to IDoc scenario with one file --> any of 3 R/3 systems.
Routing has to be done dynamically using a lookup file, based on the incoming GLN code and last character of the Order Reference number.
The last character of the Order ref Num will have A,B or C.
Where, ' A' for R/3 152 Client
' B' for R/3 142 Client
'C' for R/3 132 Client.
1. PlantGLN_Routing lookup file :
DestinationSystem, Plant GLNCode, Partner Number,
A, 5000243000473, GDKDVRC152,
B, 5000243000473, GDKDVRC142,
C, 5000243000473, GDKDVRC132,
A 500034000487 GDKDVRC152,
B 500034000487 GDKDVRC142,
C 500034000487 GDKDVRC132,
By Using DestinationSystem and Plant GLN Code as lookup key --> I need to get the value of partner system.
2. IdocCtrlLookup
Purpose: To read the IdocCtrlLookup file to populate the Idoc control segment
Now based on the partner system from previous table --> I need to get the details of Sender Port , Sender Partner Type , Sender Partner Function , Sender Partner Number , Rx Port , Rx Partner Type , Rx Partner Function , Rx Partner Number.
Please help me how can acheive this scenario with the help of lookups.
Its very urgent.
Regards
Krupakar.HI,
Here you would have to use one mapping for dynamic routing , based on this create IM and use it in receiver determination.
the another mapping is general to file to idoc.
see the dynamic routing link here
Dynamic Configuration of Some Communication Channel Parameters using Message Mapping -
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Also if you know the field name the context object can be defined for partner no that can be used in receiver determination in condition. to particular partner no in receiver determination.
Regards
Chilla -
Doubt about RFC Destination in FILE to IDOC Async scenario
hi
In FILE-XI-IDOC Async Scenario we are creating RFC Destination in R/3 and XI.
For Asyn we don't want response But We are Creating RFC Destination in R/3 also.
Any specific reason.
Thanks in advance.First you need to have a clear understading of how the idoc adapters works.
In xi we create rfc destination and specify that in the port maintenance on the idoc adapter so that we can establish a connection to the sender / receiver system which contains the IDOC METADATA (IDX2) that is required by the idoc adapter to convert the native idoc into idoc xml format.
In R/3 as sender we create rfc destination so that when the idoc has to be transported to the xi system first it will be sent to trfc port that rfc desination that u define the trfc port contains that the target system address(IP) and logon parameters req.So idoc can be sent to the desired destination.
In R/3 as a receiver to facilitate communication we define rfc dest, partner profile and specify the inbound parameters so that idoc can be posted.
Hope this answers your ques.
cheers
*Raj*
*POINTS IF SATISFIED WITH ANSWER. -
Issue with Jar files in UDF for RFC LookUp
Hi,
I am writing a UDF for RFC LookUp.
In the import statement of UDF, I used the JAR File : com.sap.aii.mapping.lookup.*;
The code inside the UDF uses LookupService.getChannel.
When I test the UDF, It shows an error ( ^ ) at LookupService.getChannel.
Could you please help me in understanding why Am I getting this error at all?
Thanks In Advance.
RohanHi,
I have used 'com.sap.aii.mapping.lookup.LookupService', and I got the following message error:
G:/usr/sap/XD1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1c5a7dc23dcf11dda79f001e4f342f87/source/com/sap/xi/tf/_MM_MT_PlannedOrder_to_ZLOIPLO_.java:3: package aii_map_api does not exist import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import aii_map_api.jar;import com.sap.aii.mapping.lookup.LookupService;*
^
Also in the above message there are 3 packages that I have not used at all and still I see them in the message.
Any reason?
Rohan. -
Exception Handling in RFC lookup
Hi Experts,
I have a query in RFC Lookup function working with PI 7.1, file to Idoc scenario.
I am using Enhance Receiver Determination to find the dynamic recivers.Here we have used a Functional Module which gives an output according to the the input parameter (which comes from input file). thus i have used RFC lookup to the remote system to fetch this info from FM.
Problem -
When the remote system is down or if the RFC lookup attemped & exceptions raised for some reason (RFC user authority has been changed & it was not able to perform the intended Job at remote system) , the message stuck in queue and block the several other messages from another interfaces which belongs to teh same queue.
Queries-
This is not allowed in production as it affects other services.
1>how can we handle the RFC lookup exception (in case of remote system is down or if the RFC lookup exception)
2>how can we perform Local lookup at PI box rather then remote lookup (the FM fetches the data from remote system)
3>Is Value mapping is relevant in this case raher the RFC lookup ? I am not sure as the values are dynamic & selected as per the FM's output.
Please provide your valuable insight .
Thanks in advance !
-JyotiHi Jyoti,
Answer for your 3 question.
1. RFC lookup will get execute on R/3 so if R/3 is down there no way that your RFC lookup will work as expected.
2. So if R/3 is down or RFC not able to get receiver system due to some problem.. then in that case.
On your Receiver determination at bottom
Configure u201Cif no receiver found proceed as followingu201D
In this you can have 3 option.
a. Error message u2013 if you select this the transaction will end with error message in SXMB_MONI
b. Ignore: if you select this execution will get ignored and there will not be any entry in SXMB_MONI
c. Select the following receiver. You can select this and can configured default receiver system in case if RFC not able to determine receiver then interface will get route to receiver system configured here.
3. As you mentioned values are dynamic then Value mapping doesnu2019t make any sense here. RFCl ookup is the right option and above are few other option in case you RFC lookup flailed.
Thanks,
Bhupesh -
Hi Experts,
I have a query in Graphical RFC Lookup function.
I am working on Pi 7.1 and scenario is File to Idoc.
In the file, material number is coming, and I have to find out the corresponding Customer number from ECC table using RFC Lookup.
I know how to use RFC lookup.
But here issue is, if Customer Number is not maintained in the ECC table for the incoming material number, then exception should be thrown and processing should be stopped at that moment.
Please tell me how to throw this exception and hence fail the mapping.
-Supriya.Hi ,
I guess you want to fail the message transformation at Message mapping level with Red Error in Monitoring , If LOOKUP return Nothing ...
What You can Do Is , Instead of RFC LOOKUP Function , Use UDF Based RFC LOOKUP , and Inside UDF you can easily raise exception.
Or
In Grapphical Message mapping pass the result from RFCLOOKUP To a 1..1 Target , if during transfermation if 1..1 node will not get any value , so mapping will get failed automatoicaly ..
hope the idea Helps
regards
PS -
Mapping Exception Issue with RFC LookUp
Hi,
My scenario is Idoc To file, in my idoc user who created a purchase order filed is not there but in xml file i want the user who create that PO, for this i am using RFC LooUp. I want the user who created a purchase order.
Graphical Mapping looks like below.
Belnr-->User Defined Function--
>UserName
Please find the code bloew:
String DBTABLE = "EKKO";
String lookUpField = "ERNAM";
String WHERE_CLAUSE = " EBELN "" = "" ' "a" ' " ;
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
"500",
"RFCUSER",
"abc1234",
"EN",
"cxylo06",
"05");
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "GenericRFCMappingLookup", mConnection );
// create function template to select data from any table
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
// set import parameters table name and RFC
input.setValue( DBTABLE, "QUERY_TABLE");
input.setValue( "," , "DELIMITER");
//Fill the where clause of the table
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("OPTIONS");
inputTable.appendRow();
inputTable.setValue(WHERE_CLAUSE,"TEXT");
mConnection.execute( function );
//Find the position of the field that has to be lookedUp
JCO.Table lookupFieldPos = function.getTableParameterList().getTable("FIELDS");
int pos = -1;
for (int i = 0; i < lookupFieldPos.getNumRows(); i++)
lookupFieldPos.setRow(i);
if (lookupFieldPos.getString("FIELDNAME").equals(lookUpField))
pos = i;
//Get the exact lookupvalue from the position obtained above
JCO.Table valueSet = function.getTableParameterList().getTable("DATA");
valueSet.setRow(0);
String resultSet = valueSet.getString("WA");
result.addValue(resultSet);
mConnection.disconnect();
I am not aware of java coding so kindly make necessary modifications.
Kindly suggest what changes i need to do to execute perfectly.
Your help will be greatly apprecited.
Regards,
VenkatHi Venkat,
If you use the JCO connection to get the value from RFC, it would be a problem in futherly like when you move this interface DEV to Q, then you need to change the connection parameters to establish the JCO connection.Same in Production environment too.It is not advisable to do JCO lookup. Go for RFC lookup as the link given by Farooq.
Create Reciever RFC communication channel and take the XML signature of u r RFC by importing that RFC under imported objects.Create an UDF, for this see the sample code which is exisitng in document to pass the Export parameter to RFC.
In this way u r RFC channel establish the connection to R3 and your RFC will execute and return the value.U just need to change the Reciever RFC channel parameters respective of environment.
Cheers
Veera -
RFC Lookup Table Parameters Reusability
Dear All
My Requirement is to Map fields in IDoc from the File data ,there are some fields in idoc for which i need to fetch data from SAP.
For this i am using RFC Look up. i am retrieving values from table parameters for RFC.
and this Table parameters are being used muliple times in Mapping.
Right now i have to execute the same RFC for set of input data atleast 5 r 6 times.
This is effective Performance of the Interface
Is there any concept of Reusuability in RFC Lookup while Mapping in PI.?
Can we use Java Initialization section in mapping for executing the RFC once and using the output data in table parameters while mapping various target fields.
Hoping for a Positive Reply
Regards
BhaskerHi,
1) If it is PI 7.1 there are mapping enhancements, such as
a) Variables for storing intermediate mapping value,
b) for RFC lookup etc.
you can find the 7.1 pdfs from SDN
2) you can have a two stage mapping, putting them sequentially in Interface mapping object.
First step : Source to Target (orignal target structure)
here you can do all the mapping and also One time RFC lookup, but leaving the other fields where you need the lookup values again
Second step : Target to Target
here already mapped target becomes your input & you know the fields which have the value & the fields that you need to map again and all other fields are one to one mapping.
Regards
Vishnu -
PI 7.1 EHP1: RFC lookup does not pass the parameter values
Hi,
I am not sure if anyone came cross this issue:
This is IDOC -> PI -> File scenario
IDOC sender side, we used IDOC packaging, means in one message, we have mutiple IDOCs.
There is RFC lookup function in message mapping, it takes 8 parameters. There are four contants value and four queue passed.
We would like to call the RFC lookup for each IDOC sent.
Saying we sent 10 IDOCs, the RFC was called 10 times, this is expected behavior.
However, in 8 parameters, we miss four parameters values even we passed values
Regards.
LiangJ Augastine:
Thanks for the input.
In blog, it talked about one RFC call for a mapping.
In my situation, we need to multiple times of RFC, since this is EDI scenario, some elements need to be incremented.
Previously, this RFC works without any problem. However we increased 4 parameters, for those parameter added laterly, it does not carry the value to RFC call, I tried to removed the function from ESR and re-import the RFC, but it still does not help.
I also tried to pass constant value or queue value, it all does not help.
Regards.
Liang -
File to Idoc : Java Mapping
Hi Experts,
The scenario is file to idoc. In the file i'll be getting name,value pairs. For ex:
Structure is
MT
....Root(1..unbounded)
............Name
............Value
File contains:
Vishal....1
Raj.........2
RFC......10
Rahul.....20
Azhar....15 and so on..
I need to loop through the file. When Name="RFC", I need to make an RFC call with Value as it's input. RFC returns 4 values which will be used for mapping.
Then I need to continue looping through the file. On encountering a particular Name, I need to map corresponding Value to target field.
For this, I should have 2 mappings. One to read the file and the other for mapping. I've never used RFC and Java mapping, Can someone provide me a link or a solution for this?
Thanks,
VishalHi,
You can do this using a UDF.
first let the source message contain first line and last line which you want to eliminate.
change the context of the Value to MT ..
start a for loop in UDF ignoring first & last line like
for(int i = 1; i< input.length() - 1; i++) // here i = 1 & not zero & input length is -1 so that first & last field eliminates
//carry on string operation to separate name & value on delimeter space
String name = input<i>.subString(0,.... to the indexOf space);
//similar for value also....
now you have name & value
check for name == 0052
if(name == 0052)
perform rfc lookup
else -
File to idocs - sequence of inbound processing
Hi everybody,
we have a file to (2) idocs scenario. In XI we map the received data of vendors into two idocs (adrmas and cremas). After building the idocs we send them in that sequence to the reveiver systems (recommended). The problem is that in the receiver system very often the idoc cremas wants to be processed before adrmas is ready. This leads to the error "vendor xy is blocked by user sapale". Especially for massprocessing I get a lot of these error-messages in bd87. As workaround I processed all the error-idocs by the report rbdmani2. (First step adrmas - second step cremas) But then I face missing data in some cases in table lfa1 - which seems to me that the sequence of 1. adrmas and 2. cremas was not correct processed.
Is there a possibility for inbound processing with the rule process adrmas - wait until ready - process the associated cremas and so on?
I checked the sap-help article for seralisation - but we could not achieve a better result by queing the outgoing messages in the xi.
Thanks very much.
With kind regards
JörgYou have to get a solution based on the following concepts
1. Do not use BPM it is not efficient
2. Understand what is the difference between an IDOC in received state and processed state. Received state mean IDOC is saved into IDOC table. Processed state mean IDOC processed into the business system.
3. You can ASK BASIS guy to turn on the immediate IDOC processing option in SAP system,so that SAP process the IDOC as soon as it arrive in IDOC table. This is not efficient, in case if your SAP system has to process SAP online client request and SAP document (inbound and outbound) same time.
4. Understand the concept of standard based integration, mean integration system provide the option to business parties to provide the successfull message transfer.
Based on all these points I recomend you to follow the steps below.
1. Extract each record from the input files into two idocs.
2. Send the first IDOC to the receiving system
3. Send the second IDOC to a ESB storage such as DATABASE, JMS Queue, MQ Series Q (if you have available) or even to another File.
4. Develop an RFC module to check the status of the IDOC being send to the receiving system. Status here mean whether the IDOC data processed into the business system. You can do this lookup using a custom RFC lookup using the attribute connecting the first IDOC record with second IDOC.
5. Process the records (second IDOC) from the intermediate storage using the RFC lookup into the business system updates its status as ready to deliver.
6. Using another process such as FILE to IDOC or JMS to IDOC or JDBC to IDOC send each record which are ready to process from intermediate storage to the receiving system.
7. Create a report using FILE or JMS, JDBC adaptor module to keep track of these three stage processing, so that in case an inconsistency happed you will have an auditing trace available.
This is the standard based integration approach.
ABAP guys, BASIS guys they may not get it when then repair a BMW in local auto workshop, cuz I had to fight with them 4 years ago to make it happen in Verizon supply chain project where I had to accomplish the same concept in SAME IDOCS you mentioned here.
BPM, turning on immediate processing of IDOCS etc will end up in buying another 16 CPU hardware and BASIS guys or ABAP guys running BAD record IDOC processing report for 350.00 hr consulting FEES.
SAP is a good company and XI is a good product, as long as it is being used as per right usage. -
File to Idoc .If order is their need to send mail
Hi All,
I have scenario like this.
Sending file (order) to SAP -IDoc
I using RFC lookup .There is funtion module which has been developed in SAP R/3 it contains 5 import parameters and return SUBRC.
If the result is subrc = 4
This is the normal situation and the order / idoc should be
generated as normally.
If the result is subrc = 0
Now we are in a situation where we earlier have received this order.
Instead of generation an IDOC, an email must be send to respective persons with contents
SUBJECT: We have already received this EDI -order before.
And the mail should contain following:
We have already received this EDI-order before.
Purchase order no: <value of purchase order no>
Sold-to: <value of sold-to>
Salesorganisation: <value of salgsorganisation>
Distribution channel: <value of distribution channel>
Division: <value of division>
Note : BPM not recomended
Thanks
MMVHi,
Check the following link
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
it is possible to configure the mail adpater to send attachemnts without any ABAP coding. Just check out these
blogs by michal that deal with the mail adapter,
/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
You can also check these links on SAP help for configuring the mail adapter,
http://help.sap.com/saphelp_nw04/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
Please reward points if it helps
Thanks
Vikranth -
PI7.1 File to Idoc scenario issue.
Hi,
We recently had an upgrade from PI7 to PI7.1.
When testing File to Idoc scenario ,we had an issue as below
Trace level="1" type="T">*** START APPLICATION TRACE ***</Trace>
<Trace level="1" type="T">Error during lookup - com.sap.aii.mapping.lookup.LookupException: Error when calling an adapter by using the communication channel GeneratedReceiverChannel_RFC (Party: , Service: ED2_200, Object ID: a8f14398a9993dccadbe983d401f693a) The channel with object ID a8f14398a9993dccadbe983d401f693a could not be found in the Integration Server Java Cache. Check if the channel exists in the Integration Builder Directory and execute a refresh of the Java Cache.</Trace>
<Trace level="1" type="T">Error when parsing RFC Response - null</Trace>
<Trace level="1" type="T">*** END APPLICATION TRACE ***</Trace>
This was working fine before upggrade.
Any changes required to be done in scenario?
Pls let me know.
Thanks,
Srinivasado a CPA cache refresh
http://hostname:port/CPACache/refresh?mode=full
also check if the object is visible in tcode SXI_CACHE..
also refresh the SXI_CACHE -
Hi..
Now i have a scenario for u instead :
this is what gimme a solid realistic approach :
i have records in this format lets say :
RecordID ordertype
900 0305
900 0305
920 DS01
900 0304
900 0305
920 DS02
Now here is what i have look into :
for all 900's whose Ordertype is same i have to make a call and then to decide to create/change by an RFC Lookup, with this RFC Lookup i have to then decide on which IDOC i have to map to . So that means i have to sort all the records of 900's based on ordertype with in the mapping itself and then make a call to IDOC .
I am not expecting whether to use XSLT / Java mapping , I can only use custom functions. Lemme know whatz the best approach?
for all 920's its not that complex but all 920 goes to one IDOC.
Any clue?
regards..sankarHi Michal,
>>>>>I'd go with Shravan's approach for sure
please send link for this, i do not have shravan's approach?
Hope you got my problem: or else see follow:
I am outlining the scenarios here :
I have a flat file with a following type of records:
RecordID ordertype
900 0305 ..............................
900 0305 .............................
920 DS01 .............................
900 0304 .........................................
900 0305 .....................................
920 DS02 .......................
930 -->not concerned with these type of records
Now here is what i have look into :
for all 900's whose Ordertype is same i have to make a call and then to decide to create/change by an RFC Lookup, with this RFC Lookup (i.e. i have to group all the records with ordertype same ) i have to then decide on which IDOC i have to map to .
i.e. For all 900's with one ordertype if i find that there exists an OPEN_PO then i have to call one IDOC with one set of values along with values returned from that RFC
if its OPEN_PO is blan that i should send values to another IDOC
for all 920 records i have to call another IDOC .
I am not expecting whether to use XSLT / Java mapping , I can only use custom functions. well lemme know whatz the best approach?
Please help
thanks,
regards
sankar
Maybe you are looking for
-
Read Tif Image from Database Display in Windows Fax Viewer
Code for reading a BLOB from Oracle which is a TIF image and displaying it in Windows Picture and Fax Viewer. Gives the ability to display with perfect resolution, Zoom In & Out, Rotate and Print. I m storing the image on my C drive, you can store wh
-
I have forgotten password for my iPad 2. can someone help?
I need help I can't remember my iPad's password on the lock screen and I'm starting to worry. Has anyone got any ideas?
-
Techniques for Gathering Structured User Input
I have a general question, and a specific example. At times, you may want to route a workflow item to an agent and return more than a simple user choice. In some cases we want to obtain values. Is there a standard or best practice way for doing that
-
Export the list of the prices of the materials at an Excel sheet
If we use PR00 condition for price of the materials, how can we export the list of the prices of the materials at an Excel sheet? Can we use V/LA or V/LD ? Thanks in advance.
-
Hello, I'm using MaxDB v 7.8.02.21 (64bit) on Windows7 Home Premium with SP1 (64bit). I want to read data in PHP v 5.3.6 (Appache 2.2.19), but I have a problem when there are some UNICODE characters in the table. My table is: create table "ADMIN"."T"