You are on page 1of 16

openSAP

Using SAP Screen Personas for Advanced


Scenarios
Week 1 Unit1

00:00:00 Hello and welcome to Week 1, Unit 1 of our openSAP course


00:00:09 "Using SAP Screen Personas for Advanced Scenarios". My name is Peter Spielvogel and Im
part of the SAP Screen Personas product team
00:00:17 responsible for product marketing and several of our customer-facing programs, such as our
Monthly Practitioner Forum.
00:00:25 Throughout this course, you will learn how to use SAP Screen Personas to simplify screens.
We will build on the example we started in the introduction course,
00:00:34 again focusing on a purchasing scenario. We will streamline several transactions to make
them more intuitive
00:00:41 by improving the flow and reducing the number of clicks. And well trap errors and use various
advanced techniques
00:00:48 to optimize performance in the overall user experience. With that as a background, let's talk
about our openSAP course objectives.
00:00:57 Well go much deeper than the introduction course, spending the next five weeks to focus on
the way typical people interact with SAP,
00:01:07 including making occasional mistakes that we either need to trap before they enter the system
or gracefully recover from issues that we can anticipate.
00:01:17 This course is aimed at the people responsible for rolling out SAP Screen Personas to their
organizations, developers who might be writing the scripts,
00:01:28 system administrators who are handling the back end, enterprise architects who are looking at
an overall UX transformation,
00:01:37 business analysts wholl be the main one simplifying the screens, customers that want to
simplify complex business scenarios,
00:01:45 and partners that want to help their clients streamline business processes and undergo either
a digital or user experience transformation.
00:01:56 Because this is an advanced course, well focus on functionality that you need to deploy
flavors that work in real-world environments.
00:02:05 Well cover advanced editor features, writing more sophisticated scripts,
00:02:10 using remote function calls or RFCs, building templates and quick styles, creating adaptive
designs,
00:02:17 and optimizing performance. Well also discuss some elements of system administration,
00:02:23 such as object maintenance and transports, so you can roll out the flavors you build to your
users.
00:02:31 In Week 1, well go beyond the basics. Well provide an overview of the architecture and
examine advanced properties in the editor
00:02:40 and start looking at advanced scripting techniques. Week 2 will focus on scripting.
00:02:46 Well look at how to handle pop-ups, dynamic controls, and switch flavors based on what
appears on the screen.
00:02:54 Well look at a wider collection of events and how to use them properly. Well also discuss how
to debug your scripts and incorporate RFCs.
00:03:04 Week 3 covers how to build a consistent user experience. This includes using corporate
branding elements such as colors, fonts, and icons.
00:03:15 Well show how to build and use templates as well as managing flavor groups. Week 4 is
focused on the system administrator.
00:03:24 Well talk about users and roles, maintaining objects such as flavors, themes and icons,
whitelisting URLs, translation, and transports.
00:03:34 Well also discuss URL parameters, which can be useful for moving information between
screens,
00:03:40 and also debugging certain scenarios. Week 5 covers best practices.
00:03:46 Well discuss performance tuning, building adaptive designs, and how to use the analytics tool
to understand system usage.
00:03:56 With that as a high-level overview of the course,
I now detail what to expect in Week 1. In this unit, in addition to outlining the course,
00:04:05 I'll summarize the product, how our customers use it, and what business benefits they can
expect.
00:04:12 In Unit 2, well go through the architecture so you understand how the product works and
interacts
00:04:18 with different system components. In Unit 3, well discuss the business scenario,
00:04:24 which well follow for the rest of the course, and make some comparisons with the simplified
scenarios from the introduction course.
00:04:33 In Unit 4, well start discussing the advance properties editor and how you can use it to refine
both the appearance and performance of your screens.
00:04:44 In Unit 5, we have our first unit in the course on scripting. This goes beyond the basics we
covered in the introduction course,
00:04:52 starting with some techniques for trapping data input errors. In Unit 6, well show you how to
create F4 Help fields on your SAP Screen Personas flavors.
00:05:03 Lets take a look at SAP Screen Personas in action to see how it simplifies classic SAP GUI
screens,
00:05:09 whether on ECC, SAP Business Suite on SAP HANA, or SAP S/4HANA. Here's our
purchasing dashboard, which we also used in the introduction course.
00:05:21 This replaces the standard SMEN transaction. While this screen gives you access to
everything in SAP,
00:05:30 anyone using the system needs a high degree of skill to navigate through all the transaction
codes. The role-based dashboard provides targeted information
00:05:45 for someone whose primary responsibility is reviewing purchase orders, reporting on those
purchase orders,
00:05:53 or looking up vendor information. With a single click,
00:06:03 you can instantly jump to information about any specific vendor. Well look at other functionality
on the screen and much, much more throughout the course.
00:06:17 Why is it important to know about SAP Screen Personas? Because this is one of the fastest
and easiest ways to simplify your ERP screens.
00:06:28 We have over a thousand customers who are already doing this. There are customers in all 25
industries that SAP serves using SAP Screen Personas
00:06:38 to make their screens more intuitive. We have customers in over 60 countries
00:06:45 simplifying their transactions and streamlining business processes. We hope the information in
this course will help you join all these customers
00:06:55 so you can bring productivity savings, lower training costs, and better data quality to your
organization.
00:07:06 In this unit, you learned about everything we will cover in the course and took a quick look at
the simplified,
role-based purchasing dashboard

