cancel
Showing results for 
Search instead for 
Did you mean: 

Help required with search help exit

0 Kudos

Hi,

I have the following code in my search help exit function module.

*******************************************************************************************************************

FUNCTION ZTRAC_SH_OBJ_TYPE.

*"----


""Local Interface:

*" TABLES

*" SHLP_TAB TYPE SHLP_DESCR_TAB_T

*" RECORD_TAB STRUCTURE SEAHLPRES

*" CHANGING

*" REFERENCE(SHLP) TYPE SHLP_DESCR_T

*" REFERENCE(CALLCONTROL) TYPE DDSHF4CTRL

*"----


Data lt_program TYPE TABLE OF zpr_program.

DATA ls_program LIKE LINE OF lt_program.

DATA id_obj_type TYPE zobj_type.

CALL FUNCTION 'ZTRAC_GET_OBJ_TYPE_ACTUAL'

IMPORTING

ED_OBJ_TYPE = id_obj_type.

CASE callcontrol-step.

*.SELONE step

WHEN 'SELONE'.

IF ID_OBJ_TYPE = 'PROGRAM'.

CALL FUNCTION 'Z_PR_GET_PROGRAMS'

  • EXPORTING

  • IV_BSUITE_ID =

  • IV_PTU_ORG_ID =

  • IV_AUTHOR_ID =

  • IV_CALLING_APPLICATION =

  • IT_INCLUDE_PHASE_IDS =

  • IT_EXCLUDE_PHASE_IDS =

IMPORTING

ET_PROGRAMS = lt_program

  • ET_PROGRAM_HEADER =

  • EXCEPTIONS

  • BSUITE_FOR_PRG_NOT_EXISTING = 1

  • PTU_ID_FOR_PRG_NOT_EXISTING = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT lt_program INTO ls_program.

  • APPEND lt_program-INT_PRG_NAME TO shlp.

  • APPEND lt_program-INT_PRG_NAME TO shlp_tab.

  • Below i am appending the result to the record_tab.

APPEND ls_program-INT_PRG_NAME TO record_tab.

ENDLOOP.

  • ELSEIF ID_OBJ_TYPE = 'PROJECT_CLUSTER'.

ENDIF.

WHEN 'DISP'.

ENDCASE.

*******************************************************************************************************************

When DISP -> I want the values in the record_tab to be filled in my F4 help. What will the code in WHEN DISP be?

Also i have appended the result only to record_tab. Do i have to append it to SHLP_TAB also?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Thanks

Former Member
0 Kudos

hi,

In DISP , you have to filter the records according to search criteria if there is any and finally move the records to Record_tab.

It would be something like this :

LOOP AT gt_select_list INTO gw_select_list WHERE carrid IN r_carrid.

MOVE gw_select_list TO record_tab-string.

CLEAR gw_select_list.

ENDLOOP.

the values in Record_tab will be displayed to the user.

0 Kudos

Hi Saurav,

I already have filtered the records in SELONE and have the values to be displayed in record_tab.

So in DISP i dont have to do anything?

Or should the filtering of the records happen in DISP and not in SELONE?

Regards,

Wilma

Former Member
0 Kudos

If you have your values in record_tab then it should not be an issue.

What is the error.

0 Kudos

Hi,

We have the values in record_tab and im not doing anything on WHEN DISP.

The F4 help does not display any values.

Regards,

Wilma

0 Kudos

Hi,

WHEN SELONE, record_tab has the desired values but WHEN DISP. record_tab[ ] is empty.

How can i pass the values of record_tab from WHEN SELONE to WHEN DISP?

Regards,

Wilma

Former Member
0 Kudos

hi,

You must be having your values to be displayed in some internal table.

Pass the values from internal table to record_tab using the method i have given in previous post.

Former Member
0 Kudos

You can also use this FM to pass values to record_tab from internal table :

CALL FUNCTION 'F4UT_RESULTS_MAP'

TABLES

shlp_tab = shlp_tab

record_tab = record_tab

source_tab = it_oigvt

CHANGING

shlp = shlp

callcontrol = callcontrol.