cancel
Showing results for 
Search instead for 
Did you mean: 

Vendor Search button (using F4)

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

Thanks Tamas

The results you're getting are what I was expecting to get when I did it.

For some reason I can't access the fields in the same way you do and the recorded actions are different.  Strange.

Note, this is only for selection screens (F4).  Other fields work as for you.

Regards

Gareth

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

So what happens if you try to create your script based on mine?

Former Member
0 Kudos

It fails - control not found!

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Interesting... at which step does it fail?

Out of curiosity, what kernel version / patch level, Personas version / SP level and Personas Silverlight client version are you on?

Is the system fully up-to-date with all notes implemented according to parent note 1964257?

Former Member
0 Kudos

Hi Tamas

Apologies for the delay - I was waiting for our support to get back with the details you requested.

They are:

kernel version / patch level---> kernel release 721 and patch level 300

Personas version / SP level --> PERSOS Release 200 and SP level 02

Personas Silverlight client version are you on? --> Not sure I guess version is 2.0

If I replicate your script exactly it fails at step 4 - control not found.

I suspect there is something in the underlying configuration - I'd like to figure out precisely what it is!

Thanks

Gareth

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

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.

former_member189842
Participant
0 Kudos

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.

Former Member
0 Kudos

Thanks for the response, Bhaskar

My skills are intermediate.  I have created a number of scripts using Record to create the script and then 'tweaking' it to copy and paste values into particluar fields.

The problem is that in this instance it's hard to identify at what point the recorded script is entering the value (or what the field is that it is entering it into) so it's not easy to know what to change.  As I mention above it seems to be buried deep into the script itself and cannot be easily changed.

To prove the point I have made the changes as suggested (see script below - changes in red boxes).

However, it fails to Paste the value into the field.  I get the following error when I try to run the script:

I believe this is because - for some reason - in this selection screen, unlike in other SAP screens, it's not possible to simply Paste the value into the field.  There is some added complication.

Do you have any experience of this?

Thanks

Gareth

former_member189842
Participant
0 Kudos

do you know how to check the control properties? can you paste a screen shot of control type of ses[0]/......../crit1803

Former Member
0 Kudos

Hi Bhaskar

I know what you're referring to but it's not possible to access any fields in this screen (see below).  I can't focus any lower than I have.

This is the window that opens when you click F4 on the Vendor field in ME21N.

Regards

Gareth

former_member189842
Participant
0 Kudos

Select the Control you need the value copied to and click on the button I highlighted. You can see it's ID there. use it in the paste value rule.

Former Member
0 Kudos

I know how to do it.  As I said it is not possible to select the control. I cannot select a control lower than the one selected - TabItemContent.

As I have said I don't believe this works in the same way as copying and pasting into other fields in SAP screens - it works differently.  This is why I'm asking if anyone has specific experience with this 'select vendor' window.

former_member189842
Participant
0 Kudos

Ok sorry I didn't get it earlier. Can you tell me the control types of ...crit1803 and ...crit1807

Former Member
0 Kudos

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