on 11-12-2008 10:43 AM
Hi,
I had created a invoice form, and i called through driver program in se38.After executing i m getting as 'Form doesn't exists'.
'zinvoice1' is the name of the smartform.
Code as follows:
REPORT ZINVOICE1.
tables: kna1,vbrp,vbrk.
parameters: p_kunnr like vbrk-kunag,
p_vbeln like vbrk-vbeln.
data : fm_name type rs38l_fnam.
data: t_vbrp like standard table of vbrp,
t_vbrk like standard table of vbrk.
data: fs_kna1 type kna1,
fs_vbrk like line of t_vbrk,
fs_vbrp like line of t_vbrp.
start-of-selection.
select single * from kna1 into fs_kna1
where kunnr eq p_kunnr.
select * from vbrk into table t_vbrk
where kunag eq p_kunnr and vbeln eq p_vbeln.
select * from vbrp into table t_vbrp for all entries in t_vbrk
where vbeln = t_vbrk-vbeln.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'zinvoice1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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/SF00000050'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IM_FS_KNA1 = fs_kna1
IM_T_VBRP = t_vbrp
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IM_T_VBRK = t_vbrk
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.
Closing thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
in FM 'SSF_FUNCTION_MODULE_NAME' where you are passing the form name as 'zinvoice1' pass it in Caps ie 'ZINVOICE1' and where you are calling the FM for smartform call it as
Call function fm_name
and not as
call function '/1BCDWB/SF00000050'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello BDK,
Check if you have any errors while activating the smart form.
Please go to Smart form and exceute it and see if the function module is generated or not....
before you call the smart form through the Zprogram.
If it is generating the function module after executing the Smart form then it is not an issue with the smrat form....we can atleast conclude this part that issue is not with the smart form so that we can debugg and check the driver program.
This will surely fix your issue.
Regards,
Kittu
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZINVOICE1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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 fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IM_FS_KNA1 = fs_kna1
IM_T_VBRP = t_vbrp
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IM_T_VBRK = t_vbrk
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please do the output settings in NACE your FORM entry and form name...
or
activate your form and try it agagin.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You are getting the Function Module name using 'SSF_FUNCTION_MODULE_NAME'. Up to this everything is fine. After that you should use CALL FUNCTION FM_NAME instead of below code.
Try this. it will work.
CALL FUNCTION '/1BCDWB/SF00000050' -
Use FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
Thanks,
Jyothi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Insted of CALL FUNCTION '/1BCDWB/SF00000050' call CALL FUNCTION fm_name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.