Skip to Content

How to use a Wildcard in LSMW

Today we spent about a half hour with 3 persons reading SAP’s documentation Using Wildcards and testing to understand how wildcards are used in LSMW

While searching SCN I found many unanswered questions and even wrong replies, so I decided to share this little piece of experience.

Our target is to provide one LSMW object to several users. Execution in parallel without overwriting other peoples work in .read and .conv files.

Open the LSMW step “Specify files” ,

add the star * as wildcard in the file name of your legacy data

add the star * as wildcard in the file name for Imported data

add the star * as wildcard in the file name for Converted data


Place the cursor on the Wildcard Value  knot and click the icon for New entry

In the pop-up enter the wildcard value, in my example the user name, along with a description.


Don’t be confused from the appearance after you clicked okay, because the value is on the left and the description on the right, contrary to all other entries above in that screen (see first screen shot as example)

when you execute the LSMW step “Import data” , then you get  entry fields for the values specified as wildcard. you can even use F4 search help to get all possible value to select.


Important to know: the source file on your PC or on the application server, has to have the wildcard value at the specified place.

It is possible to enter a different value than you see in the F4 list, you can even execute, but nothing happens, even your file name is equal to this value. SAP will not read data with a value that is not specified in the wildcard settings of “Specify files”.

You must be Logged on to comment or reply to a post.
  • Hi Jurgen,

    Sorry. Still I did not understand the purpose of the wild card. Where exactly you have used it? You can have different value for the all the fields in the standard too . Right?

    Could you please explain.

    • It is explained in the beginning of the document: Our target is to provide one LSMW object to several users. Execution in parallel without overwriting other peoples work in .read and .conv files.

  • I could understand it very well and appriciate your effort.

    I wonder if we can use multiple wildcard.

    for example first wild card for specifying path for file and second for filename.

    Example : /DC_*_/AD/_*

    would it be possible by using other char instead of wildcard.

    any suggestion would be appriciated.


    Shiva Sahu

    • The text displayed next to the section “wildcard Value” says explicitly “ Value for wilcard ‘*’in the file name

      This text would just be wrong if any other character than * could be used as wildcard

      Assume you could use Char A as a second wildcard, What do you think will happen with the A from AD in your example? /DC_*_/AD/_*

      SAP would not be able to distinguish if the A is a normal A or should be replaced.

      Technically it is restricted anyway because of the table that holds the wildcard value: /SAPDMC/LSOFIW

      This table has no field for a wildcard character.

      But you see that the selection parameter has a from – to field and a multiple selection option, this way SAP can e.g. load several different source fields at once if they match with any of the entered values

      • Hi Jurgen,

        Thanks for reply.

        i understand your point.

        here while taking this example : /DC_*_/AD/_* , i wish to have 2 wildcard , one for filepath and second for file extension.

        Example :

        i have two file

        1- D:\textfiles\test.txt

        2- C:\excelfiles\test.xls

        here i feel need of 2 wildcard .

        But as you suggested that we can not have more than 1 wildcard,so i have got my answer.


        Shiva Sahu

  • Hi jurgen sir,

    First of all,thanks for sharing this to us.As per your instructions,I have done but while executing, at read data step,getting error as file doesn’t exist or is currently locked.

    FYI,pls see the below snap shots.



    Note: My uploading file is present at desktop with name KNR and the is not in open mode.

    Kindly assist me on this.



  • Hi Jürgen,

    Thanks for the sharing.

    Questions, I able to execute but not authorized to change the Specify Files setting.

    For example, I’m going to mass upload 2 files but only got one wildcard available since I not able to create a new one. As I run through the steps until Create Batch Input Session, can I proceed to perform the same steps for the second file by using the same wildcard? Will it interrupt or overwrite the first file created early? Or I need to wait for the first file finish processing then?

      • Hi Jurgen,

        For example, I have done creating the batch of the first file by using MY01 wildcard. While processing background, can I proceed to create the batch for the second file using same wildcard? Since I got 2 different files to upload.

        • Please follow the steps given in this blog. It seems you had not yet tried. Your screenshot from SM35 has nothing to do with this blog