Capturing Outbound Interface (In UDF)

Hi,
I have designed a Outbound Interface:
<?xml version="1.0" encoding="UTF-8"?>
<MT_DMS_FINAL>
   <Record>
      <Row>
         <FirstName/>
      </Row>
   </Record>
</MT_DMS_FINAL>
Now i write a Adapter Module to get the File name when the Sender File Adapter picks up the file iot reads the filename with the help of the Adapter Module and adds a element name called Filename to the outbound interface when i see it in the SXMB_MONI.
<MT_DMS_FINAL>
   <Record>
      <Row>
         <FirstName/>
      </Row>
   </Record>
<FileName>test.xml</FileName>  // This element has to be captured
</MT_DMS_FINAL>
Now how to get the element to be used in the Mapping (UDF) i mean .kindly help how to capture the entire xml and write the code to get the "FileName" element in specific,.
Advice
regards
Srini

Hi Venkateswarlu,
For capturing the file name, Adapter Modules are not required. You can directly access it in the mapping using the UDF in the Message mapping using Dynamic Configuration. Use the following UDF. Map it directly to the output field in which you want the filename.
Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName; 
You can follow this blog:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Regards,
Sanjeev.

Similar Messages

  • BPM with 2 JDBC outbound interfaces and one inbound file interface

    Hi,
    I have a scenario where data is coming from  different databases into XI and after processing the data it creates a file at the target side. Some calculations are to be done in the middleware and the result will be sent through a file.
    My question is
    1. BPM will be used in this scenario?
    2. There will 2 outbound interfaces(one for each database access), 2 abstract interfaces and one inbound interface(file). Please correct me if I am wrong.
    3. I have to multiply the value of field from one database to a particular value in another database and get the final result. For e.g exchange rate from one database is multiplied to Transaction currency in another database and get the group currency value in the output. Can anyone give the sequence of steps in the intergration process for this scenario as I am new to BPM.
    Thanks,
    Aparna

    Thanks a lot Liang and madhusudana for your responses.
    Since I can use JDBC lookup for this in my nornal scenario I think no need for BPM.
    I have created the advanced UDF for JDBC lookup code. Below is the code.
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // Build the Query String
    Query = "Select home_cur_code FROM  gltrxcp WHERE company_code = '" + a[0] + "' ";
    try{
    //Determine a channel, as created in the Configuration
    channel = LookupService.getChannel("BS_JDBC_send","cc_JDBClookup_rec");
    //Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    //Execute Query and get the values in resultset
    resultSet = accessor.execute(Query);
    importanttrace.addWarning("resultset" + resultSet );
    for(Iterator rows = resultSet.getRows();rows.hasNext();){
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("HOME_CUR_CODE"));
    importanttrace.addWarning("result" + result );
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());
    But I am not getting the desired result. I am getting result as 'Null'.
    Can you please help in resolving this issue. I have also used trace for find out where it is passing Null and found that 'result' is coming null. Do i also need to parse it before passing it to 'result'?
    Can anyone send sample code for JDBC lookup.

  • Creation of one outbound interface for two diferent senders

    helo.
    i just want to conform ont thing that .
    my scenario is  two diferent files from 2 diferent business systems are sending to one Rfc.
    so i was created only one outbound interface for both senders and one message type bcos the file structure is same for both senders.
    so is there any thing wrong in creating only one datatype,message type,message interface for both senders.
    waiting for your response.
    cheers.
    seeta ram.

    Hi Ram,
    That is perfectly correct when you have two senders and one receiver Scenario and <b>Business Service is different</b>. Then you can use the same Interface.
    Just keep in mind that the key for XI to recognise the Right interface is combination of these 3 parameters:
    Sender Service, Sender Interface and Namespace. These cannot be duplicated.
    When the Message type is same in the sender input data then you can create just one Message Type and One Data type and RFC is anyhow the imported RFC which you need not have to worry.
    In Configuration Scenario you need to configure separately the RD, ID, CC and Agreements for the Interfaces.
    Hope this answers your query. Let us know if you need anymore clarification
    Thanks
    Srini

  • In PI 7.1, condition editor does not show the outbound interface structure

    Hello,
    I am using PI 7.1, I need to use condition whild determing receivers. So I opened the condition editor, then open the expression editor, select XPath instead of Context object. I would expect that the outbound interface structure appears in the box underneath the XPath, so that I can navigate the structure to choose the field I want to use. However nothing appears here. Do you knwo why is that? Or do I need to do anything to bring up the outbound interface structure in the expression editor?
    Thanks
    Jayson

    Hi Jayson,
    I had the same problem
    the use of context objects and the value help for xpath is available for XI3.0 interfaces in PI 7.10 only. The functionality for "new" interfaces has been implemented in 7.11 only.
    you have to use xpath w/o value help.
    I have created a context object in one of our 7.10 test systems, and indeed I was unable to use it in a receiver determination unless the service interface pattern is "Stateles (XI 3.0 compatible)". If you were to change the service interface to that pattern, you have to change the operation name unless it is already identical to the interface name. So that may not be an option for you.
    It was possible to use the context object in a receiver rule but then I could not activate the receiver determination because the software component version was supposedly unknown. I will check with my PI contacts - please let me know if the change to "XI 3.0" interface would be a possible workaround for you.
    Try the steps which I am giving below, although it's a workaround and don't know the exact reason why it is failing.
    1. Open your Outbound Message Interface (which you are using in your Receiver Determination) in IR, edit it and change the Interface pattern (which is there just below the category "Outbound") to "Stateless (XI30 - Compatible)" , save it activate it.
    2. Follow the same step for your Inbound Message Interface. Change the Interface Pattern from "Sateless" to "Stateless (XI30 - Compatible)" .
    3. Go to ID. Remove your Outbound and Inbound Message Interface from their respective Business Service/Comp and add it again.
    4. Create your your receiver determination again using the Outbound and Inbound MI you have changed.
    5. Open condition editor of your receiver determination.You should be able to see your Message Interface and can choose the XPath.
    Thanks,
    Raj
    Edited by: raj reddy on Jan 21, 2009 5:41 PM

  • Outbound interface determination in file adapter?

    In my scenario files with different schemas can be send to XI from the same directory using the file adapter (so each file has a different interface that must be mapped etc.).
    I cannot add multiple interfaces to the file adapter in sender agreement and determine the outbound interface by some condition. Interface must not be "*".
    I thought about creating multiple file adapters (all listening to the same directory) and sender agreements. Each adapter is listenig to specific file type only (e.g. *.yxz, *.abc). So before putting the files to the input directory the file extension must be changed so that only the right adapter reads the file and XI gets the right interface.
    Is there abetter way to do this???

    These blogs will be usefull i guess..
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken]
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi
    /people/ravikumar.allampallam/blog/2005/02/17/bridging-the-sync-async-bridge-with-fork-xi
    /people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
    /people/daniel.graversen/blog/2006/09/07/using-a-bpm-to-collect-messages-for-a-set-interval-of-time
    Reward points if usefull........

  • Outbound interface file for the employeesu0092 deduction information from the d

    How to Create an Outbound interface file for the employees’ deduction information from the different Payroll Companies.
    Thanks in advance.
    Regards
    vamsi.

    Hi,
    The requirement seems to be similar to the one posted in the link https://forums.oracle.com/thread/848476. Please check.

  • Outbound interface using dataset

    Hi,
         Please send me example program for outbound interface to maintain file in application server.
    Thanks
    Ali

    Hi,
    the code should look like below.
    declare:
    filepath_name TYPE rlgrap-filename,
    internal table itab.
    **Populate data to itab.
    OPEN DATASET filepath_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc = 0.
            LOOP AT itab.
              TRANSFER itab TO filepath_name .
            ENDLOOP.
          ELSE.
            MESSAGE i001(00) WITH 'Error writing to file in remote computer'.
          ENDIF.
          CLOSE DATASET filepath_name .

  • Outbound interface program for downl;oading text file

    Hi,
    I m working with outbound interface program which downloads text file into application and presentation server upon the selection.
    My probelm is
    The data format in the text file
    Whenever interface sends 1 record to the text file and next record should start continuation to the first record with
    seperator like some synbol.
    Please tel me posr the sent for this

    Hi,
    I m working with outbound interface program which downloads text file into application and presentation server upon the selection.
    My probelm is
    The data format in the text file
    Whenever interface sends 1 record to the text file and next record should start continuation to the first record with
    seperator like some synbol.
    Please tel me posr the sent for this

  • Problem with Outbound Interface for Party in Standard XI Content for SNC

    Hi All,
    I am configuring a standard XI Content for SNC, the ASN Processing (DIMP ERP Backend). The provided Integration scenario involves three swim lanes which corresponds to an ERP, SCM and an external system. The external system is as an application component that is designed for B2B communication, i.e. a service with party which is called Supplier. 
    The first action within the scenario is Create ASN in the Supplier swim lane and send a message to the action "Receive ASN and update inventory(in transit)" within the SCM system swim lane. I have created a sender party that corresponds to the Supplier swim lane and also a receiver party that corresponds to the SCM system.  I used the Integration Scenario Configurator to assign services and also all the comm. channel. However, when i try to generate the logical routing objects and collaboration agreements, i get the error message that there was no outbound interface associated with the sender(the external system) defined for the first action. There is no option within the Integration Scenario Configurator on how to assign/define the outbound interface that I want to use for the sender.
    I have no idea how to assign the outbound interface to the action for the Supplier swim lane in an Integration Scenario that is from an XI Content. Has anybody configured something similar or come across the same problem?  Any info will be much appreciated.
    Luqman

    Hi,
    This could be the problem of confilting namespace or combinations.
    in receive action just check that right message interface is configured at Inbound side.
    just check any place void ?
    1)just check the name as case sensitive.
    2)Just check is there interface belongs to right software component.
    3)Just check mapping assigned to the right combination or not.
    its better to cross check all the component are assigned to right place or not.
    ****if helpful then rewards points
    Regards,
    Sumit Gupta

  • More than one outbound interface for the webservice scenario

    Hi Experts,
    Is it possible to have more than one outbound interface for the Webservice synchronous scenario? I have tried it , but I couldn't implement it.
    I would like to have your suggestions.
    Regards
    Sara

    Hey,
    Creation of a wsdl file
    /people/riyaz.sayyad/blog/2006/05/07/consuming-xi-web-services-using-web-dynpro-150-part-i
    N:1 seemz he was refering to multimapping scenario.
    <b>Cheers,
    *RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • Driver program for outbound interfaces

    hi
    i am having 5 outbound interfaces for which i need to make a driver program
    in my driver pgm i need to make a selection screen which consists of 2 radio buttons
    1 . presentation server
    2. application server
    when we select presentation server all the 5 inerfaces prestation server down load path must execute at a time .
    in the same way if we select application server all 5 interfaces application servers must execute
    can any one help with sample code
    urgent
    regards
    sachin

    Hi sachin,
    can you explain a little more about ur req, like what do you mean by "down load path must execute at a time"
    Regards
    Raj

  • How to place Outbound Interface file in APPS SERVER?

    Hi Guys,
             Actually I'm running the below pl\sql procedure for the OutBound interface file.
    CREATE OR REPLACE procedure GE_INV_Out_BAL(Errbuf OUT varchar2,
                                           Retcode ouT varchar2,
                f_id    in number,
                t_id    in varchar2) as
    cursor c1 is select
           msi.segment1 item,
        msi.inventory_item_id Itemid,
        msi.description  itemdesc,
        msi.primary_uom_code Uom,
        ood.organization_name name,
        ood.organization_id   id,
        mc . segment1||','||mc.segment2 Category
        from
        mtl_system_items_b           msi,
        org_organization_definitions ood,
        mtl_item_categories          mic,
        mtl_categories               mc
        where
        msi.organization_id       = ood.organization_id
        and msi.inventory_item_id = mic.inventory_item_id
        and msi.organization_id   = mic.organization_id
        and mic.category_id       = mc.category_id
        and msi.purchasing_item_flag = 'Y'
        and msi.organization_id between f_id and t_id;
    x_id     utl_file.file_type;
    l_count  number(8) default 0;
    begin
              x_id:=utl_file.fopen('/u02/oracle/SUPPORT1','invoutdata.dat','W');
               --select * from v$parameter where name like '%utl_file%'
    for x1 in c1 loop
    l_count:=l_count+1;
    utl_file.put_line(x_id,x1.item    ||'-'||
            x1.itemid  ||'-'||
            x1.itemdesc||'-'||
            x1.uom   ||'-'||
            x1.name   ||'-'||
            x1.id   ||'-'||
            x1.category   );
    end loop;
    utl_file.fclose(x_id);
    Fnd_file.Put_line(Fnd_file.output,'No of Records transfered to the data file :'||l_count);
    Fnd_File.Put_line(fnd_File.Output,' ');
    Fnd_File.Put_line(fnd_File.Output,'Submitted User name  '||Fnd_Profile.Value('USERNAME'));
    Fnd_File.Put_line(fnd_File.Output,' ');
    Fnd_File.Put_line(fnd_File.Output,'Submitted Responsibility name '||Fnd_profile.value('RESP_NAME'));
    Fnd_File.Put_line(fnd_File.Output,' ');
    Fnd_File.Put_line(fnd_File.Output,'Submission Date :'|| SYSDATE);
    Exception
    WHEN utl_file.invalid_operation THEN
      fnd_file.put_line(fnd_File.log,'invalid operation');
      utl_file.fclose_all;
    WHEN utl_file.invalid_path THEN
      fnd_file.put_line(fnd_File.log,'invalid path');
      utl_file.fclose_all;
    WHEN utl_file.invalid_mode THEN
      fnd_file.put_line(fnd_File.log,'invalid mode');
      utl_file.fclose_all;
    WHEN utl_file.invalid_filehandle THEN
      fnd_file.put_line(fnd_File.log,'invalid filehandle');
      utl_file.fclose_all;
    WHEN utl_file.read_error THEN
      fnd_file.put_line(fnd_File.log,'read error');
      utl_file.fclose_all;
    WHEN utl_file.internal_error THEN
      fnd_file.put_line(fnd_File.log,'internal error');
      utl_file.fclose_all;
    WHEN OTHERS THEN
      fnd_file.put_line(fnd_File.log,'other error');
      utl_file.fclose_all;
    End GE_INV_Out_BAL;
                                     It is working nice.The interface file is going and placed in the given path of the DB server.But the Requirement is the file should be placed in the app server.Is their method to place the file Directly in App server.please convey your suggestions.

    Hi,
    The requirement seems to be similar to the one posted in the link https://forums.oracle.com/thread/848476. Please check.

  • Oracle EBS Inbound/Outbound Interface build using Oracle SOA 11g

    Hi SOA Guru's,
    I am very much new to SOA 11g, could you guy's help me in understanding "How I can build any Oracle EBS Inbound/Outbound interface using Oracle SOA 11g"
    It will be great if anybody explain me with any example script/screen shot/document.
    Thanks in advance.
    Regards
    Pankaj

    I don't have any experience with ebs, but i assume it works like this.
    In the composite editor you will find a list adapters at the right..over here you will also find the oracle applications (ebs) adapter.
    This will be the component for you which will communicate with the ebs packages.
    you need to drag this adapter on the swim lane, and after that you should create the composite application like the way it's described in the tutorials Oracle supplies, put a mediator component in the middle and expose this interface (drag the line to the left swim line)
    Hope it's a bit clear like this ?
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10224/fod_intro2.htm
    this should make a few things clear too

  • Regarding Inbound and outbound interfaces in ABAP HR

    Hi,
    Iam new to SAP. Can you send the document related to Inbound and Outbound Interfaces in detail.
    i.e What these interfaces comes under and steps to develop these inerfaces.
    Thanks&Regards,
    B.Thulasi.

    Hi,
    Iam new to SAP. Can you send the document related to Inbound and Outbound Interfaces in detail.
    i.e What these interfaces comes under and steps to develop these inerfaces.
    Thanks&Regards,
    B.Thulasi.

  • How to do an inbound and outbound interfacing using UTL_FILE ?

    dear members,
    How can we do interfacing from a legacy system to oracle and vice versa using the UTL_FILE package. I mean how to do an INBOUND and OUTBOUND interfacing using utl_file.
    regards
    sandeep

    in/
    file/
    bad/
    done/
    out/
    file/
    bad/
    done/
    I would start by ftping / putting the file in in/file/ folder, once ftp has completed move it to complete/ folder and process the file. If errorrs are generated move the file over to bad folder. If completed successfully move over to done folder.
    Having said that you would use UTL_FILE_DIR init parameter to set your directory.
    ALTER SYSTEM SET UTL_FILE_DIR='directory1','directory2' scope=spfile;
    Then you would use the regular utl_file packages to read / write to the files.
    UTL_FILE.FOPEN and so on.

Maybe you are looking for