Skip to Content
avatar image
Former Member

Vendor Search button (using F4)

Hi all

I would like to write a script in Personas to simplify the Vendor search in ME21N.  But I can't figure out how to paste the value into the Search box.  I've tried various options but nothing works.  Is it possible and how?

User should type the vendor name in the Vendor field and click a 'Search' button which will:

  1. Copy the info typed in the field
  2. Launch the Vendor Search function (F4)
  3. Select Purchasing vendor
  4. Enter the value copied in (1) into the name field and press Enter

However when I record the above steps into a script, I can't make sense of it in order to change it!

The script is as follows:

In Step 3, 'TEST*' is entered into the 'Name' field in the Search window (see below).  Instead, I want to enter the value I have copied.  How do I do that?

Looking at the script recorded in Personas (below) the value pasted in is held within the code (highlighted red).  is it possible to replace this value with the value copied from the Vendor field?

{"Id":"6a1662b2-b40d-4b5f-9cd5-8d4c571654df","Actions":[{"ActionCategory":"0","Action":"4097","ControlID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI0013\/subcntSUB0SAPLMEGUI0030\/subcntSUB1SAPLMEGUI1105\/ctxtMEPO_TOPLINESUPERFIELD","DerivedID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI__COMMON__\/subcntSUB0SAPLMEGUI0030\/subcntSUB1SAPLMEGUI1105\/ctxtMEPO_TOPLINESUPERFIELD","AdjustedID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI\/subcntSUB0SAPLMEGUI\/subcntSUB1SAPLMEGUI\/ctxtMEPO_TOPLINESUPERFIELD","Content":null},{"ActionCategory":"0","Action":"4","ControlID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI0013\/subcntSUB1SAPLMEVIEWS1100\/subcntSUB2SAPLMEVIEWS1200\/subcntSUB1SAPLMEGUI1102\/tabstripHEADER_DETAIL\/tabbtnDYN_1102TABSTRIP4","DerivedID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI__COMMON__\/subcntSUB1SAPLMEVIEWS1100\/subcntSUB2SAPLMEVIEWS1200\/subcntSUB1SAPLMEGUI1102\/tabstripHEADER_DETAIL\/tabbtnDYN_1102TABSTRIP4","AdjustedID":"ses[0]\/wnd[0]\/usrUSRAREA\/subcntSUB0SAPLMEGUI\/subcntSUB1SAPLMEVIEWS\/subcntSUB2SAPLMEVIEWS\/subcntSUB1SAPLMEGUI\/tabstripHEADER_DETAIL\/tabbtnDYN_1102TABSTRIP4","Content":null},{"ActionCategory":"0","Action":"8193","ControlID":"ses[0]\/wnd[0]","DerivedID":"ses[0]\/wnd[0]","AdjustedID":"ses[0]\/wnd[0]","Content":"4"},{"ActionCategory":"0","Action":"461","ControlID":"ses[0]\/wnd[2]\/search\/critcol\/crit1803","DerivedID":"ses[0]\/wnd[2;SAPLWDTM_0100_1242;242]\/search\/ts\/tpentry21\/content\/critcol\/crit1803","AdjustedID":"ses[0]\/wnd[2]\/search\/critcol\/crit1803","Content":null,"Arguments":[{"Key":"sign","Value":"I"},{"Key":"operator","Value":"CP"},{"Key":"low_value","Value":"TEST*"},{"Key":"high_value","Value":""}]},{"ActionCategory":"0","Action":"24","ControlID":"ses[0]\/wnd[2]\/search\/critcol\/crit1807\/cond[0]","DerivedID":"ses[0]\/wnd[2;SAPLWDTM_0100_1242;242]\/search\/ts\/tpentry21\/content\/critcol\/crit1807\/cond[0]","AdjustedID":"ses[0]\/wnd[2]\/search\/critcol\/crit1807\/cond[0]","Content":null,"Arguments":[{"Key":"sign","Value":"I"},{"Key":"operator","Value":"EQ"},{"Key":"low_value","Value":"500"},{"Key":"high_value","Value":""}]},{"ActionCategory":"0","Action":"3","ControlID":"ses[0]\/wnd[2]\/search\/btnSEARCH","DerivedID":"ses[0]\/wnd[2;SAPLWDTM_0100_1242;242]\/search\/btnSEARCH","AdjustedID":"ses[0]\/wnd[2]\/search\/btnSEARCH","Content":null}]}

Thanks

Gareth

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 13, 2015 at 05:15 PM

    Thanks all

    The answer to the problem is below.  It has to do with Personal Settings.

    To fix, go to Menu >> Help >> Settings

    In your personal settings, go into the F4 help tab, and ensure the radiobutton “Dialog (modal)” is selected. Save

    This resolved the problem I was having.  I am now able to record and modify scripts in the F4 search screen,

    Regards

    Gareth


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2015 at 06:47 AM

    Hm... I just tried to do what you are aiming for and I have no problem with recording the steps and get the described result.

    This is the flavor with the custom field for name entry and the script button:

    If I enter the name of an existing vendor, the search help brings me the matching record:

    If I enter a wrong name, I get the appropriate message:

    This is the recorded (and adjusted) script:

    This is actually rather simple... or did I misunderstand your scenario?

    I had also no problem with selecting the search criterion 'Name' and was able to get to its properties... there is nothing special about this field, it's just a simple text box. Had to keep clicking on the field a few times since it's part of a tab and also a group box, but after a few clicks it was selected just fine:

    I have no idea where the string TEST* comes from in your case (or how that recording was made for that matter, since it looks so different to mine).


    Capture1.JPG (47.6 kB)
    Capture2.JPG (49.9 kB)
    Capture3.JPG (62.3 kB)
    Capture4.JPG (47.8 kB)
    Capture5.JPG (67.6 kB)
    Capture6.JPG (100.5 kB)
    Capture7.JPG (104.1 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • To find out which Personas client version are you running, click on the Help (?) in the lower right corner of the Personas window. In the upcoming help page, you will find the client version in the lower left corner. The most recent one is 1.4.069 - this is what you should have installed.

      The kernel patch is OK.

      Also, having an up-to-date system according to note 1964257 is always the first thing we are asking in case of problems, so please verify if everything is implemented.

      Regarding the 'control not found' error: is it possible that you don't have the screen- and control overwrite entries configured for ME21N? Please look into this post and make sure all entries in the mentioned note are in your system: http://scn.sap.com/community/gui/blog/2014/04/12/sap-screen-personas-screen-id-and-control-id-overwrite-rules

      Keep in mind that if the ME21N entries are missing and you create them now, you'll have to recreate the flavors you already have because it is very likely they won't work correctly anymore.

  • avatar image
    Former Member
    Jan 05, 2015 at 04:07 PM

    Record button records the user actions fro you but it wont do 100% of the job. You have to manually add/ delete some actions depending on your requirement.

    After First line Focus, add a "Copy Value" script line and after line 5 use a "paste value".  Don't know your skill level but if you have questions on how to use copy paste, refer this blog.

    Personas scripting overview

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I'm afraid I don't know as I can't access those fields to see the properties.

      See below conversation with Tamas.  It appears that the selection screens work differently for me.

      Thanks for your help.

      Regards

      Gareth