Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

search help exit problem

Former Member
0 Likes
922

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
740

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

5 REPLIES 5
Read only

Former Member
0 Likes
740

Hi,

Refer this link..[Search help exit |]

Read only

0 Likes
740

record_tab is always empty what is wrong ? Please help !

Regards

ilhan

Read only

former_member156446
Active Contributor
0 Likes
740

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..

Read only

Former Member
0 Likes
741

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

Read only

0 Likes
740

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.