Current Position:Home > Regarding pushbutton operation in alv report

Regarding pushbutton operation in alv report

Update:10-11Source: network consolidation
Advertisement
hi,
I have a requiement in which i will get list display which contains certain no of records(let us say 10  records)...now the issue is *if i selet one record and if it is correct record* and if i hit the insert pushbutton it should go and insert into z-table which i hav created.....and if the record which i hav selected is error record.....it should throw an error message saying that it is the error record....as error record stops further process i hav used it as information message and i used 'display like 'E''....so that it wont affect further proceedings.....
and if i select the 2nd record and if i hit the pushbutton it is taking to the sap initial screen which i dont want .....
how to solve this issue?
can anyone plz help me in this issue....

The Best Answer

Advertisement
Hi Needy ,
  M giving you a sample code where you can set your pf-status and how to handle the check box etc .
This code shows you hoe to select and deselect the check boxes ..
All that you have to do is apply your logic...
set pf-status 'SELECT' .
at user-command .
  describe table t_lpr lines w_lines .
  case sy-ucomm .
    when 'SELECTALL' .
      set pf-status 'SELECT' excluding 'SELECTALL' immediately.
      do w_lines times .
        read line w_line field value w_check . " INTO W_CHECK .
        if w_check = space .
          w_check = 'X' .
          modify line w_line field value w_check.    "INTO W_CHECK .
          add 1 to w_line .
        endif .                        " IF W_CHECK = ' '
      enddo .                          " DO W_LINES TIMES
      clear w_line .
    when 'DESELECT' .
      set pf-status 'SELECT' excluding 'DESELECT' immediately.
      do w_lines times .
        read line w_line field value w_check .
        if w_check = 'X' .
          w_check = space .
          modify line w_line field value w_check .
          add 1 to w_line .
        endif .                        " IF W_CHECK = 'X' .
      enddo .                          " DO W_LINES TIMES
      clear w_line .
     Here w_line : Line that is being read
             w_lines : Total number of lines in your table(or list if you use 'list number of lines w_lines)
            w_check is my checkbox .
Hope your need will be done!!
Much Regards ,
Amuktha .
  • Regarding pushbutton operation in alv report Update:10-11

    hi, I have a requiement in which i will get list display which contains certain no of records(let us say 10  records)...now the issue is *if i selet one record and if it is correct record* and if i hit the insert pushbutton it should go and insert in

  • Display a cell in ALV report as Pushbutton Update:10-11

    Hi, I am having an ALV report. I want to display one cell of the ALV report as a Pushbutton. How is it possible ? Thanks and regards.Hi WTM,   To display a cell as pushbutton in container display of a simple, two-dimensional table, use the cell type

  • How to call ALV Report and SMARTFORMS through Pushbutton Update:11-30

    hi, i have created a report.My task is to create two buttons: 1)ALV Report. 2)SMARTFROMS. Through these button i have to call ALV Report and SMARTFORMS. i have created both button and when i execute the program, it shows me the button but not working

  • What are main events in that are used in ALV reports Update:11-30

    hi gurus what are main events in that are used in ALV reports.... regards baskarhi i think this will help u. Events in alv and their FM    The main events in alv and their FM and why we use these:  1. SLIS_PRINT_ALV.  2. SLIS_T_LISTHEADER.  3. SLIS_T

  • *which event trigger by event wise in classical, interactive, alv reports* Update:11-30

    Hi Experts, can any body tell about event wise trigger in Q(1). classical reports.         ( from initial) Q(2). Interactive reports.      (from initial) Q(3). ALV List and Grid      (from initial) points will be rewarded. Thanks, Balakrishna.Hi, Eve

  • ALV Report Update:10-11

    *& Report  ZALV11                                                      * REPORT  zalv11 LINE-SIZE 1023 MESSAGE-ID zz. TYPE-POOLS : slis. *  T A B L E S    D E C L A R A T I O N S                              * TABLES : ce1eg01,          makt,        

  • ALV Report - Production Scheduling Report Update:10-11

    Hello Gurus, I need to write an ALV report of open production order operations per selection criteria.  If the production orders are linked to any sales order, then the result of ALV should also contain the sales order data. Selection screen should c

  • Summing up a Column in ALV report Update:10-11

    Hi All, I have developed an ALV Report which will display Invoices and other details. Now i need to display the sum of NETWR column, if user wish to select that column and click the "SUM" icon. As of now, if i select the NETWR column and click '

  • To capture the selected rows along with edited field contents in alv report Update:10-11

    Dear All,          I do have requirement where, in alv report output one field is editable and need to save the content of the edited field along with the selected rows.          For example If there are 10 records displayed in the alv output with 20

  • How to extract the column width in ALv report if its executed in background Update:10-11

    I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extr