‎2013 May 29 2:36 PM
Hallo Gurus,
I have a question for you all...
I have just created a custom search help to look for tables/fields.
I have used a function created copying standard function module F4IF_SHLP_EXIT_EXAMPLE.
Anyway I'm not able to export two parameters... I would like to export both tablename and fieldname.
How do I have to fill internal table RECORD_TAB?
Thank you very much indeed!
‎2013 May 29 2:52 PM
your requirement is not clear (at least not to me).
The search help exit that you create by copying F4IF_SHLP_EXIT_EXAMPLE is an exit in your search help. Therefore the internal table record_tab is the result from your serach help.
If you want to limit the amounts of data shown to the user then you can use the serach help exit.
e.g. by writing the following code if you want to get rid of all duplicates in the result list:
CASE callcontrol-step.
WHEN 'DISP'.
SORT record_tab.
DELETE ADJACENT DUPLICATES FROM record_tab.
ENDCASE
for more logic see example in:
‎2013 May 29 2:52 PM
your requirement is not clear (at least not to me).
The search help exit that you create by copying F4IF_SHLP_EXIT_EXAMPLE is an exit in your search help. Therefore the internal table record_tab is the result from your serach help.
If you want to limit the amounts of data shown to the user then you can use the serach help exit.
e.g. by writing the following code if you want to get rid of all duplicates in the result list:
CASE callcontrol-step.
WHEN 'DISP'.
SORT record_tab.
DELETE ADJACENT DUPLICATES FROM record_tab.
ENDCASE
for more logic see example in:
‎2013 May 29 2:58 PM
Hallo Peter,
thanks for your kind reply.
I try to explain what I'm trying to do:
I have a custom Z table with these fields:
Customer Code
Customer Address.
I have created a custom search help for the customer. When I select a customer code, I would like the Search Help to export both code & address to table fields, while now I am ableto export only customer code.
‎2013 May 29 3:43 PM
Ok I understand now. This will not work with match code (standard search help)
But maybe this discussion can put you on the right track.
http://scn.sap.com/thread/1305100
Good luck.
‎2013 May 29 3:23 PM
Hi Mick,
create the itab as per your ztable.
data:it_tab type standard table of <ztable>,
wa_tab type <ztable>.
slect customer no
customer adress
from ztable
into it_tab
where customer no = selected customer no.
if sy-subrc = 0.
sort it_tab by customerno.
endif.
*- moving the data to search help work area.
loop at it_tab into wa_tab.
*- moving the data to search help work area.
MOVE wa_tab TO record_tab-string.
*- appending the work area into table.
APPEND record_tab.
CLEAR record_tab.
endloop.
*- to display the search help.
CASE callcontrol-step.
WHEN 'DISP'.
SORT record_tab.
DELETE ADJACENT DUPLICATES FROM record_tab.
ENDCASE.
please let me know if any issues.
Regards,
Gurunath
‎2013 May 29 3:51 PM
Hi Gurunath,
Thanks for your kind answer.
I have tried with your code, but it exports just customer code and not address.
‎2013 May 29 5:36 PM
Hi Mick,
please can you share screenshot where your adding the search help and logic.so that we can analyse the issue.
Regards,
Gurunath