2
00:07:15 we will revisit during subsequent weeks. In the next unit, we will review the architecture
00:07:21 so you understand how SAP Screen Personas works. Thank you.

3
Week 1 Unit 2

00:00:00 Hello and welcome to Week 1, Unit 2 of our openSAP course


00:00:09 "Using SAP Screen Personas for Advanced Scenarios". My name Tobias Queck and today
well be talking about the architecture behind SAP Screen Personas.
00:00:19 This unit will cover the general architecture of SAP Screen Personas 3.0 as well as give an
overview of all included or required components.
00:00:28 It will also cover how the release cycles of each of the components play together so that you
can plan your upgrades accordingly.
00:00:36 Last but not least, we will cover how the architecture not only enables our ECC customers, but
also S/4HANA customers.
00:00:45 SAP Screen Personas 3.0 is a non-modifying ABAP add-on or, in other words, it requires an
SAP NetWeaver ABAP stack and does not modify any other SAP or custom component.
00:00:58 Since the add-on can also be uninstalled, you as a customer can decide at any point in time to
install or uninstall the add-on
00:01:06 without the risk of modifying any other component. Let's now have a look at your system
landscape.
00:01:13 On the slide, you can see a simplified architecture of your SAP landscape. On the server side,
you have your SAP NetWeaver.
00:01:20 On top of it, you're running your SAP applications. For example, your ERP system.
00:01:25 Your users are using the SAP GUI on their desktops to interact with the system. Some of you
might also use SAP GUI for HTML,
00:01:32 also known as Web GUI, to access your SAP applications in a browser. Not mentioned in this
picture is the database because SAP Screen Personas runs on any DB,
00:01:42 though naturally we recommend SAP HANA for obvious reasons. If you're using SAP GUI for
HTML, then your browser connects to the SAP NetWeaver
00:01:51 or, to be more precise, the SAP NetWeaver kernel through a component called Internet
Transaction Server, or ITS for short.
00:02:00 ITS then interacts with heart of your NetWeaver. The DYNP.
00:02:03 The DYNP is responsible for executing your ABAP programs and transactions. To install SAP
Screen Personas, you install the Personas 3 ABAP add-on on your SAP NetWeaver.
00:02:15 Once the add-on is installed, it is detected by the DYNP. And from now on, the DYNP will
check for every screen with a Personas 3 add-on
00:02:22 if there are personalizations available for the current user in the current context. Furthermore,
the add-on contains all the client-side sources that offer the SAP Screen Personas
functionality to personalize your screens.
00:02:35 These sources are executed by the SAP GUI for HTML when available and when a user is
authorized to access SAP Screen Personas.
00:02:44 Representing the SAP Screen Personas development team here, I can proudly say that we
made sure that as many as possible customers can benefit from SAP Screen Personas.
00:02:55 The supported version below is an SAP NetWeaver Basis 7.0 SP25 in combination with an
SAP NetWeaver kernel 722.
00:03:04 And of course it also works on the new SAP Basis versions 7.01, 02, 31, 40, 50, as well as
S/4HANA.
00:03:12 You also need to make sure that you have the corresponding required kernel as well because
the SAP Screen Personas editor is attached to the SAP GUI for HTML.
00:03:22 Last but not least, on older SAP Basis versions, SAP Screen Personas requires a few
additional Notes to be applied.
00:03:29 The required Notes, as well as the required kernels, are summarized here on this slide.

