2007 Dec 24 4:47 AM
Hi, need help in ALV. My task is to display report using ALV with Check box for each record, Com.Code, Doc.No., Doc.Date, Pos.Date & Doc.Hdr.Text fields. In status bar I need 3 extra buttons, for selecting all records, deselecting them & 3rd for calling BDC using call transaction. Thanks in advance........
2007 Dec 24 6:19 AM
Hi,
To get a check box in the ALV, declare a char var of length 1. display it along with the alv report.
to the 3 buttons in the status bar, copy the standard status bar having all these required options to ur program and call this status bar in ur alv function module also declare a form statement with the name of the status bar and within that form use set pf-status 'new status bar name'.
on selecting records from the alv output and clicking on the select button from the status bar
the char field will have a value ='X'. hope u can work with this.
tc
saji
Hi, need help in ALV. My task is to display report using ALV with Check box for each record, Com.Code, Doc.No., Doc.Date, Pos.Date & Doc.Hdr.Text fields. In status bar I need 3 extra buttons, for selecting all records, deselecting them & 3rd for calling BDC using call transaction. Thanks in advance........
2007 Dec 24 6:19 AM
Hi,
To get a check box in the ALV, declare a char var of length 1. display it along with the alv report.
to the 3 buttons in the status bar, copy the standard status bar having all these required options to ur program and call this status bar in ur alv function module also declare a form statement with the name of the status bar and within that form use set pf-status 'new status bar name'.
on selecting records from the alv output and clicking on the select button from the status bar
the char field will have a value ='X'. hope u can work with this.
tc
saji
2007 Dec 24 6:29 AM
HI,
Please check the below code....
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
DATA : L_REP_MODE. "report mode
CASE P_UCOMM.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
WHEN 'BUTTON1'.
loop at itab.
itab-check = 'X'.
Modify itab.
endloop.
WHEN 'BUTTON2'.
loop at itab.
itab-check = ' '.
Modify itab.
endloop.
WHEN 'BUTTON3'.
Implement your logic here(Call Transaction)
WHEN OTHERS.
ENDCASE.
cheers,
Bujji
2008 Jun 25 12:33 PM
Hi,
I got the solution for this requirement.
We need to design Status bar for ALV as required, for SAP standard buttons, we need not add any functionality, but for user defined checkboxes add logic.
Thanks & regards,
Amit
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |