XML pay load for RFC call in java mapping

Hi,
I searched in many forums about the payload to be given for RFC Lookup from a functional module,but i think i am not able to get it correct.
Can any one please give me the exact structure of XML Payload to be sent while invoking the function module via RFC LOOKUP
Say i have 2 import parameters(input1,input2) and one output(output1)......
Thanks in advance,
H.L.Babu

>
hlbabu123 wrote:
> Hi,
> I searched in many forums about the payload to be given for RFC Lookup from a functional module,but i think i am not able to get it correct.
>
> Can any one please give me the exact structure of XML Payload to be sent while invoking the function module via RFC LOOKUP
>
> Say i have 2 import parameters(input1,input2) and one output(output1)......
>
> Thanks in advance,
> H.L.Babu
have a look at this document - https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439&overridelayout=true
in case u still have issues do get back

Similar Messages

  • Variable Substitution  need to define pay load for the following structure

    Hi All
    Please help me for defining the pay load for the following structure for the Variable Substitution 
    for genearing the file dynamically fro the payload
    Target structure is like this
    MT_RFQ_IND_IDOC_MYSPACE_TARGET............> my message type
        <HEADER>
              < FileName>
              <INDI>
              <RFQNO>
              <DOCUTYPE>
       < ITEM>
              <FEILD1>
             <FEILD2>
             <FEILD2>
    please help me
    thanking you
    Sridhar

    Hi,
    should this var1 given in any data type of my IR - No
    in variable substitution, in value give the complete thing which i said above in italics i.e. payload:MT_RFQ_IND_IDOC_FILE_TARGET,1,hEADER,1,FileName,1
    which user you used for CPACache refresh - it can only be done by XIDIRUSER.
    Regards,
    Rajeev Gupta
    Edited by: RAJEEV GUPTA on Feb 6, 2009 7:34 AM
    Edited by: RAJEEV GUPTA on Feb 6, 2009 7:35 AM

  • Question on service userid - for RFC call

    Hi
       In XI 3.0 SP18 , we are making a RFC call from XI mapping runtime - to XI's ABAP stack - RFC function module . In the RFC receiver communication channel , I tried using service user XIISUSER , XIAPPLUSER for this RFC call - I got short dumps on XI ABAP stack mentioning that these two service users do not have authorization to make RFC calls -
    Does anybody out there know what service user on XI has RFC call authorization that can used to make RFC calls onto XI ABAP stack from its mapping runtime ?
    Correct answers will be rewarded rightaway. Thanks for your time in advance.

    Hi,
    u have to make entry in sld...
    Hi,,
    2 Introduction
    Configuring IDoc adapter in Exchange Infrastructure 3.0 requires some configuration on the SAP
    systems, for both XI and the backend system where the IDoc message is to be sent. These steps, although
    simple, are many times missed or mis-configured, causing the delivery of messages to fail.
    Since IDoc adapter uses the ABAP stack, instead of J2EE, the configuration requirements are mainly in
    ABAP.
    Setting up IDoc adapters requires the XI integration server to be able to communicate with the backend
    SAP system, and also to make sure that the Logical System Name used when posting IDoc exists on the
    backend SAP system.
    3 The Step By Step Solution
    The basic steps for the IDoc configuration are outline below:
    1. Configure SM59 on XI to communicate to SAP backend system.
    2. Configure port on XI for IDoc communication.
    3. Create or verify the Logical System Name on the SAP backend system.
    4. Create or verify business system in XI’s System Landscape Directory.
    5. Verify the Logical System Name of the business system.
    6. Verify or add the Logical System Name for the sender business system.
    7. Create/configure the Communication Channel for the IDoc receiver adapter
    3.1 Configure SM59 on XI to communicate to SAP backend system.
    1. Using transaction SM59, create an RFC destination with Connection Type = “3”.
    In this example, the RFC destination name is “NDVCLNT510”.
    2. Enter the logon information:
    3. Test the connection by clicking on “Testing connection” and “Remote logon”.
    Both must be successful.
    3.2 Configure port on XI for IDoc communication.
    4. Go to transaction IDX1 on XI, and create a port. In this example, the Port name is “SAPNDV”.
    • &#61472;The Port name must be in the form of “SAPxxx”, where xxx is the system ID of the backend SAP
    system.
    • The Client must be the client number of the backend SAP system.
    • Select the RFC Destination which was created in the previous step.
    3.3 Create or verify the Logical System Name on the SAP backend system.
    5. Enter transaction SALE on the SAP backend system.
    6. Create or verify the Logical System Name. In our example, NDVCLNT510 is verified.
    3.4 Create or verify business system in XI’s System Landscape Directory.
    The business system name for the SAP backend system must contain a valid Logical System Name. This Logical System Name is the one verified or created in the previous step.
    7. In the System Landscape Directory, select the SAP backend business system. If one does not exist, then create the business system. Verify the Logical System Name.
    3.5 Verify the Logical System Name of the business system.
    8. In the Integration Directory, doubleclick on the business system (in our example, it is NDVCLNT510).
    Navigate the menu:
    Service • Adapter Specific Identifiers.
    If information is empty or incorrect, then it will have to be synchronized with the content of the System Landscape Directory. Follow the steps below for synchronization.
    9. (Optional) Synchronization of the business system in Integration Directory to the business system in System
    Landscape Directory.
    • &#61472;Double-click on the business system in the Integration Directory.
    • &#61472;Switch to Edit mode.
    • &#61472;Select menu: Service • Adapter-Specific Identifiers
    10. (Optional) Within the dialog box, click on the button as indicated below to resynchronize.
    11. (Optional) If the expected data from the System Landscape Directory is not updated, then the SLD cache may need to be cleared first.
    3.7 Create/configure the Communication Channel for the IDoc receiver adapter.
    15. In the Integration Directory, create an IDoc receiver communication channel.
    • &#61472;The RFC Destination is from step 3.1.
    • &#61472;The Port is from step 3.2.
    NOTE:
    There is no need to create an IDoc sender Communication Channel for XI. Instead, the backend SAP system must be configure to send the IDoc to XI.
    4 Appendix
    Transaction: IDX2
    There are a couple of situation where IDX2 can be useful on the XI system.
    1. When we want to test connection between the XI and SAP backend system.
    2. When an IDoc has changed, and the meta data stored in XI needs to be update. When an IDoc is sent from the SAP backend system to XI, XI will first check to see if the meta data for the IDoc is already in its persistent cache. If not, then XI will use the configuration in IDX1 to retrieve the IDoc meta data from the backend system. If the
    meta is already in cache, then it will NOT do so. Therefore, when an IDoc has changed, it is necessary to manually update the new meta data on XI, or delete it from the cache, so that the latest version can be retrieved. IDX2 is used for this purpose.
    Go to transaction IDX2 and click on “Create”.
    Enter the IDoc Type and the Source Port as defined in step #2. Click “Continue”.If successful, the following will show up. If error occurs, then the IDX1 configurations will need to be re-checked.
    Reward points if find useful.

  • Can we call a Java Map in Message  Map

    Hello,
    Can we call a Java Map in Message  Map
    Thanks and Regards
    Hemant

    Hello Vijay,
    I think this is your code:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;
    I need this code to be converted in UDF if Java map cannot be called in Message Map.
    Can anyone help me how to write UDF for the same java map.
    Thanks and Regards
    Hemant

  • Asyncronic JCO RFC call from JAVA to ABAP

    Hi,
    Please could you provide a sample java code to establish JCO RFC call to ABAP?
    Thanks.

    Hi Denis,
    Import the model In NWDS for ABAP for RFC.
    Please check here [Accessing ABAP Functions using the Adaptive RFC Model |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3?quicklink=index&overridelayout=true]
    [Web Dynpro Model: Backend Access|http://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section10 [original link is broken]]
    Also check here /docs/DOC-8661#section10 [original link is broken]
    Hope it helps,
    Redards,
    Arun

  • Upload and Download file through RFC called by java

    We are trying to download/upload file through rfc function called by java(JCO),In the rfc function,we use WS_DOWNLOAD,but it does not work.
    Any one know about this,Please help ,thanks very much.
    Message was edited by: gw gw

    Hi gw,
    This question looks a little confusing to me.
    WS_DOWNLOAD is used to download files from SAP to the presentation server (your PC).  It will not work through RFC.
    BUT, also if you want to access a function module via RFC is must be RFC enabled (as Anand pointed out).
    AND WS_DOWNLOAD uses a PUSH approach.  It pushes a file to the PC from ABAP.  So even if the two points above weren't a problem it still would not be suitable for what you are doing.
    Perhaps you could explain a little what you are trying to achieve.
    Cheers,
    Brad

  • ROLEs for RFC call

    Hi all,
       Is there any specific role, that should be assigned to the USER, so that he can make RFC calls to BAPIs.
        Or by default any USER can make the RFC calls to the BAPIs. For example, I am writing a Java/JCO appliation to call BAPIS. The current user I am using has all the permissions (I guess).
    Thanks,
    Nagarjuna.

    Your basis admin should be able to tell you.  I know that it would be included in SAPALL.  I can't really say, because it can very from system to system.
    Regarsds,
    Rich Heilman

  • Login information for RFC call

    Hi there,
    I would like to know if there is a way to authenticate a user via bsp and get that login information to make the RFC call to different systems.
    i tried the to call an FM via RFC directly from abap and it forces me to login and it works but when i put that code to bsp. I just get a "page cannot be displayed" error.
    I know i can enter an ID and password on sm59 for the connection but i need to let the user login
    I am using this for a user creation tool.. instead of using su01 to create a user it will be done via bsp and would like to reflect the changes done when running the reports from SUIM
    thanks in advance
    Ryan

    Hi Ryan,
    I will assume your RFC Destination already trusted system and using current user logon (see my previous reply).
    However this still prerequisite for the next step.
    Now, please correct me if my understanding is wrong.
    In your reply, you have at least 2 System, right?
    S1 & S2.
    Where S1 has BSP Application (Ex:/ FormRegistration)
    And S2 is where you control the user and Function Module.
    Do you put, generic user for all BSP Service in System S1?
    You can create another BSP Application in System S1 (Ex:/ CallingFM)
    but this time don't put default user in BSP Service.
    And from BSP Application FormRegistration, you create 1 button to call the BSP Application CallingFM.
    I will give you sample code:
    FormRegistration: address:http://systemS1.sap.com/FormRegistration/page1.htm
    HTML Part:
    ===========
    <HTML>
    <input type="button" value="Register the user" onclick="submitUser();">  
    <script>
       function submitUser(){
           document.forms[0].action = 'http://systemS1.sap.com/CallingFM/page1.htm';
           document.forms[0].target = '_new';
            //it will open new window, just put it empty if you don't want to open new window.
           document.forms[0].submit();
    </script>
    </HTML>
    Now, when user click Button "Register the user" it will open the new window.
    But because it doesn't allow you to using default user, it will prompt user id and password.
    After that it will submit the data to CallingFM
    Now in CallingFM we already have the sy-uname = user-B.
    CallingFM: address-> http://systemS1.sap.com/CallingFM/page1.htm
    OnInputProcessing Part:
    =================
    call function 'zcreate_user' destination 'S2'
    Why you need CallingFM BSP application? because you need to re-assign sy-uname in S1 from default user with user-B ID, and use it to connect to System S2, S3, etc.
    Please note: SM59 and User Id must be set before this.
    Because when you call RFC from other destination, SAP will refer to Logon setting in SM59 for that destination.
    Hope this will help you.

  • Best approach for RFC call from Adapter module

    What is the best approach for making a RFC call from a <b>reciever</b> file adapter module?
    1. JCo
    2. Is it possible to make use of MappingLookupAPI classes to achieve this or those run in the mapping runtime environment only?
    3. Any other way?
    Has anybody ever tried this? Any pointers????
    Regards,
    Amol

    Hi ,
    The JCo lookup is internally the same as the Jco call. the only difference being you are not hardcoding the system related data in the code. So its easier to maintain during transportation.
    Also the JCO lookup code is more readable.
    Regards
    Vijaya

  • Diiferent user for RFC call

    Hi All,
    Can we have use different user IDs to make RFC calls to SAP? Do we have option to call RFC using different users like DEV1, DEV2 etc which is specific to the user logging in to MII. This is required to maintain the change history record while posting data back to SAP
    As per the current set up its always  user which is configured in SAP server editor in MII, makes the change in SAP.
    Any input is appreciable
    Thanks in advance
    Namita

    Ajay,
      It is like passing any other parameter to your BLS.
    For example :
    1.In your BLT, create 2 trx params
    UserName,Password.
    In your Jco Action Block assign these params in the Links Tab of the action.
    2. Create a xAcute Query Template wrapping this BLS transaction.Set Param1 as UserName and Param2 as Password.
    3. Now in your frontpage screen, create an iCommand applet wrapping the above xAcute Query Template.
    4. In your screen have 2 input fields to enter username and password.
    In the "OnClick()" event, use the setParam() method to set the values from the Input fields.
    Hope this helps. I do not have the resources to give you the code but i think this should work. Let me know if this helps,
    Thanks,
    Ram

  • 'Classic' RFC library - password limited for rfc calls ?

    Hi ,
    we are using the 'classic'  RFC library to connect  to SAP for calling RFC function modules. Due to the fact that there are often older SAP systems involed, we use only passwords with 8 digits. But now we have the requirement to use passwords for the rfc user with more than 8 digits.  According to my todays knowlede, the password is limited to 8 digits with the standard rfc lib.
    Can the newer SAP NW RFC lib handle a password with more than 8 digits ?
    But  am i right that the SAPNW RFC lib is unable to handle rfc calls with opening a SAPGUI ?
    thx
    Heike

    Hi,
    thank you for your answer!
    I have investigated something new yesterday:
    I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
    That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
    But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
    From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
    The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
    WEIRD!
    Can anybody help me out of trouble?
    Thank you!

  • Clinet for RFC Connection in Java Installation

    hi ,
    I am in the process of installing Java Add on for EP.
    I have BW installed in Client 100
    But during instlaltion pls tell me teh client no i should give for RFC Connection

    Hello Balaji,
    In case of BW only one client can be used as BW client. Since your AS ABAP the BW client is 100 it has to be 100 in case of Java Add-in as well.
    Regards.
    Ruchit.

  • XML data load for master data

    All,
    Is it possible to load master data using XML datasource. If yes how. We are already using XML load for the transactional data. When we try for the Master data the option "create BW datasource with SOAP connection" is greyed out.
    Thanks.

    Hi,
    Check out this Doc
    How to…Send XML Data to BW
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21d8aa90-0201-0010-5e83-a3798b9a5ee0
    regards,
    San!

  • RFC Lookup using Java Mapping program - Examples

    Dear Experts,
    I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and never did a RFC Lookup in Java. I kindly request you to give me some examples which I could use for my RFC calls in my Java Mapping. Simple example will do.
    Client is adamant to use Java mapping, I could achieve this easily using XSLT or Graphical Mapping.
    Advance Thanks,
    Pradeep

    Hello,
    why don't you use Extended Receiver Determination Defining Extended (Dynamic) Receiver Determination - Integration Directory - SAP Library?
    What you can do is create a Message Mapping between your source message and Receivers message type. In this message mapping you can use your RFC to generate the target message.
    For example, lets say we have the function ZFM_GET_INTERFACE_INFO used to generate the List of Receivers given a source message. You could create a Message Mapping as below:
    In this case, the RFCLookup box look as below:
    The receiver determination configuration would look as follows:
    Afterwards, you will need two specific message mappings for the two ERP systems.
    Summarizing, you'll need:
    1.- A Message Mapping: Source Message to Receivers Message Type (This one uses the RFC Lookup)
    2.- A Message Mapping: Source Message to Target Message for ERP 1
    3.- A Message Mapping: Source Message to Target Message for ERP 2
    In Integration Directory you'll have 1 Receiver Determination(Source system, Target System determined Dynamically) and 2 Interface Determinations (Source System to ERP1, Source System to ERP2), etc.
    I hope you find it useful.
    Regards!

  • Webservice to RFC Scenario - Through Java Mapping

    Hello All,
    In my integration scenario, I will receive a request from a webservice consumer. The webservice is my outbound interface.
    Now I have to write a Java Mapping for it because a similar interface (file to RFC) has been implemented using it and the customer wants minimum deviation from that functionality.
    One question, that I have at this point in time is:
    I must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods, one of them is:
    public void execute(java.io.InputStream in, java.io.OutputStream out). In the existing interface the InputStream object say 'input' has been initialized to FileInputStream:
    InputStream in = new FileInputStream(new File("Sample7.xml"));
    What shall I initialize it to in my case? One probable is a InputSource, but does the execute method accept an InputSource?
    Please help,
    Regards,
    Varun

    Hello Jose,
    Thanks for your reply, but what I have mentioned above is how it is being done in a similar interface. That being a file to RFC interface, it makes sense to initialize 'in' with the file name.
    But if you mean that I do not need to initialize in my case (Webservice to RFC), then I'll surely give it a try and if useful, will get back to you.
    Thanks again,
    Varun

Maybe you are looking for

  • 0pen with Photoshop elements 10  dont load photos

    Hello, In Win7 ultimate when i try to open raw or jpg photos clicking on right key of the mouse "open with" Photoshop elements 10, the program start but never image is loaded. This issue is in Italy version. Please tell me is happen also in your vers

  • Creating a formula and the editor does not pop up

    Trying to create a simple formula. Have entered cells in by typing but it will just show the formula and not what the forumla has been designated to do

  • PO part no and SKU part number different

    I have the Material part no on which we want to do Procurement. and put the material in stock and do valuation. Then I have the Vendors part number which is different than above part no. Mans if my material code is ABC then Vendors code may be DFG. I

  • Edited Flash Movie

    FLASH NEWBIE... I purchased a flash website template that I am editing. Having no problems with the edit. However, when I test in my preview on Dreamweaver, it shows the edited movie perfectly. When I go to test it in my browser it shows the original

  • No recovery mode available when recovered from Time Machine

    My MBP has been really annoying ever since I bought it last year; every 1-2 months, HDD file structure is completely messed up which is beyond Disk Utility's recovery capability. So I need to restore entire system from Time Machine after formatting t