4
00:03:34 The same information and more details can also be found on the SAP Screen Personas page
on help.sap.com. The beauty of this architecture, especially the communication between the
DYNP and the Personas add-on,
00:03:46 is that personalizations with Personas are available out of the box for any rendering engine
for Dynpro screens. So it's not just your SAP GUI for HTML that renders personalized screens,

00:03:56 but also your SAP GUI for Windows, also known as SAP GUI, and your SAP GUI for Java,
also known as Java GUI.
00:04:03 Just get the latest version of your preferred GUI and as soon as a Personas flavor is available
for your user, the Personas icon will show up and the changes for the active flavor are applied.

00:04:14 On the screen, you can see a simple flavor created in SAP GUI for HTML. The same flavor
applies also in the other GUIs but there are minor differences in the look and feel depending
on the GUI used.
00:04:25 The vast majority of our customers use SAP Screen Personas to make the classic Dynpro
screens and transactions more productive.
00:04:33 However, SAP Screen Personas also supports a limited feature set to personalize the more
modern Web Dynpro for ABAP screens and applications.
00:04:41 This is especially useful when having users that interact with both classic transactions as well
as Web Dynpro applications to make sure that a simplified screen is served
00:04:50 no matter what underlying UI technology is used. The SAP Screen Personas team releases a
new service pack every 6 to 9 months.
00:05:00 In between, theres a release of the updated client sources every two weeks. You can apply
updates when needed.
00:05:06 It's not required that you apply the latest version of the Note every two weeks. Just get the
latest version at your convenience.
00:05:13 In addition, if there are issues in our ABAP coding, an issue-specific SAP Note will be
released.
00:05:20 If either the client or the ABAP Note contains a critical fix, then we will also announce this in
our support newsletter
00:05:26 and the SAP Screen Personas Practitioners Forum. The team is committed to support
customers with an n-2 strategy,
00:05:34 or in other words, the latest released support package as well as the last two SPs are fully
supported and known issues are fixed.
00:05:42 As of today, summer 2017, service packs SP 03, 04, and 05 are fully supported. Due to its
architecture, it is important that you as a customer do not only keep SAP Screen Personas up
to date,
00:05:57 but also the GUI that you're using. Most importantly, the SAP NetWeaver kernel because it
contains SAP GUI for HTML.
00:06:04 As mentioned before, the SAP Screen Personas client relies heavily on the SAP GUI for HTML
for rendering as well as its meta data for editing.
00:06:14 To access or edit your flavors in SAP GUI for HTML, you need a browser. Thus, we also
recommend that you keep the browser on your client machines up to date
00:06:22 for improved performance as well as for security reasons. Usually when we are talking about
the architecture and the different old SAP Basis versions that are supported,
00:06:32 the audience asks about SAP S/4HANA. Or, to be more precise, it is asked what happens to
all my SAP Screen Personas investments
00:06:39 when upgrading to SAP S/4HANA. The short and simple answer is nothing.
00:06:45 Your flavor stays the same. The Personas add-on is the same so you can pretty much run
your existing flavors as before.

5
00:06:52 However, SAP S/4HANA comes with a new SAP theme, SAP Belize. This theme does not only
change colors, but among other things, it also affects the title area.
00:07:02 As a result, if you want to use your flavors together with the new theme, some small work on
your flavors is required.
00:07:09 But as usual with SAP Screen Personas when migrating, you always have the option to use
the classic look and feel together with Personas
00:07:16 until you are ready to switch to the new one. In this unit, you got an overview of the SAP
Screen Personas architecture
00:07:23 as well as the dependencies to other components and their releases. In the next unit, you will
learn about the business scenario guiding the course
00:07:31 as well as how the scenario ties in with the advanced topics we will cover over the next five
weeks. Thank you.

