2023 Feb 14 4:29 PM
Hello, all.
I need to create a custom search help by code in my ALV.
I know there are reports like
BCALV_TEST_GRID_F4_HELP
BCALV_EDIT_08
The problem is the field is a field defined in my program in my internal table (no relation with a dictionary field) and It seems that is necessary to create the field in the field catalog with the reference of a field from a dictinary table, if not the "button" of the search help is not displayed, and there is no on_f4 event triggered...
You can try by yourself, execute any of theese programs:
in a normal execution you can see the "button" to trigger the f4 event.
But, if you, by debug, remove the REF_TABLE from the field catalog... there is no button
Do you know how can I define my field to display this button to trigger the on_f4 event?
Thanks in advance.
2023 Feb 14 6:50 PM
Hello Oliver,
You need to register the fields using this method:
lw_f4-fieldname = 'NUCTA'.
lw_f4-register = 'X'.
lw_f4-chngeafter = 'X'.
INSERT lw_f4 INTO TABLE lt_f4.
FREE: lw_f4.
CALL METHOD go_grid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4.
Register the onF4 event into your ALV and implement your search help there.
BCALV_TEST_GRID_F4_HELP its a great example.
Best regards.
2023 Feb 15 7:04 AM
Hi, Eduardo.
Yes, I know it.
I was testing with this report, and this register is done. But, as I said, if the field in the fieldcatalog dont have any value in the field REF_TABLE the "button" for the search help is not visible.
2023 Feb 15 9:42 AM
oliver.am
No problem for me. You can display values without REF_TABLE.
2023 Feb 15 2:45 PM
Hi Sandra.
It's strange, Report BCALV_EDIT_08 if I remove this value by debug is not working:
We have an old SAP version, SAP_ABAP 701 .
2023 Feb 15 8:57 PM
oliver.am
Weird. No issue at my side, with SAP GUI 7.70, ABAP 7.52 SP0:
2023 Feb 14 7:33 PM
2023 Feb 15 7:03 AM