05-16-2011 5:46 AM
Dear All,
I am working in SF . for which i am creating a ABAP program. when i execute this program then generate error:
*****************************************
Runtime Errors CALL_FUNCTION_CONFLICT_LENG
Exception CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time 16.05.2011 10:01:32
Short text
Type conflict when calling a function module (field length).
What happened?
Error in the ABAP Application Program
The current ABAP program "ZMM_MAT_DOC_PRINT had to be terminated because it ha
come across a statement that unfortunately cannot be executed.
A function module was called incorrectly.
**********************************************
"my code :"
******************************************************************************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMAT_DOC_PRINT'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME =
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION '/1BCDWB/SF00000190'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
MAKTX =
MATNR =
MENGE =
MBLNR =
EBELN =
MEINS =
WERKS =
NAME1 =
TABLES
t_mseg = t_mseg
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
***************************************************************************************************
Plz guide me to solve this problem.............
05-16-2011 6:05 AM
Catch the importing parameter FM_NAME of FM SSF_...
then call this FM through this variable.
Hope your problm will b resolved.
Thanks.
05-16-2011 5:54 AM
where is the importing file?
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = ZMAT_DOC_PRINT
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = <file to be imported>
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
05-16-2011 6:05 AM
Catch the importing parameter FM_NAME of FM SSF_...
then call this FM through this variable.
Hope your problm will b resolved.
Thanks.
05-16-2011 6:22 AM
Hi,
Do not call the smartform FM directly . Smart form FM would be different in dev , quality and production.
Also check if there are any missing parameters that needs to be passed to the FM (lv_form)
Data : lv_name TYPE TDSFNAME value 'ZMAT_DOC_PRINT' ,
lv_form type RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = lv_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = lv_form
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION lv_form
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
MAKTX =
MATNR =
MENGE =
MBLNR =
EBELN =
MEINS =
WERKS =
NAME1 =
TABLES
t_mseg = t_mseg
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Srini.
05-16-2011 7:44 AM
Dear Srini Vas,
as per your guidance i did changes but again same error generate..............
***********************************
Runtime Errors CALL_FUNCTION_CONFLICT_LENG
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time 16.05.2011 12:04:31
Short text Type conflict when calling a function module (field length).
What happened?
Error in the ABAP Application Program
The current ABAP program "ZMM_MAT_DOC_PRINT" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
A function module was called incorrectly.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
The call to the function module "/1BCDWB/SF00000190" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "T_MSEG".
Although the currently specified field
"T_MSEG" is the correct type, its length is incorrect.
*************************************************************************
Plz guide me...............
05-16-2011 7:46 AM
Hi,
Dump clearly says there is some wrong in declaring T_MSEG ..
Check how its declared in the program and in the Smart form as well. Also check if there are any mandatory fields
that needs to be passed to SF.
Regards,
Srini.