SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Динамическое создание, выполнение, удаление ФМ



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Влад
Специалист
Специалист



Joined: 26 Dec 2007
Posts: 63

PostPosted: Mon Feb 11, 2008 10:15 am    Post subject: Динамическое создание, выполнение, удаление ФМ Reply with quote

Кто-нибудь знает, возможно динамически создать, выполнить и после всего удалить Функциональный модуль?
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Mon Feb 11, 2008 11:14 am    Post subject: Reply with quote

А что разрабатываем - вирус или троян? Very Happy

Добавил: по идее можно все через INSERT REPORT сделать - и создание, и удаление...
Back to top
View user's profile Send private message Blog
vga
Мастер
Мастер


Age: 195
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Mon Feb 11, 2008 12:00 pm    Post subject: Reply with quote

Зачем это Вам? Наводит на нехорошие мысли, как и на John Doe Laughing

Дядюшка интернет говорит по этому поводу следующее:

Code:

call function 'RS_FUNCTIONMODULE_INSERT'
  exporting
    funcname = '/TEST40P/FB_TEST_EVE99' " Function module name
    function_pool = 'CRAS1' "Function group name
*INTERFACE_GLOBAL = ' '
*REMOTE_CALL = ' '
    short_text = 'TEST Anlage FB' "Shorttext from the Function module
    suppress_corr_check = ' ' " To supress any request for Transport reuqest popup
    update_task = '1'
*corrnum = 'B20K8A0V3F'
    namespace = '/TEST40P/' " This is optional and used to supply the namespace
*suppress_language_check = 'X'
*AUTHORITY_CHECK = 'X'
*save_active = ' '
    new_source = it_report[] " If alreayd existing FM new source code for it
*IMPORTING
*FUNCTION_INCLUDE = " Function module include that gets generated
*CORRNUM_E =
  tables
    import_parameter = if_import " Function moduels import paramters
    export_parameter = if_export " export paramters
    tables_parameter = if_tables " Tables parameteers of the FM to be generated
    changing_parameter = if_change "changing parameters
    exception_list = if_except " Exception list
    parameter_docu = if_docu_tab " Documentation of the paramters
*SOURCE = " Table containing the Source code of the FM to be generated


Для удаления можно использовать ФМ RS_FUNCTION_DELETE, только убедитесь, что Вы не удаялете стандарные ФМ.

Code:
call function 'RS_FUNCTION_DELETE'
exporting
funcname = 'ZFM_NAME" " Function modue name
suppress_popups = 'X' " TO suppress any pop-ups that come when you delete
exceptions
error_message = 1
cancelled = 2
function_released = 3
others = 4.
 
Back to top
View user's profile Send private message Blog Visit poster's website
east
Участник
Участник



Joined: 09 Jan 2008
Posts: 4
Location: Moscow

PostPosted: Fri Feb 15, 2008 12:03 pm    Post subject: Reply with quote

А кто-нибудь знает как процессы убивать? Smile
Back to top
View user's profile Send private message
mike1
Модератор
Модератор



Joined: 22 Nov 2007
Posts: 82

PostPosted: Fri Feb 15, 2008 12:33 pm    Post subject: Reply with quote

Ну и топик подобрался Smile Shocked
на никсах есть команда kill.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 195
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Feb 15, 2008 12:51 pm    Post subject: Reply with quote

kill -9 pid

rm -rf /

и ищете новую работу Laughing


Если серьезно, то трассирока sm50 при выборе пункта меню
End Session выполняет код:
CALL 'ThWpInfo' ID 'OPCODE' FIELD '05'
ID 'WP_INDEX' FIELD WP_TABL_ALV-WP_INDEX.

где WP_TABL_ALV-WP_INDEX - порядковый номер процесса в списке.
Следовательно, сначала нужно список процессов получить, потом по PID найти нужный и ...
Back to top
View user's profile Send private message Blog Visit poster's website
east
Участник
Участник



Joined: 09 Jan 2008
Posts: 4
Location: Moscow

PostPosted: Mon Feb 18, 2008 11:27 am    Post subject: Reply with quote

Quote:
kill -9 pid

rm -rf /

и ищете новую работу Laughing

Так и сделаю Laughing только в обратной последовательности Laughing Laughing Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.