Difference between revisions of "SAP EHS"
From SapWiki
(→BAPI) |
(→BAPI) |
||
Line 1: | Line 1: | ||
==BAPI== | ==BAPI== | ||
− | + | ===BAPI BAPI_BUS1240_CREATE - Trn. CBIH82=== | |
+ | ====BADI EHSI_IA_BAPI para extensiones ==== | ||
+ | <nowiki> | ||
+ | method IF_EX_EHSI_IA_BAPI~TRANSFER_EXTENSIONTAB_2_APITAB. | ||
+ | |||
+ | DATA: wa_extension TYPE bapiparex, | ||
+ | ext_value(960) TYPE c, | ||
+ | wa_action TYPE CCIHS_ACHAPI, | ||
+ | l_ref TYPE REF TO data. | ||
+ | |||
+ | FIELD-SYMBOLS: <l_struc> TYPE ANY, | ||
+ | <l_field> TYPE ANY. | ||
+ | |||
+ | loop at I_EXTENSION_IN_TAB into wa_extension where structure = 'ZMIESTRUCTURA' . | ||
+ | AT NEW structure. | ||
+ | CREATE DATA l_ref TYPE (wa_extension-structure). | ||
+ | ASSIGN l_ref->* TO <l_struc>. | ||
+ | ENDAT. | ||
+ | ext_value = wa_extension-valuepart1. | ||
+ | MOVE ext_value TO <l_struc>. | ||
+ | |||
+ | read TABLE X_API_ACTION_TAB into wa_action with key acid = wa_extension-valuepart2. | ||
+ | if sy-subrc = 0. | ||
+ | MOVE-CORRESPONDING <l_struc> to wa_action. | ||
+ | modify X_API_ACTION_TAB from wa_action index sy-tabix. | ||
+ | endif. | ||
+ | ENDLOOP. | ||
+ | endmethod.</nowiki> |
Revision as of 18:41, 4 September 2023
BAPI
BAPI BAPI_BUS1240_CREATE - Trn. CBIH82
BADI EHSI_IA_BAPI para extensiones
method IF_EX_EHSI_IA_BAPI~TRANSFER_EXTENSIONTAB_2_APITAB. DATA: wa_extension TYPE bapiparex, ext_value(960) TYPE c, wa_action TYPE CCIHS_ACHAPI, l_ref TYPE REF TO data. FIELD-SYMBOLS: <l_struc> TYPE ANY, <l_field> TYPE ANY. loop at I_EXTENSION_IN_TAB into wa_extension where structure = 'ZMIESTRUCTURA' . AT NEW structure. CREATE DATA l_ref TYPE (wa_extension-structure). ASSIGN l_ref->* TO <l_struc>. ENDAT. ext_value = wa_extension-valuepart1. MOVE ext_value TO <l_struc>. read TABLE X_API_ACTION_TAB into wa_action with key acid = wa_extension-valuepart2. if sy-subrc = 0. MOVE-CORRESPONDING <l_struc> to wa_action. modify X_API_ACTION_TAB from wa_action index sy-tabix. endif. ENDLOOP. endmethod.