Unicode Conversion Issue – ABAP, modification in database table.

Facing unicode conversion issue in modify statement.

mod_tab.png

mod_tab1.png

 

Here’s the code

DATA: datum TYPE sy-datum.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
PARAMETERS: p_date TYPE datum.
SELECTION-SCREEN END OF BLOCK b1.

CONSTANTS:lc_tabname TYPE tabname VALUE ‘ztfre_layout’.

IF p_date IS INITIAL.
p_date = sy-datum – 1.
ENDIF.

IF p_date IS NOT INITIAL.

SELECT min_stock,
zvalto
FROM ztfre_layout
WHERE ( min_stock IS NOT INITIAL AND zvalto LT @p_date )
OR min_stock IS INITIAL
INTO TABLE @DATA(layout_tab).
IF sy-subrc = 0.

LOOP AT layout_tab ASSIGNING FIELD-SYMBOL(<layout>).
<layout>-min_stock = 0.
ENDLOOP.

IF layout_tab IS NOT INITIAL.

CALL FUNCTION ‘ENQUEUE_E_TABLE’
EXPORTING
mode_rstable = ‘E’
tabname = lc_tabname
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
MODIFY ztfre_layout FROM TABLE layout_tab.
MESSAGE: ‘Records updated successfully’ TYPE ‘S’.
COMMIT WORK AND WAIT.

CALL FUNCTION ‘DEQUEUE_E_TABLE’
EXPORTING
tabname = lc_tabname.
ENDIF.
ENDIF.

ENDIF.
ENDIF.

Scroll to Top