Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Check BOX problem

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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?

Former Member
0 Kudos

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

.

Former Member
0 Kudos

Can u just send ur code,so that i can understand it fully

Former Member
0 Kudos

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

Former Member
0 Kudos