2023 Jul 13 6:39 AM
Hello,
I want to enable the ABC Analysis and Word processing in Specific.
I have use the cl_salv_functions_list Method . Below is my code.
Can Someone please help me out to Enable the ABC Analysis and Word Processing?
Thank You.
DATA: lo_gr_alv TYPE REF TO cl_salv_table,
lo_gr_functions TYPE REF TO cl_salv_functions_list.
DATA: "lo_selections type ref to cl_salv_selections,
lo_columns TYPE REF TO cl_salv_columns,
lo_column TYPE REF TO cl_salv_column_table.
DATA: lo_header TYPE REF TO cl_salv_form_layout_grid,
lo_h_label TYPE REF TO cl_salv_form_label,
lv_text TYPE char100.
*Create alv object.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = lo_gr_alv
CHANGING
t_table = gt_sel.
CATCH cx_salv_msg.
ENDTRY.
* Show all alv functions.
lo_gr_functions = lo_gr_alv->get_functions( ).
lo_gr_functions->set_all( abap_true ).
lo_gr_functions->set_abc_analysis( abap_true ).
lo_gr_functions->set_export_wordprocessor( abap_true ).
* Fit the columns
lo_columns = lo_gr_alv->get_columns( ).
lo_columns->set_optimize( abap_true ).
* Display alv
lo_gr_alv->display( ).
2023 Jul 13 8:36 AM
lo_gr_alv->set_screen_status( pfstatus = 'STANDARD_FULLSCREEN'
report = 'SAPLSLVC_FULLSCREEN'
set_functions = lo_gr_alv->c_functions_all
).
add after "ENDTRY"
2023 Jul 13 8:36 AM
lo_gr_alv->set_screen_status( pfstatus = 'STANDARD_FULLSCREEN'
report = 'SAPLSLVC_FULLSCREEN'
set_functions = lo_gr_alv->c_functions_all
).
add after "ENDTRY"
2023 Jul 13 9:26 AM
Or same solution, but using a custom copy of standard SALV GUI status SAPLSALV_FUNCTIONS_STATUS / SALV_TABLE_STANDARD + these extra function codes:
2023 Jul 13 7:20 PM
I was able to enable the ABC analysis. But When i tried to use it, it shows me an error as below.
TYPE "LIFNR" is unknown.
What else needs to be done?
Any help or support on this issue
2023 Jul 13 9:21 AM
Weird that ABC analysis is not proposed anywhere in standard full screen ALV, but is proposed in standard container mode via the Export button...
2023 Jul 13 9:58 AM
2023 Jul 13 12:30 PM
I agree with you, it's what my previous comment says. Maybe my comment is not clear enough: you have tried the fullscreen SALV, and my comment is to say that if you display SALV inside a CL_GUI_CONTAINER control, you can see the buttons above where you can select ABC Analysis. These are two completely different things that SALV inside CL_GUI_CONTAINER control proposes ABC Analysis to the user as a menu option instead of a button, and that fullscreen SALV doesn't propose anything (neither menu option nor button). The only option in fullscreen SALV to run the ABC analysis is to type &ABC in the command field, but it's more a temporary workaround.
2023 Jul 13 1:42 PM
2023 Jul 13 2:21 PM
Please use the COMMENT button for comments, asking for complements, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.
If you want to target someone, if this person has posted an Answer, use the button COMMENT, if this person is the Original Poster of the question he/she will be automatically informed, otherwise copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work/but typing this character will suggest hyperlinked names).
2023 Jul 13 7:14 PM