How to handle Dynamic File Name

Hello All,
I have a  requirement, I have to download a file from application server to my ABAP program which will be executed in the background. The problem is the file name is a dynamic file name with timestamp on it. So how do I read the file from the application server. I know there are certain function modules but I don't think so that they can work in background.
So If anyone has worked on it before your reply would be helpful.
Thanks and Regards,
Sushil

Hi,
Use this funcation module this will return you the list of files in a directory...
It will work even in back group processing also..
SUBST_GET_FILE_LIST
or if it is unix environ ment.
data: begin of t_tabl occurs 0,
line(132),
end of t_tabl,
data: lc_command(100) type c.
Get all the file name falling under specified directory...
lc_command(3) = 'ls '.
lc_command+3(45) = p_dir. " Directory of file path
call 'SYSTEM' id 'COMMAND' field lc_command
id 'TAB' field t_tabl-sys.
Check any files exits in the directory.......................
if t_tabl[] is initial.
message e006 with 'No files exist in the specified directory ' p_dir.
endif.
here you will have all the file names in t_tab1 you can sort by name and will get the latest file in order..
Thanks
Mahesh
Message was edited by:
        I Can Solve It

Similar Messages

  • How to read dynamic file names in RSEINB00?

    Hi, ABAP Gurus,
    actually I'm a PI Consultant. Now I have a scenario to use the report RSEINB00.
    In the Applicaton Server i put ASCII IDocs with the following name convension: <static name>+<time stemple>:
    SAPIDOC20111127-224128-952.txt
    SAPIDOC20111127-224129-115.txt
    I created a new port in WE21 and the Outbound file and Inbound fiel tabs haben the same configration:
    physical directory: /ABC/DEV100/inbound/
    Function module: EDI_PATH_CREATE_DATE_TIME
    Inbound file: SAPIDOC.txt
    To execute the report RSEINB00 I must give the complete file name and port. It is not convenient.
    My target is, with a job to run RSEINB00 once daily to read all files with name "SAPIDOC + <time stemple>" full automatically.
    Is it possible? how to figure it out?
    thanks a lot in advance! <removed by moderator>.
    Regards
    Rene
    Edited by: Thomas Zloch on Nov 29, 2011 5:23 PM

    with the extension of the standard report RSEINB00 i solved this problem. here is some code:
    DATA:
      dir_name  LIKE  epsf-epsdirnam,
      file_mask LIKE  epsf-epsfilnam,
      g_message_fields LIKE edimessage.
    DATA:
      filename LIKE  edi_path-pthnam,
      filename2 LIKE edi_path-pthnam,
      myport TYPE EDIPO-PORT.
    DATA: h_EDIDC     LIKE EDIDC.
    DATA:
      wa TYPE file_table.
    DATA:
      t_dir_list TYPE STANDARD TABLE OF epsfili WITH HEADER LINE,
      itab TYPE table of file_table WITH HEADER LINE.
    *The directoy, where the Markant ASCII IDocs are droped by XI.
    dir_name = '<.../inbound>'.
    *File mask of ASCII IDocs.
    file_mask = 'XYIDOC.'.
    *File port.
    myport = '<Portname>'.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
        dir_name               = dir_name
        file_mask              = file_mask
      TABLES
        dir_list               = t_dir_list
      EXCEPTIONS
        invalid_eps_subdir     = 1
        sapgparam_failed       = 2
        build_directory_failed = 3
        no_authorization       = 4
        read_directory_failed  = 5
        too_many_read_errors   = 6
        empty_directory_list   = 7
        OTHERS                 = 8.
    IF sy-subrc <> 0.
      MESSAGE e600(fr) WITH 'No ASCII IDoc exits'.
    ENDIF.
    "BREAK-POINT.
    *The old ASCII IDocs are stored in a dataset and copied with new file name sent_<original name>
    LOOP AT t_dir_list.
      CONCATENATE dir_name '/' t_dir_list-name INTO filename.
      CONCATENATE dir_name '/sent_' t_dir_list-name INTO filename2.
    open dataset filename for input in text mode.
    open dataset filename2 for output in text mode.
    if sy-subrc = 0.
      do.
        read dataset filename into wa.
          if sy-subrc <> 0.
           exit.
          endif.
      transfer wa to filename2.
         append wa to itab.
           enddo.
    endif.
    close dataset filename.
    *loop at itab into wa.
    transfer wa to filename2.
    *endloop.
    close dataset filename2.
      PERFORM inbound_processing USING filename.
    ENDLOOP.
    *&      Form  inbound_processing
    FORM inbound_processing USING filename TYPE edi_path-pthnam.
    do inbound processing from file
      CALL FUNCTION 'IDOC_INBOUND_FROM_FILE'
        EXPORTING
          file_name            = filename
          port                 = myport
        EXCEPTIONS
          file_open_failed     = 1
          marker_to_be_deleted = 2
          read_file_failed     = 3
          idoc_not_stored      = 4
          file_delete_failed   = 5
          marker_modify_failed = 6
          event_create_failed  = 7
          first_record_invalid = 8
          invalid_record       = 9
          OTHERS               = 10.
      IF sy-subrc <> 0.
    fill message fields for exception handling from system fields
        MOVE-CORRESPONDING sy TO g_message_fields.
    error handling using the 3.0 business workflow
        CALL FUNCTION 'IDOC_ERROR_WORKFLOW_START'
          EXPORTING
            docnum                  = 0
            eventcode               = 'EDIM'
            mess                    = g_message_fields
          EXCEPTIONS
            no_entry_in_tede5       = 0
            error_in_start_workflow = 0
            OTHERS                  = 0.
    do not care for exceptions here
        COMMIT WORK.
    append message for RFC
        MESSAGE ID     g_message_fields-msgid
                TYPE   'A'
                NUMBER g_message_fields-msgno
                WITH   g_message_fields-msgv1 g_message_fields-msgv2
                       g_message_fields-msgv3 g_message_fields-msgv4.
      ENDIF.
    ENDFORM.                    "inbound_processing

  • How to give a dynamic File Name for Receiver File/FTP Adapter.

    Hi Experts,
        I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out"  & in File Consturction mode i have given as "Add Time Stamp".
        therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
    where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
        How to do this ?
        for your info we are using ABAP Mapping.
        Pl help me
    Regards,
    Umesh

    Hi Umesh,
          Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
    And refer the below weblogs for Variable Subtiutuion File Name Scheme
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    Hope this way would be solve u r problem.
    Cheers
    Veera
    >>>Reward points, if it is needful

  • How does Photostream handle duplicate file names?

    My sister has an iPhone and an iPad, and takes photos with both. Her husband has an iPhone, and also takes photos. They have a PC. Photostream is enabled on all of these devices.
    Now, since all three devices use a simple sequential file numbering system (IMG_XXXX), they will produce duplicate file names.
    This, of course, becomes an issue when you consolidate the photos taken by multiple iOS devices in one folder as is done by Photostream on PC.
    Which brings me to my question: How does Photostream (on PC) handle duplicate file names? Does it simply overwrite, keeping the one with the latest date, or what? Does it inform the user in any way?
    Oddly, I have seen little discussion on this. It really seems like Photostream is pointless

    FOLLOWUP. Below, is a clearer explanation of my concern/question.
    My sister has an iPhone and an iPad, and takes photos with both. Her husband has an iPhone, and also takes photos. Photostream is enabled on three devices. They have a PC. iCloud Control Panel for Windows is installed, and Photostream is enabled.
    Now, since iOS devices use a simple sequential file numbering system (IMG_XXXX.JPG), when you consolidate these images into one folder as is done by Photostream on PC, you will sooner or later encounter two (or more) different photos that have the same file name. Different photos with the same file names can/will happen when you consolidate images taken with different iOS devices into the same folder.
    Which brings me to my question:
    How does Photostream (on PC) handle duplicate file names that are not duplicate images?
    Q: Does it simply overwrite, perhaps keeping the one with the latest date taken? In this case Photostream will not contain all of the photos it should.
    Q: Or, does it do something to create a unique filename when it encounters a duplicate file name? For example: IMG_0001, IMG_0001(1), IMG_0001(2)
    Oddly, I have seen no discussion on this. I hope someone can help me understand how Photostream handles this so we can decide how best to use Photostream, or if it is a feature we want to disable.
    Thank you,
    Lilla

  • How to put the file name in notepad file

    dear frank,
    how to put the file name in notepad file via power shell. I mean i want to put the file name in that notepad file
    for example,
    my file name is ABL and in this file data is
    02/06/2015,180.00,182.00,176.01,180.50,1575500
    02/06/2015,4.20,4.20,4.20,4.20,500
    02/06/2015,113.50,113.70,112.91,113.09,157800
    02/06/2015,682.01,695.90,682.00,683.19,4250
    02/06/2015,213.98,215.00,213.00,214.87,326200
    02/06/2015,21.52,21.65,21.52,21.60,4000
    02/06/2015,111.00,111.25,108.25,108.91,17100
    02/06/2015,52.00,52.00,52.00,52.00,500
    and i want to data in this form
    ABL,02/06/2015,180.00,182.00,176.01,180.50,1575500
    ABL,02/06/2015,4.20,4.20,4.20,4.20,500
    ABL,02/06/2015,113.50,113.70,112.91,113.09,157800
    ABL,02/06/2015,682.01,695.90,682.00,683.19,4250
    ABL,02/06/2015,213.98,215.00,213.00,214.87,326200
    ABL,02/06/2015,21.52,21.65,21.52,21.60,4000
    ABL,02/06/2015,111.00,111.25,108.25,108.91,17100
    ABL,02/06/2015,52.00,52.00,52.00,52.00,500
    There are many file like this that i want to be edit
    plese tell me how can i do it, i think it is possible via windows power shell.
    thanks in advance.

    Hi
    Just for completeness, what version of VB.NET are you using?
    Here is a complete project to copy all the files with the added "ABL," at the start of each line.  You need to start a new Project with a BLANK default Form1, and replace all of Form1 code with the code below. When you run this project, you
    need to use the 2 buttons to set up the ORIGINAL file folder and a folder to place the copies. You need to check if the file EXTENSION is correct (I assumed txt), and check the text to add to each line is correct.  Once all is set up you should have a
    big red button to start the operation.
    NOTE: it is important that you try this out on a copy of some of the files to verify accuracy BEFORE trying on original files. Make sure you have a good back up of the original files before doing anything else.
    ' new project with default BLANK Form1
    ' replace all Form1 code with this code
    ' WARNING: make sure you have a backup of
    ' any files you use this application to
    ' operate on.
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class Form1
    Dim OrigFileFolderPath As String = Nothing
    Dim CopyToFolderPath As String = Nothing
    Dim lab1, lab2, lab3 As New Label
    Dim tb1, tb2, tb3 As New TextBox
    Dim b1, b2, b3, b4 As New Button
    Dim fb As New FolderBrowserDialog
    Dim bgw As New System.ComponentModel.BackgroundWorker
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Me.Size = New Size(731, 300)
    With lab1
    .Text = "Original Files Folder Path"
    .Location = New Point(15, 5)
    End With
    With tb1
    .Width = 560
    .Location = New Point(10, 30)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
    End With
    With lab2
    .Text = "Copy Files to Folder Path"
    .Location = New Point(15, 125)
    End With
    With tb2
    .Width = 665
    .Location = New Point(10, 150)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
    End With
    With lab3
    .Text = "File Ext"
    .Location = New Point(600, 5)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    End With
    With tb3
    .Text = ".txt"
    .Width = 80
    .Location = New Point(590, 30)
    .BackColor = Color.Khaki
    .ForeColor = Color.Maroon
    .TextAlign = HorizontalAlignment.Center
    .Font = New Font(Me.Font.FontFamily, 12)
    .BorderStyle = BorderStyle.FixedSingle
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    End With
    With b1
    .Text = "Choose Original Files Folder Path"
    .AutoSize = True
    .Location = New Point(10, 65)
    End With
    With b2
    .Text = "Choose Copy Files to Folder Path"
    .AutoSize = True
    .Location = New Point(10, 185)
    End With
    With b3
    .Text = "DO THE COPY"
    .AutoSize = False
    .Size = New Size(240, 50)
    .BackColor = Color.Red
    .ForeColor = Color.White
    .Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
    .Location = New Point(420, 80)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    .Visible = False
    End With
    With b4
    .Text = "CANCEL JOB"
    .AutoSize = False
    .Size = New Size(240, 50)
    .BackColor = Color.Red
    .ForeColor = Color.White
    .Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
    .Location = New Point(420, 80)
    .Anchor = AnchorStyles.Top Or AnchorStyles.Right
    .Visible = False
    End With
    Me.Controls.AddRange({lab1, lab2, lab3, tb1, tb2, tb3, b1, b2, b3, b4})
    With bgw
    .WorkerReportsProgress = True
    .WorkerSupportsCancellation = True
    End With
    AddHandler bgw.DoWork, AddressOf bgw_DoWork
    AddHandler bgw.RunWorkerCompleted, AddressOf bgw_Completed
    AddHandler b1.Click, AddressOf b1_Click
    AddHandler b2.Click, AddressOf b2_Click
    AddHandler b3.Click, AddressOf b3_Click
    AddHandler b4.Click, AddressOf b4_Click
    End Sub
    Private Sub b1_Click(sender As Object, e As EventArgs)
    fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
    fb.ShowNewFolderButton = False
    Dim r As DialogResult = fb.ShowDialog
    If r = Windows.Forms.DialogResult.OK Then
    tb1.Text = fb.SelectedPath
    If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
    If tb3.Text = Nothing Then
    redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
    If tb3.Text = Nothing Then GoTo redo
    End If
    b3.Visible = True
    Else
    b3.Visible = False
    End If
    End If
    End Sub
    Private Sub b2_Click(sender As Object, e As EventArgs)
    fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
    fb.ShowNewFolderButton = True
    Dim r As DialogResult = fb.ShowDialog
    If r = Windows.Forms.DialogResult.OK Then
    tb2.Text = fb.SelectedPath
    If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
    If tb3.Text = Nothing Then
    redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
    If tb3.Text = Nothing Then GoTo redo
    End If
    b3.Visible = True
    Else
    b3.Visible = False
    End If
    End If
    End Sub
    Private Sub b3_Click(sender As Object, e As EventArgs)
    b3.Visible = False
    b4.Visible = True
    If Not tb3.Text.StartsWith(".") Then tb3.Text = "." & tb3.Text
    bgw.RunWorkerAsync()
    End Sub
    Private Sub b4_Click(sender As Object, e As EventArgs)
    bgw.CancelAsync()
    End Sub
    Private Sub ReadPWFile(fn As String)
    Dim filename As String = My.Computer.FileSystem.GetName(fn)
    Dim barename As String = IO.Path.GetFileNameWithoutExtension(fn)
    Dim copyto As String = tb2.Text & "\" & filename
    Dim line As String = Nothing
    Dim lines As New List(Of String)
    Using sr As IO.StreamReader = New IO.StreamReader(fn)
    Do
    line = sr.ReadLine()
    If Not line = Nothing Then
    lines.Add(barename & "," & line)
    End If
    Loop Until line = Nothing
    End Using
    Using sw As IO.StreamWriter = New IO.StreamWriter(copyto)
    For Each s As String In lines
    sw.WriteLine(s)
    Next
    End Using
    End Sub
    Private Sub bgw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
    Dim ftc As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(tb1.Text)
    For Each f As String In ftc
    If bgw.CancellationPending Then
    e.Cancel = True
    Exit For
    End If
    Dim ex As String = My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower
    If My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower = tb3.Text.ToLower Then
    ReadPWFile(f)
    End If
    Next
    End Sub
    Public Sub bgw_Completed(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
    tb1.Text = Nothing
    tb2.Text = Nothing
    b3.Visible = False
    b4.Visible = False
    MessageBox.Show("Finished copying files", "Job Completed")
    End Sub
    End Class
    Regards Les, Livingston, Scotland

  • Setting dynamic file name in Receiver file adapter - not from payload

    Guys I just remember reading a weblog but can't find it now that I need it, on how to set the file name in message mapping dynamically but not using any payload field.
    Please let me know if you remember this.
    Thanks a lot,
    Viktor Varga

    also u can check in
    <a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II</a>
    <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>

  • Dynamic File name in File Adapter

    Hi,
    I have a requirement to pass dynamic file name in File Adapter.
    Is there any way to pass a variable for the file name attribut in file adapter.
    I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
    Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
    regards
    Saiju

    Hi Saiju,
    Yes there is.
    Assign your file name to a variable, let's say 'fileName'.
    Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
    That's it... (assuming you are using 11g)
    Arik
    Edited by: Arik on Jun 27, 2012 3:12 PM

  • Dynamic File Name depending on the Source File name

    Hi Experts,
    I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
    Source File name                 Targer Folder/Filename
    NK01.VR59.L2007030         VR59/Rec.l200
    NK01.VR71.L2017030         VR71/Rec.l201
    NK01.VR77.L2027030         VR77/Rec.l202
    See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
    So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
    Points will be rewarded for Valuable anwer.
    Thanks in Advance,
    Best Regads,
    Vijay

    Hi VIjay,
    Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " "  statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
    I am getting the following error in End to End error Scenarios:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • Dynamic File name for File receiver adapter

    Hello,
    I am doing Proxy sender to File receiver scenario.
    Filename is generated in SAP R/3 program and I want to create the file with this same name
    on target location.
    please suggest me how to use this file name in Receiver file adapter?.
    Thanks & Regards
    Jagesh

    Hi,
    you have to enable the adapter specific parameter --> file name in both the sender and the receiver CC to get the input file name as output file name.
    Refer this blog:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Also you need to use this udf
    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; 
    Also refer this blog:
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Regards,
    Nithiyanandam

  • How to create Same file names for source and target.

    hi
    Can any body send Procedure for below requirement.
    how to create the dynamic file names for a source and save the file with same name in the Target, because it has to identify that which sender had sent the file and the target file should be again sent back to the customer as a link.
    Please help me.
    Thanks

    Hi,
    See the below link
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - sender file name as receiver file name
    Regards
    Chilla

  • Dynamic file names in outbound file adapter

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

  • Dynamic file name from messsage payload

    Hi Friends,
    My requirement is to read one .xml file , which has  Purchase Order deatails and place .html file on receiver side, we are using XSLT for mapping.
    The file name should be "POnumber.html " , i've gone through below but couldn't get much
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Can any one send the that code , and steps to add that code in side XSLT.
    Thanks
    John

    Hi,
    With above links
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    See in the below Michal blog , how to conver the file as html , take that part only.
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Regards
    Chilla

  • Dynamic file name(Context)

    Hello All,
    I am using Dynamic file name function in my message mapping. Below is the code that I am using inside UDF:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String fileName = conf.get(key);
    return fileName;
    Now the questions is as per my requirement, I need to generate multiple file names. Can some one help me how can change the above code for catering multiple returns
    Thanks
    Regards
    Moorthy

    Hello,
    Now the questions is as per my requirement, I need to generate multiple file names. Can some one help me how can change the above code for catering multiple returns
    If you are using multi-mapping (0..n), only one will be accessed. See link below from SAP Help
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/09b16006526e72e10000000a422035/frameset.htm
    Or you can use variable substitution for filename generation (search in SDN).
    Hope this helps,
    Mark

  • Dynamic file name in communication channel

    hello
    is it possible to give in the communication channel, under the 'File Access Parameters', a dynamic file name?
    to get it out of a table or something?
    Thanks
    Kfir

    Hi,
    Yes its bit possible to use the dynamic file name at File access paramters
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Refer below links for more in depth details about it
    Re: Dynamic file name in Receiver File Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/frameset.htm
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Check out this URL
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Check these weblogs as well...
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    Thanks
    Swarup

  • Dynamic File Name on Receiver Side using XSLT mapping

    Hi,
      My scenario is a Proxy to File scenario.The File on the receiving side is a TEXT file generated due to XSLT mapping. The file name has to be dynamic like- TEST<DDMMYYHHMMSS>File.DAT.
    If somebody knows how to do the same please help.
    Regards
    Ritu

    Hi Ritu,
    I agree to Krishna.With your XSLT mapping create a XML output which can be converted to a text file with content conversion.
    And for the dynamic file name, i guess its the date that matters which needs to be in DDMMYYHHMMSS format. the same can be accomplished by a Java function and calling it in your XSLT .
    Do refer this weblog it will help you accomplish the same.
    >>> /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Regards,
    Shabarish

Maybe you are looking for

  • Battery issues  done all suggestion

    I have just purchased a used 15" powerbook Aluminum 1.67. The PB works fine plugged in. When I unplug it, it shuts down within 5 minutes on battery power(it reads 100% charge). It won't star up on battery power you can hear the start up chime but it

  • How to map apple mail to correct location on computer

    I incorrectly shut down my wife's email... Did TrueCrypt first and then the email folder.  Now the email folder is not looking for the email folder in True Crypt.  How do I get the email application to look for the correct folder location in TrueCryp

  • Adobe download Assistant won't work.

    Here's what happens I open adobe download assistant trying to download Adobe After Effects CS5.5 and I sign in I choose the folder for the download and then I wait for it to start downloading and it never does. It stays saying "Sign in with youy Adob

  • Assets PO

    Hi Friend, We have a Assets import PO, where we have received the GRN for bill passing.At the time of bill passing of freight element i have seen that the actual freight amount is more then PO freight amount. according I have passed the same but afte

  • Tables for Confirmed Prouction orders to first operation only in routing

    Hi QM/PP Gurus,   My client has this requirement, they want a list of production orders as well as their confirmation dates for their first operation in their routings. Can u provide me any tables for this one.  Thanks. Regards, Matildo, Edsel F. QM