on 09-10-2013 10:48 AM
To do copy and paste you need to invoke a script, so you need a script button to press. You can link your custom field to this script button so that typing an article and pressing "Enter" will invoke the script, rather than requiring the user to press the script button. Having built the link you can even hide the button.
Pasting the value might be more complicated, although it looks like you might be trying to create a one-line purchase order. If so, that makes life easy. Record a script where you type a value into the Article field of the first line of the table, and then change the "Enter Value" action to a "Paste Value" action and paste the value you copied. If you look at the cell references in that recording, you'll see how to address individual cells in a table, should you wish to paste into lines other than the first.
Does that help? If you need more info, please ask.
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please elaborate more about how to
1)pressing"Enter will invoke the script"
In the Script you can actually replace a the hot key to invoke the script. However it requires ctrl and another key for the script to work. However will it be possible to only press on one key and it will invoke the script
2) hide the script button
3) How to combine link all the flavors together?
Thanks
Stacy
Sure. In the video below (you might need to view it full size to see the detail) you see a simple example of looking up the real name of a user (me) from the username. In the first version, there's a script button you press to do the lookup. I don't show the script, but it does the obvious thing of invoking SU01 and grabbing the contents of the field labelled "Format", which contains the full name.
Then you'll see me invoke the Personas editor and link the text field to the lookup button. When I do the lookup the second time you see I type in a username but don't press the button. What you can't see is that I hit <ENTER> after typing the username. That's what the "link" I created does - press the selected button when enter is pressed.
Then you'll see me invoke the editor again and hide the button. Since we no longer need to press it, it doesn't need to be visible. Pressing <ENTER> in the text field will still press it, even if you can't see it. But you need to hide it, not delete it! And in the final look up in the video you'll see I still get the user's full name after hitting enter, even though the script button doing the work is no longer on the screen.
Does that make more sense? By the way, you can link standard SAP fields to script buttons too, not just custom fields you've added in Personas. That is occasionally useful for enhancing transactions with extra data without having to resort to the clunkiness of asking people to hit a button to fill in some extra fields. It feels more "integrated" if data appears when you just hit <ENTER>!
Steve.
Right, this doesn't work with buttons. To associate a script with a standard button you need to replace the button. Create a new script button to do what you need, including possibly pushing the standard button at an appropriate point, then hide the standard button and put your new one in its place.
Does that make sense?
Steve.
Hi Stacy,
Please have a look at http://scn.sap.com/docs/DOC-35565. It shows how to use IF conditions in a simple example.
@Steve: Enjoy TechEd!
Cheers,
Tobias.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.