‎2009 Feb 07 7:40 AM
I try to call the FM GET_PRINT_PARAMETERS, but is raised an run time error.
Runtime Errors CALL_FUNCTION_UC_STRUCT
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time 02/07/2009 10:37:23
My Code :
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
importing
out_parameters = loc_mstr_print_parms
valid = loc_mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
Wating ur reply.
BR,
Ali
Edited by: Ali Saleh AlAbbad on Feb 7, 2009 8:42 AM
‎2009 Feb 07 7:44 AM
hi,
Check the data declaration whcih you have passed to the Fm
DATA:
l_text TYPE pri_params-plist,
l_valid TYPE c, " Flag
wa_param LIKE pri_params.
l_text = i_vdetails_line-objid.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
copies = '1'
* destination = sy-pdest
line_count = sy-linct
line_size = sy-linsz
list_name = l_text
new_list_id = 'X'
no_dialog = 'X'
IMPORTING
out_parameters = wa_param
valid = l_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
‎2009 Feb 07 7:49 AM
‎2009 Feb 07 7:53 AM
what type you have taken for:
out_parameters = loc_mstr_print_parms --is it pri_params
valid = loc_mc_valid
‎2009 Feb 07 7:55 AM
Hi,
I have copied your code and tested but i did not get any runtime error...Check the copied code..
DATA:
loc_mc_valid TYPE c, " Flag
loc_mstr_print_parms LIKE pri_params.
call function 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
IMPORTING
out_parameters = loc_mstr_print_parms
valid = loc_mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
IF sy-subrc eq 0.
ENDIF.
‎2009 Feb 07 8:15 AM
I put this FM1 inside form Form1 and the soubroutine in side FM2
FM2
perform FORM1.
ENDFM2
Form FORM1
call FM1.
ENDFORM2.
that is mean i call my function module inside a function module , Is it possible.
‎2009 Feb 07 7:49 AM
hi bro....
you have to chec in if the parameter you have passed to function module has exactly same data type as that of parameter in function module...
and if so move the data which is not having exactly sane data type or field width to a data variable having that thing same as in func module.... and the use that variable to be passed to function module....
your problem will be solved
regards
‎2009 Feb 07 7:54 AM
Hi,
loc_mstr_print_parms should be of type PRI_PARAMS.
Regards,
Dev.
‎2009 Feb 07 9:27 AM
Hi Ali,
Could you please tell me what is the type of the variable
loc_mc_valid
regards,
Ravi
‎2009 Feb 08 4:31 AM