
Implement the BADI_FINS_CFIN_AC_INTERFACE if there is no implementation existing so far, as Multiple Use of this BADI is not possible.
types:
BEGIN OF gts_asset_buffer,
bukrs TYPE bukrs,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
buzei TYPE buzei,
anln1 TYPE anln1,
anln2 TYPE anln2,
END OF gts_asset_buffer .
types:
gtt_asset_buffer TYPE TABLE OF gts_asset_buffer .
class-data GT_ASSET_BUFFER type GTT_ASSET_BUFFER.
*" Loading the class-global table GT_ASSET_BUFFER created for data records
* If ANLN1 is initial, ANLN2 will be '0' as well - so no need to concatenate in that scenario as per requirement
*" Adding BUKRS, BELNR, GJAHR, BUZEI for key-field combination to later map the data as per them
gt_asset_buffer[] = VALUE #( FOR ls_data IN is_posting_data-accit_ext
WHERE ( anln1 IS NOT INITIAL )
( bukrs = ls_data-bukrs
belnr = ls_data-belnr
gjahr = ls_data-gjahr
buzei = ls_data-buzei
anln1 = ls_data-anln1
anln2 = ls_data-anln2
)
).
SORT gt_asset_buffer[]. " sort to read with Binary search
LOOP AT cs_posting_data-accit_ext ASSIGNING FIELD-SYMBOL(<ls_accit2>).
READ TABLE gt_asset_buffer ASSIGNING FIELD-SYMBOL(<ls_asset>)
BINARY SEARCH WITH KEY bukrs = <ls_accit2>-bukrs " sorted in GET_PROCESS_CONTROL
belnr = <ls_accit2>-belnr
gjahr = <ls_accit2>-gjahr
buzei = <ls_accit2>-buzei.
IF sy-subrc = 0.
<ls_accit2>-zztext2 = |{ <ls_asset>-anln1 }{ zif_fire_constants=>gc_hypen }{ <ls_asset>-anln2 }|.
UNASSIGN <ls_asset>.
ENDIF.
ENDLOOP.
/AIF/ERR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
8 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 |