cancel
Showing results for 
Search instead for 
Did you mean: 

Form doesn't exists after calling driver program

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Closing thread

Former Member
0 Kudos

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'

Former Member
0 Kudos

Hi Neha,

I had changed 'zinvoive1' to 'ZINVOICE1' and some how it works, but now i m getting run-time error message. i want to check my form settings.

Former Member
0 Kudos

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

Former Member
0 Kudos

CLosing thread

Former Member
0 Kudos

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.

Former Member
0 Kudos

please do the output settings in NACE your FORM entry and form name...

or

activate your form and try it agagin.....

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi jyoti,

I had also changed the func.module name '/1BCDWB/SF00000050' to 'fm_name' , but still i m getting as 'Form doesn't exists'.

Former Member
0 Kudos

Hi,

Insted of CALL FUNCTION '/1BCDWB/SF00000050' call CALL FUNCTION fm_name.