VeloX Docs

SAP plugins

SAP RD Specification Data Read

Read specification data from SAP EHS / Product Compliance specifications for comparison, reports or further migration steps.

Purpose: Read specification data from SAP specifications (EHS / Product Compliance).

  • Take search values such as the specification number, type or value assignment type from an Excel file, an SAP table, a database table or a third-party system.
  • Read the matching specification data (header, identifiers, value assignments, header status and more) and pass it on to the next plugin.

In the Designer, the plugin is called Specification Read and is in the SAP Targets group. Like the other plugins in this group, it receives its input from a source plugin. For each source record, it reads the specifications that match the search values with the standard BAPI BAPI_BUS1077_GETDETAIL and returns the selected objects as tables that you can map to the next plugin, for example the Excel Export plugin.

How to use

  1. Add the Specification Read plugin to the canvas.
  2. Open the Connection Parameters.
  3. Fill in the SAP connection parameters, user name and password, or connect through the Password Manager (see example).
  4. Set the plugin options (see Options).
  5. Click Connect.
  6. The line under the connection button turns green when the connection to SAP is established.
  7. Select the search fields and export objects, then map the search fields to a source (required) and the export fields to a target (optional).

The connection tabs are the same as in the other SAP plugins: Password Manager (SAP System and Server Type), Application Server and Message Server. See the Password Manager for saved SAP systems.

Options

Field Description
Read mode (drop-down) Read without Lock (default) reads the data for display only, without locks. Read with Lock reads the data with a shared lock on the specification while it is read.
Read Value Assignment Type Description Also reads the description of each value assignment type (class). The description is returned in the SUBCHACAT_DESCRIPTION field. Selected by default.
Phrase Conversion Returns phrase-based characteristic values as the full phrase text instead of the phrase ID. The texts are read in the language from the PHRASE_LANGUAGE search field. Selected by default.
Read Phrase LongText Also reads the long texts of phrases. Selected by default.

Expand Settings in the connection parameters to change the connection pool settings (IDLE_TIMEOUT, POOL_SIZE, MAX_POOL_SIZE) or to open the plugin Notes.

Phrase conversion details

With Phrase Conversion, the plugin reads the phrases behind all characteristic values that have the phrase key format (phrase library and phrase, separated by -) with BAPI_BUS1091_GETDETAIL. In the Value assignments output:

  • CHAR_VALUE contains the phrase long text if Read Phrase LongText is selected and the phrase has one, otherwise the phrase text.
  • CHAR_VALUE_ORIGIN keeps the original value (the phrase key).
  • Additional fields with the prefixes PHR_HDR_ (phrase header) and PHR_ITEM_ (phrase text) contain the phrase data.

PHRASE_LANGUAGE accepts a two-letter ISO code or the SAP internal language key. The plugin uses the phrase texts in the logon language of the connection, so set PHRASE_LANGUAGE to the same language as Language in the connection parameters.

Import and export fields

The Specification Read plugin consists of three main parts, see Image 1 below:

  • Input header structure parameters (1)
  • Input table parameters (2)
  • Output table parameters (3)
Image 1: Output table parameters (3)

Image 1

Open Fields and select what you need on the tabs. Click Select All to select everything on a tab.

Tab Content
Search Fields The search criteria: specification header fields (for example SUBSTANCE), PHRASE_LANGUAGE, and value assignment types (PROP_HEADER) to read only selected value assignment types.
Export Objects The data to read, for example Specification Header Data, identifiers and identifier long texts, regulatory list assignments, material assignments, reference specifications, inheritance relationships, value assignment types, instances and data, component assignments, user-defined texts, transport and packaging data, Header Status and Confirmations (SAP error messages).
Subobjects Shown for objects that have subobjects.

The drop-down list shows the description of each field. Use the search if there are many parameters, see Image 2.

Image 2: The drop-down list shows the description of each field. Use the search if there are many parameters, see Image 2

Image 2

Search fields

