
By using SAP GUI Property Collector, you can identify the UI elements that you want to use to extract their data. SAP GUI Property Collector helps you to determine field IDs that you need to extract data from an SAP GUI transaction (a dynpro screen). Before you can define new tags, you first need to collect the properties that are to be exposed from a transaction and then used in the side panel.
Properties are the basis for defining tags. For more information, see 6.7.2 Creating Tags in the Tag Table.
To use the SAP GUI Property Collector with SAP Logon (standalone SAP GUI), you use SAP GUI 7.20 (any patch level).
To use SAP GUI transactions in NWBC, you use at least SAP GUI 7.20 patch level 9.
You have installed and enabled SAP GUI scripting on the server and in SAP GUI. For more information, see http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3099a575-9cf4-2a10-9492-9838706b9262.
Caution
If SAP GUI scripting is enabled, the screens can be read.
You can also use read-only scripting. For more information, see the SAP GUI scripting API documentation at http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a034a16b-3bfe-2a10-e2bb-8bd880db0b3c.
In NWBC for Desktop, you start SAP GUI Property Collector by pressing CTRL and simultaneously choosing .
To use the tool with standalone SAP GUI, log on to your system using SAP Logon.
Then start SAP GUI Property Collector from one of the following installation folders:
C:\Program Files\SAP\NWBC35\NwbcPropertyCollector.exe
C:\Program Files (x86)\SAP\NWBC35\NwbcPropertyCollector.exe
Open an SAP GUI transaction in NWBC for Desktop and display the relevant fields.
In SAP GUI Property Collector, choose the relevant session. Each SAP GUI main window is a session. Sessions with disabled scripting are shown in the dropdown list with a comment.
Choose the Select from Screen pushbutton and keep your mouse button pressed while moving your mouse over UI elements in SAP GUI.
You can choose the Property Viewer pushbutton to view UI elements and the property list in a separate window. For more information, see below.
If the data from SAP GUI is not up-to-date and grayed out, choose Refresh.
You can select the Program Name, Screen, and Long ID checkboxes. If you do not select the Long ID checkbox, short IDs are added to the collection.
You can use long IDs or short IDs. Short IDs are the last unique fragment of long IDs.
Example
Long ID
You have multiple G/L accounts that have identical short IDs but different long IDs. If you want to extract a specific G/L account, use long IDs since only long IDs are unique in this case.
Short ID
You have two transactions AS23 and AS03, which are identical from a coding point of view. Long IDs for fields used in these transactions are:
Fixed asset: lid:/wnd[0]/usr/subKOPF:SAPLAIST:0099/ctxtANLA-ANLN1.Text
Group asset: lid:/wnd[0]/usr/subKOPF:SAPLAIST:0097/ctxtANLA-ANLN1.Text.
Technically, fixed asset and group asset are the same, therefore you can only use the short ID: sid:ctxtANLA-ANLN1.Text.
Note
Short IDs are not unique since they might appear multiple times on the screen in different subscreens. In this case, the first short ID found wins.
Short IDs do not work for elements like title, since they do not have technical names.
Short IDs only work in the active window. For example, when a dynpro dialog box is opened, the fields on the screen are only found when using long IDs. Long IDs contain Wnd[0] and therefore also allow you to read field values below dialog boxes. This only works if the dialog box and the dynpro below are in the same program.
Recommendation
In general, we recommend that you use short IDs. Use long IDs only where necessary.
If you have multiple fields that are similar and that have identical short IDs on different subscreens, you should use long IDs. You should use short IDs if you have screens that are slightly different depending on the transaction context. It is possible that long IDs are slightly different for the same field and this is not obvious at first glance. In this case, you have to use the short ID because the tag is a key field in the tag table and you cannot have two entries with the same tag name, which differ only in the property (short/long ID).
You can use SAP GUI Property Collector to simulate the extraction and check the extracted value in the Value field.
Choose the Add to Collection pushbutton.
You can use asterisks (*) for the Program Name and Screen fields if the same SAP GUI field is used on multiple screens or in multiple programs. For example, you can use 1* for all screens that start with 1 (100, 101, 110, 120, and so on).
Select the lifetime for the property. You have the following options:
Transaction
The data context stays available as long as the current transaction is running in NWBC.
Screen
The data context stays available as long as you do not leave the main screen.
To see which properties are alive, you can select the Show only properties alive in NWBC’s data context checkbox. If you select this checkbox and you start a new transaction, the tool does not show any of the collected values any longer, since they are not alive any longer.
The colors in the Value column have the following meaning:
Yellow
The fields are alive in the data context but not on the current screen.
Black
The black properties are not alive in the data context.
Green
The green properties are all currently read from the screen or they are constants (value: prefix in ID). They are alive in the data context.
Select the relevant properties, and choose the Copy to Clipboard pushbutton.
Continue tagging in the tag table. For more information, see 6.7.2 Creating Tags in the Tag Table.
In the Property Viewer, you can get an overview of the current screen and of all supported properties of a UI element. When you select a different property, it is automatically selected in the main dialog of SAP GUI Property Collector and you can directly add it to the collection. In the Property Viewer, you find the extended properties, that is, properties that are implemented in NWBC and not in SAP GUI scripting.
Example
IsOnScreen
Every UI element has this property. The value is X when the field is currently visible on screen; the value is blank when the field is not on the screen.
SelectedRowsData
SelectedColumnsData
SelectedCellsData
For more information, see the screen explanations in the Property Viewer.