Skip to Content

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

Wildcard1.JPG

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.

Wildcard0.JPG

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.

Wildcard2.JPG

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

To report this post you need to login first.

23 Comments

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

  1. subramanian sankaran

    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.

    (0) 
    1. Jürgen L Post author

      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.

      (0) 
  2. shiva sahu

    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.

    Regards,

    Shiva Sahu

    (0) 
    1. Jürgen L Post author

      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

      (0) 
      1. shiva sahu

        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.

        Regards,

        Shiva Sahu

        (0) 
  3. Narendra Konnipati

    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.

    snap1.PNG

    snap2.PNG

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

    Kindly assist me on this.

    BR’s

    KNR

    (0) 
  4. WeiKee Teoh

    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?

    (0) 
      1. WeiKee Teoh

        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.

        (0) 
        1. Jürgen L Post author

          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

          (0) 

Leave a Reply