2009 Feb 02 12:43 PM
Hi Guru,
I have found a FM that can convert some special code to ASCII format as the following.
However, I need to use back it_lines to pass to the next FM. How can I do that?
it_lines is declare as type crmt_text_wrkt while c_tab is declare in type tdtab_c132
data: it_lines TYPE STANDARD TABLE OF tline.
DATA: c_tab TYPE tdtab_c132 WITH HEADER LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ZT10'
language = sy-langu
name = '495113313A2A7515E1000000AC12234C'
object = 'CRM_ORDERH'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = it_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8
.
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH c_tab[].
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
CODEPAGE = '0000'
formatwidth = 72
language = sy-langu
tabletype = 'ASC'
TAB_SUBSTITUTE = ' '
LF_SUBSTITUTE = ' '
replace_symbols = 'X'
replace_sapchars = 'X'
IMPORTING
FORMATWIDTH_E =
X_DATATAB =
c_datatab = c_tab[]
X_SIZE =
TABLES
itf_lines = it_lines
EXCEPTIONS
INVALID_TABLETYPE = 1
OTHERS = 2
.
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hi Guru,
I have found a FM that can convert some special code to ASCII format as the following.
However, I need to use back it_lines to pass to the next FM. How can I do that?
it_lines is declare as type crmt_text_wrkt while c_tab is declare in type tdtab_c132
data: it_lines TYPE STANDARD TABLE OF tline.
DATA: c_tab TYPE tdtab_c132 WITH HEADER LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ZT10'
language = sy-langu
name = '495113313A2A7515E1000000AC12234C'
object = 'CRM_ORDERH'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = it_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8
.
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH c_tab[].
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
CODEPAGE = '0000'
formatwidth = 72
language = sy-langu
tabletype = 'ASC'
TAB_SUBSTITUTE = ' '
LF_SUBSTITUTE = ' '
replace_symbols = 'X'
replace_sapchars = 'X'
IMPORTING
FORMATWIDTH_E =
X_DATATAB =
c_datatab = c_tab[]
X_SIZE =
TABLES
itf_lines = it_lines
EXCEPTIONS
INVALID_TABLETYPE = 1
OTHERS = 2
.
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2009 Feb 02 1:23 PM
Are you using the CRM_ORDER_READ FM? Because the table is indeed typed as CRMT_TEXT_WRKT. But upon navigation double click on:
CRMT_TEXT_WRKT
CRMT_TEXT_WRK
COMT_TEXT_LINES_T
TLINE
You will see that it has the exact same format as ITF_LINE in FM CONVERT_ITF_TO_ASCII. The ITF_LINE (table) is the input (amongst others) for this function module So I don't see the problem. There is no need to convert, because c_tab is the return parameter.
So please explain in more detail please.