Sıralı tablo kullanımı

types: begin of typ_lfa1,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
end of typ_lfa1.
data: gt_lfa1 type sorted table of typ_lfa1 with unique key lifnr
with header line.


*&---------------------------------------------------------------------*
*&      Form  READ_LFA1
*&---------------------------------------------------------------------*
form read_lfa1  using    piv_parnr type ihpa-parnr
changing pcs_lfa1  type typ_lfa1.
clear pcs_lfa1.
read table gt_lfa1 into pcs_lfa1 with table key lifnr = piv_parnr.
if sy-subrc ne 0.
select single *
into corresponding fields of pcs_lfa1
from lfa1
where lifnr eq piv_parnr.
check sy-subrc eq 0.
insert pcs_lfa1 into table gt_lfa1.
endif.
endform.                                                    " READ_LFA1

itab to file with separated by coma, semicolon, etc

data: struct type ref to cl_abap_structdescr,
ls_component type abap_compdescr.
lt_tab  type truxs_t_text_data with header line,
ls_tab(4096),
lv_tab       type string.
lv_text      type c length 255.
field-symbols: <lfs_file>  type any.
loop at lt_itab.
clear: lt_tab,
lv_tab.
loop at struct->components into ls_component.
read table gt_fieldcat into gs_fcat with key fieldname = ls_component-name.
check sy-subrc eq 0.
ASSIGN COMPONENT ls_component-name OF STRUCTURE lt_itab TO <lfs_file>.
check sy-subrc eq 0.
case gs_fcat-datatype.
when 'DATS'.
write <lfs_file> to lv_text MM/DD/YYYY.
when 'QUAN' or 'CURR'.
write <lfs_file> to lv_text.
call function 'CLOI_PUT_SIGN_IN_FRONT'
changing
value = lv_text.
when 'INT4'.
write <lfs_file> to lv_text DECIMALS 0.
call function 'CLOI_PUT_SIGN_IN_FRONT'
changing
value = lv_text.
when others.
write <lfs_file> to lv_text.
endcase.
condense lv_text.
concatenate lt_tab lv_text into lt_tab
separated by lv_tab.
lv_tab = ';'.    "separator
endloop.
append lt_tab.
endloop.

Çoklanmış MIME’leri silmek

  1. RSIR_MIME_DUPLICATES_FIND raporu ile çoklanmış nesneler bulunur.
  2. SE80’de BSP uygulaması içinde yer alan MIME listeni gelinir. Çoklanmış nesnelerden birine sağ tıklayarak özelliklerine girilir.
  3. Nesnenin yaratılma tarihine bakılır, diğeri de kontrol edilerek silinecek olana karar verilir. Thecnical Information sayfasından Class ve Document bilgisi alınır.
  4. SDOK_LOIO_DELETE_WITH_PHIOS fonkiyonu SE37’den çalıştırılarak OBJECT_ID giriş parametresine Class ve Document bilgisi çalıştırılarak nesne silinir.

Deleting dublicate MIME objects: http://scn.sap.com/docs/DOC-34763

ICON ID’sini bulmak için

  1. SE11’e gidip ICON tablosunu görüntüleyin.
  2. Tablo içeriğini filtreleme ekranına gelin.
  3. ID alanında F4 tuşuna basın.
  4. İstediğiniz simgeyi bulup seçin ve tamam deyin.
  5. Filtreleme ekranında ID alanında ID’yi göreceksiniz.

Treeview’deki seçim kutuları

Tüm seçim kutularının seçimini için:
CALL METHOD tree1->lm_update_all_checkmarks( ‘ ‘ )  .

Tüm seçim kutularını seçmek için:
CALL METHOD tree1->lm_update_all_checkmarks( ‘X’ )  .

LOWERCASE HTTP SCRAMBLE

REPORT  Z_LOWERCASE_HTTP_SCRAMBLE.
data: conv type ref to cl_abap_conv_out_ce,
buffer type xstring,
x4(4) type x,
y4(4) type x,
x type x,
i type i,
mask(4) type x value '0000003F',
dest(100) type x,
lf type f.


data: stab(64) type x value
'F0ED53B83244F1F876C67959FD4F13A2' &
'C15195EC5483C234774943A27DE26596' &
'5E5398789A17A33CD383A8B829FBDCA5' &
'55D702778413ACDDF9B83116610E6DFA'.
data: sourcelen type i,
key       type i,
source    type string,
destination type c LENGTH 100.
sourcelen = 5.
key = 26101957.
source = 'sifre'.


if sourcelen eq 0. exit. endif.


y4 = key.
x4 = key * 2.
y4 = y4 bit-xor x4.
x4 = key / 32.
y4 = y4 bit-xor x4.
y4 = y4 bit-and mask.


conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
call method conv->write( data = source ).
buffer = conv->get_buffer( ).


i = 0.
do sourcelen times.
if sy-index eq 40.
x4 = 1.
endif.
lf = ( key * i * i - i ) mod 256.
x = lf.
x = stab+y4(1) bit-xor x.
dest+i = buffer+i(1) bit-xor x.
i = i + 1.
y4 = y4 + 1.
y4 = y4 bit-and mask.
enddo.


write dest(sourcelen) to destination.
write destination.