2013 May 07 12:16 AM
Hi All,
We have an ABAP program that displays data using REUSE_ALV_GRID_DISPLAY_LVC. There is an editable column in the report for which we need to display F4 help. The functionality of the F4 help will completely user-defined and we want to display a popup based on custom logic.
Could you please share some ideas or your experience in resolving this issue? For any details, please let me know.
Many Thanks,
Senthil G.
2013 May 07 12:31 AM
Hi,
When you prepare the field catalog you have to specify the indicator (F4AVAILABL in structure LVC_S_FCAT) for activating F4 help associated with the field. Before that in case it is a custom field (Zfield) create a search help and assign it to the domain of the field for which you want the F4 help.
Cheers,
Arindam
2013 May 07 1:29 PM
Hi Arindam,
I have set the indicator F4AVAILABL in the structure LVC_S_FCAT and now I get the F4 button for the fields.
The standard field does not have any search help associated with it. So, I have idenfied a function module to display the popup with values.
Could you please tell me how to display this using REUSE_ALV_GRID_DISPLAY_LVC?
Many Thanks,
Senthil G.
2013 May 07 1:34 PM
Hi,
It's better to design your custom search help and assign it to the domain and the data element and use it in ALV. That way you will get what you want. Hi can you also update which field and what search values you want?
Cheers,
Arindam
2013 May 07 4:34 AM
Hi,
Add the following to your field catalog.
lt_fieldcatalog-f4availabl = 'X'. "Does the field have an input help
lt_fieldcatalog-ref_table = 'SYST'. "Reference table name for internal table field
lt_fieldcatalog-ref_field = 'DATUM'. "Reference field name for internal table field
Regards,
Jake
2013 May 07 1:30 PM
This will not work, Jake.
Any other suggestions?
Regards,
Senthil G.
2013 May 07 5:39 AM
Hi,
For assigning F4 help
You have to define, implement and register the event on F4.
Use method register_f4_for_fields.
And refer to this standard report this will surely help you.
BCALV_TEST_GRID_F4_HELP
Reward if helpful.
2013 May 07 6:00 AM
Hi,
For assigining F4 Help for Classical ALV Grid:
Just you have to add the following to your Fieldcatalog:
wa_fieldcatalog-ref_tabname = 'Table name' " for which field you want F4 help that field tablename
Regards,
Jyothi
2013 May 07 1:41 PM
Sathish,
The given program uses the class CL_GUI_ALV_GRID for display but the program is using REUSE_ALV_GRID_DISPLAY_LVC. So, Is there any way to do with this?
Regards,
Senthil G.
2013 May 07 1:42 PM
jyothi,
I have a subroutine written to fetch the values. In that case, how to link this with reference table/field?
Regards,
Senthil G.
2013 May 07 6:00 AM
Hi ,
Please check the following link:
http://scn.sap.com/message/3826655
Please try as follows:
X_FIELDCAT-DATATYPE = 'DATS'.
X_FIELDCAT-INTTYPE = 'D'.
X_FIELDCAT-REF_TABLE = 'LIKP'.
X_FIELDCAT-REF_FIELD = 'LFDAT'. "of type dats.
Regards,
Souvik
2013 May 07 1:45 PM
Hello Souvik,
The suggestion is for OO ALV GRID. I am using the classical ALV Grid.
Any further suggestions?
Regards,
Senthil G.
2013 May 07 1:59 PM
Hi Senthil G,
For example if we want provide F4help in classical ALV Grid.
Example: Field name:PHASE
Table Name: VIMI01(Phase field is avilable in VIMI01 table)
I have a subroutine written to fetch the values. In that case, Use below one
PERFORM FIELDCAT USING:
'PHASE' 'Phase' 8 SPACE SPACE 'VIMI01'.
FORM FIELDCAT USING F D O TO P R.
DATA WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
STATICS V_POS TYPE I VALUE 1.
V_POS = V_POS + 1.
CLEAR WA_FIELDCAT.
MOVE :
1 TO WA_FIELDCAT-ROW_POS,
V_POS TO WA_FIELDCAT-COL_POS,
F TO WA_FIELDCAT-FIELDNAME,
D TO WA_FIELDCAT-SELTEXT_L,
O TO WA_FIELDCAT-OUTPUTLEN,
TO TO WA_FIELDCAT-DO_SUM,
P TO WA_FIELDCAT-FIX_COLUMN,
R TO WA_FIELDCAT-REF_TABNAME.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
ENDFORM. "fill_fieldcat
Check above code once in Subroutine, I think it will help to you 100%.
Regards,
Jyothi
2013 May 07 2:47 PM
Hi Former Member
Create Custom domain in Z field and assign all those values in VALUE RANGE tab in Domain area.
w_fcat-fieldname = 'ACTION'.
w_fcat-edit = 'X'.
w_fcat-input = 'X'.
w_fcat-ref_fieldname = 'ZSCRAP'.
w_fcat-ref_tabname = 'ZNEW'.
w_fcat-tabname = 'it_fINAL'.
w_fcat-seltext_m = 'ACTION'.
APPEND w_fcat TO i_fcat.
CLEAR w_fcat.
append above values in fieldcat table.
another one thing is if u want to select F4 help in ALV grid there only means, (ie) before that no values should be displayed na in output, so pass empty value initially in loop, so that particular columns will be empty while selecting F4 there).
once values placed means, then u can write the user_command for that saving all those values in list .
Regards,
Bastin.G
2013 May 07 2:20 PM
Hi Senthil,
could you please update which field you want to search ? and paste your internal table deceleration used in REUSE_ALV_GRID_DISPLAY_LVC & field catalog deceleration.
and paste your code part, wich you used the FM 'LVC_TRANSFER_FROM_SLIS'
and call function 'REUSE_ALV_GRID_DISPLAY_LVC'
regards
Kannan
2013 May 10 8:24 AM
Resolved using the below link. Instead of button, we can use MC_STYLE_F4 also.
http://scn.sap.com/message/10281035
Regards,
Senthil G.
2013 Oct 23 9:50 PM
Hi Senthil,
I have same requirement to create custom F4 value help for column in ALV output. Could you provide sample code using REUSE_ALV_GRID_DISPLAY_LVC.
Thanks
Abhiram.