Hi Guru's,
I try to recover datas from my selection screen for create a list send it by mail. I have a problem when I do my submit 'ksb1' and pass my range as parameter, the error displayed is "Wrong type passing parameters to "KOSTL"" AFter I have to convert it in PDF format before to send it by mail.
SELECT * FROM zst_cntrllng_rsp APPENDING TABLE i_cntrllng_rsp
WHERE zzkostl = 'X'.
IF sy-subrc = 0.
LOOP AT i_cntrllng_rsp INTO wa_cntrllng_rsp.
CLEAR i_csks.
SELECT * FROM csks APPENDING TABLE i_csks
WHERE verak_user = wa_cntrllng_rsp-bname.
IF sy-subrc = 0.
" Construct a range to fill the report.
LOOP AT i_csks INTO wa_csks.
wa_r_kostl-sign = 'I'.
wa_r_kostl-option = 'EQ'.
wa_r_kostl-low = wa_csks-kostl.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
SUBMIT rkaep000
* I think my problem is here
with kostl = i_r_kostl.
* export list to memory
* and return.
.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = wa_spool
* 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 'EFG_SPOOL_GET_SPOOLIDS'
* EXPORTING
** X_TAB_RNG_SPOOLIDS =
* x_tab_rng_identifier =
** X_TAB_RNG_TIMESTAMP =
** IMPORTING
** Y_TAB_SPOOLIDS =
** Y_TAB_SPOOL_BUFF =
** EXCEPTIONS
** NOT_QUALIFIED = 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.
ENDFORM. "get_costcenter
Edited by: rahhaoui mohamed on Jun 12, 2009 4:01 PM
Edited by: rahhaoui mohamed on Jun 12, 2009 4:02 PM