Skip to Content
author's profile photo Former Member
Former Member

Help needed........for report

Hi all,

At the output of a report i have a 4 columns + a column having a checkbox. There is also a execute button at the application toolbar of the output.On clicking the execute button, i want to delete only those entries against which checkbox = 'X'.

How to recognise which row have been selected. Please help.

Regards,

Mainak

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2007 at 05:21 AM

    hi

    for this u have to read the list.

    and find which chkboxes are checked

    ie

    if chk = 'X'.

    delete......

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2007 at 05:22 AM

    Hi,

    Check this code..

    DATA: BEGIN OF itab OCCURS 0,
                check,
                value(20),
              END OF itab.
    
    
    SET PF-STATUS 'TEST1'.
    
    itab-value = 'ETSAT'.
    APPEND itab.
    
    itab-value = 'ETSATADSF'.
    APPEND itab.
    
    itab-value = 'ETSAT'.
    APPEND itab.
    
    
    LOOP AT itab.
      WRITE: / itab-check AS CHECKBOX,
                    itab-value.
    ENDLOOP.
    
    
    AT USER-COMMAND.
    
      DATA: wa LIKE itab.
      DATA: itab_download LIKE itab OCCURS 0 WITH HEADER LINE.
    * When the button is pressed..
      IF sy-ucomm = 'EXECUTE'.
    
        DESCRIBE TABLE itab.
    
        DO sy-tfill TIMES.
    
    
          READ LINE sy-index FIELD VALUE itab-check.
    
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
    
          CHECK itab-check = 'X'.
    
          itab_download-value = itab-value.
    
    * Delete the value..
          DELETE ZTABLE WHERE FIELD = ITAB_DOWNLOAD-VALUE.
    
        ENDDO.
    
    
    
      ENDIF.
    

    Thanks

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2007 at 05:22 AM

    wht is the structure of the internal table that u are displayin as output?

    if u hav the checkbox field in that internal table then while deletein records check all teh fields there the value of that check boc column is 'X' or not SPACE ..and u can delete all des records

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2007 at 05:26 AM

    hi mainak,

    loop at itab where checkbox = 'X'.

    move-coresponding itab to itab1.

    append itab1.

    endloop.

    if not itab1[] is initial.

    delete itab from table itab1 where key field = itab1-keyfield.

    endif.

    reward points if helpful.

    regards,

    seshu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2007 at 06:02 AM

    Hi Mainak,

    Just try this:

      GET CURSOR FIELD L_FIELD VALUE L_VALUE.
      IF L_FIELD = '<checkbox name>' AND L_VALUE = 'X'.
        <logic for delete>
      ENDIF.

    Hope this helps.

    Regards

    Anil Madhavan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.