Tuesday, July 12, 2011

Calling function module from new task in SAP ABAP

clear: f_flag.
call function 'CLOI_CHANGES_UPL_31'
starting new task 'CLOI_TEST'
performing receive_res on end of task
exporting
cloi_if_par = ls_cloi_if_par_v2
tables
cloi_ordi_imp = lt_cloi_ordi
cloi_method_log_exp = lt_cloi_methods_exp
cloi_message_log_exp = t_cloi_messages_exp
cloi_msg_obj_log_exp = lt_cloi_msg_obj_log_exp
cloi_ord_exp = t_cloi_ord_exp.

* wait till the global variable will be set by our form
wait until f_flag = 'X'.

This is the form that is used to receive results and signalize
the end of processing:

form receive_res using taskname.

data: lt_cloi_msg_obj_log_exp type standard table of cloimoblog,
lt_cloi_methods_exp type standard table of cloimetlog.

receive results from function 'CLOI_CHANGES_UPL_31'
tables
cloi_method_log_exp = lt_cloi_methods_exp
cloi_message_log_exp = t_cloi_messages_exp
cloi_msg_obj_log_exp = lt_cloi_msg_obj_log_exp
cloi_ord_exp = t_cloi_ord_exp.

f_flag = 'X'.

endform.

Note: 'importing' function module is not possible here.

Thursday, July 7, 2011

victim of software counterfeiting windows did not pass genuine windows validation

Error message
you may be a victim of software counterfeiting, this copy of windows did not pass genuine windows validation.

Causes
windows\system32\WgaLogon.dll
windows\system32\WgaTray.exe
windows\system32\LegitCheckControl.dll

Steps to perform

1) Start windows in safe mode.
2) Open command prompt (start->run->cmd)
3) delete file LegitCheckControl.dll. Command is "del LegitCheckControl.dll /F"
4) change properties of WgaLogon.dll.

The wgatray.exe process makes the check for genuine windows software. You can disable WGA by removing the execute bit on WgaLogon.dll. That way, winlogon can't call it as a notification package at boot, and since WgaLogon is responsible for running and maintaining WgaTray.exe, no more tray popups either.

To change the execute bit of WgaLogon.dll, first turn off Simple File Sharing. Now right click the file in Windows Explorer and open the Security Tab. Hit the Advanced button, uncheck the Inherit box at the bottom, hit the Copy button, then hit OK. Go through each listed user/group and remove the "Read & Execute" permission for that file, leaving the "Read" permission as-is.

Hit OK to apply the permission changes and close the file properties dialog. Restart the machine. You can now turn "Use simple file sharing" back on, if you want.
Note: Sometimes no need to worry about "Use simple file sharing". Without turning off simple file sharing

5) Restart pc in safe mode.

6) delete files WgaLogon.dll and WgaTray.exe
Commands are as follows:

delete WgaLogon.dll /F
delete WgaTray.exe /F

7) Now start pc in normal mode

ITS DONE! :)