Skip to Content
0
Former Member
Jul 20, 2005 at 04:46 AM

problems with RFC

19 Views

hi

i have created a RFC wherein i submit my report program thru "SUBMIT" command. Pls refer the below code:

DATA: ITHEADER LIKE TABLE OF abaplist 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.

CALL FUNCTION 'LIST_TO_ASCI'

  • EXPORTING

  • LIST_INDEX = -1

  • WITH_LINE_BREAK = ' '

TABLES

listasci = ITHEADER

  • LISTOBJECT =

  • 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.

In TABLES option of the FM i have declare a table

ITHEADER1 like a structure of some abap dictionary table.

I want to retrieve the desired output into the internal table ITHEADER1 so that i can use that table for EP.

Could you pls tell me how to get the data in readable format, bcos when i run the above code it it giving me run-time errors.

Thanks