Field or object Description
KEY_DATE, CHANGE_NUMBER, VALFR, VALTO Optional date and change number parameters of BAPI_BUS1077_GETDETAIL. CHANGE_NUMBER has Add Leading Zeros switched on by default.
PHRASE_LANGUAGE Language for phrase texts (see Phrase conversion details). Converted to upper case.
Specification header Mandatory. SUBSTANCE (specification number) is mandatory and has Add Leading Zeros switched on by default. If the source returns several rows for one record, all matching specifications are read.
Value assignment types (PROP_HEADER) Optional. Map SUBCHACAT to read only these value assignment types.

Output tables

Each export object is returned as a table. Every row also contains the fields of its parents, so you can map a single object without joining tables yourself:

  • All objects contain the specification key fields SUBSTANCE and SUBCATEGRY, filled from the specification header.
  • Identifier objects contain ID_TYPE, ID_CATEGRY and IDENTIFIER of their identifier; INSTANCE is the identifier sequence.
  • Value assignment objects contain SUBCHACAT and SUBCHACAT_DESCRIPTION of their value assignment type; INSTANCE is the instance sequence.
  • Identifier long texts are joined into the LONG_TEXT field of the identifier. CMPLT_TEXT contains the long text if there is one, otherwise the identifier.
  • Assessment and source data are added to the rows of Value assignment instances.
  • For reference specifications, REF_SUBSTANCE contains the number of the referenced specification (read from table ESTRH).
  • Header Status returns one row per specification with the latest status (SCHEMA_ID, STATUS_ID) from table /PLMB/SAM_OBJST. This object is available only if the function module /PLMB/SAM_MODIFY_STATUS exists in the SAP system.

Field options

Open the details of a search field to set Default Value (with No Default Value., Ignore Source. or Only If Source Empty.), Convert To Upper Case and Add Leading Zeros. Export fields have a Remove Zeros option. Mandatory fields are marked with M.

Mapping

First, create a mapping between a source and the Specification Read plugin. The source can be the Excel Import plugin, a database, the SAP Read Table plugin, the Python plugin and so on.

For example, if the source is the Excel plugin, map the fields between the Excel plugin and the Specification Read plugin with drag and drop, as shown below:

Image 3: For example, if the source is the Excel plugin, map the fields between the Excel plugin and the Specification Read…

Image 3

Most Specification Read fields are part of the standard SAP transaction CG02BD. To complete the mapping, you need domain knowledge in Specification Management (EHS-BD-SPE). Also see the SAP documentation.

Run-time behavior

  • The plugin reads specification data with BAPI_BUS1077_GETDETAIL. Phrase texts are read with BAPI_BUS1091_GETDETAIL.
  • Header Status returns the latest status of each specification.
  • Reference specifications and component specifications are read too.
  • The plugin only reads data. It doesn't change anything in SAP.
  • The migration log shows a Specification Read column. Click it to open the specification in SAP. This requires SAP GUI on your computer and the function module C100_ENTRY_ONE_SUBSTANCE in the SAP system.

SAP calls for each record

  1. BAPI_BUS1077_GETDETAIL with the search values and read flags for the selected export objects, followed by BAPI_BUS1077_CLEARBUFFER.
  2. BAPI_CLASS_GETDETAIL for each value assignment type, if Read Value Assignment Type Description is selected.
  3. RFC_READ_TABLE on ESTRH for the numbers of reference specifications, if REF_SUBSTANCE is selected.
  4. BAPI_BUS1091_GETDETAIL for the phrases, if Phrase Conversion is selected and value assignments are read.
  5. RFC_READ_TABLE on /PLMB/SAM_OBJST, if Header Status is selected.

The Simulation setting has no effect on this plugin, because it never writes to SAP.

Log

The Specification Read column shows the specification number when the record searches for exactly one specification. If BAPI_BUS1077_GETDETAIL returns an error, for example because the specification doesn't exist, the row is marked as an error with the SAP messages, and no data is passed on.

Prerequisites

  • SAP EHS / Product Compliance (specification management) in the SAP system.
  • An SAP user with RFC access, display authorization for specifications and phrases, and authorization to read tables ESTRH and /PLMB/SAM_OBJST with RFC_READ_TABLE.
  • For opening specifications from the log: SAP GUI on your computer.
Esc