Skip to Content
avatar image
Former Member

smartform

Hi all

how can we pass data from print program to smartform.

Regards

Nagendra.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jun 26, 2007 at 12:28 PM

    hi nagendra,

    u will have to use function modules to pass data from print program to smartform.

    ssf_function_module_name....

    this function will create a FM for ur smartform...

    after this call function for the FM generated for ur smartform...

    this FM will be having all the import, export, table parameters which u have defined in smartforms...just pass the import parameters and internal tables in this FM...

    hope this will be helpfull....

    please reward in case usefulll...

    regards,

    prashant

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 26, 2007 at 12:01 PM

    Please take alook at the standard SAP Programs

    SF_EXAMPLE_01

    SF_EXAMPLE_02

    Regards,

    Anish Thomas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 26, 2007 at 12:02 PM

    Hi

    When you call the fun module the data from Driver program is transferred to the smartform

    see the sample code

    • Passing data to SMARTFORMS

    call function 'SSF_FUNCTION_MODULE_NAME'

    exporting

    formname = 'ZSMARTFORM'

    • VARIANT = ' '

    • DIRECT_CALL = ' '

    IMPORTING

    FM_NAME = FM_NAME

    EXCEPTIONS

    NO_FORM = 1

    NO_FUNCTION_MODULE = 2

    OTHERS = 3.

    if sy-subrc <> 0.

    WRITE: / 'ERROR 1'.

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

    • IMPORTING

    • DOCUMENT_OUTPUT_INFO =

    • JOB_OUTPUT_INFO =

    • JOB_OUTPUT_OPTIONS =

    TABLES

    GS_MKPF = INT_MKPF

    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.

    and we pass the tables data to fun module which in turn goes into smartform which is called in first

    <b>Reward points for useful Answers</b>

    Regards

    Anji

    Add comment
    10|10000 characters needed characters exceeded