Wonderful explanation. In simple terms you have explained it which is easy to understand. Even after investing huge amount of money I didn't understood it in class.
Nice Explication Mam.....Even Non It Back Ground Students Can Understand Easily, Can You Do More Class About Sap Abap, Your Way Of teaching is very clear .......
Always write below code after select querr If sy-subrc = 0. Else. Message 'Data not found' type 'I'. Endif. It will make sure your query runs and its data then proceed, if data not found then shows message.
I have doubt How to phase error like we already mentioned field name.? When we select same field name From different internal tables.? Give reply plz Mam I am fresher for SAP ABAP.
To achieve this functionality you need to call the method set_cell_type of class cl_salv_column_table and pass the value as if_salv_c_cell_type=>checkbox_hotspot . Now clicking on the checkbox will trigger the event LINK_CLICK , so we need to declare and event handler class here lcl_event_handler and declare a method m_link_click to handle the action . The LINK_CLICK event will give us the row and column value of the selected checkbox row , to we need to change the value to ‘X’ or 1 to mark it as checked . At the end we need to call the REFRESH( ) method of class CL_SALV_TABLE . We cannot activate the checkbox in classic ABAP list as in this case we cannot change the value of the checkbox.
REPORT ztestr_alv_10. TYPES : BEGIN OF gy_bseg, check TYPE xfeld, bukrs TYPE bukrs, belnr TYPE belnr_d, gjahr TYPE gjahr, buzei TYPE buzei, wrbtr TYPE wrbtr, END OF gy_bseg. DATA : gt_bseg TYPE STANDARD TABLE OF gy_bseg INITIAL SIZE 1. DATA : lo_alv TYPE REF TO cl_salv_table. REFRESH : gt_bseg[]. *----------------------------------------------------------------------* * CLASS lcl_event_handler DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_event_handler DEFINITION. PUBLIC SECTION. METHODS: m_link_click FOR EVENT link_click OF cl_salv_events_table IMPORTING row column. ENDCLASS. "lcl_event_handler DEFINITION *----------------------------------------------------------------------* * CLASS lcl_event_handler IMPLEMENTATION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS lcl_event_handler IMPLEMENTATION. METHOD m_link_click. FIELD-SYMBOLS : TYPE gy_bseg. READ TABLE gt_bseg ASSIGNING INDEX row. IF sy-subrc IS INITIAL. IF -check IS INITIAL. -check = 'X'. ELSE. CLEAR -check. ENDIF. ENDIF. lo_alv->refresh( ). ENDMETHOD. "m_link_click ENDCLASS. "lcl_event_handler IMPLEMENTATION START-OF-SELECTION. SELECT bukrs belnr gjahr buzei wrbtr FROM bseg INTO CORRESPONDING FIELDS OF TABLE gt_bseg UP TO 10 ROWS. IF sy-subrc IS INITIAL. SORT gt_bseg BY bukrs belnr gjahr buzei . ENDIF. TRY. CALL METHOD cl_salv_table=>factory IMPORTING r_salv_table = lo_alv CHANGING t_table = gt_bseg. CATCH cx_salv_msg . ENDTRY. *-- Checkbox logic starts DATA : lo_columns TYPE REF TO cl_salv_columns_table. lo_columns = lo_alv->get_columns( ). lo_columns->set_optimize( 'X' ). DATA : lo_column TYPE REF TO cl_salv_column_table. TRY. lo_column ?= lo_columns->get_column( 'CHECK' ). lo_column->set_cell_type( if_salv_c_cell_type=>checkbox_hotspot ). lo_column->set_output_length( 10 ). CATCH cx_salv_not_found. ENDTRY. DATA: lo_events TYPE REF TO cl_salv_events_table. lo_events = lo_alv->get_event( ). DATA: lo_event_handler TYPE REF TO lcl_event_handler. CREATE OBJECT lo_event_handler. SET HANDLER lo_event_handler->m_link_click FOR lo_events. *-- Checkbox logic end lo_alv->display( ).
Wonderful explanation. In simple terms you have explained it which is easy to understand. Even after investing huge amount of money I didn't understood it in class.
wonderful explanation mam
Thanks a lot
Thanks for explaining mam.
Most welcome 😊
Great Tutorial sister.
Thank you 😊
Nice Explication Mam.....Even Non It Back Ground Students Can Understand Easily, Can You Do More Class About Sap Abap, Your Way Of teaching is very clear .......
Sure Thank you so much 😌
Very helpful
nice expalatioin mam, thanks for uploading
Very very nice explaination on ALV Report
Thank You 😊
@@learnabap plz do more videos on SAP ABAP Modulepool
thank you swathi your alv report very helpful to me
Superb ,no words can Express👍
Thank You 😊
Thanks, you are the best.
You're welcome!
Clear explained.. I am MM and SD consultant. If you are taking abap class please let me know. My wife want to join abap class
Thanks swathi, nice explanation.
Clear understanding. Thanks a lot, Swati. If possible, please can you proceed to like these videos?
Sure after few days i will make the videos
Can you create a video on how to populate automatic field value on PARAMETER 2, based on PARAMETER 1??
lovely.i am trying to set the colum-pos is not working on my ALV report.
Thanks mam. It's very useful
Mam keep more video your video is fully understand ☺️
Thank you, I will
Is this for display ALV in the same screen??
Mam plz bring more video on about alv report
Nice video ..but please make videos on new abap syntax
Thank u
it helped me a lot
Thank you 😊
Always write below code after select querr
If sy-subrc = 0.
Else.
Message 'Data not found' type 'I'.
Endif.
It will make sure your query runs and its data then proceed, if data not found then shows message.
Thank you for Suggestion
clearly understandable . keep it up
Glad to hear that
Marathi 👌
Thank You
I have doubt
How to phase error like we already mentioned field name.?
When we select same field name
From different internal tables.?
Give reply plz Mam
I am fresher for SAP ABAP.
Mam report dump and error pr ek vdo pls
How to enable back and cancel buttons
I will make video on this topic
THANKS TON MAM 🙏
Do more videos BdC recording and BAPI and BADI ALSO MAM.
yes sure
@@learnabap Thanks for the reply.
How auto calculation perform in alv at entry time?
gd explain
Thank you, keep watching
Hi swati
How to add checkbox field in cl_salv_table. ?
To achieve this functionality you need to call the method set_cell_type of class cl_salv_column_table and
pass the value as if_salv_c_cell_type=>checkbox_hotspot . Now clicking on the checkbox will trigger the event LINK_CLICK , so we need to declare and event handler class here lcl_event_handler and declare a method m_link_click to handle the action . The LINK_CLICK event will give us the row and column value of the selected checkbox row , to we need to change the value to ‘X’ or 1 to mark it as checked .
At the end we need to call the REFRESH( ) method of class CL_SALV_TABLE .
We cannot activate the checkbox in classic ABAP list as in this case we cannot change the value of the
checkbox.
Please refer to the following source codes :
REPORT ztestr_alv_10.
TYPES : BEGIN OF gy_bseg,
check TYPE xfeld,
bukrs TYPE bukrs,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
buzei TYPE buzei,
wrbtr TYPE wrbtr,
END OF gy_bseg.
DATA : gt_bseg TYPE STANDARD TABLE OF gy_bseg INITIAL SIZE 1.
DATA : lo_alv TYPE REF TO cl_salv_table.
REFRESH : gt_bseg[].
*----------------------------------------------------------------------*
* CLASS lcl_event_handler DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
m_link_click FOR EVENT link_click OF cl_salv_events_table
IMPORTING row column.
ENDCLASS. "lcl_event_handler DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_event_handler IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
METHOD m_link_click.
FIELD-SYMBOLS : TYPE gy_bseg.
READ TABLE gt_bseg ASSIGNING INDEX row.
IF sy-subrc IS INITIAL.
IF -check IS INITIAL.
-check = 'X'.
ELSE.
CLEAR -check.
ENDIF.
ENDIF.
lo_alv->refresh( ).
ENDMETHOD.
"m_link_click
ENDCLASS. "lcl_event_handler IMPLEMENTATION
START-OF-SELECTION.
SELECT bukrs belnr gjahr buzei wrbtr
FROM bseg
INTO CORRESPONDING FIELDS OF TABLE gt_bseg
UP TO 10 ROWS.
IF sy-subrc IS INITIAL.
SORT gt_bseg BY bukrs belnr gjahr buzei .
ENDIF.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = gt_bseg.
CATCH cx_salv_msg .
ENDTRY.
*-- Checkbox logic starts
DATA : lo_columns TYPE REF TO cl_salv_columns_table.
lo_columns = lo_alv->get_columns( ).
lo_columns->set_optimize( 'X' ).
DATA : lo_column TYPE REF TO cl_salv_column_table.
TRY.
lo_column ?= lo_columns->get_column( 'CHECK' ).
lo_column->set_cell_type( if_salv_c_cell_type=>checkbox_hotspot ).
lo_column->set_output_length( 10 ).
CATCH cx_salv_not_found.
ENDTRY.
DATA: lo_events TYPE REF TO cl_salv_events_table.
lo_events = lo_alv->get_event( ).
DATA: lo_event_handler TYPE REF TO lcl_event_handler.
CREATE OBJECT lo_event_handler.
SET HANDLER lo_event_handler->m_link_click FOR lo_events.
*-- Checkbox logic end
lo_alv->display( ).
Thank You Swati..
Could you please start sessions on Adobe Forms.
Blocked ALV Report ?
Definitely I will upload video about blocked ALV as well
R u taking any classes
Not now but yes I will start very soon