03-05-2007 5:02 AM
Hi all,
Iam Displaying the output in ALV format with check boxes, in the output, if we check 2 check boxes and press delete pushbuttons, the values has to delete from th e DB table.
Here my prob is iam getting the output with check boxes,. but when i select 1 check box and press delete, the record was not deleted.
For reading the check box lines i used the command
READ LINE sy-index FIELD VALUE i_kssk1-flag.
but this is not working. please any one suggest me the other solutions.
Thanks & Regards,
Sreedhar
03-05-2007 5:07 AM
the problem mite be that ur not reading the first line but reading some other line..
did u check whether ur reading the checked line or not?
03-05-2007 5:11 AM
Check in debugging whether the value is getting cptured in the following code
READ LINE sy-index FIELD VALUE i_kssk1-flag.
Also check whtehr u have writte the code in user_command?
If not u need to change the same to rs_selfield TYPE slis_selfield.
then read.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
* Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM
.
03-05-2007 5:11 AM
03-05-2007 5:14 AM
Hi Sreedhar,
For reading the contents of line use HIDE or GET CURSOR FIELD statement. And then delete the value from database. It will work.
Reward points if helpful answer.
Ashven
03-05-2007 5:19 AM
Sreedhar,
Please refer to the following link:
Pls. reward if useful