Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sap smart form printing error

Former Member
0 Likes
1,100

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,019

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.

7 REPLIES 7
Read only

Former Member
0 Likes
1,020

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

Read only

0 Likes
1,019

what do u mean by that?

Read only

0 Likes
1,019

i tried that .

the program runs but says that form ztestform does not exist.

Read only

0 Likes
1,019

THANKS EVERYONE

its working.

CHeers

Troy/

Read only

Former Member
0 Likes
1,019

hi,

Call the function module ' /1BCDWB/SF00000099' using pattern in the abap editor.

Then pass the required parameters to the function module.

Read only

Former Member
0 Likes
1,019

Hi

Just try this

CALL FUNCTION '/1BCDWB/SF00000099'

Replace this line with

call function 'SSF_FUNCTION_MODULE_NAME'

Thanks

Ravi

Read only

Former Member
0 Likes
1,019

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