Show TOC

6.7.1.1 Identifying UI Elements with SAP GUI Property CollectorLocate this document in the navigation structure

Context

You can use SAP GUI Property Collector to identify the UI elements in an SAP GUI transaction (a dynpro screen) and their properties that are to be extracted and passed to the side panel.

Procedure

  1. Start SAP GUI Property Collector in one of the following ways:
    • In NWBC for Desktop, start SAP GUI Property Collector by pressing CTRL and simultaneously choosing Start of the navigation path Help Next navigation step Tools Next navigation step SAP GUI Property Collector End of the navigation path.

    • 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

  2. Open an SAP GUI transaction in NWBC for Desktop and display the relevant fields.
  3. 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 menu with a comment.

  4. Choose the Select from Screen pushbutton and keep your mouse button pressed while moving your mouse over UI elements in SAP GUI.
  5. You can choose the Property Viewer pushbutton to view UI elements and the property list in a separate window. For more information, see below.
  6. If the data from SAP GUI is not up-to-date and grayed out, choose Refresh .
  7. You can select the Program Name , Screen , and Long ID checkboxes.

    You can use long IDs or short IDs . Short IDs are the last unique fragment of long IDs. If you do not select the Long ID checkbox, short IDs are added to the collection.

    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 (transaction does not exist) and AS03 (transaction does not exist), 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 titles, since they do not have technical names.

    • Short IDs work in the active window only. For example, when a dynpro dialog box is opened, the fields on the screen are found only when using long IDs. Long IDs contain Wnd[0] and therefore also allow you to read field values below dialog boxes. This works only if the dialog box and the dynpro below are in the same program.

    Recommendation

    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 that differ only in the property (short/long ID).

  8. You can use SAP GUI Property Collector to simulate the extraction and check the extracted value in the Value field.
  9. Choose the Add to Collection pushbutton.
  10. You can use asterisks (*) for the Program Name field and the Screen field 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).
  11. 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.

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

  13. Select the relevant properties and choose the Copy to Clipboard pushbutton.
  14. Continue tagging in the tag table. For more information, see 6.7.2 Creating Tags in the Tag Table .