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

f4if_shlp_exit_example multiple export parameters

Former Member
0 Likes
2,259

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!

1 ACCEPTED SOLUTION
Read only

PeterJonker
Active Contributor
0 Likes
1,567

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:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-edc983384...

6 REPLIES 6
Read only

PeterJonker
Active Contributor
0 Likes
1,568

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:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-edc983384...

Read only

0 Likes
1,567

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.

Read only

0 Likes
1,567

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.

Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
1,567

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


Read only

0 Likes
1,567

Hi Gurunath,

Thanks for your kind answer.

I have tried with your code, but it exports just customer code and not address.

Read only

0 Likes
1,567

Hi Mick,

please can you share screenshot where your adding the search help and logic.so that we can analyse the issue.

Regards,

Gurunath