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

former_member299080
Participant
0 Likes
760

Hi,

We added two custom fields to the standard SAP search OIJ_DOCNR without

having to obtain any object keys. The fields we added are OIEXGNUM and

TSYST.

We also added the two fields to the included search help OIJ_DOCNR_G.

As a result, we can see the two custom fields on the F4 search screen.

Unfortunately, the two fields are not automatically populated like the

other fields.

The data for these two fields is in the same reference table ROIJNOM_IO

as the other fields. It appears when displaying the explicit search

help there's no reference to the table ROIJNOM_IO like for the other

fields. Please see the attached document.

Is there a way to populate the explicit search help without doing a

core mod. If not possible, is there a way to autopopulate custom fields

in f4 search? Without this reference, we have to export/import memory

id's and maninpulate the internal table SHLP in a custom search exit.

In our case, the search exit is ZOIJ_F4IF_DOCNR_S. Note, the problem

with this is that the export only get's executed if a change is made to

a specific field on the nomination line item. This is not reliable.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
642

are those fields present in the selection method..? check it first. if they are not present then you may have to go for search help exit for populating the fields.

4 REPLIES 4
Read only

Former Member
0 Likes
643

are those fields present in the selection method..? check it first. if they are not present then you may have to go for search help exit for populating the fields.

Read only

0 Likes
642

Thanks for response. The fields do exist in the Selection Method for the SEARCH Help. THe problem we are trying to resolve is the automatic defaulting of the values on the SEARCH HELP screen from the ALV line item data. Note, the ALV table uses the structure ROIJNOM_IO as its format. Displaying the "SEARCH HELP for Field" for DOCNR in this structure it correctly shows all of the Search HELP parameters as defined in OIJ_DOCNR. THe unfortunate problem though is there's no "field assignment" for the one parameter we need "OIEXGNUM". The table and field are blank while the other fields have ROIJNOM_IO and Field name. Because there's no "Field assignment" for OIEXGNUM, I have to use the SEARCH EXIT to manipulate in order to default the value so that it shows on the SEARCH HELP screen. See below. I do not have a problem with this per se however, in order to get the default value I had to use EXPORT and IMPORT memory parameters which I would prefer not using because of some other issues.

As you can see below, I'm manipulating the SHLP-INTERFACE table to get the values defaulted. So, the question is this, is there a way to correct the FIELD ASSIGNMENT without a core mod? I believe I can fix this issue in two minutes with a CORE mod but the client does not allow it.

PLease advise.

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

  • Check memory id to get material number and add to search help

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

IMPORT f4_help TO w_f4_help FROM MEMORY ID 'OIEXGNUM'.

IF w_f4_help-tsyst IS NOT INITIAL.

READ TABLE shlp-interface INTO w_interface WITH KEY shlpfield = 'TSYST'.

IF sy-subrc IS INITIAL.

IF w_f4_help-tsyst IS NOT INITIAL.

l_index = sy-tabix.

w_interface-valtabname = 'ROIJNOM_IO'.

w_interface-valfield = 'TSYST'.

w_interface-topshlpnam = 'OIJ_DOCNR'.

w_interface-topshlpfld = 'TSYST'.

w_interface-value = w_f4_help-tsyst.

*

MODIFY shlp-interface FROM w_interface INDEX l_index.

ENDIF.

ENDIF.

READ TABLE shlp-fieldprop INTO ls_fieldprop WITH KEY fieldname = 'TSYST'.

IF sy-subrc IS INITIAL.

IF w_f4_help-tsyst IS NOT INITIAL.

l_index = sy-tabix.

ls_fieldprop-shlpinput = 'X'.

ls_fieldprop-shlpoutput = 'X'.

*

MODIFY shlp-fieldprop FROM ls_fieldprop INDEX l_index.

ENDIF.

ENDIF.

ENDIF.

IF w_f4_help-oiexgnum IS NOT INITIAL.

READ TABLE shlp-interface INTO w_interface WITH KEY shlpfield = 'OIEXGNUM'.

IF sy-subrc IS INITIAL.

IF w_f4_help-oiexgnum IS NOT INITIAL.

l_index = sy-tabix.

w_interface-valtabname = 'ROIJNOM_IO'.

w_interface-valfield = 'OIEXGNUM'.

w_interface-topshlpnam = 'OIJ_DOCNR'.

w_interface-topshlpfld = 'OIEXGNUM'.

w_interface-value = w_f4_help-oiexgnum.

*

MODIFY shlp-interface FROM w_interface INDEX l_index.

ENDIF.

ENDIF.

READ TABLE shlp-fieldprop INTO ls_fieldprop WITH KEY fieldname = 'OIEXGNUM'.

IF sy-subrc IS INITIAL.

IF w_f4_help-oiexgnum IS NOT INITIAL.

l_index = sy-tabix.

ls_fieldprop-shlpinput = 'X'.

ls_fieldprop-shlpoutput = 'X'.

*

MODIFY shlp-fieldprop FROM ls_fieldprop INDEX l_index.

ENDIF.

ENDIF.

ENDIF.

Read only

0 Likes
642

Did you try the search help exit option. you can populate the information to those fields in the step DISP.

Read only

0 Likes
642

The problem is that I need to pass data values from the ALV grid to SEARCH table SHLP and I'm unable to take advantage of the Field assignment. I can do it by exporting and importing to Memory and then using the search exit but would prefer that it map automatically without having to export/import.