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

How to do program for search help

Former Member
0 Likes
1,225

Hi,

Please tell me how to do the program for search help in Dialog programming.

Thanks,

Sriram.

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
989

Say you have a field on your screen that is name as P_LGORT. You want to throw up a F4 help with the possible storage locations and there descriptions. Of course there is already a search help for this field, this is just an example.

Put something like this in the screen flow logic.



PROCESS ON VALUE-REQUEST.

  FIELD P_LGORT MODULE LGORT_HELP.


Now in the ABAP code, probably in the PAI include of your program. You will want some code like this.



************************************************************************
*      Module LGORT_HELP  INPUT
************************************************************************
module lgort_help input.

* Internal Table for storage location help
  data: begin of help_lgort occurs 0,
         lgort type zt001l-lgort,
         lgobe type zt001l-lgobe,
        end of help_lgort.

  select lgort lgobe from t001l
           into corresponding fields of table help_lgort.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'LGORT'
            dynprofield = 'P_LGORT'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_lgort.

endmodule.


Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
989

Please award points for helpful answers and close if answered completely, Thanks.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
989

Step 1:

Create a function module (ZZ_TEST_FUNCTION).

Step 2:

--> Create a search help(ZSEARCH)

--> Enter the above function Module(ZZ_TEST_FUNCTION) in search help exit field.

STEP 3:

Attach the search help with any field of table.

Function module Sample Code:

FUNCTION ZZ_TEST_FUNCTION.

""Local interface:

*" IMPORTING

*" VALUE(MCONAME) DEFAULT SPACE *" VALUE(SELSTR) DEFAULT SPACE

*" TABLES

*" SHLP_TAB TYPE SHLP_DESCR_TAB_T

*" RECORD_TAB STRUCTURE SEAHLPRES

*" CHANGING

*" VALUE(SHLP) TYPE SHLP_DESCR_T *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL

*" STRUCTURE DDSHF4CTRL

*"----


CALL SCREEN 100.

  • Return from application back to SAP

CASE save_ok_0100.

WHEN 'RSTR'.

callcontrol-step = 'SELONE2'.

WHEN 'CANCEL' OR 'BACK' OR 'EXIT'.

callcontrol-step = 'EXIT'.

WHEN 'SEL'.

READ TABLE itab.

record_tab = itab-filed1.

APPEND record_tab.

callcontrol-step = 'RETURN'.

EXIT.

ENDIF.

ENDCASE.

ENDFUNCTION.

Read only

Former Member
0 Likes
989

How to do program for search help

Read only

0 Likes
989

at line selection

on value request

for assigning search help for any parameters in the selection screen

Read only

Former Member
0 Likes
989

Try the following code..

Use this functionality to get search help in dialog programming.

FORM HELP_CHECK.

*-- Set up fields to retrieve data

ltab_fields-tabname = 'ZFI_PMNTADV'.

ltab_fields-fieldname = 'CHECT'.

ltab_fields-selectflag = 'X'.

APPEND ltab_fields.

ltab_fields-tabname = 'ZFI_PMNTADV'.

ltab_fields-fieldname = 'PMNT_ADV'.

ltab_fields-selectflag = 'X'.

APPEND ltab_fields.

SORT ltab_fields.

DELETE ADJACENT DUPLICATES FROM ltab_fields.

*-- Fill values

SELECT chect

INTO TABLE ltab_values

FROM zfi_pmntadv

WHERE pmnt_adv NE space.

SORT ltab_values.

DELETE ADJACENT DUPLICATES FROM ltab_values.

CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'

EXPORTING

fieldname = 'chect'

tabname = 'zfi_pmntadv'

title_in_values_list = 'Select a value'

IMPORTING

select_value = so_chect

TABLES

fields = ltab_fields

valuetab = ltab_values

EXCEPTIONS

field_not_in_ddic = 01

more_then_one_selectfield = 02

no_selectfield = 03.

ENDFORM. "fiscal_year

Read only

Former Member
0 Likes
989

Hiii

You can use like this.

process on help-request .

field <wa_header-netpr> module <help_netpr> .

MODULE <help_netpr> INPUT.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

titel = Add titles

txt1 = Text to be display

txt2 = text-t11

  • TXT3 = ' '

  • TXT4 = ' '

.

ENDMODULE. " help_netpr INPUT

Pls rewards points if its helpful

Regards

Hitesh