2006 May 18 6:18 PM
Hi all,
I want to display a search help for a Project Systems user field. I tried to attach a search help directly to the field (PRPS-USR03) but it didn't work. I don't think that is the correct approach. Something tells me I should include this logic in a user exit. Can anyone give me some idea as to how I can accomplish this task?
regards,
Mat
2006 May 18 7:16 PM
Hi all,
I want to display a search help for a Project Systems user field. I tried to attach a search help directly to the field (PRPS-USR03) but it didn't work. I don't think that is the correct approach. Something tells me I should include this logic in a user exit. Can anyone give me some idea as to how I can accomplish this task?
regards,
Mat
2006 May 18 6:26 PM
hello Mathew,
You can create search helps in SE11. There is a radiobutton for them. Is this search help for a custom table?
You can define search helps over database tables or views. Enter the name of the db table or view in the Selection Method field, then at the bottom add the fields that you want to show in the search help.
or
SH creation: In SE11, give a custom name for search help and select Elementary or Cumulative. Then in Selection method select the table from which the data needs to be fetched.
Provide the fields that are to be retreived in Search help parameters.check the fields that are to be imported and exported and also the position(1.2..) of the fields to be displayed.
And in the custom table give this search help in help/check in se11 table display.
This should solve your problem
Regards,
Naveen
2006 May 18 6:35 PM
Thanks much Naveen. Here is my dilemma. The search help I want to add is for the table PRPS and the field is USR03. This is NOT a custom table. Further, the help selection is dependent upon the value of another field in PRPS named SLWID. For instance, if the screen filed value of SLWID = 'DIR' then I want to display a USR03 help list consisting of three values S, N or P. I don't believe I can add this search help directly to USR03 in PRPS. I think I need to use a user exit...any thoughts?
2006 May 18 7:16 PM
2006 May 18 7:19 PM
I need to have the search help displayed in the standard tcode CJ20N.
2006 May 18 7:34 PM
So you need to create your own search help like says NAVEENKUMAR GUDURI and get acces key to do the modification in PRPS table.
Regards.
2006 May 18 8:40 PM
I tried that by creating an elementary search help including one export paramter...usr03. I used the access key to attach the search help to the field in the table. When I execute CJ20N I navigate to usr03 and click f4...nothing happens No list...no nothing!!
As a side note. I did find a BADI named WBS_USER_FIELDS_F4 that I implemented...but the interface only allows me to return a single value...is there a way to display a select list from the interface...when the user selects a value from the select list I can return it in the export paramter.
2007 Feb 22 6:21 AM
Hi Matthew,
Perharps this reply might be too late. I just developed this badi and return multiple values by using function F4IF_INT_TABLE_VALUE_REQUEST.
here's the coding:
method IF_EX_WBS_USER_FIELDS_F4~AT_F4 .
To enhance field Project Category in Screen CJ02
(PRPS-USR03)
check i_PRPS-SLWID = 'ZPS0001'.
CHECK i_user_field = 'PRPS-USR03'.
CALL FUNCTION 'ZBW_GET_SEARCH_HELP'
IMPORTING
E_VALUE = E_VALUE
.
endmethod.
FUNCTION zbw_get_search_help.
*"----
""Local interface:
*" EXPORTING
*" REFERENCE(E_VALUE) TYPE PRPS-USR00
*"----
DATA : BEGIN OF itab OCCURS 0,
e_value(20),
END OF itab.
DATA: BEGIN OF field_tab OCCURS 0.
INCLUDE STRUCTURE dfies.
DATA END OF field_tab.
DATA : return_tab LIKE ddshretval OCCURS 0 .
REFRESH: field_tab.
CLEAR field_tab.
field_tab-fieldname = 'E_VALUE'.
field_tab-intlen = 20.
field_tab-outputlen = 20.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Project Category'.
APPEND field_tab.
CLEAR field_tab.
field_tab-fieldname = 'DESC'.
field_tab-intlen = 30.
field_tab-outputlen = 30.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Description'.
APPEND field_tab.
REFRESH: itab.
select * from zbw_proj.
CLEAR: itab.
itab-e_value = zbw_proj-PROJ_DEF.
APPEND itab.
CLEAR: itab.
itab-e_value = zbw_proj-PROJ_DEs.
APPEND itab.
endselect.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'E_VALUE'
dynprofield = 'A'
dynpprog = sy-cprog
dynpnr = sy-dynnr
TABLES
value_tab = itab
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDFUNCTION.
2007 May 29 3:00 PM
Hi Ester,
Could you please explain the following in detail :
1) What are all the import & export parameters for the function module ZBW_GET_SEARCH_HELP.
2) What are the fields that are stored in the Ztable : zbw_proj
3) What is the significance of Internal table : field_tab
4)'F4IF_INT_TABLE_VALUE_REQUEST' is used to populate all possible values. After selecting one value out of all the possible values, do we need to export/import them? not very clear on this... could you please explain the program flow.
Regards,
Syam
2007 May 29 3:01 PM
Hi Ester,
Could you please explain the following in detail :
1) What are all the import & export parameters for the function module ZBW_GET_SEARCH_HELP.
2) What are the fields that are stored in the Ztable : zbw_proj
3) What is the significance of Internal table : field_tab
4)'F4IF_INT_TABLE_VALUE_REQUEST' is used to populate all possible values. After selecting one value out of all the possible values, do we need to export/import them? not very clear on this... could you please explain the program flow.
Regards,
Syam
2007 Jul 18 7:06 AM
hi all, sorry for the late reply,
FUNCTION zbw_get_search_help.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(FIELD) TYPE ZFIELD
*" EXPORTING
*" REFERENCE(E_VALUE) TYPE PRPS-USR00
*"----
DATA : BEGIN OF itab OCCURS 0,
e_value(20),
END OF itab.
DATA: BEGIN OF field_tab OCCURS 0.
INCLUDE STRUCTURE dfies.
DATA END OF field_tab.
DATA : return_tab LIKE ddshretval OCCURS 0 with header line.
REFRESH: field_tab.
*start of UCR6379
tables: Zinvest, ZREGIONSTATE.
*end of UCR6379
*start of UCR6379: PS enhancement
CASE field.
WHEN 'PRPS-USR03'. "project category
end of UCR6379
CLEAR field_tab.
field_tab-fieldname = 'E_VALUE'.
field_tab-intlen = 20.
field_tab-outputlen = 20.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Project Category'.
APPEND field_tab.
CLEAR field_tab.
field_tab-fieldname = 'DESC'.
field_tab-intlen = 30.
field_tab-outputlen = 30.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Description'.
APPEND field_tab.
REFRESH: itab.
SELECT * FROM zbw_proj.
CLEAR: itab.
itab-e_value = zbw_proj-proj_def.
APPEND itab.
CLEAR: itab.
itab-e_value = zbw_proj-proj_des.
APPEND itab.
ENDSELECT.
WHEN 'PRPS-USR07'. "investment no
CLEAR field_tab.
field_tab-fieldname = 'E_VALUE'.
field_tab-intlen = 20.
field_tab-outputlen = 20.
field_tab-decimals = 2.
field_tab-inttype = 'C'.
field_tab-REFTABLE = 'ZINVEST'.
field_tab-REFFIELD = 'ZNO'.
field_tab-scrtext_m = 'Investment No'.
APPEND field_tab.
CLEAR field_tab.
field_tab-fieldname = 'DESC'.
field_tab-intlen = 30.
field_tab-outputlen = 30.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Description'.
APPEND field_tab.
REFRESH: itab.
SELECT * FROM ZINVEST.
CLEAR: itab.
itab-e_value = ZINVEST-ZNO.
APPEND itab.
CLEAR: itab.
itab-e_value = ZINVEST-ZDESC.
APPEND itab.
ENDSELECT.
WHEN 'PRPS-USR02' or 'PRPS-USR01'. "region & state
CLEAR field_tab.
field_tab-fieldname = 'Region'.
field_tab-intlen = 20.
field_tab-outputlen = 20.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'Region'.
APPEND field_tab.
CLEAR field_tab.
field_tab-fieldname = 'E_VALUE'.
field_tab-intlen = 20.
field_tab-outputlen = 20.
field_tab-inttype = 'C'.
field_tab-scrtext_m = 'State No'.
APPEND field_tab.
REFRESH: itab.
SELECT * FROM ZREGIONSTATE.
CLEAR: itab.
itab-e_value = ZREGIONSTATE-STATE_NO.
APPEND itab.
CLEAR: itab.
itab-e_value = ZREGIONSTATE-REGION.
APPEND itab.
ENDSELECT.
*start of UCR6379: PS enhancement
ENDCASE.
*end of UCR6379
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'E_VALUE'
dynprofield = 'A'
dynpprog = sy-cprog
dynpnr = sy-dynnr
TABLES
value_tab = itab
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
if field = 'PRPS-USR02' or field = 'PRPS-USR01'..
read table return_tab index 1.
endif.
ENDFUNCTION.
in badi WBS_USER_FIELDS_F4, field E_VALUE is the return value, therefore in fm 'F4IF_INT_TABLE_VALUE_REQUEST' , retfield is 'E_VALUE'
2007 Jul 23 6:26 PM
Hi, can you explain me the procedure of use the badi, please it's urgent.
I don´t understand yor code in some parts
I´´m beginner in abap
Thanks
2007 Jun 04 2:54 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |