Conversion: RAW to STRING
Code:
---------------------------------------------------------------------------------------------------------------
DATA : lt TYPE TABLE OF zapp_rej_reason,
ls TYPE zapp_rej_reason,
ls_str TYPE string,
lt_str TYPE TABLE OF string,
ls_x TYPE etxml_line_str. " rawstring
SELECT * FROM zapp_rej_reason INTO TABLE lt.
LOOP AT lt INTO ls.
ls_x = ls-ret_text.
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
input = ls_x
RECEIVING
conv = data(lr_conv).
CALL METHOD lr_conv->read
IMPORTING
data = ls_str.
APPEND ls_str TO lt_str.
ENDLOOP.
CLEAR : ls_str.
LOOP AT lt_str INTO ls_str.
WRITE :/ ls_str.
ENDLOOP.
---------------------------------------------------------------------------------------------------------------
RAW dictionary data type is similar to hexadecimal .
Step1. A table that stores raw data.
Step2. Table contents.
Step3. program that converts RAW to STRING.
Step4. So here is the output.
Code:
---------------------------------------------------------------------------------------------------------------
DATA : lt TYPE TABLE OF zapp_rej_reason,
ls TYPE zapp_rej_reason,
ls_str TYPE string,
lt_str TYPE TABLE OF string,
ls_x TYPE etxml_line_str. " rawstring
SELECT * FROM zapp_rej_reason INTO TABLE lt.
LOOP AT lt INTO ls.
ls_x = ls-ret_text.
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
input = ls_x
RECEIVING
conv = data(lr_conv).
CALL METHOD lr_conv->read
IMPORTING
data = ls_str.
APPEND ls_str TO lt_str.
ENDLOOP.
CLEAR : ls_str.
LOOP AT lt_str INTO ls_str.
WRITE :/ ls_str.
ENDLOOP.
---------------------------------------------------------------------------------------------------------------
RAW dictionary data type is similar to hexadecimal .
Step1. A table that stores raw data.
Step2. Table contents.
Step3. program that converts RAW to STRING.
Step4. So here is the output.
No comments:
Post a Comment