cancel
Showing results for 
Search instead for 
Did you mean: 

smartform sy-subrc = 1

Former Member
0 Kudos

Hi,

after call to FM generated i am getting sy-subrc =1 ,

please see the code below.

V_FORM_FM is the run time generated FM name return by 'SSF_FUNCTION_MODULE_NAME '

CALL FUNCTION V_FORM_FM

EXPORTING

CONTROL_PARAMETERS = LWA_CONTROL_PARAMS

OUTPUT_OPTIONS = LWA_OUTPUT_OPTIONS

USER_SETTINGS = LV_USER_SETTINGS

WA_STMT_HEADER = WA_STMT_HDR_FORM

V_BUDAT = P_BUDAT

IMPORTING

JOB_OUTPUT_INFO = LWA_JOB_OUTPUT_INFO

JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS

TABLES

I_CURRENCY_LIST_IN = I_CURRENCY_LIST

I_OPEN_ITEMS_IN = I_OPEN_ITEMS_FORM

I_AGING_IN = I_AGING_FORM

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

The same thing worked in one server , but in other server its not working.

in the other server i am not able to preview the smartform after call to FM generated sy-subrc = 1.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check the device type ( printer ) in both the systems. When the driver or device type changes the output will be realigned slighlty .

This also happens if the template goes out of the window. compare window attributes in both the systems. if they are same then this will be issue with your printer.

This happens in the preview also because you select the device for the preview.

Former Member
0 Kudos

can u explain in details what i need to check?

Former Member
0 Kudos

In the print preview you might be giving some printer name. Please check both the printers in Dev and production.

check with basis. they can help you if there is any difference in the device type or drivers.

Thanks!

Ashok

Answers (2)

Answers (2)

raymond_giuseppi
Active Contributor

You have to get the actual message behind the error raised, like SSFCOMPOSER nnn or so., to do this use FM SSF_READ_ERRORS.

call function 'SSF_FUNCTION_MODULE_NAME'
...
call function l_fm_name
...
IF sy-subrc NE 0.
    call function 'SSF_READ_ERRORS'
       importing
            errortab = lt_errortab.  
...

Read [Checking and Testing a Smart Form|http://help.sap.com/saphelp_nw04s/helpdata/EN/4b/83fb5bdf8f11d3969700a0c930660b/content.htm]

Regards,

Raymond

Former Member
0 Kudos

Hi,

Check once the Fields which are displayed are assigned thier actual lengths.

For Ex: each amount field occupies 13 char so width of the cell should be 13 char

If you have assigned lesser legths then use &field(CZ)& for Numeric fields and &field(CS)& for Char Fields.

Debug your Smartform in Different Server by copying the FM generted by Smartform and In SE38 paste the Name of Fm and change as (For Ex /1BCDWB/SF00000201 change as /1BCDWB/LSF00000201F01) and display and Place the Break point in your program lines and debug.

Regards,

Vijaya Lakshmi.T