2007 May 04 8:21 AM
hi!
I am trying to print one smart from through print program.
the name of smart form is ztestform.
and the name of the function module is /1BCDWB/SF00000099
I am writing following print program.
REPORT ZSMARTFORM.
data fname(30).
CALL FUNCTION '/1BCDWB/SF00000099'
EXPORTING
formname = 'ztestform'
IMPORTING
fm_name = fname.
call function fname.
and it returns with the error " function parameter form name is unknown"
so what should i do?
points will be awarded.
Cheers
Troy.
2007 May 04 8:23 AM
Hi,
Use FM ssf_function_module_name
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ztestform'
importing
fm_name = v_form_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 v_form_name.
Thanks
Ravi
hi!
I am trying to print one smart from through print program.
the name of smart form is ztestform.
and the name of the function module is /1BCDWB/SF00000099
I am writing following print program.
REPORT ZSMARTFORM.
data fname(30).
CALL FUNCTION '/1BCDWB/SF00000099'
EXPORTING
formname = 'ztestform'
IMPORTING
fm_name = fname.
call function fname.
and it returns with the error " function parameter form name is unknown"
so what should i do?
points will be awarded.
Cheers
Troy.
2007 May 04 8:23 AM
Hi,
Use FM ssf_function_module_name
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ztestform'
importing
fm_name = v_form_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 v_form_name.
Thanks
Ravi
2007 May 04 8:25 AM
2007 May 04 8:33 AM
i tried that .
the program runs but says that form ztestform does not exist.
2007 May 04 8:35 AM
2007 May 04 8:28 AM
hi,
Call the function module ' /1BCDWB/SF00000099' using pattern in the abap editor.
Then pass the required parameters to the function module.
2007 May 04 8:30 AM
Hi
Just try this
CALL FUNCTION '/1BCDWB/SF00000099'
Replace this line with
call function 'SSF_FUNCTION_MODULE_NAME'
Thanks
Ravi
2007 May 04 8:31 AM
Hi Troy,
Use FM SSF_FUNCTION_MODULE_NAME.
pass smartform name . it will give u SF function name. u call that fm.
Please refer this code :
data : p_form type TDSFNAME.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = P_FORM
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = P_FUNCTION
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 P_FUNCTION
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 =
TABLES
D_VBRK = IT_VBRK
D_VBRP = IT_VBRP
D_LIKP = IT_LIKP
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.
Reward points if helpful.
Regards,
Hemant