Skip to Content
author's profile photo Former Member
Former Member

parameters passed in form, values taken only at initialization

I have passed parameters to a smartform,

when I run the form in debug mode, at initialisation level, the values are correctly assigned , but after displaying the form, the values are not assigned.

Can anybody help me on this please?I dont know where is my error

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2006 at 04:26 PM

    I think u have to call the smartform function module twice. Once before displaying the form and after displaying the form call the smartform FM again.

    Check some sample code:

    FORM f3500_call_smartform_rdi .

    *------Local Data Declaration

    DATA: ls_composer_param TYPE ssfcompop,

    ls_job_info TYPE ssfcrescl,

    ls_control_param TYPE ssfctrlop,

    lws_high TYPE tvarv_val,

    lws_answer(1) TYPE c.

    DATA: wa_spoolids TYPE tsfspoolid,

    wa_spoolnum TYPE rspoid ,

    wa_printdata TYPE efg_strn_printdata.

    ****Calling smartforms

    DATA: lws_fm_name TYPE rs38l_fnam.

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

    formname = 'ZSW_MED_PO_ES1'

    • VARIANT = ' '

    • DIRECT_CALL = ' '

    IMPORTING

    fm_name = lws_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.

    ls_composer_param-tdnewid = ' '.

    ls_composer_param-tdimmed = ' '.

    ls_composer_param-tddest = c_zstr.

    ls_composer_param-xsf = ' '.

    ls_composer_param-xsfcmode = 'X'.

    ls_composer_param-xsf = ' '.

    ls_composer_param-xsfoutmode = ' '.

    ls_composer_param-xsfoutdev = c_zstr.

    ls_control_param-device = c_printer.

    ls_control_param-no_dialog = 'X'.

    ls_control_param-preview = 'X'.

    CALL FUNCTION lws_fm_name "'/1BCDWB/SF00000059'

    EXPORTING

    • ARCHIVE_INDEX =

    • ARCHIVE_INDEX_TAB =

    • ARCHIVE_PARAMETERS =

    control_parameters = ls_control_param

    • MAIL_APPL_OBJ =

    • MAIL_RECIPIENT =

    • MAIL_SENDER =

    output_options = ls_composer_param

    • USER_SETTINGS = 'X'

    ws_po_no = ws_po_no

    IMPORTING

    • DOCUMENT_OUTPUT_INFO =

    job_output_info = ls_job_info

    • JOB_OUTPUT_OPTIONS =

    TABLES

    i_eket = i_eket[]

    i_vbep = i_vbep[]

    i_vbak = i_vbak[]

    i_ekpo = i_ekpo[]

    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.

    *-------Pop up

    CALL FUNCTION 'POPUP_TO_CONFIRM'

    EXPORTING

    titlebar = text-001

    text_question = text-002

    text_button_1 = 'Yes'

    text_button_2 = 'No'

    default_button = '1'

    display_cancel_button = space

    IMPORTING

    answer = lws_answer

    EXCEPTIONS

    text_not_found = 1

    OTHERS = 2.

    • CALL FUNCTION 'ZSW_POP_TO_CONFIRM'

    • EXPORTING

    • textline = text-002

    • IMPORTING

    • answer = lws_answer.

    IF sy-subrc <> 0.

    ENDIF.

    **----


    User presses No

    IF lws_answer = '2'. "'NO'.

    EXIT.

    • ELSEIF lws_answer = 'YES' OR lws_answer = 'PRV'.

    ELSE.

    SELECT SINGLE high

    INTO lws_high

    FROM tvarv

    WHERE name = c_invoice.

    IF sy-subrc EQ 0.

    ENDIF.

    ls_composer_param-tdsuffix1 = lws_high.

    ls_composer_param-tddest = lws_high.

    ls_composer_param-xsfoutdev = lws_high.

    ls_composer_param-tdsuffix2 = sy-uname.

    ls_composer_param-xsf = 'X'.

    ls_composer_param-xsfoutmode = 'S'.

    ls_composer_param-xsfcmode = 'X'.

    ls_composer_param-tdnewid = 'X'.

    ls_control_param-no_dialog = 'X'.

    ls_control_param-preview = ' '.

    CALL FUNCTION lws_fm_name "'/1BCDWB/SF00000059'

    EXPORTING

    • ARCHIVE_INDEX =

    • ARCHIVE_INDEX_TAB =

    • ARCHIVE_PARAMETERS =

    control_parameters = ls_control_param

    • MAIL_APPL_OBJ =

    • MAIL_RECIPIENT =

    • MAIL_SENDER =

    output_options = ls_composer_param

    • USER_SETTINGS = 'X'

    ws_po_no = ws_po_no

    IMPORTING

    • DOCUMENT_OUTPUT_INFO =

    job_output_info = ls_job_info

    • JOB_OUTPUT_OPTIONS =

    TABLES

    i_eket = i_eket[]

    i_vbep = i_vbep[]

    i_vbak = i_vbak[]

    i_ekpo = i_ekpo[]

    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.

    ELSE.

    MOVE ls_job_info-spoolids[] TO wa_spoolids[].

    READ TABLE wa_spoolids INTO wa_spoolnum INDEX 1.

    IF sy-subrc = 0.

    DATA :id LIKE tsp01-rqident,

    module TYPE zstreamserve-zmodule,

    formno TYPE zstreamserve-zformno,

    filename TYPE char50,

    ws_uploadloc TYPE char255.

    CLEAR : id,module, formno,filename,ws_uploadloc.

    MOVE wa_spoolnum TO id.

    module = c_swq.

    formno = c_form.

    CONCATENATE 'XSF_' ws_po_no '-' sy-datum '-'

    sy-uzeit INTO filename.

    CONDENSE filename.

    CALL FUNCTION 'ZM_XML_DOWNLOAD'

    EXPORTING

    spoolid = id

    country = 'ES' "c_es

    module = module

    formno = formno

    filename = filename

    IMPORTING

    upld_location = ws_uploadloc

    • TABLES

    • I_DATA =

    EXCEPTIONS

    no_such_spool = 1

    no_path_found = 2

    spool_download_error = 3

    file_open_error = 4

    input_not_sufficient = 5

    invalid_parameter = 6

    OTHERS = 7

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    • MESSAGE e027(zswqc).

    CASE sy-subrc.

    WHEN 1.

    MESSAGE e036(zswqc).

    WHEN 2.

    MESSAGE e037(zswqc).

    WHEN 3.

    MESSAGE e038(zswqc).

    WHEN 4.

    MESSAGE e039(zswqc).

    WHEN 5.

    MESSAGE e040(zswqc).

    WHEN 6.

    MESSAGE e041(zswqc).

    WHEN 7.

    MESSAGE e042(zswqc).

    ENDCASE.

    ENDIF.

    ENDIF. "Endof if for Spool Num Found

    ENDIF.

    ENDIF.

    ENDFORM. " f3500_call_smartform_rdi

    Regards,

    Prakash.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 04, 2006 at 04:24 PM

    Hi,

    Just check whether the values are getting cleared anywhere in between.

    Rather try to print in the output list to check it..

    cheers,

    Simha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2006 at 05:09 PM

    Hi

    Can you paste your code of assigning parameters and the call to the smartform?

    Regards,

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.