Skip to Content
Author's profile photo Former Member

Dynamic Physical file path creation (Passing selection screen variables for Archive job file names)

<body>Rules for Name of function module Challenge faced:</p><p>There is no connection from Program FI_DOCUMNT_WRI and this function module.<br />Tried to find User exit in Program FI_DOCUMNT_WRI  to pass Variables to memory and then get them to function module Y_FILENAME_EXIT_BUKRS. But this did not work.<br />Finaly we got the below logic which is  using ABAP memory.<br />Process to use ABAP memory is:<br /> </p><p>FIELD-SYMBOLS: <FS_EXAMPLE> type bukrs.<br />ASSIGN: (‘(Program name)Varible name) TO <FS_ EXAMPLE >.                                </p><p>g_bukrs =  <FS_ EXAMPLE >.</p><p>We can access the program variable only if the program is in execution.  </p><p>Code of Y_FILENAME_EXIT_BUKRS.


“Local Interface:





   g_bukrs type bukrs,                   ” Company code

   g_output  type char20.                ” output

  • Company code


  *Pass company code to the output if not initial

   if g_bukrs is not initial.

    g_output = g_bukrs.

   endif.                              ” If g_bukrs

  • Concatenate ‘_’ to the output if not initial

  if g_output is not initial.

   concatenate g_output


               into OUTPUT.

  endif.                               ” If g_output

Overview of functionality: 

The phenomenon of this functionality is to setup a dynamic file name for a given logical file.  The formation of file name will take place by obtaining the values from ABAP memory. These variables are populated by the program which is used in the function module.

This function module (exit) is automatically triggered while Physical file name is generated.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      This blog helped me while working on archive materials.
      Author's profile photo Former Member
      Former Member

      Very useful blog!