6
Week 1 Unit 3

00:00:00 Hello and welcome to Week One, Unit Three of our openSAP course
00:00:10 "Using SAP Screen Personas for Advanced Scenarios". My name is Peter Spielvogel and in
this unit I will discuss the general business scenario
00:00:18 we will cover in the rest of the course. As you know, SAP Screen Personas helps you build
role-based screens,
00:00:26 which we call flavors. The role we will follow in this course is a purchasing manager.
00:00:33 In the introduction course, we built this purchasing dashboard. It provides shortcuts to several
functions that a purchasing manager might do in his or her day- to-day work.
00:00:45 If I enter an order number, the information comes right back on the SMEN screen,
00:01:01 keeping the user in the same context without having to navigate to ME23N to retrieve the
information.
00:01:11 Similarly, if I want to look up a vendor, I can click on the button.
00:01:25 It takes me to transaction BP and shows me the information. This worked great for a simplified
introduction course.
00:01:37 In the real world, people don't always type in the values perfectly. Maybe they leave the field
blank, and we don't want to take them to this screen with a pop-up
00:01:53 that they then need to clear. Or they might type in an incorrect value, by accident, of course,
00:02:05 and again come up with an error message here, an error message in the corner, and then they
need to recover from that.
00:02:20 In fact, instead of leaving the data entry to chance, it would be best if we can add an F4 Help
to this screen.
00:02:29 So whatever the user enters, they can pick from a list and reduce the probability of a keying
error. Well show you how to do this.
00:02:38 These are real-world scenarios that well address in this course. Let's take a look at another
transaction ME2N,
00:02:47 for which we created a button to take you there easily. You can see all the different search
fields on the screens.
00:02:55 Which ones do you need? Well, probably there are only a few,
00:03:00 so we will show you how to simplify the screen using templates to make it very easy to provide
the search information here.
00:03:09 Now you can choose a purchasing group and hit Go and get the information right there on the
screen. As an alternative, you can search by document type
00:03:23 and come up with a different list. If we go back to the original screen,
00:03:29 youll notice the results look very similar. But with our new flavor, weve combined screens with
the search box
00:03:40 and the results to make it easy to search. These Fiori-looking screens can easily be embedded
into the Fiori launchpad
00:03:50 so you can deliver a seamless experience to your users. These are just a few of the real-world
scenarios well examine,
00:03:58 going deeper than the idealized and simplified screens we built in the introduction course.
Many transactions have complex logic with
pop-up messages or dependencies
00:04:09 among different areas of the screen. Well discuss these along with troubleshooting tips to
handle anything that comes your way
00:04:17 during the UX transformation process. In the introduction course, we showed you how to
merge tabs.
00:04:26 That too is not as simple as it looks. If you try to combine information from too many tabs,
00:04:33 this can hurt performance. Don't worry, well show a workaround using RFCs

7
00:04:40 to reduce the number of trips to the back end. Sometimes there are dependencies among
tabs.
00:04:46 Well discuss what happens then and what to do about it. The more you automate on the
screen,
00:04:54 the more processing steps are typically happening on the back end, in the browser, or
interactions between them.
00:05:02 If you try to do too much, you might see a performance impact. Well spend some time
discussing how to optimize performance,
00:05:10 so your users have a delightful experience with their simplified screens. In this unit, you
learned about the differences
00:05:19 between the simplified scenario we presented in the introduction course and the real-world
scenarios well show you
00:05:26 when you're handling advanced scenarios in SAP Screen Personas. In the next unit, we will
examine the advanced properties editor
00:05:36 and how you can use it to fine-tune the appearance and performance of your flavors. Thank
you.

8
Week 1 Unit 4

00:00:00 Hello and welcome to Week 1, Unit 4 of our openSAP course


