Skip to Content

<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:

*”  EXPORTING

*”     VALUE(OUTPUT)

*”—-


  DATA:

   g_bukrs type bukrs,                   ” Company code

   g_output  type char20.                ” output

  • Company code

  FIELD-SYMBOLS: .

  *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.

!https://weblogs.sdn.sap.com/weblogs/images/251819124/Snap4.jpg|height=1|alt=|width=1|src=https://weblogs.sdn.sap.com/weblogs/images/251819124/Snap4.jpg|border=0!!https://weblogs.sdn.sap.com/weblogs/images/251819124/Snap4.jpg|height=1|alt=|width=1|src=https://weblogs.sdn.sap.com/weblogs/images/251819124/Snap4.jpg|border=0!</body>

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply