12-22-2008 10:54 AM
Hi there,
how can I get the name of a smartform if I have only its generated FM-name?
Can you give me a hint?
Thanks a lot
Kind regards
Markus
12-22-2008 10:57 AM
Hi,
try like this..
DATA: fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = '<your form name>'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = 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.
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'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
it_final = <your final table>
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.
Arunima
12-22-2008 10:57 AM
Hi,
try like this..
DATA: fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = '<your form name>'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = 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.
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'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
it_final = <your final table>
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.
Arunima
12-22-2008 11:06 AM
hmmm, quite a peculiar requirement.
Just open tcode SE37 and enter the generated FM name and press display.
See the attributes tab and you can see the smartform name in Shorttext.
Also you can get it from the source code of the function module, just look in the data declaration, you will find something like;
BEGIN OF %FULLNAME,
FORM TYPE TDSFNAME VALUE 'Your smartform name here', "here comes the smartform name
VARI TYPE TDVARIANT,
ACTV TYPE TDBOOL VALUE 'X',
END OF %FULLNAME.
@Arunima
Hope you haven't read the question carefully
Regards
Karthik D
12-22-2008 11:12 AM
Hello Markus,
Please check the table STXFADMI.
Here put the numeric part of the FM-name to the field FMNUMB.
If you give me the FM-name i can make my suggestion more clear.
Else you can make use of the technique as suggested by Karthik )
BR,
Suhas
Edited by: Suhas Saha on Dec 22, 2008 12:14 PM