00:00:10 Using SAP Screen Personas for Advanced Scenarios. My name is Klaus Keller and in this
unit, will talk about how to fine-tune your flavor with more advanced features.
00:00:21 We will have a look at extracting elements that are nested inside containers, helper lines that
help you to align elements,
00:00:29 and the various possibilities the Advanced Property Editor offers. On some screens, elements
are nested in containers or even multiple levels of containers.
00:00:41 The screen that shows the delivery address for purchase orders in transaction me23m is an
example of that. In order to optimize the screen using a flavor,
00:00:51 it sometimes is required to remove containers that are not required in simplified screens. One
obvious way would be to move all elements out of the container, hide the container,
00:01:03 and move the elements back to where we want them to be. However, there is an easier and
faster way to achieve this
00:01:09 and I would like to show this to you. We take a look at the delivery address of the purchase
order.
00:01:22 On the screen, we can see the delivery address. Lets assume we want to change the screen,

00:01:26 so we create a new flavor for it. Click on New Flavor,


00:01:34 give the flavor a name, and here we can see that the delivery address resides in multiple
levels of containers.
00:01:52 So I can click through it and see there are at least two nesting levels of containers. As a side
note, whenever you've selected an element in the flavor editor,
00:02:03 you can use the escape key to select this parent. If, for some reason, we want to eliminate the
multiple nesting,
00:02:10 we could move the fields one by one out of the inner container. But there is an easier and
faster way to do that.
00:02:19 I select the inner container, and now I just click on Extract Objects.
00:02:26 Now all address fields are moved from the inner container one level up, and the inner
container is set to invisible.
00:02:37 I can show this by selecting, that is only one container,
00:02:41 and then the elements reside in it. We saw that a single click on Extract Objects moved all
elements from the inner container to the outer container.
00:02:51 The inner container is now hidden. This functionality saves you time if you want to reduce the
amount of nesting containers.
00:03:01 Other features that help you arrange screen elements in the flavor editor are helper lines and
the snap mode.
00:03:09 Rather than comparing top, left, width, and height values of multiple elements, helper lines
show you immediately whether the current dragged element is in alignment with other
elements on the screen.
00:03:21 If helper lines are enabled, thin lines will show up and indicate a matching alignment. If,
additionally, snap mode is active,
00:03:29 the dragged elements snap to helper lines and approximate to it. Even if snap mode is
enabled,
00:03:36 you still can place an element freely on the screen by holding down the Alt key. The Alt key will
temporarily deactivate snap mode.
00:03:47 To enable and configure helper lines in snap mode, you need to switch to the design tab in the
Flavor Editor of SAP Screen Personas.
00:03:55 There you will find the respective buttons. To get a comprehensive list of properties and values
for an element,

9
00:04:04 you can have a look at the Advanced Property Editor. There are multiple ways to get to the
dialog.
00:04:10 First, youll need to select the element you want to inspect or change, and then the advanced
properties can be opened via the Home tab, dropdown More Options, entry Advanced.
00:04:22 You could also use shortcut CTRL+ Alt + E or the key navigation sequence Alt + H, S, M, A.. I
will show that in a moment.
00:04:33 While you can use the Advanced Property Editor to change and reset property values, youll
need to be careful what you enter.
00:04:41 Although the dialog will indicate if a value is not correctly entered, being an expert tool, it still
allows you to set the value.
00:04:50 In other words, it will store whatever you enter, and that might harm the flavor. However, on
the other hand, there are a few properties that can only be set via the advanced property
dialog.
00:05:03 For instance, in order to define a certain tab sequence for the focus during runtime, you need
to set the property tab to element in the Advanced Property Editor.
00:05:15 Another use case of the Advanced Property Editor is to reset signal properties or the complete
selected elements to their original appearance.
00:05:23 Lets have a closer look at one scenario where this might be helpful. I use again a transaction
to display purchase order me23m.
00:05:36 In here I start the flavor editor again. Lets assume you changed a sequence of elements in a
toolbar.
00:05:47 Later you decide you do not like the changes that have been done, you want to revert back to
the original state of the toolbar.
00:05:54 All you need to do is to select the toolbar and start the Advanced Property Editor. To
demonstrate the keyboard navigation,
00:06:02 I do this here with the Alt key followed by
H, S, M, A. I select the toolbar and I press the Alt key.
00:06:14 After pressing the Alt key, I can see tooltips showing what key I can use to access features on
the screen. As the advanced property dialog is on the Home tab, I press H.
00:06:28 Now it shows me the keys for the groups, I press S for style group. As I want to select the
future from dropdown More Options, I press M now.
00:06:41 The Advanced Property Editor can be started with A for advanced. Here we see the advanced
property dialog.
00:06:50 Changed properties are indicated by reset icon next to them. In order to reset all change
properties at once and bring the element into its original state,
00:07:00 I could click on the Reset All Properties button. There is a confirmation dialog which we can
confirm with Yes.
00:07:11 As you can see, the toolbar is back in its original state as it was before we started to edit the
screen. In this unit, we learned how to do modification with advanced features.
00:07:24 We learned how to extract elements from their containers to reduce nesting, what helper lines
and snap mode mean,
00:07:31 and how to use the Advanced Property Editor. In the next unit, you will learn how to use
conditional logic and session constants.
00:07:40 Thank you.

