cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms print program

Former Member
0 Kudos

Dear friends,

please help me in this issue. i transported a smartform with a print program in to production which is generating dump, i found that the function module specified in the print program and the function module generated for the smartform where different.

will it happen normally? what is the solution for this and what precautions i ahve to take i future for this type of things?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check the function modules in PRD and DEV.

Once recall the function module in DEV and Transport again.

Former Member
0 Kudos

Dear Usha,

can u give me the code for calling the sf function module as a variable in print program which will automatically pick the function module in production?

Former Member
0 Kudos

Hi,

Try this.

DATA: FORMNAME TYPE TDSFNAME,

FM_NAME TYPE RS38L_FNAM.

FORMNAME = 'Z_SD_GEN_INVOICE'.( U r smartform name)

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = FORMNAME

  • 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 (insted of function module number place FM_NAME )

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Venkat,

Smart form will generate the function module. we need to take it as a vraible in the repert program .please see my code

DATA:lv_fname TYPE rs38l_fnam . " varable for ur function module.

CALL FUNCTION lv_fname

EXPORTING

wa_header = wa_header " header values

TABLES

it_item = it_item " item values

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards

Former Member
0 Kudos

hi salman,

how can it Recognize the my smartfurm function modulewhich i have given for the smartform

regards,

venkat

Former Member
0 Kudos

Hi venkat

try this.this is xtension to my previous query

u need to call in ur report program

DATA: lv_form TYPE tdsfname VALUE 'ZSMART_DC_INVOIC', " ur form name

lv_fname TYPE rs38l_fnam .

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = lv_form

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = lv_fname

  • 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_fname

EXPORTING

wa_header = wa_header

TABLES

it_item = it_item

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.