Skip to Content
avatar image
Former Member

smartforms

Hi,

I have created a customized POsmartform, as there is no standard print program for standard smartfrom '/smb40/mmpo_a', I need to write a print program. Please tell me how to write a print program?

Rgds,

khadeer.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 12, 2008 at 06:34 AM

    Hi,

    U can use these code to call ur smartform...........

    DATA: smf_name TYPE TDSFNAME VALUE u2019ZSMARTFORM01u2019,

    fn_name TYPE RS38L_FNAM.

    CALL FUNCTION u2019SSF_FUNCTION_MODULE_NAMEu2019

    EXPORTING

    FORMNAME = smf_name

    IMPORTING

    FM_NAME = fn_name.

    CALL FUNCTION fn_name

    EXPORTING

    WA = wa_doc.

    Thanks,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 11, 2008 at 06:57 AM

    Hi,

    print program is normal Report program in which you call the particular function module to pass the smartforms name.

    Check this sample program-

    http://www.uber-goober.com/forums/showthread.php?p=38330

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 11, 2008 at 07:25 AM

    data: i_otf type itcoo occurs 0 with header line,

    i_tline type table of tline with header line,

    i_receivers type table of somlreci1 with header line,

    i_record like solisti1 occurs 0 with header line,

    • Objects to send mail.

    i_objpack like sopcklsti1 occurs 0 with header line,

    i_objtxt like solisti1 occurs 0 with header line,

    i_objbin like solisti1 occurs 0 with header line,

    i_reclist like somlreci1 occurs 0 with header line,

    • Work Area declarations

    wa_objhead type soli_tab,

    w_ctrlop type ssfctrlop,

    w_compop type ssfcompop,

    w_return type ssfcrescl,

    wa_doc_chng type sodocchgi1,

    w_data type sodocchgi1,

    wa_buffer type string, "To convert from 132 to 255

    • Variables declarations

    v_form_name type rs38l_fnam,

    v_len_in like sood-objlen,

    v_len_out like sood-objlen,

    v_len_outn type i,

    v_lines_txt type i,

    v_lines_bin type i.

    data : t_bsid type standard table of zfr_efl_evcda_letter with header line.

    call function 'SSF_FUNCTION_MODULE_NAME'

    exporting

    formname = 'ZFR_EFL_SCHEM_COMPLN_LETTER'

    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.

    w_ctrlop-getotf = 'X'.

    w_ctrlop-no_dialog = 'X'.

    w_compop-tdnoprev = 'X'.

    call function v_form_name

    exporting

    control_parameters = w_ctrlop

    output_options = w_compop

    user_settings = 'X'

    importing

    job_output_info = w_return

    tables

    t_zfr_efl_evcda = t_bsid[]

    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.

    Regards

    Anbu

    Add comment
    10|10000 characters needed characters exceeded