Skip to Content
avatar image
Former Member

regarding smartforms

Moved to correct forum by moderator. Please use a meaningful subject in future

hi gurus,

i hv 2 doubts.

1st is as below after calling fn module 'SSF_FUNCTION_MODULE_NAME',how to call second fn module(fm_name).becasuse this fn module is defined by us ,so how to call f(m_name)

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSAN_INVOICE'

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

2nd doubt

why we have to create table type and then define it in import parameter of form interface

like in standard form ex SM_EXAMPLE_01.

below is code of SM_EXAMPLE_01

data: customer type scustom,

bookings type ty_bookings,

connections type ty_connections.

here for bookings and connections we have to create table type.then in import parameter of form interface we hv defined it. why to do this,and what is use of table type,can't we simply define table in table parameter of iform interface.

Edited by: Matt on Dec 2, 2008 2:20 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Dec 02, 2008 at 11:04 AM

    call function fm_name

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2008 at 11:06 AM

    Hi

    Check few things,

    1. data: fm_name type rs38l_fnam. is there in your program.

    2. Check the actuial FM name in smartform and compare that by putting a break-point at 'SSF_FUNCTION_MODULE_NAME' and verify that it is returning a FM name and that is the same as what you saw in smartforms.

    Ranga

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2008 at 11:06 AM

    HI,

    Execute the Smartfrom In another window and it generaes the FM name whcih you can see.

    Take tha FM name Use the Patter option from Application toolbar to get the Fm template in you code.

    and rename the FM name with variable..FM_name

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2008 at 11:10 AM

    1st....

    data : fm_name type rs38l_fnam.

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

    formname = 'ZSAN_INVOICE'

    IMPORTING

    fm_name = fm_name

    EXCEPTIONS

    no_form = 1

    no_function_module = 2

    OTHERS = 3.

    IF sy-subrc 0.

    above -


    > fm_name get the f.m (number) generated by smartforms.

    instead of passing that number u should pass the fm_name...

    because the fm (number) may differ client to client so if u pass the form name to f.m 'SSF_FUNCTION_MODULE_NAME' it will give u the fm (number)...

    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'

    DATE_L = s_date-low

    DATE_H = s_date-high

    PLANT_L = s_werks-low

    PLANT_H = s_werks-high

    MANUPLANT = it001w-werks

    • IMPORTING

    • DOCUMENT_OUTPUT_INFO =

    • JOB_OUTPUT_INFO =

    • JOB_OUTPUT_OPTIONS =

    TABLES

    IFINAL = ifinal[]

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2008 at 11:10 AM

    1. After calling SSF_FUNCTION_MODULE_NAME' you get the FM name in fm_name. Now use

    call function fm_name.
    

    This will call your smartform.

    2. Form interfaces are used to pass values in/out the smartform.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Try this way

      1. Goto to Tcode Smartfroms...give the SMARTFROM NAME ABD EXECUTE.

      2. You get the SE37 screen with FM name

      3. take the Fm name and in your progam using Patters button in application tool bar of se38 editor.

      get the Fm structure.

      4. Change the Fm name to variable.

  • avatar image
    Former Member
    Dec 02, 2008 at 11:21 AM

    Hi Sanjay,

    After calling this FM 'SSF_FUNCTION_MODULE_NAME' you can see in debug mode that some number and char mix string is genarated and it is in the import parameter fm_name.when you click on call pattern with this String that is returned in FM_NAMe.you can directly call this FM.this the next FM that you have to call in your prog

    jenerally ppl save it in variable fm_name whos type is rs38l_fnam.

    So u just copy the Import parameter fm_name of FM 'SSF_FUNCTION_MODULE_NAME' in debug mode and call FM with the value stored in that.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded