Ansicht
Dokumentation

/SEHS/C1F0_PHRASES_CREATE - EHS-ERP: Create Phrases

/SEHS/C1F0_PHRASES_CREATE - EHS-ERP: Create Phrases

ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module is part of the application programming interfaces (APIs) in EH&S for phrases. It is used to to create phrase data.

What is the structure of the table with the phrase data?

X_API_PHR_TAB
   |
   |-- HEAD                    Header data
   |-- TEXT_TAB
   |       |
   |       |-- HEAD            Item data
   |       |-- LONGTEXT        Long text for a phrase text
   |-- REF_TAB                 Reference data
   |-- JOIN_TAB                Data for phrase set assignment

Which phrase is created?

The entry in the table X_API_PHR_TAB specifies the phrases for which data is to be created. Provided that data is created for an existing phrase, you must determine the phrase by specifying its record number (RECN). If no record number has been entered, the phrase header is created.

Which data is created for the phrases?

The individual indicators I_FLG_xxx specify which phrase data is to be created. Accordingly, the data must exist in the table X_API_PHR_TAB.

I_FLG_HEADER X_API_PHR_TAB-HEAD
I_FLG_TEXT X_API_PHR_TAB-TEXT_TAB-HEAD
I_FLG_TEXT_LONGTEXT X_API_PHR_TAB-TEXT_TAB-LONGTEXT
I_FLG_REF X_API_PHR_TAB-REF_TAB
I_FLG_JOIN X_API_PHR_TAB-JOIN_TAB

If an indicator is set to TRUE, the corresponding data is created in the database. However, the record number of a data record cannot already exist. If it does already exist, this record is not created.

How are errors reported?

The following three indicators provide the information as to whether problems generally occurred when data was being processed:

  • E_FLG_LOCKFAIL
A lock error occurred.
  • E_FLG_WARNING
A warning occurred.
  • E_FLG_ERROR
An error occurred.

Each structure or table within the phrase data table also has the fields ERRORMODE, ERRORINFO, ERRORCLASS, and ERRORPARAM:

  • ERRORMODE
This field contains the information as to whether the data record has caused an error or warning in processing. The following constants are defined for this purpose in the type group ESPAP:
  • ESPAP_ERRORMODE-NONE ,,No error occurred

  • ESPAP_ERRORMODE-WARNING ,,Warning occurred

  • ESPAP_ERRORMODE-ERROR ,,Error occurred

  • ERRORINFO
If a warning or error occurs, this field contains a number that is defined as a constant in the type group ESPPH. This number is subject to the following rules:
  • Number < 1000

The number represents a message number for a message without parameters.
  • 1000 <= number < 2000

The number minus 1000 represents a message number for a message with parameters.
  • Number >= 2000

Error number without reference to a message.
Error handling should always be carried out with the defined constants from the type group ESPPH so that you do not depend on the error number.
Example of error constants:
  • ESPPH_ERROR-AUTHORITY-NUMBER ,,Authorization error

  • ESPPH_ERROR-DUPLICATE_REC-NUMBER ,,Record already exists

  • ESPPH_WARNING-HEADER_DELETED-NUMBER ,,Header is logically deleted

  • ERRORCLASS
Provided that the error number represents a message, the message class is specified in this field. With the error number, the message class is defined as a constant in the type group ESPPH.
  • ERRORPARAM
This parameter enables the API to return error-related information to the initiator. This information can then, for example, be set as a parameter for a message.

Notes

  • In order that only one lock per phrase library is transmitted when you create phrase data (this can also be several phrases), the I_FLG_LOCK_CATALOG indicator must be set to TRUE. This means that the phrase library is exclusively locked.
  • The initiator of the API must have included the type group ESPPH. This makes the table types, structure types, and the constants for error handling available to the initiator.

Further information

  • Type group ESPAP
  • Type group ESPPH




Parameters

E_FLG_ERROR
E_FLG_LOCKFAIL
E_FLG_WARNING
I_ADDINF
I_FLG_CHECK_ONLY
I_FLG_HEADER
I_FLG_JOIN
I_FLG_KEY_DATE_SWITCH_ONLY
I_FLG_KEY_DRAWN
I_FLG_LOCK_CATALOG
I_FLG_REF
I_FLG_SPLIT_WITHOUT_CHANGENO
I_FLG_TEXT
I_FLG_TEXT_LONGTEXT
I_LSADM
I_VALFR
I_VALTO
X_API_PHR_TAB

Exceptions

CONVMODE_SET_FAILED
INTERNAL_ERROR
INTERVAL_ACCESS_ERROR
KEYDATE_OR_CHANGENUMBER_ERROR
NO_OBJECT_SPECIFIED
PARAMETER_ERROR

Function Group

S/SAPLC1F0

Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 7677 Date: 20240427 Time: 063746     sap01-206 ( 84 ms )