on ‎2011 May 19 1:23 PM
Found this sarcastic bit of coding while debuggin today, made my day:
CL_WDR_CLIENT_ABSTRACT_HTTP
HANDLE_REQUEST
cl_wdr_client_ssr=>todo_cleanup( 'Evil hack because of missing support in RR_APPLICATION' )."#EC NOTEXT
method TODO_CLEANUP.
" REASON
if 1 = 1.
endif.
endmethod.There must be more of this kind. Contribute! For the good of the world!
cheers, Lukas
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
This is the one which caught my eye today
CL_ABAP_ZIP=>CRC32( ).
* Do the calculations by hand. This is going to be slow. This is going to be a pain.
* What is a man to do?
CONSTANTS: magic_nr(4) TYPE x VALUE 'EDB88320',
mFFFFFFFF(4) TYPE x VALUE 'FFFFFFFF',
m7FFFFFFF(4) TYPE x VALUE '7FFFFFFF',
m00FFFFFF(4) TYPE x VALUE '00FFFFFF',
m000000FF(4) TYPE x VALUE '000000FF',
m000000(3) TYPE x VALUE '000000'.
IF XSTRLEN( crc32_map ) = 0.
DO 256 TIMES.
DATA: c(4) TYPE x, low_bit(4) TYPE x.
c = sy-index - 1.
DO 8 TIMES.
low_bit = '00000001'. low_bit = c BIT-AND low_bit. " c & 1
c = c DIV 2. c = c BIT-AND m7FFFFFFF. " c >> 1 (top is zero, but in ABAP signed!)
IF low_bit IS NOT INITIAL.
c = c BIT-XOR magic_nr.
ENDIF.
ENDDO.
CONCATENATE crc32_map c INTO crc32_map IN BYTE MODE.
ENDDO.
ENDIF.Cheers,
Suhas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.