‎2009 Feb 01 5:50 PM
Hello Dear Experts,
I am facing some problem in creating a search help exit.
I need to write a search help exit which provides
the "Maintenance status of complete material" (Table Mara -> Field VPSTA).
It is little bit complicate to do that becausesearch help exit have a predefined interface generally
and I dont know the handling with it. I have used the pattern
F4IF_SHLP_EXIT_EXAMPLE which is for all the search help exits to be created.
But e.g. the RECORD_TAB is always empty. I have also created one Paramter named ZVPSTA
within my Elementary srch hlp.
Please help me to do that. What is still missing in the below shown code ?
Any help on this would be highly appreciated.
FUNCTION ZSHELPEXIT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" REFERENCE(ZVPSTA) TYPE ZVPSTA OPTIONAL
*" VALUE(SHLP) TYPE SHLP_DESCR OPTIONAL
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*" OPTIONAL
*"----------------------------------------------------------------------
tables: mara.
data ls_itab type MARA-VPSTA.
data lt_itab type table of MARA-VPSTA.
select DISTINCT VPSTA from mara into table lt_itab.
ZVPSTA = lt_itab[].
ENDFUNCTION.
‎2009 Feb 02 8:12 PM
thanks for all your replys. All what I am trying to understand is how can I influence
the output.
e.g.
the "Maintenance status of complete material" (Table Mara -> Field VPSTA)
has several times the same data entry. I want elimanate them with
select DISTINCT VPSTA from mara into table lt_itab.
But there is no chance to do that. It ignores this statement totaly.
Regards
ilhan
‎2009 Feb 02 3:04 AM
‎2009 Feb 02 8:43 AM
record_tab is always empty what is wrong ? Please help !
Regards
ilhan
‎2009 Feb 02 6:58 PM
Check [My Wiki on search help exit|https://wiki.sdn.sap.com/wiki/x/du0]
there is some thing to do with callcontrol-step... you need to check if its select or some thing else... its been long I dont remember much of it either..
‎2009 Feb 02 8:12 PM
thanks for all your replys. All what I am trying to understand is how can I influence
the output.
e.g.
the "Maintenance status of complete material" (Table Mara -> Field VPSTA)
has several times the same data entry. I want elimanate them with
select DISTINCT VPSTA from mara into table lt_itab.
But there is no chance to do that. It ignores this statement totaly.
Regards
ilhan
‎2009 Feb 02 8:19 PM
how about you select all VPSTA into lt_temp and say delete adjucent duplicate comapring VPSTA and use for all entries on lt_temp.
select VPSTA from mara
for all entries in lt_temp
where <cond>
into table lt_itab.