Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Wednesday, September 22, 2010

How to remove entries from a search help hit list

Hi gents,
Thought i should offer some code i often find useful.
The below code removes entries from a searh help hit list.
This is taken from DMS, but the structure is the same regardless.
Espen Leknes
The field we are looking for, BEGRU is not part of the result returned from the search help.
This means we have to get the values for the primary key from the search help.
,which is available. Then we do a lookup from DRAW and get the field BEGRU. Voilá,
we have the field we are looking for and can remove that entry.
data: l_descbname type dfies,
l_descgltgb type dfies.
data: l_bname type xubname,
l_gltgb type xugltgb.

read table shlp_tab index 1.
read table shlp_tab-fielddescr with key fieldname = 'BNAME'
into l_descbname.
read table shlp_tab-fielddescr with key fieldname = 'GLTGB'
into l_descgltgb.
if sy-subrc eq 0.

loop at record_tab.
move record_tab+l_descbname-offset(l_descbname-intlen)
to l_bname.
move record_tab+l_descgltgb-offset(l_descgltgb-intlen)
to l_gltgb.
if l_gltgb < sy-datum and l_gltgb ne '00000000'.

delete record_tab.

endif.
endloop.
endif.
exit.
endif.

No comments: