pls look into the below code which i wrote it in FM to create an RFC for EP.
FUNCTION ZFM_ZMM45.
*"----
""Local interface:
*" IMPORTING
*" VALUE(S_WERKS) LIKE ZMARA_MARC-WERKS OPTIONAL
*" VALUE(S_MTART_LOW) LIKE ZMARA_MARC-MTART OPTIONAL
*" VALUE(S_MTART_HIGH) LIKE ZMARA_MARC-MTART
*" VALUE(S_MATNR_LOW) LIKE ZMARA_MARC-MATNR OPTIONAL
*" VALUE(S_MATNR_HIGH) LIKE ZMARA_MARC-MATNR
*" VALUE(S_BUDAT_LOW) LIKE ZS_MKPF_MSEG-BUDAT OPTIONAL
*" VALUE(S_BUDAT_HIGH) LIKE ZS_MKPF_MSEG-BUDAT OPTIONAL
*" VALUE(S_LGORT) LIKE MARD-LGORT OPTIONAL
*" VALUE(RB1) LIKE Z_MKPF_MSEG-SOBKZ DEFAULT 'A'
*" VALUE(RB2) LIKE Z_MKPF_MSEG-SOBKZ
*" VALUE(RB3) LIKE Z_MKPF_MSEG-SOBKZ
*" TABLES
*" ITHEADER1 STRUCTURE ZSTRU1_ZMM45
*"----
DATA: ITHEADER LIKE TABLE OF abaplist WITH HEADER LINE.
DATA: ITAB LIKE TABLE OF ITHEADER1 WITH HEADER LINE.
submit zrpt_mm_045 EXPORTING LIST TO MEMORY
with s_werks-low = s_werks
with s_mtart-low = s_mtart_low
with s_mtart-high = s_mtart_high
with s_matnr-low = s_matnr_low
with s_matnr-high = s_matnr_high
with s_budat-low = s_budat_low
with s_budat-high = s_budat_high
with s_lgort-low = s_lgort
with rb1 = rb1
with rb2 = rb2
with rb3 = rb3
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = ITHEADER
EXCEPTIONS
NOT_FOUND = 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.
*EXPORT ITHEADER TO INTERNAL TABLE ITHEADER1.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
WITH_LINE_BREAK = ' '
TABLES
listasci = itab
LISTOBJECT = itheader
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFUNCTION.
but when i execute this it gives me the following run-time error
Only flat, character-type data objects are supported at the argument
position "LISTASCI" for the statement
"DESCRIBE".
In this case, the operand "LISTASCI" has the non-character-type or deep type
"ZSTRU1_ZMM45". The current program is flagged as a Unicode program. In the
Unicode
context, type X fields are seen as non-character-type, as are
structures that contain non-character-type components.
pls sugges me what should i do.
Thanx