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

F4 Help for Classical ALV Grid

Former Member
0 Likes
6,873

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.

16 REPLIES 16
Read only

arindam_m
Active Contributor
0 Likes
3,827

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 

Read only

Former Member
0 Likes
3,827

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.

Read only

arindam_m
Active Contributor
0 Likes
3,827

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

Read only

Former Member
0 Likes
3,827

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

Read only

0 Likes
3,827

This will not work, Jake.

Any other suggestions?

Regards,

Senthil G.

Read only

Former Member
0 Likes
3,827

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.

Read only

0 Likes
3,827

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

Read only

0 Likes
3,827

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.

Read only

0 Likes
3,827

jyothi,

I have a subroutine written to fetch the values. In that case, how to link this with reference table/field?

Regards,

Senthil G.

Read only

souvik_saha
Explorer
0 Likes
3,827

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

Read only

0 Likes
3,827

Hello Souvik,

The suggestion is for OO ALV GRID. I am using the classical ALV Grid.

Any further suggestions?

Regards,

Senthil G.

Read only

0 Likes
3,827

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 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




Read only

0 Likes
3,827

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

Read only

Former Member
0 Likes
3,827

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

Read only

Former Member
0 Likes
3,827

Resolved using the below link. Instead of button, we can use MC_STYLE_F4 also.

http://scn.sap.com/message/10281035

Regards,

Senthil G.

Read only

0 Likes
3,827

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.