10
Week 1 Unit 5

00:00:00 Hello and welcome to Week 1, Unit 5 of our openSAP course


00:00:09 Using SAP Screen Personas for Advanced Scenarios. My name is Sebastian Steinhauer.
00:00:14 Im the product owner for SAP Screen Personas. Today we will have our first closer look at
scripting.
00:00:20 This episode will be based on our flavor that we created as part of the openSAP course
"Introduction to SAP Screen Personas".
00:00:27 If youre using our sandbox system, the flavor will be available for you to copy and modify. This
flavor has a nice lookup feature.
00:00:35 However, it has some limitations. So if you put in an order number that doesnt exist, like
NONUMBER, and hit the Go button,
00:00:47 you can see that it actually returns a value right away, which, of course, is an issue we need to
address.
00:00:52 So lets take a look at the script. And in the script, we'll be looking for the place where we take
the order number and confirm it on the screen.
00:01:05 I'm going to take the remainder of the script and temporarily put that into a text file. I'll simply
reexecute the script to see what happens at that point in our script.
00:01:20 So as we can see, the screen seems fine, but if we toggle the script editor to the top of the
screen,
00:01:26 we can see that there is actually an error message in the status bar. So if you ever wondered
why the script editor can be toggled up and down, this is why.
00:01:37 Now we need to add a check for this condition, so we can use the object inspector,
00:01:43 and grab the status bar, and add a check with an if condition.
00:01:50 We're going to look for the messageNumber, and if that messageNumber equals 019, then we
know that this specific error has happened
00:02:02 and an invalid order number has been entered. And in that case, what we need to do in our
script
00:02:08 is we need to return to our previous screens, so we're going to use the object selector again,
00:02:19 find the cancel button, and use its press command.
00:02:34 And then were going to return out to our first screen, by pressing that button.
00:02:41 And we want to highlight that theres an error that happened to the Order Number field. So
what were going to do is we will set the color value for the Order Number.
00:02:53 Specifically were going to look at the backgroundColor. Were going to set that
backgroundColor to a slight pinkish red,
00:03:08 with FFC9C9 as its color value. And we will set the fields border color to a bright red,
00:03:21 which is just FF0000. Also, of course, we dont want any of the other values to still be reflected
in the return value.
00:03:33 So were going to select the Net Value and its text value and set that to empty.
00:03:45 Also were going to do the same for the Delivered state as well as the Invoiced state here.
00:04:07 And if we save the script now, and execute it with our NOORDER value,
00:04:18 we can see that the script returns and puts the highlighting on that field. Of course if the script
executes as planned, we dont want that to happen,
00:04:31 so we need to put our previously removed piece of the code into the else block, so Ill just take
that and move it back in.
00:04:44 And if we now provide a valid order number, its supposed to work. So let me put in this
number,
00:04:56 and execute our script. And as you can see, the values are still returned.
00:05:02 However, as you can see, there's also an issue with the script since the input value is still
highlighted as an error.

11
00:05:12 So whenever were returning successfully with our script, in the end we need to reset these
values to their default.
00:05:20 So Im going to select the Order Number field, and again Im interested in the color properties,

00:05:30 specifically the background color and the border color. To set them to their default, Im simply
going to set them to an empty string.
00:05:52 And as you can see, if we reexecute the script, the value is cleared again.
00:05:59 The values are not highlighted as an error anymore and our script executed successfully. So
far so good. Pretty nice script.
00:06:08 But this is the advanced course, so we can do better. Checking for an error three screens into
a script will create some overhead,
00:06:16 especially since some values can be ruled out right away. For example, in the case of an
empty input field,
00:06:23 there is really no need to execute any other screen, so lets make that scenario quicker.
00:06:30 Right here, after we read the order number, we can check its value, and if its not defined or
empty, we can check it.
00:06:37 So lets do that. Do an if,
00:06:42 and were interested in the order number, and were interested in the case in which it is not
defined.
00:06:50 So "if(!(ordernr))" (if not order number), and then we simply will return with our script.
00:07:04 However, we also want to highlight the error, so we're going to reset our Order Number field
values again.
00:07:14 So as before, we're going to use the object picker and set the backgroundColor to FFC9C9.
And we will also set the border color to our bright red.
00:07:40 If, of course, our check succeeded and the value that was provided was valid, we will do the
same thing we did before.
00:07:47 Were going to set the same value, but this time were not going to set it to a color, but again
we'll go back to our empty string to reset to its default.
00:07:59 We save this. We remove the value.
00:08:03 And we execute the script. We can see that the Order Number field is highlighted as an error.

00:08:09 If we put our input value back in and we execute our script, you can see that it is cleared out
and works as designed.
00:08:21 In JavaScript, a number of values will translate to false when evaluated. They are called
falsy.
00:08:27 Null, Undefined, Not a Number, the empty string (""), 0, and False will do that.
00:08:34 Since this is Boolean logic, all the other values are true and theyre thus called truthy. Now
this script is really much better.
00:08:43 However, it will always execute even if the order number hasnt even changed. So lets quickly
improve that as well.
00:08:52 Whenever our script executes fully, we will simply put the last checked order number into our
session cache using session.utils.put.
00:09:00 So right here, at the end of the script, were going to do session.utils.put. Were going to
provide a key, in this case lastOrderNumber and the ordernr for it.
00:09:22 Now at the beginning of our script, after checking whether theres actually a value provided, we
can now go ahead and check whether the value that we provided
00:09:33 is the same one as the one that was previously in this field. So we go with
"if (ordernr === session.utils.get.)",
00:09:49 Im going to provide the key, which is lastOrderNumber. And if those values are identical,
00:09:58 we just execute it with the exact same input value. So well simply return,

12
00:10:08 and we can simply save the script, and, as you can see, if we now execute with the exact
same input twice,
00:10:19 the first time to set the value into the cache, the second time to read it, that the second
execution is much faster,
00:10:26 so we actually skipped all the additional steps required. The advantage of using
session.utils.put and session.utils.get is that this check is done on client only,
00:10:37 and there is no round-trip to the back end needed. In the last couple minutes, you learned how
to add conditional logic to your scripts
00:10:45 and how to use it to handle errors. You also learned how you can prevent unnecessary back-
end roundtrips.
00:10:53 If you want to do this exercise itself, you can find the flavor I used as a starting point in our
SAP Screen Personas sandbox
00:11:00 and in the SAP Screen Personas Flavor Gallery. In the next unit, you will learn how to enhance
your flavors with an F4 lookup.
00:11:09 Thank you for taking this openSAP course. Have a great day.

13
Week 1 Unit 6

00:00:00 Hello and welcome to Week 1, Unit 6 of our openSAP course


00:00:10 "Using SAP Screen Personas for Advanced Scenarios". My name is Regina Sheynblat.
00:00:15 In the last unit, we showed you how to go beyond basic scripting. Today, we will be focusing
on F4.
00:00:22 We will discuss the purpose of F4, how to add the needed table and field for F4 to the whitelist,

00:00:27 and how to implement and apply F4 to flavors. SAP supports two types of help:
00:00:34 modal and amodal. Both types provide the same F4 functionality.
00:00:39 The difference is in the user interface. SAP Screen Personas prefers that F4 help is set to the
modal setting.
00:00:47 Let me show you where you would find that setting in your setup. First click on the Help in your
SAP GUI.
00:00:56 Click on Settings and you will see the F4 Help tab. You will see here amodal and modal. As
mentioned before,
00:01:04 SAP prefers that you set it to modal. In the previous openSAP course,
00:01:11 you saw how we added the order number lookup to the Purchase Order Monitoring dashboard.
Let me refresh your memory of the dashboard.
00:01:20 Heres the order number lookup and you see that this is F4 help. The reason that that was
possible for the transaction ME23N
00:01:30 is because the table and the field that supports the F4 help has already been added to the F4
whitelist,
00:01:38 which is one of the things that an administrator would do. Before search help can be added to
any flavor,
00:01:45 the table and the field that it needs to access have to be whitelisted. Let me show you the help,
the whitelist that supports this order number.
00:01:55 You would go to the admin transaction, click on F4 Help Whitelist,
00:02:01 heres the table name and the field name that supports the order number. In order to know
what to add to the whitelist,
00:02:09 you first have to find out what table and field name supports the F4 help that you want to add
to your flavor.
00:02:16 Now let me show how to find that table and field that can be added to the whitelist.
00:02:21 Lets start from the dashboard. Were going to click on the Display Vendor button that was
previously added.
00:02:29 This is launching your business partner transaction. Lets assume we want to add the
Business Partner field
00:02:36 to the front of the dashboard. By selecting the Business Partner field and pressing F1,
00:02:45 we will get the Performance Assistant. Click on the Technical Information,
00:02:52 and here you will find the table name and the field name that you will be adding to the whitelist.

00:03:00 Lets get out of here. And well go back to the admin transaction.
00:03:11 Now in the admin transaction, were going to add the table and the field to the whitelist.
00:03:19 Were going to click Change, New Entries,
00:03:27 type in the table name and the field
00:03:37 and save our entry. The data was saved.
00:03:45 Now lets go back to our dashboard. And insert a new text field,
00:03:51 so were going to edit our flavor and were going to insert a new F4 text field.
00:04:06 Now you will see that the table you have added is already in the dropdown and you can select
that.

14
00:04:14 Were going to drag it down here. And save and exit.
00:04:21 You can test out what you have done. Theres more than one way to add the F4 field to your
flavor.
00:04:35 But both ways require that you whitelist the table and the field. The second way to add the F4
field to your flavor is to use script events.
00:04:44 Let me show you how to add F4 using a script. Lets first delete the previously inserted F4 text
field.
00:04:52 And for using the script, were going to insert just a plain one-line text field. Were going to
save and exit.
00:05:02 And now were going to start our scripting. Were going to create a new script. Lets call this F4
Lookup.
00:05:18 Were going to click on the first line, were going to use the Object Selector by selecting the
text field that you just added.
00:05:31 Were going to insert a line and youre going to be able to find the showF4Help in one of the
menu properties that you have selected.
00:05:42 Now you want to add the table. And the text field
00:06:11 dont forget that semicolon that you have previously noted down.
00:06:15 Save your script. Exit.
00:06:21 And well go back to editing our flavor. Now well use Script Events to attach our F4 Lookup.
00:06:36 Save and exit. And now were going to test it out.
00:06:48 Voil! Today we showed you two ways you can add an F4 text field to your flavor.
00:06:54 This week you learned about the architecture behind SAP Screen Personas, how to fine-tune
your flavors,
00:07:00 and how to use conditional logic in your flavors. Next time, we will cover how to handle
dynamic scenarios with SAP Screen Personas.
00:07:09 Next week, we will also cover how to use RFCs as well as managing your scripts and
debugging them. Thank you.

15
www.sap.com

2017 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or
for any purpose without the express permission of SAP SE or an SAP affiliate
company.
SAP and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE (or an
SAP affiliate company) in Germany and other countries. Please see
http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.
Some software products marketed by SAP SE and its distributors contain
proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for
informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and
services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be
construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue
any course of business outlined in this document or any related presentation,
or to develop
or release any functionality mentioned therein. This document, or any related
presentation, and SAP SEs or its affiliated companies strategy and possible
future developments, products, and/or platform directions and functionality
are all subject to change and may be changed by SAP SE or its affiliated
companies at any time
for any reason without notice. The information in this document is not a
commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and
uncertainties that could cause actual results to differ materially from
expectations. Readers are cautioned not to place undue reliance on these
forward-looking statements, which speak only as of their dates, and they
should not be relied upon in making purchasing decisions.

You might also like