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

How to get the smartforms name

Hello ABAPers,

Im quite confused regarding the filename of smartforms...using the CALL FUNCTION gy_sf_fm_name.. the value of gy_sf_fm_name is /1BCDWB/SF00000022 but how can i get the real sf name?

Kindly help. Will reward points

Thanks in advance

aVaDuDz

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:14 AM

    hi,

    you need to give the smartform name to SSF_FUNCTION_MODULE_NAME and get the FM name as importing parameter..

    regards,

    theja.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 09:45 AM

    Hi,

    When you activate your smartform, the corresponding function module is generated. It is this function module which was executed everytime, not the form. Here we have to see the function module and the form as the same entities. When we transfer the form from one client to the other, only form is transfered. When we activate it, then it generates a funciton module here. Since the function modules are system generated we get names like /BC001/......

    It is mandatory that we should know the smartform name.

    You pass this smartform name to the SSF_FUNCTION_MODULE_NAME as input and get the function module associated with that smartform as a result.

    Then we have to call this function module separtely using form interfaces that we have defined in the form.

    Regards

    vadi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 11:17 AM

    Hello,

    Each time you modify your Smartform, the form name will change.

    So, you need to tune your report pgm so as track down the form name.

    For the FM : SSF_FUNCTION_MODULE_NAME, set :

    IMPORTING

    fm_name = wrk_sfname

    Where : wrk_sfname TYPE rs38l_fnam.

    Now, you have your Form name as /1BCDWB/SF00000022

    Call the function /1BCDWB/SF00000022 using pattern.

    And replace CALL FUNCTION '/1BCDWB/SF00001567' with :

    CALL FUNCTION wrk_sfname...

    ...

    ....

    ....

    Now, you don't have to be bothered about the function name generated by your smartform.

    Hope it helps.

    Regards,

    Remi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:18 AM

    Use SSF_FUNCTION_MODULE

    while generating smartform it generates its generates its own FM the name of that function module is system dependent , i.e. if u develop that smart in development system then suppose it generated FM with name /BCD/00023.

    it may differ in quality system and it also difeers in production system so instead of giving that FM name we give smartform name to the FM ssf_function_module_name and we will import FM name and then proceed further

    this is the use of the FM

    plzz reward if it is useful...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:28 AM

    Hi,

    Call like:

    call function 'SSF_FUNCTION_MODULE_NAME'

    exporting

    formname = 'ZTICKET_AA' "ur form name

    • VARIANT = ' '

    • DIRECT_CALL = ' '

    importing

    fm_name = fname

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

    call function fname "here ur dynamic function modulename will be captured

    • 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

    it_smart = it_smart

    • EXCEPTIONS

    • FORMATTING_ERROR = 1

    • INTERNAL_ERROR = 2

    • SEND_ERROR = 3

    • USER_CANCELED = 4

    • OTHERS = 5

    .

    Regards,

    Renjith Michael.

    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.