Reg rfc & idoc

hai all,
i want to know exactly the reason why RFC resides on Java stack and where as IDoc resides on Abap stack, as they both belongs to SAP R/3.
Thanking You All,
Mohammed Akmal.

Hey,
Same topic was discusssed y'day check this thread.
Process Integration (PI) & SOA Middleware
Prateek asnwer is most near same as it think of.
<b>Cheers,
*RAJ*
*REWARD POINTS IF FOUND USEFULL*</b>

Similar Messages

  • Reg: RFC / IDOC required for doing CIDX Scenario

    Hi! Gurus,
    This is Amar Srinivas Eli. I have task here to work and implement CIDX Scenario succesfully. There are some business cases as per the CIDX standards from that I was selected one Business case i,,e, FORECASTING.
    But inorder to implement that scenario I need some RFC's or  IDOC lists from SAP side whether it may be a source or target side..what ever it may be...and other side will be CIDX format.
    Here I need your help in the below mentioned tasks. Kindly help me out in a detailed step by step guide and do the needful to me.
    1. How to get RFC / IDOC name from R3 System and I know that I can get RFC from SE37 and IDOCs 
        from WE05 but I need whether all the required fileds are statisfying in the RFC's or not.
    2. My first preference is only for STANDARD SAP RFCs or IDOCs.
    3. Please let me know how to see the inner fields present in those RFC's
    4. ALso please provide any configuration guide which contains screen shots if you already worked
        earlier on CIDX Scenario I mean step by step and also for testing
    5... tell me if there is any other tool other than STK kit for testing CIDX messages.
    6.  Is there any Freeware STK tool kit is there or not...
    Also share your experience and errors that you have faces while doing this CIDX Scenario.
    Regards:
    Amar Srinivas Eli

    Hi! All,
    Thanks for your fast response..
    Hi! Raja,
    I gone through your points. Here I have few doubts on those please clarify that.
    1. Coming to testing i didt used any testing tool , but you can comre your output using XML Spy or Stylus studio.*
    *CIDx Documents,you wil find in SDN please search in SDN.
    Means Without using STK Tool or else some other tool How can I get the CIDX response for my request in the Testing environment. See I am not doing this in  real time I am trying to findout the solution for Business cases so I need one testing environment tool right ? Is that ALTOVA XML spy will give no right ?
    Note: You told that you have done that business case IDOC--CIDX Order change / req Will you please share the information documentation I mean step  by step procedure for end to end doc...based on your scenario ?
    2. I know those R3 and PI settings I mean configurations means ports and RFC destinations and all those..but only thing I dono is "How you got that IDOC I mean on what basis and how did u search the IDOC?"
    3.  See Here I am working on topic FORECASTING it includes so many sub tasks like Deman PLan req and response, supply plan req and response and replenishment order and etc....so based on that how can I get those related RFC's or IDOC's in order to communicate from R3 Side
    If Suppose I have seen one RFC/IDOC and for example out of 10 fields few are there in one IDOC and another few are there in another IDOC then in that case I need to go for Multimapping IDOCs I mean 2 Senders to one Receiver if yes Is it possible?
    My first requirement is based on the above mentioned business cases how can I get the corresponding RFC's or IDOCs ?
    Regards:
    Amar Srinivas Eli
    Edited by: Amar Srinivas Eli on Jan 5, 2009 12:19 PM

  • Problem importing RFC/IDOC

    Hi All,
    While importing RFC/IDOC, there are 3 steps
    1. Logon
    2. Choose Objects
    3. Execute imports
    After giving the reqd info in logon, I can go to the next step, but here when I click on RFC or IDOC, I am not able to see the RFCs or IDOCS, IR is not responding, the screen goes blank and I have to close the application(IR).
    Any help is appreciated.
    Thanks,
    Jai Shankar

    >>wasn't it 3 that felt like 15 ?
    No i guess it is a 15 actually.
    >>do you have many Zidoc - ZRFC ?
    Yes. This is a IDES system I am connectin to. So lot of them.
    Thanks,
    Jai Shankar

  • Guarantee EOIO Processing in File-RFC-RFC-IDoc Scenario

    Looking for some opinions on the following set up we've got.  We're trying to build QoS EOIO on a scenario that goes File Sender->RFC and then RFC->IDoc.  My question is basically have we effectively ensured that our scenario will be EOIO from file to IDoc.  We want the first record in the file to always be the first created IDoc, the 10th record in the file to always be the 10th IDoc created etc.....  We also want to make sure that if we encounter an error at any point that all subsequent processing stops and waits until the problem is resolved.  We've successfully completed some steps but my biggest concern is in the area between where XI sends the data to SAP1 via RFC and the resulting return RFC from SAP1.  I'm thinking we may not be quite there yet and would be interested to hear what others thought.
    We're on SP15.  The scenario goes like this (no BPM):
    1) We have a legacy system LEG1 that we pick files up from using the Sender File adapter.  This step will take the file from LEG1 into XI and map it to an SAP remote function on SAP system SAP1.  We set QoS on the file adapter to EOIO.  Our interface determination for the File to RFC component is set to QoS of "Maintain Order at Runtime".
    2) XI makes the RFC call to SAP1 (6.20) using an RFC receiver adapter.  The called function then processes the data and returns the data back to XI using another remote function call.  This function call is of type tRFC where we call the function "in background task" and issue a commit after the RFC call.
    3) We receive the data into XI from SAP1 using the RFC sender adapter.  XI maps it to our IDoc layout and sends it onto another SAP system called SAP2.  Again here our interface determination QoS is set to "Maintain Order at Runtime".
    4) XI passes the IDoc onto SAP2 (7.00) using a receiver IDoc adapter. The paramter Queue Processing is turned on.

    About EOIO in qRFCs, actually this is quite a polemic topic.
    There is something you could do, allright, but it is controversial whether you could properly call it "EOIO" or not.
    Refer to this thread for further discussion: use EOIO on Sender RFC and outbound ABAP proxy calls
    Supposing you call the other RFC before you commit work in the receiver RFC, and supposing you could have EOIO at 2nd RFC (sender RFC), all these assumptions could mean that you would guarantee EOIO end-to-end. But they are just assumptions.
    You have to try it and stress test the scenario to guarantee the validity of this design.
    One other approach would be a BPM with all steps in one single transaction (check BPM transaction handling). The steps would be:
    File -> sync RFC -> Idoc
    where the response of RFC should be the necessary information for triggering the IDoc, and all send steps would be in EOIO mode (set queue name in Send steps). Also, file sender adapter QoS should be set to EOIO.
    But I'm also not sure that this will guarantee EOIO end-to-end (possibly not...)
    Good luck.
    Regards,
    Henrique.

  • When to use RFC ,Idoc and proxies

    When to use the RFC,IDoc and proxies.
    What is the difference in using RFC,Idoc and proxies.
    I want the therotical explanation of it.
    I gone through some of the links.
    i want the explanation which is there in simple words
    and which is easily understand by the bigginers
    those dont know more about adapters.

    hi,
    You use all these three things when the sender or receiver for XI is R/3 system.
    You use proxy in sap 6.0 version or higher.
    you use that when you dont want to use an adapter.
    or very high volume of data has to be transfered.
    you go for rfc which can be synchronous as well as asynchronous
    http://help.sap.com/saphelp_nw04/helpdata/en/22/042a3e488911d189490000e829fbbd/frameset.htm
    refer for idoc:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
    regards,
    ujjwal kumar

  • Error importing RFC / idoc despite following note 769356

    We have been experiencing a number of problems where we cannot import RFC / idocs in the integration repository.  The BASIS team have followed note 769356 and originally this solved the problem but meant that we reverted back to old screens in the Integration Builder and some German texts in the Integration Repository.
    Current patch version is Support Stack 4
    To get to this point the following steps were followed:
    Undeployed com.sap.xi.repository
    Deployed the install version of com.sap.xi.repository.
    In order to correct the problems with the incorrect screens etc.. The following steps were carried out:
    Undeployed com.sap.xi.repository
    Deployed the Support Stack 4 version of XITOOLS (includes com.sap.xi.repository)
    Applied Support Stack 5 for the Abap kernel
    Applied SAPXIAFC04P_1-20000272 and SAPXITOOL04P_1-20000274 via SDM
    This fixed all of the problems with German texts etc.. but now we cannot import RFC / idocs again.  In the Java Web Start Log (attached) we still get the error message
    mentioned in note 769356.  We have deleted the Web Start Cache on the client hosts (several restarts of the machine and deletions of the cache).  The BASIS guys are going to undeploy and redeploy the repository again but failing that we are running out of ideas.
    Does anyone have any suggestions?
    Here is the entry in the log file:
    java.lang.AbstractMethodError: com.sap.aii.ibrep.sbeans.upload.UploadServiceRemote_Stub.openSAPSource(Lcom/sap/aii/utilxi/misc/r3Connect/SAPConnectionData;Lcom/sap/aii/utilxi/misc/r3Connect/SAPLoginData;Lcom/sap/aii/ib/bom/gen/VersionContext;)Lcom/sap/aii/ibrep/sbeans/upload/SourceID;at com.sap.aii.ibrep.clsif.upload.RemoteUploadClient$ConnectionImpl.connectBean(RemoteUploadClient.java:107)at com.sap.aii.ibrep.clsif.upload.RemoteUploadClient$ConnectionImpl.<init>(RemoteUploadClient.java:91)at com.sap.aii.ibrep.clsif.upload.RemoteUploadClient.getSAPUploadConnection(RemoteUploadClient.java:66)at com.sap.aii.ibrep.gui.tools.r3import.wizard.SAPLogonPage.connect(SAPLogonPage.java:94)at com.sap.aii.ibrep.gui.tools.r3import.wizard.R3ImportWizard$LoginTask.run(R3ImportWizard.java:456)at com.sap.aii.utilxi.misc.thread.ThreadPool$ThreadPoolThread.run(ThreadPool.java:321)

    Dan,
    you are almost there!
    If you religiously follow note 769356, you should not have this problem.
    Just do the following as the note suggests:
    - From SDM, undeploy only the com.sap.xi.repository
    - Unzip SAPXITOOL04P_1-20000274.SCA.zip 
    - The file ExchangeRepository.sda will be one of the extracted files
    - Only import the ExchangeRepository.sda.  Do not import the entire ZIP package.
    - Restart the J2EE engine.
    - Delete Webstart Cache
    - From the XI admin page:
    http://XIhost:50000/rep/support/admin/status.html
    Re-Initialize the Jars for resigning.
    - Wait for 5 minutes for the jar signing to finish. Sometimes, the jar signing gets interrupted, you have to let it finish.
    The above steps worked for me.
    thanks,
    Manish

  • Import RFC/IDOC error

    Hi all,
    I am following "How to...push data in to BW from XI."
    In the 5th step in the document it is given
    Choose "Import RFC/IDOC" in the context menu of "Imported Objects" and enter your user data to logon to the BW system.
    Select the function module /BIO/Q16ASENDXMLDATATOBW_RFC
    Press "continue"
    Press "Start"
    But when I do this I am getting a java nullpointer exception error com.sap.aii.ibrep.sbeans.upload.remoteuploadexception:jsva.lang.nullpointerexception
    I am using jre1.4.2_10 and java web start version 1.4.2
    Please help me in resolving this issue.
    Regards,
    Aanand

    Hi Anand,
            Can you pls make sure that no other users have this same RFC imported into your XI integration builder and is waiting to get their change list activated. In that case also we get the error in importing...
    check these links also.
    Error importing RFC / idoc despite following note 769356
    Cheers
    JK

  • Is SAP Adapter(RFC, IDOC) dead?

    Hi
    SAP plan to create ESA services for all SAP applications.
    But has RFC/IDOC technology future? What do you think?
    Companies will not need expensive SAP Adapter more
    and XI will not have an advantage in this case.
    It will be enough to have some lightweight and cheap ESB with BPEL engine.

    Denis
    It is not that if we are going to have a new product / service in market then the old technology will not be used. Take an example of Business connector which is there before years but still is being used eventhough XI is present in the market. Still SAP says that it will support but they ask to migrate to the new technology to keep pace with the growing market. There are lot of companies who are using SAP with RFC/IDOC technology. Hence eventhough SAP plans to create ESA services it still will support the existing technology.
    ---Mohan

  • RFC, IDOC and secure connection

    Hello
    Does RFC/IDOC support secure connection like HTTPS?
    How the data can be encrypted?

    Hi,
    As Moorthy  Quoted  RFC will help you,
    This will be help you for encrypying the data.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2cce390-0201-0010-5a9f-cca08c75b6ea
    /people/kathirvel.balakrishnan2/blog/2006/06/13/sap-php-together-a-simple-base64-encoding-and-decoding
    Encrypting data
    Regards
    Agasthuri Doss

  • Where to find documentation for RFCs / IDocs?

    Hi all,
    We're planning to implement some XI interfaces against the MM module - where can we find online docs for available RFCs/IDoc APIs?
    Thanks very much in advance!
    Steve

    Hi,
    have a look at this page:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7c9f43d711d1893e0000e8323c4f/frameset.htm
    to find many MM interfaces: invoices, orders etc
    some are not well documented (material movements)
    so just ask an interface consultant about them
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • REG:ALE,IDoc , RFC

    HI,
    PLEASE SEND ANY GOOD MTERIAL FOR ALE IDOC , RFC.
    THANK YOU
    ASHOK KUMAR

    hi,
    <b>ALE / IDOC</b>
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/ale/configuration.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapdevelopment.co.uk/training
    http://www.sapgenie.com/ale/why_ale.htm
    http://www.sapdevelopment.co.uk/training
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    You need to create idocs for the same. Have a look at below link.It will heip you surely.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Go thro' thesre links:-
    http://help.sap.com/saphelp_46c/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.thespot4sap.com/Articles/SAP_ALE_IDOCS.asp
    <b>RFC</b>
    Remote Function Call:
    RFCs are requests that an SAP component sends to invoke functions on remote systems, or calls that remote systems initiate to invoke functions on an SAP component.A process that can accept RFCs from SAP components. This allows SAP components to access functions in external systems. In SAP BC terminology, the process is called a Listener. Listeners are one or more threads on SAP Business Connector that wait for incoming requests from SAP components. Listeners are named and register with an SAP gateway to indicate that they are ready to accept requests. Listeners can accept RFC or tRFC requests.
    Transactional RFC (tRFC) and Queued RFC (qRFC). tRFC is used mainly to transfer ALE Intermediate Documents (IDocs).
    Transactional RFC:
    If an error occurs during a synchronous remote function call, the system cannot tell at what point the error occurred (most crucially, whether the function module was actually processed in R/3 before the operation failed). Restarting a failed call is therefore a dangerous thing to do, since you risk duplicating a completed function call.
    To alleviate this problem, you can use transactional RFC, which guarantees that each function call you issue will only be executed once, even if you submit it repeatedly to the R/3 System. The system implements this safeguard by assigning a unique transaction ID (TID) to each transaction that you submit. When you attempt to process the transaction, the system checks whether that TID has already been processed. If it has, the transaction is ignored.
    Queued RFC:
    When you use transactional RFC, you cannot guarantee the order in which the function calls will be processed in the system (it is quite possible that one call might overtake another). For cases where you need to specify a particular processing order, you can use queued RFC, which is an extension of transactional RFC. In qRFC, you place each function call in a logical queue. A function call cannot be executed until all of its predecessors in the queue have been processed. Queued RFC calls are processed asynchronously.
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    Have a look at this link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE2/BCFESDE2.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f078394a-4469-2910-c4bf-853c75674694
    Regards
    Ashu

  • Scenario - IDoc - XI - RFC - IDoc

    Hi Experts,
    I am new to BPM.
    We have 2 sap systems...SAP1, SAP2.
    The BPM scenario is,
    When Material changes made in MM02 of SAP1, changepointers creates an IDoc1. IDoc1 is first sent to XI. Now in SAP2, it is to be checked whether that particular changed in SAP1 exists in SAP2 or not. For this, from XI an RFC call is made to SAP2, depending on the return values, the IDoc message that has been reached to XI (from SAP1) is sent to SAP2.
    How to achieve this.
    Any docs, links would help me. I am very new to BPM.
    -Naveen.

    Hi,
    <i>Can any one give me some direction.</i>
    >>>Are you talking about BPM steps ? if so I have given that.
    For Message Interfaces-
    1) Abs, Async, Message Interface of type Idoc
    2) Abs, Sync, Message Interface of type RFC
    3) Abs, Async Message Interface of type Idoc , which is sending to SAP2 system. If you have mapping changes.
    Mapping is outside the BPM, Create a dummy message type for RFC response. To check the response in the BPM
    i.e Idoc to RFC Req Mapping
        RFC Response to Dummy RFC response
    Hope this helps,
    Regards,
    Moorthy

  • Reg:rfc

    Hai to all,
    I am created one below rfc function module. that is ZTEST_FUNC.
    Expert Forums » ABAP Development » ABAP Dictionary
    Thread: reg:fm
    Welcome, chaitu sumi   
    Your Control Panel 
    Your Reward Points 
    Your Questions 
    There are new replies to your question.
    Mark question as still not answered.
    Mark question as answered.
    Use the radio buttons to award points to replies.
      You are watching this thread. To stop watching this thread, click "Stop Watching Thread" below. (Watch Options) 
    This watch sends emails by default. If you don't want to receive emails on changes in this thread, go to the watch options, un-mark the "Email" checkbox next to the thread's entry and click "Update". 
    Reply to this Thread   Search Forum    Stop Watching Thread    Back to Thread List 
      Replies: 2 - Pages: 1 - Last Post: Aug 6, 2007 5:03 PM by: Sudheer Junnuth...  Threads: Previous  
    chaitu sumi  
    Posts: 9
    Questions: 9
    Registered: 7/13/07
    Forum points: 0 
       reg:fm  
    Posted: Aug 6, 2007 4:47 PM         Reply      E-mail this post 
    I created below function module, which is having below import parameters and tables:
    FUNCTION ztest_func.
    ""Local interface:
    *" IMPORTING
    *" VALUE(S_LFDAT1) LIKE LIKP-LFDAT
    *" VALUE(S_LFDAT2) LIKE LIKP-LFDAT OPTIONAL
    *" VALUE(RAIL_ROAD) TYPE CHECKBOX
    *" TABLES
    *" IT_FINAL STRUCTURE ZTLC_SAL
    data: it_cond type n,
    loop_index like sy-tabix .
    select zdelv~vkorg
    zdelv~vbeln
    zdelv~lfart
    zdelv~lfdat
    zdelv~wadat
    zdelv~vtweg
    zdelv~spart
    zdelv~vkbur
    zdelv~vkgrp
    zdelv~kunnr
    zdelv~vsbed
    zdelv~ntgew
    zdelv~route
    zdelv~lgort
    zdelv~inco1
    zdelv~matnr
    zdelv~mvgr1
    zdelv~vsart
    zdelv~rwerks
    zdelv~dwerks
    into corresponding fields of table IT_FRGT
    From zdelv WHERE zdelv~wadat = s_lfdat1 " and s_lfdat2
    AND zdelv~lfart IN ('ZGDP','ZGRR','ZRLF','ZGLF').
    if Sy-subrc = 0.
    Sort it_frgt
    by vbeln dwerks lgort route kunnr regio vkbur vkgrp bran1 cityc.
    Delete adjacent duplicates from it_frgt
    Comparing vbeln dwerks lgort route kunnr
    regio vkbur vkgrp bran1 Cityc.
    Loop_index = 1.
    Loop at it_frgt." to wa_frgt.
    *select kunnr regio from kna1 into kna1 where kunnr = it_frgt-kunnr.
    *select bland from t005u into corresponding fields of table it_regio where Bland = kna1-regio.
    *endselect.
    IF RAIL_ROAD = 'I'.
    IF IT_FRGT-VSBED <> '04'.
    DELETE IT_FRGT.
    clear it_frgt.
    CONTINUE.
    ENDIF.
    ENDIF.
    IF RAIL_ROAD = 'R'.
    IF IT_FRGT-VSBED = '04'.
    DELETE IT_FRGT.
    clear it_frgt.
    CONTINUE.
    endif.
    endif.
    clear wa_frgt.
    select single lifnr from vbpa into vbpa
    where vbeln eq it_frgt-vbeln and
    parvw eq 'ZD'.
    move-corresponding it_frgt to wa_frgt.
    move vbpa-lifnr to wa_frgt-lifnr.
    If wa_frgt-lfart eq 'ZGND' OR
    wa_frgt-lfart eq 'ZGNL' OR
    wa_frgt-lfart eq 'ZGNS'.
    wa_frgt-LVTEXT = 'STA'.
    if wa_frgt-lfart eq 'ZGNS'.
    delete it_frgt.
    continue.
    endif.
    select mseg~werks
    mseg~lgort
    into (wa_frgt-rwerks,wa_frgt-rlgort)
    from vbfa join mseg
    on mseg~mblnr = vbfa~vbeln
    where vbfa~vbelv eq wa_frgt-vbeln and
    vbfa~vbtyp_n = 'i'.
    Endselect.
    wa_frgt-netwr = 0.
    if wa_frgt-netwr = 0.
    select single regio region plant lgobe cityc from zsta
    into corresponding fields of it_zfrgt
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg
    and kunnr = it_frgt-kunnr.
    if sy-subrc <> 0.
    select single regio region plant lgobe cityc from zsta into corresponding fields of it_zfrgt
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg.
    select single cityc from kna1 into wa_frgt-cityc
    where kunnr = wa_frgt-kunnr.
    it_zfrgt-cityc = wa_frgt-cityc.
    endif.
    select single regio region plant lgobe cityc from zsta into corresponding fields of it_zfrgt1
    where werks = it_frgt-rwerks
    and lgort = it_frgt-rlgort
    and vkorg = it_frgt-vkorg
    and kunnr = it_frgt-kunnr.
    if sy-subrc <> 0.
    select single regio region plant lgobe cityc from zsta into corresponding fields of it_zfrgt1
    where werks = it_frgt-rwerks
    and lgort = it_frgt-rlgort
    and vkorg = it_frgt-vkorg.
    endif.
    else.
    select single regio region plant lgobe cityc from zsta into corresponding fields of it_zfrgt
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg.
    endif.
    else.
    select single * from zsta into it_zfrgt
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg.
    endif.
    wa_frgt-regio = it_zfrgt-regio.
    wa_frgt-region = it_zfrgt-region.
    wa_frgt-plant = it_zfrgt-plant.
    wa_frgt-lgobe = it_zfrgt-lgobe.
    wa_frgt-cityc = it_zfrgt-cityc.
    wa_frgt-soffice = it_zfrgt1-Plant.
    STA *
    endif.
    if wa_frgt-lfart eq 'ZGDP' OR
    wa_frgt-lfart eq 'ZGDR' OR
    wa_frgt-lfart eq 'ZGRR' OR
    wa_frgt-lfart eq 'ZRLF' OR
    wa_frgt-lfart eq 'ZGLF' OR
    wa_frgt-lfart eq 'ZGLR' .
    if wa_frgt-lfart eq 'ZGLR'.
    delete it_frgt.
    continue.
    endif.
    if wa_frgt-lfart eq 'ZGDR'.
    delete it_frgt.
    continue.
    endif.
    select single WBSTK from LIKPUK into Likpuk-wbstk
    where vbeln = wa_frgt-vbeln.
    if sy-subrc = 0.
    if likpuk-wbstk <> 'C'.
    delete it_frgt.
    clear wa_frgt.
    continue.
    endif.
    endif.
    wa_frgt-LVTEXT = 'SALES'.
    wa_frgt-netwr = 0.
    if wa_frgt-netwr = 0.
    Select single * from ZFRGT into it_zfrgt2
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg
    and kunnr = it_frgt-kunnr.
    if sy-subrc <> 0.
    clear it_zfrgt2.
    Select single * from ZFRGT into it_zfrgt2
    where werks = it_frgt-dwerks
    and lgort = it_frgt-lgort
    and vkorg = it_frgt-vkorg.
    if sy-subrc <> 0.
    select single * from t001w
    where werks = it_frgt-dwerks.
    if sy-subrc = 0.
    wa_frgt-plant = t001w-name1.
    select single * from t001l
    where werks = it_frgt-Dwerks and
    lgort = it_frgt-lgort.
    if sy-subrc = 0.
    wa_frgt-lgobe = t001l-lgobe.
    endif.
    it_zfrgt2-lgobe = wa_frgt-lgobe.
    it_zfrgt2-plant = wa_frgt-plant.
    endif.
    Endif.
    Select single * from kna1 where kunnr = it_frgt-kunnr.
    wa_frgt-cityc = kna1-cityc.
    wa_frgt-regio = kna1-regio.
    wa_frgt-bran1 = kna1-bran1.
    select single vtext from tbrct into tbrct where braco = it_frgt-bran1.
    wa_frgt-vtext = tbrct-vtext.
    endselect.
    select single bezei from t005u into t005u where bland = wa_frgt-regio
    and land1 = 'IN'.
    wa_frgt-region = t005u-bezei.
    it_zfrgt2-cityc = wa_frgt-cityc.
    it_zfrgt2-regio = wa_frgt-regio.
    it_zfrgt2-region = wa_frgt-region.
    it_zfrgt2-vtext = wa_frgt-vtext.
    it_zfrgt2-bran1 = wa_frgt-bran1.
    endif.
    endif.
    endif.
    wa_frgt-regio = it_zfrgt2-regio.
    wa_frgt-region = it_zfrgt2-region.
    wa_frgt-plant = it_zfrgt2-plant.
    wa_frgt-lgobe = it_zfrgt2-lgobe.
    wa_frgt-cityc = it_zfrgt2-cityc.
    wa_frgt-vtext = it_zfrgt2-vtext.
    wa_frgt-bran1 = it_zfrgt2-bran1.
    select single * from tvkbt into tvkbt where vkbur = wa_frgt-vkbur.
    if sy-subrc = 0.
    wa_frgt-soffice = tvkbt-bezei.
    endif.
    select single * from tvgrt where vkgrp = wa_frgt-vkgrp.
    if sy-subrc = 0.
    wa_frgt-district = tvgrt-bezei.
    endif.
    endif.
    select single * from zdest into zdest where
    vkorg = wa_frgt-vkorg and
    regio = wa_frgt-regio and
    cityc = wa_frgt-cityc and
    actvt = 'A'.
    if sy-subrc = 0.
    wa_frgt-vtext = zdest-vtext1.
    wa_frgt-bran1 = zdest-ibraco.
    wa_frgt-vkgrp = zdest-ivkgrp.
    select single * from tvgrt into tvgrt where vkgrp = wa_frgt-vkgrp.
    if sy-subrc = 0.
    wa_frgt-district = tvgrt-bezei.
    endif.
    else.
    wa_frgt-vtext = ' '.
    wa_frgt-bran1 = ' '.
    wa_frgt-district = ' '.
    endif.
    endselect.
    *endselect.
    *IF kna1-regio IS NOT INITIAL.
    Read table it_regio with key BLAND = wa_FRGT-REGIO.
    IF SY-SUBRC <> 0.
    DELETE IT_FRGT.
    clear it_frgt.
    CONTINUE.
    ENDIF.
    ENDIF.
    if wa_frgt-lfart eq 'ZGDR'.
    wa_frgt-NQGEW = wa_frgt-NTGEW.
    wa_frgt-NQGEW = wa_frgt-NQGEW * 1.
    else.
    wa_frgt-NQGEW = wa_frgt-NTGEW.
    wa_frgt-NQGEW = wa_frgt-NQGEW * 1.
    endif.
    if wa_frgt-vsbed <> '04'.
    Wa_frgt-t_mode = 'Road'.
    else.
    Wa_frgt-t_mode = 'Rail'.
    endif.
    it_cond = 0.
    if wa_frgt-netwr eq 0.
    if wa_frgt-vsbed <> '04'.
    select * from a531 into a531
    where werks eq wa_frgt-dwerks and
    zzlgort eq wa_frgt-lgort and
    cityc eq wa_frgt-cityc
    order by datbi DESCENDING.
    if sy-subrc = 0.
    it_cond = 1.
    if ( a531-datbi >= sy-datum and
    a531-datab <= sy-datum ).
    wa_frgt-knumh = a531-knumh.
    exit.
    endif.
    endif.
    endselect.
    if it_cond = 0.
    select * from a524 into a524
    where werks eq wa_frgt-dwerks and
    ZZTRANSP eq wa_frgt-lifnr and
    cityc eq wa_frgt-cityc
    order by datbi DESCENDING.
    if sy-subrc = 0.
    it_cond = 1.
    if ( a524-datbi >= sy-datum and
    a524-datab <= sy-datum ).
    . wa_frgt-knumh = a524-knumh.
    exit.
    endif.
    endif.
    endselect.
    endif.
    if it_cond = 0.
    select * from a530 into a530
    where werks eq wa_frgt-dwerks and
    ZZLGORT eq wa_frgt-lgort and
    inco1 eq wa_frgt-inco1 and
    cityc eq wa_frgt-cityc
    order by datbi DESCENDING.
    if sy-subrc = 0.
    it_cond = 1.
    if ( a530-datbi >= sy-datum and
    a530-datab <= sy-datum ).
    wa_frgt-knumh = a530-knumh.
    exit.
    endif.
    endif.
    endselect.
    endif.
    if it_cond = 0.
    select * from a527 into a527
    where werks eq wa_frgt-dwerks and
    ZZLGORT eq wa_frgt-lgort and
    ZZTRANSP eq wa_frgt-lifnr and
    cityc eq wa_frgt-cityc
    order by datbi DESCENDING.
    if sy-subrc = 0.
    it_cond = 1.
    if ( a527-datbi >= sy-datum and
    a527-datab <= sy-datum ).
    wa_frgt-knumh = a527-knumh.
    exit.
    endif.
    endif.
    endselect.
    endif.
    endif.
    else.
    select * from a519 into a519
    where vsbed eq wa_frgt-vsbed and
    rke_route eq wa_frgt-route
    order by datbi DESCENDING.
    if sy-subrc = 0.
    it_cond = 1.
    if ( a519-datbi >= sy-datum and
    a519-datab <= sy-datum ).
    wa_frgt-knumh = a519-knumh.
    exit.
    endif.
    endif.
    endselect.
    endif.
    if wa_frgt-knumh is not initial.
    select single * from konp into konp
    where knumh = wa_frgt-knumh.
    move konp-kbetr to wa_frgt-netwr.
    if konp-KMEIN = 'BAG'.
    wa_frgt-NQTWR = wa_frgt-NETWR *
    ( wa_frgt-ntgew * ( 20 / konp-kpein ) ).
    else.
    wa_frgt-NQTWR = wa_frgt-NETWR * wa_frgt-ntgew.
    endif.
    else.
    delete it_frgt.
    clear wa_frgt.
    continue.
    endif.
    else.
    wa_frgt-NQTWR = wa_frgt-NETWR.
    endif.
    CLEAR ZFREIGHT.
    if wa_frgt-vsbed = '04'.
    select single distn frgt from Zfreight into Zfreight
    Where Werks eq wa_FRGT-DWERKS
    AND LGORT eq wa_FRGT-LGORT
    AND route eq wa_FRGT-route.
    else.
    if ( it_frgt-lfart = 'ZGNL' ) OR ( it_frgt-lfart = 'ZGLF' ).
    Select single * from Zfreight into Zfreight
    Where Werks eq wa_FRGT-DWERKS
    AND cityc eq wa_FRGT-cityc
    AND route eq wa_FRGT-route.
    else.
    Select single * from Zfreight into Zfreight
    Where Werks eq wa_FRGT-DWERKS
    AND LGORT eq wa_FRGT-LGORT
    AND cityc eq wa_FRGT-cityc
    AND route eq wa_FRGT-route.
    endif.
    endif.
    if sy-subrc = 0.
    wa_FRGT-RRKM = ZFREIGHT-DISTN.
    if wa_frgt-rrkm > 0.
    wa_frgt-NKTWR = wa_frgt-rrkm * wa_frgt-ntgew.
    endif.
    IF ZFREIGHT-FRGT = 'P'.
    wa_frgt-BEZEI = 'Primary Freight'.
    Endif.
    IF ZFREIGHT-FRGT = 'S'.
    wa_frgt-BEZEI = 'Secondary Freight'.
    Endif.
    endif.
    modify it_frgt from wa_frgt index loop_index .
    Loop_index = loop_index + 1.
    endloop.
    endif.
    Sort it_frgt by Regio dwerks lgort Vkbur district bran1 mvgr1 t_mode.
    Clear:WA_frgt.
    Loop at it_frgt.
    If wa_frgt is initial.
    move-corresponding it_frgt to wa_frgt.
    wa_frgt-NQGEW = 0.
    wa_frgt-NQTWR = 0.
    wa_frgt-NKTWR = 0.
    endif.
    if it_frgt-lfart eq 'ZGDR' .
    it_frgt-NQGEW = it_frgt-NQGEW * -1.
    it_frgt-NQTWR = it_frgt-NQTWR * -1.
    it_frgt-NKTWR = it_frgt-NKTWR * -1.
    endif.
    if it_frgt-regio = wa_frgt-regio and
    it_frgt-dwerks = wa_frgt-dwerks and
    it_frgt-lgort = wa_frgt-lgort and
    it_frgt-vkbur = wa_frgt-vkbur and
    it_frgt-district = wa_frgt-district and
    it_frgt-bran1 = wa_frgt-bran1 and
    it_frgt-t_mode = wa_frgt-t_mode.
    wa_frgt-NQGEW = wa_frgt-NQGEW + it_frgt-NQGEW.
    wa_frgt-NQTWR = wa_frgt-NQTWR + it_frgt-NQTWR.
    wa_frgt-NKTWR = wa_frgt-NKTWR + it_frgt-NKTWR.
    else.
    Append wa_frgt to it_sfrgt.
    Clear wa_frgt.
    move-corresponding it_frgt to wa_frgt.
    wa_frgt-NQGEW = 0.
    wa_frgt-NQTWR = 0.
    wa_frgt-NKTWR = 0.
    wa_frgt-NQGEW = WA_frgt-NQGEW + it_frgt-NQGEW.
    wa_frgt-NQTWR = wa_frgt-NQTWR + it_frgt-NQTWR.
    wa_frgt-NKTWR = wa_frgt-NKTWR + it_frgt-NKTWR.
    endif.
    AT LAST .
    Append wa_frgt to it_sfrgt.
    Clear wa_frgt.
    ENDAT.
    endloop.
    sort it_sfrgt by regio dwerks lgort Vkbur district bran1 t_mode rrkm nqgew nqtwr nktwr avg_frt.
    Loop At IT_SFRGT.
    IT_SFRGT-RRKM = 0 .
    IF IT_SFRGT-NQGEW > 0 AND IT_SFRGT-NQTWR > 0.
    IT_SFRGT-AVG_FRT = IT_SFRGT-NQTWR / IT_SFRGT-NQGEW.
    ENDIF.
    IF IT_SFRGT-NQGEW > 0 AND IT_SFRGT-NKTWR > 0.
    IT_SFRGT-RRKM = IT_SFRGT-NKTWR / IT_SFRGT-NQGEW.
    ENDIF.
    IF IT_SFRGT-RRKM > 0 AND IT_SFRGT-AVG_FRT > 0.
    IT_SFRGT-FRT_RT = IT_SFRGT-AVG_FRT / IT_SFRGT-RRKM.
    ENDIF.
    MODIFY IT_SFRGT .
    Endloop.
    Sort it_sfrgt by REGION vkorg dwerks lgort t_mode rwerks mvgr1.
    loop at it_sfrgt.
    move-corresponding it_sfrgt to itab1.
    append itab1.
    endloop.
    loop at itab1.
    move-corresponding itab1 to IT_FINAL.
    append it_final.
    endloop.
    ENDFUNCTION.
    AND I created another function module ZTEST_RFC.
    In ZTEST_RFC MODULE I AM CALLING ABOVE FUNCTION MODULE ZTEST_FUNC.
    NOW its going to dump its showing the error CALL_FUNCTION_UC_STRUC RUNTIME ERROR IS COMING.
    how can i solve this problem could any body tell me its very urgent.
    In ZTEST_FUNC  function module only i am collecting the data and put into IT_FINAL INTERNAL TABLE.

    According to
    http://help.sap.com/saphelp_nw04/helpdata/en/f9/3f69fd11a80b4e93a5c9230bafc767/content.htm
    The reason for the Runtime error: CALL_FUNCTION_UC_STRUCT is that "Type conflict while transferring structure ".
    I'd suggest therefore that you check the definition of the variables in ZTEST_RFC where it calls ZTEST_FUNC as there would seem to be a mismatch.  If you are editing ZTEST_RFC, try using the Check > Extended check functionality as this will typically pinpoint such problems for you.

  • Inbuilt RFC/IDOCs to upload ITEM MASTER DATA in SAP IS Retail system

    Hi,
    Kindly let me know the inbuilt IDOCs/RFCs to upload ITEM MASTER DATA in SAP IS Retail system.
    Otherwise let me know the tcode to check the inbuilt IDOCs/RFCs in SAP IS retail system or let me know all MASTER DATA related inbuilt IDOCs/RFCs in SAP IS retail system.
    Thanks
    Ramesh

    Hi,
    Please check below link. hope it helps you to answer your question
    http://wiki.sdn.sap.com/wiki/display/Retail/SAPRetailPOS+Interface

  • Reg Sender IDoc error in PI7.3

    Hi All,
    I am facing the below error while triggering an IDoc from ECC to PI. I could see the error in SM58 and PI log as below:
    [JRA]serverExceptionOccurred. Server XI_IDOC_DEFAULT, Managed_Application_Thread|XI_IDOC_DEFAULT Exception: com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: Commit fault: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.adapter.idoc.app, BC-XI-CON-IDO) Exception raised from invocation of public void com.sap.aii.af.idoc.inbound.IDocReceiverBean.onCommit(java.lang.String) method on bean instance com.sap.aii.af.idoc.inbound.IDocReceiverBean@24a49d74 for bean sap.com/com.sap.aii.adapter.idoc.app*xml|com.sap.aii.adapter.idoc.ejb.jar*xml|IDocReceiverBean in application sap.com/com.sap.aii.adapter.idoc.app.; nested exception is: com.sap.conn.idoc.IDocRuntimeException (raised by system |PI_AAE_IDOC)
    Can anyone please help me on the same.
    The resource adapter configurations  are deleted and created again. Also the RFC destination is working fine.
    Cheers,
    Neethu

    Neethu,
    Can you check if you are able to ping PI from the TCP Ip rfc destination in ECC.
    Also the program id in the RFC destination created in SAP should match program id in InboundRA
    Also the gateway parameters in the inboundRA in PI should be set properly. If you are setting the Gateway to be PI gateway then enable Local to true. If you are using SAP Gateway then set Local to false.

Maybe you are looking for

  • Archiving Mini-DV Tapes - iMovie or QuickTime 7 Pro?

    Hello, I've been through many similar posts here and on the Internet.  Like many, I have mini-dv tapes that need to be archived to an external hard drive for storage and editing, later.  After considerable research, I am inclined to select either iMo

  • Static Libraries

    I am trying to compile a jsoncpp into a static libraray (libjson.a) using the ar command. I am using "ar rvs libjson.a json.o" after compiling the library into json.o. I then try to compile another libary and include a static reference to the libjson

  • How to add ALV button using OO in module pool program using ALV grid

    Hello Gurus!!!               Want some tips related how to add button using ALV Grid(OO). I want to display the button for search, sort ....              Please suggest the step -by-step procedure for implementation of these button.              I am

  • What are my options for adding an additional single app...

    Okay, hopefully this will make sense: I have the Student & Teacher CC subscription.  I'd like to use Illustrator CS6 on an additional computer.  What are my options?  (Obviously, the most cost-effective option is what I'm looking for!) Jon

  • Find my Iphone using xp

    how can I use my Window xp computer to find my Iphone the app list is for windows 7