Proxy to file using dynamic configuration

Hi Frnds,
I  have a scenario ABAP_Proxy-XI-File, here in the proxy I am getting a pdf file with xml as attachment now I need to save the pdf file to the target folder with the name availble in one of the fields of attached xml file.
I have used Adapter specific attributes option for filename substitution but getting the follwoing error:
Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
Please anyone can help me in overcoming this issue.
Regards
shiva

U have a limitation here. At XI u can read only 1 file (pdf or xml). Bcoz receiver file adapter will not support attachment. pdf is required bcoz u need to transfer it to receiver. Xml is also required bcoz the directory name is inside that xml
The workaround could be creating an adpater module that passes the directory name as well. U should send pdf file with xml as attachment.
If u have the dir name, then the dynamic configuration code should be like this
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key,MappedDirectoryName);
This MappedDirectoryName should be the name passed through payload. The receiver file communiation channel must have dummy dir name
Regards,
Prateek

Similar Messages

  • Problem:obtaing file name using Dynamic configuration of file adapter

    hi all
    I am using Dynamic configuration for getting file name.
    I am getting Dynamic configuration in SXMB_MONI containg file name, but payload is empty unlike file i am sending.

    Hi All,
    Basically my requirement to get Filename in idoc segments in order to validate the posting at month end.
    Its an File to idoc scenario- GL Posting.
    Please check attached UDF and it gives error. Kindly help. Thanks

  • Getting file directory using dynamic configuration:Code needed

    Hi,
    I need the code for getting the source file directory name using dynamic configuration. Also, an explanation on how it can be used in mapping for comparison.
    Thanks,
    Vishal

    Hi Vishal,
      Refer  carefully the following blog by micheal to get the  Attributes dynamically during runtime by enabling the Adapter Specific message Attributes in adapter level.
      /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Create an UDF in mapping with no input parameters to it and include the piece of code and use it according to your requirement in mapping.
    //write your code here
    try{
    String filedirectory    = "";
    DynamicConfiguration conf1 = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","Directory");
    filedirectory = conf1.get(key1);
    return filedirectory;
    catch(Exception e)
         String exception = e.toString();
          return exception;
    Thanks,
    Ram.

  • Change Directory Path using Dynamic Configuration

    Hi,
    We have a requirement where the directory path for placing the files is different across our different environments. Ex: Development Environment has a different path than the Quality Enviornmnet. Also the full path is depending on fileds within the message.
    I want to use Dynamic Configuration to create the Directory path. But in order to capture the full requirement I need to know wheich environment I am within the User Defined Function.
    Can someone provide me the java class and function that I can use in my UDF to read the environment I am in.
    ( Essentially I want to read Sy-SYSID in ABAP...using Java. )
    Regards,
    Arunava

    Hi Arunva,
    >>Essentially I want to read Sy-SYSID in ABAP...using Java.
    It might not be possible to read system id in java, but you can read the sender or receiver service(SENDER_SERVICE or RECEIVER_SERVICE) and based on it can decide the diretory in DynamicConfiguration.
    If you have a sender or receiver SAP sysem then better to read its name because this business systm ill haeunique name aross different environment. Check this thread too
    User-defined function: RFC call
    Regards
    Suraj

  • Using Dynamic Configuration api for SOAP adapter

    I want to use Dynamic Configuration api to send a SOAP request to a webservice.
    tha value in my adapter is
    my Target URL  is
    http://xidr3.bcs.de:50000/XISOAPAdapter/MessageServlet? channel=:Routing2_Service:SS_SOAP_Sender_Working_June12&nosoap=true
    which is the corresponding field i have to set in Dynamic Configuration?
    I have written the following code is this right?
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    String temp = "http:/"+"/sap.com/xi/XI/System/SOAP";
    DynamicConfigurationKey key = DynamicConfigurationKey.create(temp, "TServerLocation");
    String varURL =
    "http:/"+"/xidr3.bcs.de:50000/XISOAPAdapter/MessageServlet?channel=:Routing2_Service:SS_SOAP_Sender_Working_June12&nosoap=true";
    conf.put(key,varURL);
    return "";

    Hi,
    Yes, your code looks fine. Can you let me know what is the error you are getting. Have you checked the Flag in your communication channel.
    Use Adapter-Specific Message Attributes
    Variable Transport Binding 
    Once you test your scenario you can see the Dynamic URL in your message Header by going to tcode sxmb_moni. See if you are able to find something called DynamicConfiguration in your message haeader. If yes what is the value set there.
    PS: From the target URL you posted It looks like your webservice is hosted on the XI box itself. Is it the same XI box or different box? Just curious to know.
    Reward point if answer is helpful
    Thanks
    Amit

  • Accesing Runtime Parameters using Dynamic configuration

    Hi..
    Can we access  the following  parameters from mapping using DYNAMIC CONFIGURATION key?
    <SAP:TraceLevel>1</SAP:TraceLevel>
      <SAP:LogSeqNbr>000</SAP:LogSeqNbr>
      <SAP:RetryLogSeqNbr>000</SAP:RetryLogSeqNbr>
      <SAP:QIdInternal>XBTI0001</SAP:QIdInternal>
    Please let me know how to access
    Thanks
    Ram

    Hi Ram,
        I dont think we can achieve this one,only two ways to read any values at mapping level
    1)Dynamic Configuration--Option ruled out....not possible,
    2)Write some java coding to read the value,i think this one also not work it out.
    your req unique..i am looking for answer..:)
    Cheers,
    Raj

  • Use dynamic configurations inside an abap proxy

    Hi,
    is it possible to set dynamic configurations inside an abap proxy?
    Inside an abap-mapping I can use "CALL METHOD DYNAMIC_CONFIGURATION->SET_RECORD".
    What's up with an abap proxy?
    Regards
    Wolfgang Hummel

    Hi,
    Not Possible.
    Thanks!

  • Using dynamic configuration to modify parameter in sender channel?

    Hi,
    I would like to be able to set the filename in an SFTP sender communication channel (based upon a name determined at runtime, which is read from another file).
    My understanding is that parameters set in dynamic configuration can only be set as part of mapping therefore I cannot see how to set these before my sender communication channel is invoked.
    Please can someone confirm if there is a method of achieving this requirement.
    Thanks,
    Alan

    Hi,
    >>>My understanding is that parameters set in dynamic configuration can only be set as part of mapping therefore I cannot see how to set these before my sender communication channel is invoked.
    they can be set anywhere in the message flow - in adapter modules too for example
    >>>I would like to be able to set the filename in an SFTP sender communication channe
    you cannot set it before the adapter starts polling from anything else
    what you can do is to create a file -> java proxy (sftp) - anything flow
    read this another file first -> call SFTP from a java proxy in a sync way to fetch the second file using the name from the first one -> do anything else what you need
    you can also do the same with one adapter - axis (put the file fetching and sftp call inside one class)
    but it  requires some java knowledge - but it would work in one sender adapter in this case
    Regards,
    Michal Krawczyk

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

  • File Adapter dynamic configuration

    Hi,
    I would like to know how to configure location,polling frequency, file name dynamically at runtime.?
    Is there any possibility to read configuration/property file at time?
    Regards,
    Govind

    Which SOA Suite Version you are using ? You can change the directory and file details. Pls refer Re: Get File name using File Adapter Hope that will help you.

  • Client proxy to file(xml) scenario configuration

    I have done client proxy to file (xml) ,while executing abap code there is no error, but xml msg is not received in particular target directory. so i want to know about 1. What are the configuration required for client proxy to pi(with T.Code).
                                                           2.how to monitor client proxy in ecc and pi.
    please reply me

    1. What are the configuration required for client proxy to pi(with T.Code).
    step1:
    1.       Create a HTTP connection in the business system using transaction SM59
    Technical Setting & Logon Security details:
    u2022         Connection Type: H
    u2022         Target Host: System name
    u2022         Service Number: HTTP Port name
    u2022         Path Prefix:
    step2:
    2.       Configuration Business system as local Integration Engine.
    1.       Go to Transaction SXMB_ADM
    2.       Choose Edit --> Change Global Configuration Data.
    3.       Select Role of Business System: Application system
    step3:
    check maintain SLD Access data / not by using T.C  SLDAPICUST
    SLDAPICUST->check  XI Server is it activate/not
    step4:
    4.test LCR Connection by using SLDCHECK.
    2.how to monitor client proxy in ecc .
    trigger the report by using T.c se38 and check the status in SXMB_MONI in ECC.
    Edited by: bhavanisankar.solasu on Feb 13, 2012 11:09 AM

  • Proxy to File using EOIO

    Hi Experts,
    I have a scenario where I need to send data from SAP to PI so I am using proxy to file scenario. Here i need to send huge amount of data.
    In some blog i saw that proxy can handle only some maximum amount of data.(but not 100% sure how much size of data the proxy can handle)
    So i decided to call the proxy multiple times by sending only some 'n' no. of records and kept the receiver file adapter in append mode.
    The problem here is the data is not appending in the order in which i am sending from SAP. In sxmb_moni the messages were showing the QoS as 'EO'.
    Is it possible to change the QoS to EOIO?
    Thanks & Regards
    Stephen Rouvier

    From SAP documentation:
    "The sender of a message uses the attribute Quality of Service (QoS) to determine how a message is delivered"
    hence ..as the File adapter supports all Qos, the Proxy can be called with Qos EOIO and the adapter will maintain the Qos as requested.
    You should how ever try and send the data in a bulk and see how the Proxy handle it.
    What is the nature of the data exported and for what purpose?

  • Example of obj.conf file using dynamic headers/footers

    Just a quick query. I'm trying to use dynamic headers/footers and I've read
    the notes on:
    http://docs.iplanet.com/docs/manuals/enterprise/50/ag/essearch.htm#26999
    I cant seem to get it to work. Could you send me an example of an obj.conf
    file so I can get mine to work?
    Many Thanks in Advance,
    Mian Amar Ahmad

    Thanks. I followed the guidance of the 3 links you provided. I thought what I coded in the obj.conf was working.
    <If $uri =~ "^/dynamic/(.*)$">
    NameTrans fn="restart" uri="/$1?$query"
    </If>
    But, I later found that this fails when the method is a GET and the query-string is null and when the method is a POST. I need all GETs and POSTs starting with "/dynamic" to have it stripped and "restarted". So, I modified my original config to make POSTs work. So now I have the following code:
    <If $method eq "POST" and $uri =~ "^/dynamic/(.*)$">
    NameTrans fn="restart" uri="/$1"
    </If>
    <If $method eq "GET" and $uri =~ "^/dynamic/(.*)$">
    NameTrans fn="restart" uri="/$1?$query"
    </If>
    Now, I'm left with trying to get it working for GETs where the query-string is null. I'm not quite sure how to do this? Do you have any suggestions? It seems like the code is getting pretty crazy just to perform this functionality, Is there a simplier way that I am not seeing?

  • Managing recorded files using dynamic page.

    Hi all,
    I have an app that record the user's voice, each time in one
    different file
    adding an index to the end of the file name.
    rec_tom1.flv, rec_tom2.flv....
    I'm having some problems trying to recover this names
    I need to know if it's possible list this recorded files
    using a dynamic
    page. I have a web host at host A that will have an asp page
    pointing to my
    FMS host B, this page will list the flies and return it to my
    flash app,
    then I 'll load this in a list box.
    in the dynamic page at some point I'll need the PATH to the
    FMS server....
    this is where thigns fail....
    I've tried to point using as path the "rtmp + account name"
    without success.
    So, I need to know if first this is possible, then if so, try
    to figure out
    the correct path to it.
    best
    rodrigo.

    Central comes with predefined tasks PGCNTGET and PGCNTSET (see below). Create a job that includes both thses JFMERGE steps. PGCNTGET will run through the job, count pages and direct output to -zNUL. PGCNTSET will run through the job again and this time have the number of pages stored in variable @pagecount and direct the output to -z@PhysicalDev
    If you create a data field PAGES on your template you can pass this into the field:
    ^GLOBAL PAGES
    Page @$PAGE. of @PAGECOUNT
    Tasks:
    PGCNTGET "@MDFName." "@InFile." -l -apr"@PreambleName." -all"@LogFileName." -asl@SkipLines -amq@ManagedMem -ams"@MSTName." -m@Macro#.@LoadFlag -z"@PhysicalDev." @PrintDirectorParms. @OtherJobTokens. -aii"@IniFileName."
    PGCNTSET "@MDFName." "@InFile." -l -apr"@PreambleName." -all"@LogFileName." -asl@SkipLines -amq@ManagedMem -ams"@MSTName." -m@Macro#.@LoadFlag -z"@PhysicalDev." @PrintDirectorParms. @OtherJobTokens. -aii"@IniFileName." -advglobal:pagecount=@NumberPages.

  • Spool SQl data into text file using dynamic sql

    Hi,
    I am spooling output data into text file using command
    select 'select t.mxname,bo.lxtype,t.mxrev'||chr(10)||'from mx_1234567'||chr(10)||
    'where <condition>';
    here mxname varchar(128),lxtype(128),mxrev(128) all are of varchar type.I want the output in format
    e.g Part|1211121313|A
    but due to column width the output,I am getting is with spaces.
    "Part then blank spaces |1211121313 then blank spaces |A"
    how can I remove these spaces between columns.I used set space 0 but not working.
    Thanks in advance.
    Your help will be appreciated.

    Hi Frank,
    I have seen your reply for SET LINE SIZE function. But, I could not be able to understand it.
    I am facing similar kind of issue in my present project.
    I am trying spool more than 50 columns from a table into flat file. Because of more column lengths in few columns, i am getting space. There are so many columns with the same issue. I want to remove that space.so that, data can fit perfectly in one line in .txt file without any wrap text.
    Below is my sample query.sql. Please let me know the syntax. My mail id : [email protected]
    --Created : Sep 22,2008, Created By : Srinivasa Bojja
    --Export all Fulfillments
    --Scheduled daily after 1:00am and should complete before 3:30am
    WHENEVER SQLERROR EXIT SQL.SQLCODE
    SET LINESIZE 800
    SET WRAP OFF
    SET PAGESIZE 800
    SET FEEDBACK OFF
    SET HEADING ON
    SET ECHO OFF
    SET CONCAT OFF
    SET COLSEP '|'
    SET UNDERLINE OFF
    SPOOL C:\Fulfillment.txt;
    SELECT SRV.COMM_METHOD_CD AS Method,
    SRV.SR_NUM AS "Fulfillment Row_Id",
    CON.LAST_NAME AS "Filled By"
    SRV.SR_TITLE AS Notes,
    SRVXM.ATTRIB_04 AS "Form Description"
    FROM SIEBEL.S_SRV_REQ SRV,
    SIEBEL.S_SRV_REQ_XM SRVXM,
    SIEBEL.S_USER USR,
    SIEBEL.S_CONTACT CON
    WHERE SRV.ROW_ID = SRVXM.PAR_ROW_ID AND
    SRV.OWNER_EMP_ID = USR.ROW_ID AND
    CON.ROW_ID= SRV.CST_CON_ID;
    SPOOL OFF;
    EXIT;

Maybe you are looking for

  • SAFARI FREEZES MY MACBOOK Pro retina  ALL THE TIME, HOW CAN I FIX IT ?

    Safari freezes all the time my Macbook Pro and I have to restart it. Is it a problem of Safari or Yosemite ? How can I fix it ?

  • Certificate problem / STRUST

    Hi everybody I tired to setup a HTTPs connection. Therefore I maintain a HTTP destination (Type G) under SM59. Under STRUST I imported the certificate. I expected now to be able to assign the certificate under SM59 to my HTTP connection under SSL Cli

  • How to create a black and white text clip?

    I'm using pro Cs4 and was wondering how do I create a black and white text clip?  When I used Vegas there was a clip I could put in, and simply write whatever I needed. Still getting used to Pro Cs4 and was wondering if anybody can help me. Thanks!

  • "Error" type noise

    Every now and then my computer makes an error type of a noise. Nothing happens on the screen and it's at random times. For instance, sometimes I'm typing and it does this, sometimes I'm moving around the curser and it will do it too. What could cause

  • Xcelsius Set Up Problems

    I am trying to set up a new copy of Xcelsius Engage 2008.  When License Manager pops up it asks me for my Xcelsius Key Code which I type in EXACTLY as it is stated on the card I received in the box: <keycode deleted> I am told that this key code is i