02-20-2014 2:41 AM
Hi ,
My report is simple. I am selecting data from joining two tables. After that I am showing data using SALV Objects. But none of the field in the report show value in F4 or dropdown list. For instance, fields like RFBSK, ERDAT and FKART. I have defined my internal table using same data dictionary field used in select statement. Following is the methods used after selecting data into table ts_output. Only posting status (RFBSK) show dropdown button but clicking on button does not show all defined value ranges.
cl_salv_table=>factory( IMPORTING r_salv_table = gr_table
CHANGING t_table = ts_output ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
gr_columns = gr_table->get_columns( ).
gr_columns->set_optimize( abap_true ).
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_display->set_list_header( 'Croatia - Reporting on Zero invoices' ).
gr_table->display( ).
Any Idea?
Thanks and Best Regards,
02-20-2014 3:05 AM
How are you defining the final internal table and which 2 tables data is present in it?
F4 help should come automatically based on type of field.
02-20-2014 3:05 AM
How are you defining the final internal table and which 2 tables data is present in it?
F4 help should come automatically based on type of field.
02-20-2014 3:09 AM
Hi Manish,
Thanks for reply!
That is what I was thinking. It should come automatically. Here is my rest of the code.
TYPES: BEGIN OF ty_output,
vbeln TYPE vbeln_vf,
fkart TYPE fkart,
vkorg TYPE vkorg,
netwr TYPE netwr,
waerk TYPE waerk,
erzet TYPE erzet,
erdat TYPE erdat,
kunrg TYPE kunrg,
kunag TYPE kunag,
xblnr TYPE xblnr_v1,
bupla TYPE bupla,
rfbsk TYPE rfbsk,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
monat TYPE monat,
blart TYPE blart,
bldat TYPE bldat,
budat TYPE budat,
xblnr1 TYPE xblnr1,
awtyp TYPE awtyp,
awkey TYPE awkey,
xref1_hd TYPE xref1_hd,
xref2_hd TYPE xref2_hd,
xblnr_alt TYPE xblnr_alt,
END OF ty_output.
DATA: ts_output TYPE STANDARD TABLE OF ty_output.
SELECT v~vbeln v~fkart v~vkorg v~netwr v~waerk v~erzet
v~erdat v~kunrg v~kunag v~xblnr v~bupla v~rfbsk
b~belnr b~gjahr b~monat b~blart b~bldat b~budat
b~xblnr b~awtyp b~awkey b~xref1_hd b~xref2_hd
b~xblnr_alt
INTO TABLE ts_output
FROM vbrk AS v
LEFT OUTER JOIN bkpf AS b
ON b~awtyp = 'VBRK'
AND b~awkey = v~vbeln
WHERE v~erdat IN r_date
AND v~vkorg = s_vkorg-low
AND v~vbeln IN s_vbeln.
02-20-2014 4:41 AM
i have not worked with oops alv, but in normal ALV while defining fieldcat if u give reftab as standard table which is having the respective field that will give f4 option in the alv report...
Regards,
Siva Prasad.
02-20-2014 6:58 AM
The ddic reference can be added using one line by calling method apply_ddic_structure of class cl_salv_columns_table.
lr_columns = lr->get_columns( ).
* DATA: p_ddic TYPE salv_s_ddic_reference.
* p_ddic-table = 'VBRK'.
* p_ddic-field = 'RFBSK'.
* lr_column ?= lr_columns->get_column( 'RFBSK' ).
* lr_column->set_ddic_reference( p_ddic ).
* lr_column->set_f4( if_salv_c_bool_sap=>true ).
lr_columns->apply_ddic_structure( 'VBRK' ).
You are already doing get_columns to fill gr_columns. After this call apply_ddic_structure.
The commented lines above show a way to apply ddic reference selectively.
This would enable the F4 help.
/.
02-20-2014 4:34 AM
Hi Heta,
can you please check how you have defined the internal GR_TABLE.
Thanks,
Satish
02-20-2014 2:02 PM
Hi Manish,
Thank you! Your tip was extremely helpful.
So after
gr_columns = gr_table->get_columns( ).
I added this
gr_columns->apply_ddic_structure( 'VBRK' ).
And it resolve the issue.
Thanks a lot!!
02-20-2014 2:11 PM
You are welcome. Please debug the SALV_DEMO* report line by line to explore other details. Doing this would save time when you are dealing with same class next time.
A tip for SCN. For the sake of maintaining a correct logical structure of discussion, you should use the correct reply button that is present next to every post/reply.
When you scroll to end of a discussion, there a "Reply to original post" link that is used to reply to OP (original poster, the person who started the discussion).
In this case, your reply is addressed to me, but structure wise it is addressed to Satish as his reply was last in the discussion.
02-06-2023 4:09 PM
The F4 dropdown in a SALV report refers to a dropdown list in the SAP ALV (ABAP List Viewer) grid control. When the user presses the F4 key in an ALV field, the dropdown list appears, allowing the user to select a value from a predefined list of options. The F4 dropdown functionality can be implemented in a SALV report by using the function module 'F4IF_FIELD_VALUE_REQUEST' and adding the dropdown list to the ALV field using the method 'set_input_field_edit'. https://wordmaker.info/how-many/dropdown.html