Abap Mapping - Specify file name

Hi there
Is it possible to specify the flat file's filename in the abap mapping? I need to create several flat files with abap mapping and each file uses the same receiver adapter but have a different name..
Thanx,
Jan

Hi Jan,
>The variable mechanism only seems to work if you specify the filename before you execute the abap mapping
aeh, no
>Or in the abap mapping itself set the filename
yes
You need a XML element like <filename> in your target message, there you store the filename (by ABAP mapping).
At adapter side you define the filename with %myVariable%
And finally you need to fill the variable, choose payload: myRootElement,1,filename,1 for example, if this is your structure. Have a look to Variable substituion at SAP help [Configuring the Receiver File/FTP Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
Regards,
Udo

Similar Messages

  • How to read a ftp file with a specified file name in Proxy-XI-File scenario

    Dear all,
    I have the following requirement:
    The end user send a request via the proxy to XI, within the request parameters there is a file name, and the XI need to retrieve the file content from a ftp server with this specified file name, how can I achieve this?
    According to my understanding, the file receiver adapter can only write the files to the server.
    Thanks and regards,
    Bean

    Dear Bean,
    This can be achieved using a BPM...
    you will have to use Two parallel receive steps within a fork...
    1. 1st receive step :This will bring the data from the proxy
    2. 2nd receive step :according to pipeline step before this step would be executed interface determination would be called withini that you can put a mapping wherin the source and target message type would be as follows
    a. source message type ; the file structure that is going to be picked from ftp structure
    b.target message type : same structure as source except at top you will add "filename" field
    (you cna find on forum how we can get a fielname in the mapping ..in case you dont knw )
    3. now you can define correlation on the field "fielname" in both the receive steps provide the hirearchy and structure of data coming from both file and procy are same...
    4..  after corelation you can put any steps like transformation ( as you want)
    Hope this helps

  • SFTP sender to File receiver mapping of file names

    My scenario is: sender channel = SFTP (Seeburger) transferring multiple PDF files to Receiver adapter File (NFS).
    These PDF files need to have the same name as the original files from the sender (3rd party) system.
    Because these files are being processed without an interface, I can't use UDF to help map the file names.
    I've tried using Seeburger's localejbs/Seeburger/AttribMapper to map the names, as follows:
    File (NFS) receiver channel config:
    - ASMA boxes for 'Use Adapter-Specific Message Attributes' and 'File Name' are ticked
    - Module localejbs/Seeburger/AttribMapper is on the first line in the module tab under processing sequence, with module key = AttributeMapper
    - Under Module Configuration: 
      - Module Key = AttributeMapper
      - Parameter Name = http://sap.com/xi/XI/System/File/FileName
      - Parameter Value = @http://seeburger.com/xi/SFTP/dtSubject
    (I haven't entered any attribute module config on the sender side)
    This setup fails on the receiver side with the message 'Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.RetryControlException: Channel stopped by administrative task.' (not very helpful!).  All I can get from that is that it doesn't like my module configuration!
    Can anyone help me understand the correct way to do the file name mapping for my specific scenario?
    Regards,
    Christine

    We've got this working at last!
    The main problem was indeed the missing .sca file from Seeburger:  SeeModuleCollectionPI.sca
    Our Basis team deployed this file this morning.  After a bit of fiddling around with the attribute mapping, my test files were transferred successfully with their original names.
    The config I ended up with is just as described in another forum post for SFTP to FTP, but I'll repeat it in more detail here:
    Sender channel
    Parameters tab:
    Adapter Type = SFTP (Seeburger)
    (sender, transport & message protocol = SFTP)
    Scheduler = x in all appropriate days, with interval = 1 (minimum allowed)
    (rest here is specific to your environment, but I set filename to *.pdf to get all .pdf files from the sender)
    Module tab
    Processing Sequence
    Number  Module Name                                          Type                                          Module Key
    1            localejbs/Seeburger/AttribMapper          Local Enterprise Bean     AttribMapper
    2            localejbs/Seeburger/solution/sftp           Local Enterprise Bean     solutionid
    3            localejbs/CallSapAdapter                   Local Enterprise Bean     exit
    Module Configuration
    Module Key        Parameter Name                                               Parameter Value
    AttribMapper          http://sap.com/xi/XI/System/File/FileName         @http://seeburger.com/xi/common/dtSubject
    Receiver Channel
    Parameters tab:
    Adapter type = File
    (receiver, with transport protocol File System (NFS), etc)
    Target tab:
    Target directory (set to your required PI server directory)
    File Name Schema = * (can be anything, will be ignored)
    Processing tab:
    (your requirements-specific settings - mine were create, write directly, file type binary)
    Advanced tab:
    Under Adapter-Specific Message Attributes (ASMA):
    tick the following:
    Use Adapter-Specific Message Attributes
    Fail If Adapter-Specific Message Attributes Missing
    File Name
    Modules tab:
    Processing Sequence
    Number  Module Name                                          Type                                          Module Key
    1            CallSapAdapter                                       Local Enterprise Bean     0
    (nothing under Module Configuration)
    Thanks to those who kindly took the time to try and help me, your suggestions pointed me at the real problem.
    Christine

  • How to modify 'Specified File Name' of a scheduled report

    I run a daily scheduled report every morning and send it out as an emailed attachment. My problem is, I want the file name of the pdf attachment to include the previous day's date. How can I modify the 'Specified File Name' setting in the destination tab to reflect the previous day's date. I do not want to use %SI_STARTTIME% because that only shows the date&time that the report was actually run....I need the previous date. So far I am unsuccessful.
    Thanks

    Hi,
    i think this is only possible via the SDK. I would recommend creating a Support Message with SAP to solve this issue.
    Maybe there is already Samplecode available from the Support.
    Regards
    -Seb.

  • Specifying file name for ServletOutputStream ?

    Hello,
    How can I specify a file name for a ServletOutputStream ? The code below always defaults to file name "MinimalBinaryStream" ?
    Thanks for your help !!!
    James
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class MinimalBinaryStream extends HttpServlet
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        doGet(request, response);
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("application/octet-stream");
        response.setContentLength(3);
        ServletOutputStream bout = response.getOutputStream();
        bout.write(0x31);
        bout.write(0x32);
        bout.write(0x33);
        bout.flush();
        bout.close();
    }

    Thanks nantucket,
    I have solved the problem by editing my "web.xml" file, for example:
    <web-app>
        <servlet-mapping>
            <servlet-name>MinimalBinaryStream</servlet-name>
            <url-pattern>/myfile.bin</url-pattern>
        </servlet-mapping>
    </web-app>

  • Mapping Dynamic File Names - JDev 10.1.3.1.0

    It is important for me to be able to capture the name of the inbound file while mapping in the XSL builder. I need it to be mapped to an XML value on the target side. The file name will be dynamic so it will not be possible to hard code it. Is anyone aware of a tool that can do this for me? I would only like the absolute name of the file, not the entire path.
    Thanks, Eric

    Perhaps better late than never...
    This is a limitation in JDeveloper that it cannot render an XSL in design/mapper view when it contains these features of XSL. Pretty much 100% of AIA transformations fall into this category.

  • How do i map from file name to the device it resides on

    hi
    i need to find a way to map from a file name to the disk device it resides on( so i can do ioctl to that device ).
    i know that stat(2) returns a dev_t value, but i don't know how to translate from that dev_t to the device name( e.g. /dev/dsk/c0d0... )
    THANKS
    Gabriel

    thanks for the reply,
    i'm using a similar mechnisem on linux - using getmntent(3) to find the longest prefix of the filename realpath(3).
    i was actually looking for a mechnisem similar to the devname(2) syscall on the BSD os. with this call the kernel do all the work for you simply by mapping from dev_t( which the kernel stored in the indoe) to the device name by keeping a simple mapping table.
    if this mechinsem doesn't exists i will have to (eventually) duplicate the kernel work(namei) and create my own mapping.
    THX
    gabriel

  • Mapping physical file name to logical file name

    Hi All,
    Can anybody let me know wht is the procedure to map a logical file name to physical file name. wht is the use of logical file name when there exists physical file name?
    Thanx in Advance

    As far as creating the Logical path  it’s done through the transaction code ‘file’ by using options
    Steps are:
    1. Logical file path definition which is logical file path name.
    2. Assignment of physical path to logical path - where we give the physical path to the logical path name defined in the last step.
    After creating the Logical path the procedure to attach the file name to the Logical path is as follows:
    Use the function Module C13Z_FRONT_END_TO_APPL to upload the file from the front end to the application server.
    Source file on front end will be the CSV file path which is to be uploaded to the application server
    Target file on application server will be the physical path of the file on the application server where the file is to be uploaded.
    Attach the physical path of the file on the application server to the Logical file using transaction code ‘file’.
    Logical File:   The Logical name of the file which will be used by the interfaces to upload the file
    Physical file:  The name of the physical file on the application server
    Logical path:  The path of the physical file on the application server where it is stored.
    The possible reason for the use of Logical file name could be we can have directories within SAP in which we can have logical files stored. These files can be used by various interfaces. Different Logical paths can be used for different interfaces. the second reson can be to give more user friendly name to the file rather than a long physical name to the file.

  • Map source file name in target payload.

    Dear All,
    I have an interfacing scenario in which I want to populate a IDoc(target) field with the Source xml File Name.
    How can I do this in graphical mapping?
    If theres a UDF, plz guide me on the code.
    Help!!
    Thanks.

    If theres a UDF, plz guide me on the code.
    DynamicConfiguration is teh concept that you need and Rajesh has already pointed you to teh blog.
    This has been discussed and re-discussed almost every other week. Please run a simple search before raising a query.
    Regards
    Soumen...

  • Print to PDF and specify file name.

    Hardware/Software Details:
    MacBook 2GHz Intel Core 2 Duo
    OS 10.5.5
    Adobe Acrobat Professional 8.1.2
    Hey all,
    I'm a teacher and I've been scripting PDFs for use as marking sheets for assignments. What I'm trying to achieve is a situation where I tick all the boxes, marks are calculated and comments filled-in using my form fields (which all work fine) and then produce a PDF from that file with the student's name as the new file name (which is where I'm stuck!).
    In the past, I've had a button that on mouseOver brings the field with the student's name into focus, mouseDown evoked the File:Copy menuItem (copying the student name to the system's clipboard) and then mouseUp which triggered File:Print from which I would choose 'Adobe PDF 8.0' as the printer, hit Save, paste the student's name as the file name and choose the appropriate directory.
    File:Copy is no longer a "safe" menu item according to the latest versions of Acrobat, so I'm having to manually copy the name which is complicating the process further.
    I'm working on a script activated by the mouseUp of a button in this PDF which is currently looking like this:
    >var pp = this.getPrintParams();
    // format name to remove spaces and commas
    var studName = this.getField("Name").value.split(",").join("_").split(" ").join("");
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.printerName = "";
    pp.fileName = studentName + ".ps";
    this.print(pp);
    Although the console will list 'AdobePDF8' as one of my printers, I've since discovered that "the destination printer cannot be set through this property in Mac OS" :( . I can set it as my default printer to work around it, but I still can't dictate the name of the new file. So, I've resorted to printing to PostScript with the aim of running them all as a batch through the AdobePDF8 printer later, except there's still a few problems.
    The name of the PostScript file won't work when I try to include the value of another variable (var studentName)
    The fonts in the PostScript files that it does produce get substituted with Courier and look terrible
    Both the API Reference and the Developer Guide seem to indicate that you can print to a file rather than a printer, but both only seem to mention PostScript file using this method.
    Is there another way to do this? If not, is there a solution to the two problems I mentioned?
    Cheers,
    Chris

    Ok, I've pursued the SaveAs method (as George suggested) with moderate success with the following code (secure function names have been changed ;) ):
    config.js file script:
    >myTrustedSaveAs = app.trustedFunction( function ( doc, studName )
    app.beginPriv();
    doc.saveAs({
    cPath: studName,
    bCopy: true,
    bPromptToOverwrite: true
    app.endPriv();
    myTrustedOpenDoc = app.trustedFunction( function ( path )
    app.beginPriv();
    app.openDoc({
    cPath: path
    app.endPriv();
    Button's onMouseUp script:
    >// get student name and turn it into a file name
    var studFile = this.getField("Name").value.split(",").join("_").split(" ").join("") + ".pdf";
    // get the current document's directory path
    var origFile = this.path;
    var pathBits = this.path.split("/");
    pathBits.pop();
    // whack 'em together
    pathBits.push(studFile);
    var studFilePath = pathBits.join("/");
    // toss the form fields and stuff
    this.flattenPages({
    nNonPrint: 2
    // save the new file
    myTrustedSaveAs(this,studFilePath);
    // open the original again (not working)
    myTrustedOpenDoc(origFile);
    // close the one I just saved
    this.closeDoc(true);
    This is what happens:
    Button is clicked,
    All the form fields and buttons are removed,
    It produces a file with the new file name (e.g. Lawrence_Chris.pdf) next to the original,
    The file closes
    I'm pretty sure that once the SaveAs runs and the new file is created, I actually still have the original file open instead of the that was just saved. This would explain why the openDoc command doesn't seem to do anything because the file it's opening is already open. The closeDoc then runs and of course I then have no open documents!
    So, now I either need a way to revert the open original file so I get all of my form fields back and don't have to reopen it, or a way to close and then immediately open the file without saving changes. :/
    Any ideas?
    slight inconvenience of needing a separate .js file written for the user's JavaScript folder before launching Acrobat to overcome security restrictions. File sizes only seem to get down to about 376KB as opposed to the 40KB files that the AdobePDF8 printer spits out. :(

  • Specify file name of the document returned on the HTTP post

    Hello,
    we are submitting a PDF form by calling submitForm function:
    doc.submitForm
            cURL: "http://localhost/script",
            cSubmitAs: "XML"
    The server returnes data of type "Content-type: application/pdf" and as a result this aplication/pdf data is displayed in a new window in Acrobat Reader.
    The document in new window has name e.g. A9R3347.tmp, is it possible to force some concrete name ?
    We tried to send from server the http header:
    Content-Disposition: attachment; filename=\"custom_name.pdf\"
    or   
    Content-Type: application/pdf;         filename=custom_name.pdf
    but non of this works.
    1/ is it possible to set some custom name of the document, which is returned from a server in response of HTTP Post submit ?
    2/ is it possible to return other kind of data then application/pdf ? ( my tests with AR 9.3 with other formats failed).
    Thanks for any advice.

    See Oracle Metalink,
    ..Oracle Portal Technical Forum,
    ....Subject: PORTAL - uploading files (file attachments) with file names.
    This message thread outlines javascript code that automatically captures the filename during an upload.

  • Burst by email - specify file name

    Hello All,
    I have implemented the bursting by email functionality for one of my reports. I have tested this report. Everything is working fine. I am able to receive emails with file attachements.
    The problem is the attached file names are prepended with some xmlp_12345678_ .
    Ex: if the building_id is 'AB0001' , the file name in the attachement is xmlp_23456789_AB0001_1.xls.
    I would like to know is there any way to get it as AB0001.xls.
    I tried to give bldg.building_id||'.xls' as one of the parameters in bursting definition. But, looks like its ignoring it. The file attachment is still prepended with some xmlp and some auto generated number.
    Here is the bursting definition
    select distinct bldg.building_id KEY,
    'Report_with_status' TEMPLATE,
    'RTF' TEMPLATE_FORMAT,
    'en-US' LOCALE,
    'EXCEL' OUTPUT_FORMAT,
    'EMAIL' DEL_CHANNEL,
    'my email address' PARAMETER1,
    null PARAMETER2,
    'my email address' PARAMETER3,
    'Report for '||bldg.building_id PARAMETER4,
    'Please find the attached report' PARAMETER5,
    'true' PARAMETER6,
    'Do_Not_Reply email address' PARAMETER7,
    from building bldg
    Any ideas are greatly appreciated.
    Thanks in advance.

    Probably, you have to request for enhancement on this from standalone bip.

  • Export:- User specified file name

    Hi,
    On clicking Export button in BIP, the filename is same as BIP Report heading in file Open Dialog box, is there any way to give filename same as selected value from Dashboard Prompt. So when someone click Export, by default it should take the same file name as selected in Dropdown value.
    -Amit

    give this at title
    @{presentation_variable}
    and uncheck 'Display Saved Name'
    this gives you the title name as the user selected prompt value..
    Regards,
    Raghu

  • Save image to camera roll with specified file name or get the file name

    I am saving an image to camera roll but don't see an option to save the file using a custom name. Is it possible to do so? or is it possible to get the name of the file saved?

    Ensure you have set the correct capability in your app to save the picture with the exact name you specified.
    You can try the code below to iterate through all pictures in the cameraroll album and find out if the name exists.
    using (var mediaLib = new MediaLibrary())
    var camRollAlbum = mediaLib.RootPictureAlbum.Albums.Where(a=>a.Name == "Camera Roll").FirstOrDefault();
    foreach (var pic in camRollAlbum.Pictures)
    string picName = string.Empty;
    if(pic.Name.Contains("Selfie"))
    picName = pic.Name;
    Let me know if this helps.
    Abdulwahab Suleiman

  • How to specify file name while invoking the GET_ZIP_BUNDLE service

    Hello.
    The GET_ZIP_BUNDLE service by default generate zip file with name "Bundle". I wanted to change this name runtime, that is while invoking this service. How can I do it?
    The class ziprenditions.ZipRenditionsHandler most probably handle this service by the method createRenditionBundle.
    There I saw a line:
    downloadName = LocaleResources.getString("csZipRenditionBundleName", this.m_service);I have tried to print the value of csZipRenditionBundleName and I got "Bundle". I am wondering is there any way to set a value to this message key?
    I have tried this idoc function:
    <$createRenditionBundle='some_name'$>before invoking the service. But this didn't work.
    Also I have tried to change it from Java class, and for that I have defined a custom service and did:
    LocaleUtils.encodeMessage("csZipRenditionBundleName", null, "JYM");But this also not working.
    What I want is to get the zip file with the name which is the same to the files it is archiving.
    For more information, here is how I am invoking the GET_ZIP_BUNDLE service:
    I have defined a form element:
    <form action="/cs/idcplg" method="POST" id="zipBundleForm" name="zipBundleForm">
       <input type="hidden" value="GET_ZIP_BUNDLE" name="IdcService">
       <input type="hidden" value="pkg:dDocName,pkg:dID,pkg:Rendition,pkg:RevisionSelectionMethod,pkg:AuxRenditionType" name="bundleKeys">                            
    </form>And I have a button with id downloadContent and I have attached the following JavaScript with it:
    $('#downloadContent').click(function (event){
       event.preventDefault();
       var formId = "zipBundleForm";
       var counter = 0;
       var renditionType = "";
       $("#zipBundleForm").find(":hidden").each(function() {
          if($(this).attr("name").startsWith("pkg:"))
             $(this).remove();     
       $("#downloadContentForm").find('input:checkbox:checked').each(function() {
          renditionType = $(this).val();
          $(".thumbnails").find('input:checkbox:checked').each(function() {
             if($(this).attr('data-type') == 'image'){
                createHiddenInputElement(formId, "pkg:dDocName" + counter, $(this).attr("name"));
                createHiddenInputElement(formId, "pkg:dID" + counter, $(this).attr("id"));
                createHiddenInputElement(formId, "pkg:Rendition" + counter, renditionType)
                createHiddenInputElement(formId, "pkg:RevisionSelectionMethod" + counter, "Specific");                                             
                counter++;     
       $("#zipBundleForm").submit();     
    var createHiddenInputElement = function(formId, elementName, elementValue){
       var newElement = document.createElement("input");
       newElement.setAttribute("type", "hidden");
       newElement.setAttribute("name", elementName);
       newElement.setAttribute("value", elementValue);
       $("#"+formId).append(newElement);
    }Thanks in advance.

    if you want a fixed bundle name other than "bundle", you can override the localization string entry 'csZipRenditionBundleName' in a component.

Maybe you are looking for

  • Kanguru Flash Drives

    I'm thinking of buying an 8GB flash drive for use on the firewire port. I can't use ExpressCard since my Verizon aircard uses it, and I find USB flash drives to be slow. I'm looking at the Kanguru 8GB Fire Flash drives (http://www.kanguru.com/firefla

  • Upgrade from 8i to 10g

    Can a direct upgrade from 8i to 10g is possible? OR Do we need to upgraded from 8i to 9i , before we upgrade to 10g? If we can migrate from 8i to 10g , directly please suggest me the metalink note number. Thanks Naveen

  • Re: how do I run the eviroment

    you need to set the path to your java installation. if you installed the java SDK its usually set path = %path%;c:\jdk1.3.1_0\bin J.

  • Max length name of Attribute/Entity

    Hello! I want create name of Attribute more than 50 characters, but MDS 2014 does not do it. Is it possible?

  • Why is PS CS4 Extended crashing when I use the quick selection tool, it was working fine yesterday..

    ...today I have updated the lastest software to version 11.02 and it is still crashing. Please can anyone help.