Ansicht
Dokumentation
C1L30002 - EHS: BOMBOS - Creating Additional Substance Data
ROGBILLS - Synchronize billing plans Vendor Master (General Section)This documentation is copyright by SAP AG.
You can use this SAP enhancement to generate other customer-specific data for the specification, in addition to the data specified by Customizing. The enhancement is executed after compositions are generated, but before the data is written.
Input parameters
- I_WORKLIST
Transfers data for an entry in the worklist to the function module exit. You can use this data to perform Customizing checks that decide on the selection of additional data that is to be generated.
-
Note
You must transfer the I_WORKLIST-RECNROOT field to the RECNROOT of the additional data that is to be created so that a clear assignment to the specification can be created. Otherwise an error is generated when generating the specification since the system does not dind the header data.
- I_RECNTVA
Is transferred as the reference field for the calculated BOM composition. Use this field if you want to create additional data such as an assessment or sources for this composition (calculated composition).
- I_SRSID
Contains the origin of the data. Specify this parameter for all data that is created using the interface BOM - composition. This makes it easier to see how these originated when you evaluate the data.
- I_OWNID
Contains the data provider. Proceed as with parameter I_SRSID.
- I_BOS_CHANGE
If the parameter is set to TRUE, a specification already exists in the database.
If you want to create additional data and I_BOS_CHANGE is set to TRUE, you must check in the program to see whether data already exists. Use the function module BAPI_BUS1077_GETDETAIL to read specification data. Transfer the SUBID from I_WORKLIST as the key.
If the data (also relating to SRSID and OWNID) is available, you must specify in the program that the associated indicator (see output parameter) is set to FALSE. If the indicator is not set to FALSE, the following error will occur when the specification is generated: Object exists. In this case, the system cannot create the composition.
Output parameters
Set the following output parameters to TRUE if you want to create the respective table data:
Output parameter | Associated table |
---|---|
E_FLG_REFSUBS = 'X' | E_API_REFSUBS_TAB |
E_FLG_IDENT = 'X' | E_API_IDENT_TAB |
E_FLG_IDENT_SUBLIST = 'X' | E_API_IDENT_LONGTEXT_TAB |
E_FLG_IDENT_LONGTEXT = 'X' | E_API_IDENT_SUBLIST_TAB |
E_FLG_MATJOIN = 'X' | E_API_MATJOIN_TAB |
E_FLG_PROP_HEADER = 'X' | E_API_PROP_HEADER_TAB |
E_FLG_PROP = 'X' | E_API_PROP_TAB |
E_FLG_PROP_DATA = 'X' | E_API_PROP_DATA_TAB |
E_FLG_PROP_COMP = 'X' | E_API_PROP_COMPONENT_TAB |
E_FLG_PROP_USAGE = 'X' | E_API_PROP_USAGE_TAB |
E_FLG_PROP_REL = 'X' | E_API_PROP_RELIABILITY_TAB |
E_FLG_PROP_SOURCE = 'X' | E_API_PROP_SOURCE_TAB |
E_FLG_PROP_FTEXT = 'X' | E_API_PROP_FTEXT_TAB |
E_FLG_PROP_FTEXT_LONGTEXT = 'X' | E_API_PROP_FTEXT_LONGTEXT_TAB |
E_FLG_PROP_TAB07 = 'X' | E_API_PROP_TAB07_TAB |
E_FLG_PROP_TAB0B = 'X' | E_API_PROP_TAB0B_TAB |
E_FLG_PROP_TAB0D = 'X' | E_API_PROP_TAB0D_TAB |
E_FLG_PROP_TAB0F = 'X' | E_API_PROP_TAB0F_TAB |
Tables
- I_RECNTRI_TAB
Contains all RECNs for the new identificators created. You can use these RECNs to assign regulatory lists (such as substance lists) or long texts.
Transfer the RECN from table I_RECNTRI_TAB to the RECNTRI field (Reference to Identifier) to perform a clear assignment.
The following tables contain the additional data that is to be created during the generation of the specification. They are only created if the relevant output parameter indicator (see above) is set.
E_API_REFSUBS_TAB | Reference specifications |
E_API_IDENT_TAB | Identifiers |
E_API_IDENT_LONGTEXT_TAB | Long text for identifiers |
E_API_IDENT_SUBLIST_TAB | Reg. lists for identifiers |
E_API_MATJOIN_TAB | Material-to-specification assignments |
E_API_PROP_HEADER_TAB | Value assignment headers |
E_API_PROP_TAB | Value assignments |
E_API_PROP_DATA_TAB | Characteristics of value assignments |
E_API_PROP_COMPONENT_TAB | Compositions |
E_API_PROP_USAGE_TAB | Usages |
E_API_PROP_RELIABILITY_TAB | Assessment |
E_API_PROP_SOURCE_TAB | Source |
E_API_PROP_FTEXT_TAB | User-defined texts |
E_API_PROP_FTEXT_LONGTEXT_TAB | Long text for identifiers |
E_API_PROP_TAB07_TAB | Transport approval |
E_API_PROP_TAB0B_TAB | Packaging code approval |
E_API_PROP_TAB0B_TAB | Risk classification |
E_API_PROP_TAB0F_TAB | Transport classification |
Exceptions
You can trigger exceptions if errors occurred when creating the data. These are treated as errors in the function module that is called. The generation of the specification is aborted and the relevant message is written in the log.
DATA_FAILURE | Error when creating data. |
INTERNAL_ERROR | Internal system error |
Examples
- Creating regulatory lists for generated identifiers
-
* Assigning the data origin and data provider
- e_api_ident_sublist_tab-srsid = i_srsid.
- e_api_ident_sublist_tab-ownid = i_ownid.
- e_api_ident_sublist_tab-recnroot = i_worklist-recnroot.
-
* Assigning identifiers (RECN) created using the piece list transfer
- READ TABLE i_recntri_tab INDEX 1.
- e_api_ident_sublist_tab-recntri = i_recntri_tab-recn.
-
* Regulatory list
- e_api_ident_sublist_tab-slstid = 'EU-LIST'.
- APPEND e_api_ident_sublist_tab.
-
* Indicator for regulatory list set to TRUE
- e_flg_ident_sublist = TRUE.
- Creating an assessment for calculated composition
-
* Assigning data origin and data provider for assessment
- e_api_prop_reliability_tab-srsid = i_srsid.
- e_api_prop_reliability_tab-ownid = i_ownid.
- e_api_prop_reliability_tab-recnroot = i_worklist-recnroot.
-
* Assignment to value assignment (generated composition)
- e_api_prop_reliability_tab-recntva = i_recntva.
-
* Defining assessment
- e_api_prop_reliability_tab-relid = '1'.
- APPEND e_api_prop_reliability_tab.
-
* Indicator for assessment set to TRUE
- e_flg_prop_rel = TRUE.
- Creating data for a value assignment (such as colour)
-
* Step 1: Definition of value assignment header
- * Define sequence number for value assignment header
- CALL FUNCTION 'C149_RECN_GET_NEXT'
- IMPORTING
- number = e_api_prop_header_tab-recn.
- * Assignment of data origin, data provider for value assignment type
- e_api_prop_header_tab-srsid = i_srsid.
- e_api_prop_header_tab-ownid = i_ownid.
- e_api_prop_header_tab-recnroot = i_worklist-recnroot.
-
* Defining the value assignment type
- e_api_prop_header_tab-estcat = 'SAP_EHS_1013_008'.
- APPEND e_api_prop_header_tab.
-
* Step 2: Definition of value assignment data record
- * Define sequence number for value assignment
- CALL FUNCTION 'C149_RECN_GET_NEXT'
- IMPORTING
- number = e_api_prop_tab-recn.
-
* Assignment of data origin, data provider for value assignment instance
- e_api_prop_tab-srsid = i_srsid.
- e_api_prop_tab-ownid = i_ownid.
- e_api_prop_tab-recnroot = i_worklist-recnroot.
-
* Assignment of value assignment header
- e_api_prop_tab-recntvh = e_api_prop_header_tab-recn.
- APPEND e_api_prop_tab.
-
* Step 3: Definition of characteristic
- * Assignment to specification
- e_api_prop_data_tab-recnroot = i_worklist-recnroot.
-
* Definition of characteristic table
- e_api_prop_data_tab-objid = 'ESTVA'.
-
* Assignment to value assignment data record
- READ TABLE e_api_prop_tab
- WITH KEY recntvh = e_api_prop_header_tab-recn.
- CONCATENATE e_api_prop_tab-recn e_api_prop_tab-actn
- INTO e_api_prop_data_tab-objek.
-
* Definition of characteristic and characteristic value (phrase key)
- e_api_prop_data_tab-atnam = 'SAP_EHS_1013_008_VALUE'.
- e_api_prop_data_tab-atwrt = 'EHS-P50-03'.
-
* Assignment to phrase header
- e_api_prop_data_tab-recntph = '1305896'.
- APPEND e_api_prop_data_tab.
Note
Always specify the foreign key relationship between the data (RECNROOT - specification key, RECNTRI - identifier key, RECNTVH - value assignment type key, RECNTVA - value assignment key). The data that was created can then be clearly assigned.
To receive a complete log, write the respective log messages. You can then perform an exact error analysis. (Use function modules from the function group SBAL - application log)
PERFORM Short Reference ABAP Short Reference
This documentation is copyright by SAP AG.
Length: 13283 Date: 20240420 Time: 051454 sap01-206 ( 105 ms )