cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the smartforms name

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

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

regards,

theja.

Answers (4)

Answers (4)

p190355
Active Contributor
0 Kudos

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

i048168
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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