IDOC to IDOC....... RFC look up

Hi Friends,
Iam new to SAP XI and have some questions.Answers to this query will be my pleasure.
my scenario:
sender :idoc1 (delivery)
receiver: idoc2 if customer present
              else idoc3 to create "customer" and then idoc2 to create "sales order"
Message mappings:
1 for idoc1 to idoc2
1 for idoc1 to idoc3
and 2 interface mappings for the above message mappings.
Please explain me how can i use one mapping if condition is false and then mapping2
and how to use second mapping if condition is true.
Also given below is mapping for a field .Please check and explain:
source field:E1ADRM1-PARTNER_ID          
Mapping/Transformation rule:E1ADRM1-PARTNER_Q = 'WE' Select KUNNR from KNB1where     ALTKN = E1ADRM1-PARTNER_ID and BUKRS = 'GR11'   Value = KNB1-KUNNR    and check that KNA1-STCD2 = 999839383 with KNA1-KUNNR=KNB1-KUNNR                        if no entry found in KNB1customer must be created     
Target field: PARTN_NUMB
Please explain.I got an answer previously that i have to use RFC look up, if so please explain where and how to write the RFC look up.
Thanks in advance,
Harish.

Hi Kinthali,
I think I am not getting your question correctly...
You need to map from Idoc1 to idoc2 or if idoc 2 is not the idoc1 to idoc3... right??
<i>>>Please explain me how can i use one mapping if condition is false and then mapping2 and how to use second mapping if condition is true.</i>
Which condition are you talking about here?? Check the condition in the interface determination and then choose the needed interface...
Regards
Suraj

Similar Messages

  • RFC Look Up APIs for a IDOC Receiver Communication Channel

    Hi,
    Can we use RFC Look Up APIs in UDF for a IDOC Receiver Communication Channel. (File to IDOC Scenario). Requirement is to send a notificaiton when IDOC got posted with IDOC number.
    Best Regards,
    Madan Agrawal

    As the name suggests, RFC lookup uses RFC receiver channel only. In mapping of your File to Idoc scenario, you may perform this lookup.
    Requirement is to send a notificaiton when IDOC got posted with IDOC number.
    Configure ALEAudit for this requirement. How were you planning to use RFC lookup for such a requirement?
    Regards,
    Prateek

  • Main Difference Between EDI and IDOC Based On RFC

    In IDOC ,RFC is Used to define the characteristics of communication links to a remote system on which a functions needs to be executed.
    What About EDI ?

    Hi Saurabh,
    Check this..Hope it helps you.
    EDI is nothing but Electronic data interchange. SAP will support EDI through Intermediate documents (IDOCS).
    EDI (Electronic Document interchange) - EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network. 
    EDI is also called paperless exchange. 
    Advantages: 
    Reduced Data entry errors
    Reduced processing time
    Availabilty of data in electonic form
    Reduced paperwork
    Reduced Cost
    Reduced inventories and better planning
    Standard means of communications
    Better business process
    EDI has two process
    1. Outbound process
    2. Inbound process
    OP:
    1.Application document is created.
    2.IDOC is generated
    3.IDoc is transferred from SAP to Operating system layer
    4.Idoc is converted into EDI standards
    5.Edi document is transmitted to the business partner
    6.The Edi Subsystem report status to SAP
    IP:
    1.EDI transmission received
    2.EDI document is converted into an IDOC
    3.IDOC is transferred to the SAP layer
    4.The application document is created
    5.The application document can be viewed.
    IDOC:
    IDOC is a container that can be used to exchange data between any two process.
    Each iDoc is assigned a unique number for tracking and future reference.
    iDoc Consist of several segments,and segments contain several fields.
    iDoc contains the following three type of records...
    1.One Control Record.
    2.One or many Data Record
    3.One or many Status record.
    PORT:
    Port is used in the outbound process to determine the name of the EDI subsystem program,the directory path where the idoc file will be created at the operating system level,the idoc file names and the rfc desinations.
    RFC Destination:
    Used to define the characteristics of communication links to a remote system on which a functions needs to be executed.
    Partner Profile:
    Partner profile specified the various componets used in an outbound process ( Partner number,IDoc type,message type,Port,Process code),the mode in which it communicates with the subsystem(batch or immediate) and the person to be notified in case of errors.
    Message Control
    Used in pricing,account determination,material determination,and output determination.The message control component enables you to encapsulate business rules with out having to write abap programs.
    Process:
    Setup RFC destinations SM59
    Port Destinations WE21
    Partner Profile WE20
    Message control NACE
    Purchase Order ME21
    Check IDOCs WE02,WE05
    Explain to me about Idoc?
    IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. 
    IDocs are used for asynchronous transactions:  Each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. 
    Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions. 
    A large enterprise's networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. 
    IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands. 
    An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication
    layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. 
    The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
    Re,Manas

  • Reg. RFC look up

    Hi All,
    I am working on RFC look up. My Scenario is IDoc to IDoc. The IDoc has a segment say E1 where the occurence is 0---5 and two fields inside that i.e. QUALF and IDTNR.  The requiremnt is like when QUALF  is equal to 002 then fetch the value of material number from SAP and map to IDTNR. Also this material number is picked only when QUALF is equal to 003 and the field IDTNR has some value i.e. article number in SAP. So I need to get value of the material number equal to this article number.
    I am using RFC look up for this mapping condition in order to fetch value from SAP.
    Can anyone help me on this to configure the RFC look up in PI?
    Thanks and Regards,
    Neethu

    Hi All,
    For my requirement I have used this UDF,
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // filling the string with our RFC-XML (with values)
    String m ="<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:ZSD_EAN_MATERIAL_GET xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><P_EAN11></P_EAN11></ns0:ZSD_EAN_MATERIAL_GET>" ;
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    // 1. Determine a channel (Business system, Communication channel)
    Channel channel = LookupService.getChannel("RD9","CC_RFC_RECEIVER_LOOKUP_I040");
    // 2. Get a RFC accessor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create a xml input stream representing the function module request message.
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    // 4. Create xml payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute lookup.
    Payload result = accessor.call(payload);
    InputStream in = result.getContent();
    out = new ByteArrayOutputStream(1024);
    byte[] buffer = new byte[1024];
    for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
    out.write(buffer, 0, read);
    content = out.toString();
    catch(LookupException e)
    importanttrace.addWarning("Error while lookup " + e.getMessage() );
    catch(IOException e)
    importanttrace.addWarning("Error " + e.getMessage() );
    finally
    if (out!=null) {
    try {
    out.close();
    } catch (IOException e) {
    importanttrace.addWarning("Error while closing stream " + e.getMessage() );
    // 7. close the accessor in order to free resources.
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
    //returning the result u2013 RFC-XML.response
    return content;
    While executing this UDF I am getting the output as:
    <?xml version="1.0" encoding="UTF-8"?><rfc:ZSD_EAN_MATERIAL_GET.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Materialnumber></Materialnumber></rfc:ZSD_EAN_MATERIAL_GET.Response></IDTNR>
      <KTEXT />
    instead of value
    Can anyone suggest me on this?
    Thanks and Regards,
    Neethu

  • IDoc to IDoc scenario: distribute the model view

    Hi!
    I try currently to  configure a IDoc to IDoc scenario for SAP ECC 6.0 system with following business 2 systems:
    ERP:100 (Sender)
    ERP:200 (Receiver)
    and XIB:100 (XI system)
    I successfuly created  a message type and generated the model view in tcode BD64.
    Question:
    When I try to distribute the model view which system should I choose?
    a) XI System or
    b) Receiver system ERP:200
    When  I choose the receiver system ERP:200 and get the following error
    Target system: ERP:200
    Model view ECCCLNT100 has not been updated
    Reason: Distribution model is currently being processed
    When I try to choose my XI system I get the following error:
    Target system: XIB:100
    RFC destination for synchronous communication (message type SYNCH)
    Partner profile LS PIBCLNT100 SYNCH does not exist
    Generate partner profile
    or specify outbound partner profiles for message type SYNCH
    Is that an error? If yes, how can I fix them?
    Thank you very much
    Thom

    Hi
    Look my reply on this thread regarding SYNC Message Type.
    Re: problem while distribute model view
    When I try to distribute the model view which system should I choose?
    a) XI System or
    b) Receiver system ERP:200
    You are sending IDoc to XI then R/3 so select XI system. because receiver of IDoc is XI then IDoc would be send from XI.

  • Regarding idoc to idoc scenario

    Hi Masters,
    can u provide step by step blog or doing idoc to idoc scenario.....
    and second thing is tht working on production server.. i had done all  the design part as wel as the config part for sending the same idoc to the reciever system .. it is bcoz later two fields are added to that sender idoc so i did all the mappings related to that .. after completing all  when i checked the xml the two fields it is not showing in the xml.. wht might be the error can u explain me ...
    its very urgent ... waiting for u r reply .
    thanks in advance,
    jp..

    Hi Jp k
    refer these links for ur scenario
    for idocs scenario have a look to this how to guide:
    https://websmp203.sap-ag.de/~sapdownload/011000358700003604082004E/HowTo_IDOC_XI_Scenarios.pdf
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems
    Scenario - IDoc - XI - RFC - IDoc
    Thanks !!

  • Sample scenario for IDOC-soap-IDOC

    Hello,
    Please provide me a sample scenario for
    1.IDOC-Soap-IDOC using webservice (Is it possible without BPM?)
    thanks and regards,
    Nikhil.

    Hi,
    For SOAP adapter configuration you need to first generate the WSDL from the ID and import that WSDl into the external definition.
    Use that WSDL as a strucutre.
    How to use webservices in XI
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    SOAP configuration will be:
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    Yes please look at following weblogs
    /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    How to Develop a Webservice Using NWDS and SAP XI.30
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555
    Thnx
    Chirag

  • Very simple and working IDoc to IDoc scenario

    Hi!
    I would like to implement for demo issues a working IDoc to IDoc scenario with SAP XI 7.0.
    The IDocs sohuld be send from SAP ECC 6.0 system client 100 to SAP ECC 6.0 system client 200.
    Questions:
    - which material type should be used (e.g. MATMAS02,..)
    - how should the message mapping (e.g. MATMAS02 to MATMAS02) look like
    - what are the other settings in IB Repository and IB Configuration
    - how should the test from WE19  look like?
    Thank you very much!

    Hi Holger,
           No issues for that , U can use the MATMAS 02 or MATMAS 03.
    Setting in R/3 system:
    1) Create the RFC Destination(SM59).
    2) Create the tRFC port(WE21)
    3) Create the Partner profiles( WE20)
    4) Create the Distribution Model(BD64)
    Setting in XI:
    1) Create the RFC Destination
    2) Create the IDOC Port into IDOC Adapter(IDX1)
    3) Load the Metadata into IDOC into IDOC Adapter(IDX2).
    Same settings happened in Receiver IDOC also.
    Directory : No need to create the Sender agreement & no need to create the Sender Communication Channel.
    Repoistery: Import the Sender IDOC and Receiver IDOC from R/3 system.
    In WE19 Testing tool we can test IDOC generated or not.
    Regards,
    Sateesh
    D

  • Error in IDOC-XI-IDOC scenario

    Hi folks,
    Let me explain the issue. This is an IDOC-XI-IDOC scenario. No BPM’s involved. SAX parsing used to parse the IDOCs.
    We had around 35000 IDOCs coming in from Brazil system, and they are all stuck in SMQ2 (Inbound queue) in XI. The first message of every queue is in SYSFAIL status, with the status text as <b>‘Problems found during the EXPORT to specified keyin table’</b>.
    When I try to execute the queue manually, nothing happens, but an error comes at the bottom of the screen, saying <b>‘Function module does not exist or EXCEPTION raised’</b>.
    I checked the dump on ST22, and it shows 130 runtime errors yesterday. The name of the runtime error is<b> ‘EXPORT_TABLE_UPDATE_CONFLICT’</b>.
    In the ‘what happened?’ part of the dump, it says ‘Error in ABAP application program. The current ABAP program <b>“CL_XMS_PERSIST=============CP”</b> had to be terminated because one of the statements could not be executed. This is probably due to an error in the ABAP program.’
    Even SXMB_MONI is not opening (for yesterday’s date). When I try to open it, it hangs for a long time, and finally opens an ‘ABAP Runtime Errors’ page with the runtime error titled as<b> ‘SNAP_NO_NEW_ENTRY’</b> and the error short text as ‘ Runtime error: Unable to write short dump’
    Please advise.Thanks a ton!
    cheers,
    Prashanth

    Hello Prashanth,
    First of all this is an XI issue and belongs in that forum.
    The export problem is typical to situations where your XI DB is out of space/out of table space. Please check with your Basis team.
    ‘Function module does not exist or EXCEPTION raised’- This message is a standard ABAP RFC message. For an RFC function call to succeed, you need the same RFC function to exist on both systems. However this is probably not the case- it is more likely that you're out of DB space as I already wrote.
    Good Luck (don't forget to award points)
    Ofer

  • PI 7.1 scenario -- File to File , File to IDOC  and IDoc to File Scenario

    Hi All,
    *I have PI 7.0 . I have in that File to File , File to IDOC  and IDoc to File Scenarios*
    File to File -- This scenario is working fine.
    File to IDOC   --  Setting done in PI 7.0 like SM59,  IDXI, IDX2  and in R/3 like SALE (logical system)---  This scenario is working fine.
    IDoc to File  --  Seeting done in R/3 like SALE (Logical system, Distrubtion Model (Port, Partner Profile)) -- This scenario is working fine.
    Now I need to move to PI 7.1  -- for File to File , File to IDOC  and IDoc to File Scenarios.
    Please let me know do I require to make any changes in Design and Configuration and settings in PI 7.1 and R/3 for above scenarios or it will work fine as it is already working for PI 7.0
    If changes are required please let me know what changes to do for each scaenario and pls also send blogs for that.
    Regards

    >
    Rickkk wrote:
    > Hi,
    >
    > Idoc metadeta is updated through idx2?
    >
    > Regards
    If there is no metadata maintained for an idoc type, the metadata for that idoc type gets loaded when an idoc of that type is received by PI for the first time. If you are looking at loading metadata of all idoc types before the first run, its really not required. Just make sure that the port is configured properly. Although, there is no harm in preloading the metadata using IDX2.
    You need to use IDX2 mandatorily when the the metadata changes and the metadata in ECC and PI is different. In that case, you need to delete metadata for the changed IDoc type and then either you can update the metada through IDX2 or let the system take care of.

  • SM58 Error For IDOC to IDOC Scenario

    Folks,
    I am getting an error in SM58 from Sender system ( IDOC-XI-IDOC Scenario ) <u><b>IDoc adapter inbound channel: Error Error when reading</b></u>. The Issue is XI is not receiving any IDOCS. Does anybody know what is the problem
    Thanks
    Manish

    Hi Renjith,
    I'm facing the same problem the flow is basically form BW to BO.
    When they load the data at sender side the idocs are stucked with error status 2:
    "Could not find code page for receiving system" in transaction BD87.
    Also when I reprocess it is successful. But its is getting stucked in SM58 with errors like:
    1)Error in RFC connnection
    2)ERROR REQU_D38IW3WD0XGK1DA48DM96N12J PG# 8 in BW
    When I execute it throes an error saying "Function Module does not existsor EXCEPTION raised".
    Also are many queues stucked in SMQ1 Outbound.
    Please help. Many Thanks.

  • IDOC - XI - IDOC with strange Config , Still working . Please comment !

    I am having an running IDOC interface in Production ...
    whose SAP XI Config looks strange to me ...
    This Interface is IDOC - XI - IDOC
    On receiver IDOC adapter ... following Options are checked...
    1. APPLY CONTROL VALUE FROM PAYLOAD
    2. TAKE SENDER FROM PAYLOAD
    3. TAKE RECEIVER FROM PAYLOAD.
    So all three Options are checked , But Now the strange thing is in Mapping ...
    When I look into the Mapping ...
    Sender IDOC   to     Receiver IDOC
    Sender IDOC is different from Receiver IDOC ..
    In Control Record ( EDIDC_40)
    TABNAME IS MAPPED WITH TABNAME
    DIRECT IS MAPPED WITH DIRECT
    IDOCTYPE IS MAPPED WITH IDOCTYPPE
    MESTYPE IS MAPPED WITH MESTYPE
    SNDPRN IS MAPPED WITH CONSTANT HAVING SAP XI SYSTEM RELATED VALUES
    SNDPOR IS MAPPED WITH CONSTANT HAVING SAP XI SYSTEM RELATED VALUES
    SNDPRT IS MAPPED WITH CONSTANT HAVING SAP XI SYSTEM RELATED VALUES
    RCVPOR IS DISABLED
    RCVPRN IS DISABLED
    So now my Query are :-
    1. IF RCVPRN/ RCVPRN is disables ... How interface is still working  as TAKE RECEIVER FROM PAYLOAD Option are checked , still that interface is working ... ??????????
    2. IF Receiver DOCTYPE / MESTYPE IS MAPPED WITH Sender DOCTYPE / MESTYPE, How it is getting Correct values .. if both Sender and receiver IDOC are Different????
    Please make Comments !
    Regards
    PS

    Hi,
    IDoc control record will get generated by the XI runtime and there are certain fields which cannot be controlled using mapping for e.g. in your case disabling of RCVPRN ..if you disable this field stil the value will be generated and passed to the receiver system...
    To check what exactly idoc values are passing then go to MONI and check there under Response ->IDoc Outbound which displays the control record values passed exactly...
    HTH
    Rajesh

  • IDoc- XI- IDoc - Problem in TRFC-Queue

    Hi everybody,
    in Integration Builder i have created an A2A-Scenario (Idoc->XI->IDoc).
    After designing and configurating i want to send an IDoc to XI.
    But the IDoc stands in the TRFC-Queue with error "no service for system <xxx> client 020 in Integration Directory."
    In ID i have set Business Systems for sender and receiver both with outbound/inbound interfaces of idoc-type, which i have upload from relevant sap-system.
    What is my fault?
    Thanks a lot.
    Greetings
    Joerg Knaust

    hi,
    most probably it's a typo
    there's no sender agreement if you're sending idocs
    from r3 to the xi
    1. how does your service in TCODE - IDX1 look like?
    sapSID ?
    2. adapter specific identifiers (do it step by step):
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • IDoc to IDOC, settings

    Hi!
    I would like to implement IDoc to IDoc scenario.
    I have one ECC 6.0 system with 2 clients and SAP XI system.
    The problem is that the the message type MATMAS does not exist in XI system.
    Furthermore I give the following error when I try to load metadata in tcode IDX2:
    Basic type 'MATMAS02' is unknown
    Message no. EA224
    I already created Ports in tcode IDX1, defined the RFC connections
    Can some one give me exactly the steps for business systems and XI to execute?
    What I already have done:
    1) Sender SAP ECC 6.0 (SID:ERB, client 100))
    WE21: Creation of port SAPERP with RFC destination XI_SYSTEM
    WE20: Creation of Partner LS according to logical names:
    EC6CLNT100 (Outbound parameters: MATMAS and SYNCH)
    EC6CLNT200
    PIBCLNT100
    2) XI System (SID:PIB, client 100)
    WE21: Which Ports should I create here?
    WE20 : Which partner LS should I create here and with which outbound/inbound parameters?
    3) Receiver system SAP ECC 6.0 (SID:ERB, client 200))
    WE21 Which Ports should I create here? ()
    WE20 Which partner LS should I create here and with which outbound/inbound parameters?
    It will be great to get some information.
    Thank you very much!
    regards
    Holger

    Hi,
    Are some name conventions for the ports?
    it should be SAP<System id>_<clent_no> in XI system. Transaction : IDX1
    Other questions
    What is the succesful condition/steps to see the meta data in IDX2 of SAP XI system?
    If you have maintaned ports and RFC destiantion in XI for R3, metadat willl be loaded automatically in first run of your interface.
    Do I need to create logical systems of both business systems in SAP XI?
    Yes you need to create two business systems for each client.
    Regards,
    sreenivas.

  • IDoc to IDoc Scenario with High Volumes

    We have requirement to load around 2.4 million idocs using XI from source SAP to target SAP system in ~8 hours. It's a IDoc to IDoc scenario with simple mapping involved.
    I Have looked at various weblogs with the design optons such as BPM collect pattern, collect pattern using IDoc XML file and IDoc Packaging.
    I am looking for inputs from real time experiences on such scenarios...i.e performanace statstics, best practices to handle such scenarios, hardware, XI basis tuning etc...
    Please share any experiences on the same...
    Regrads
    Anand

    Thanks Michal and Chandra...
    Chandra,
    I have looked into the weblog mentioned( option 2 - collecting idocs using IDoc XML port).
    I undersatnd that performance would also depened on hardware,tuning, idoc size, mapping complexity etc, but just get a rough idea and to decide on the design I was looking for stats, approaches followed in other projects  and past experiences in such scenarios.
    Michal,
    I cannot avoid collection of idocs as sending idoc's individually from source to target will have performance problems.
    I can avoid BPM by using IDoc XML port collection ( option 2).
    2.4 million idocs in 8 hours would mean that XI needs to process 300K idocs per hour.  I guess I need to try option 2  and check the performance.
    Regards
    Anand

Maybe you are looking for