Select multiple lines in a sorted subsumarized ALV

Select multiple lines in a sorted sub summarized ALV
Hi all,
I had to make  a Z version of ME28 transaction in order to do a PO mass release.
The customer asked for a similar looking transaction.
The ALV displays PO sorted and summarized by Purchase Document.
I had a selection column to the ALV so the user can select multiple PO.
Te problem is that I don’t know how to see wich PO’s are selected due the selection field of my output data does not get marked when I click on the Purchase Document
As you an see in the ALV I created you can select at "header level" by clicking on the Purchasing Order row.
But this does not affect my output table so I dont have an X on the select field.
It does when I click on a item level.
How can I read this marked lines?
Thanks in advance.

I need to release it.
It works fine when I select an item row, cause it updates the i_output-sel = X, So I just loop it and do the mass release,
Problem is when I try to do a seletion like in the image I've upload.
I need to know wich line of my i_output table correspond to which subtotal Purchasing Order selectedrow.

Similar Messages

  • How to select multiple lines in ALV report

    hi gurus,
    I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
    Regards,
    Satyajit

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = gd_repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_ekko
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "button add by me
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
    *       text
    *      -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
    *       text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
    *       text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
    here u can select morethan one line using control(ctrl)
    reward if usefull...

  • ALV - Select multiple lines without CTRL

    Hi,
    I have an ALV OO Grid with layout-sel_mode = 'A'.
    But I need to select multiple lines without need to hold CTRL key. Just like a table control.
    Is it possible?
    Thanks,
    Frisoni

    Hi,
    This is not possible selecting multiple records whitout using CTRL... you can have the checkbox instead of tab to select the multiple records without using CTRL.
    Refer to this link..How to select multiple lines in ALV without using the CTRL key

  • Selecting multiple lines from ALV output for further validation

    Hi guru's,
             i have created a ALV report with a check box in the output,i need to select multiple lines by checking 'X' in the check box
    after that i need to do further validation..like updating etc..how to read the selected lines( check box = 'X' )from the output of the ALV report.Is there any function for that.plz help me with this regard.
    Thanks & Regards,
    Balaji.S

    Hi Balaji,
    Try this way.
    <font color=blue><pre>
    REPORT ztest_alv_row_selection.
    DATA: BEGIN OF it_output OCCURS 0,
            select TYPE c,          "This variable stores the value when row selected.
            bukrs  TYPE t001-bukrs,
            butxt  TYPE t001-butxt,
          END OF it_output.
    TYPE-POOLS:slis.
    DATA:it_events            TYPE STANDARD TABLE OF slis_alv_event,
         it_fieldcat          TYPE STANDARD TABLE OF slis_fieldcat_alv,
         wa_fieldcat          TYPE slis_fieldcat_alv,
         wa_events            TYPE slis_alv_event,
         wa_layout            TYPE slis_layout_alv.
    DATA:g_program            TYPE sy-repid VALUE sy-repid.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_output UP TO 100 ROWS.
      DEFINE fieldcatalog.
        wa_fieldcat-fieldname = &1.
        wa_fieldcat-tabname   = &2.
        wa_fieldcat-seltext_l = &3.
        append wa_fieldcat to it_fieldcat.
        clear  wa_fieldcat.
      END-OF-DEFINITION.
      fieldcatalog: "Column table       col text
                    'BUKRS' 'IT_OUTPUT' 'BUKRS',
                    'BUTXT' 'IT_OUTPUT' 'BUTXT'.
      wa_layout-box_fieldname     = 'SELECT'. "This has to be set to get selection
      wa_layout-colwidth_optimize = 'X'.
      wa_events-name              = 'PF_STATUS_SET'.
      wa_events-form              = 'PF_STATUS_SET'.
      APPEND wa_events TO it_events.
      CLEAR wa_events.
      wa_events-name              = 'USER_COMMAND'.
      wa_events-form              = 'USER_COMMAND'.
      APPEND wa_events TO it_events.
      CLEAR wa_events.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = g_program
          is_layout          = wa_layout
          it_fieldcat        = it_fieldcat
          it_events          = it_events
        TABLES
          t_outtab           = it_output.
    *&      Form  PF_STATUS_SET
    FORM pf_status_set USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTEST'.
    1. When you set Pf status ZTEST, standard application tools will be removed.
    2. Goto SE41 give program 'SAPLKKBL' and status 'STANDARD_FULLSCREEN'.
    3. Copy the status from those to ZTEST of our program. Now you will see all standard functions.
    ENDFORM.                    "PF_STATUS_SET
          FORM USER_COMMAND                                          *
    FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN 'DISPLAY'.  "user presses SAVE
          LOOP AT it_output.
            IF it_output-select EQ 'X'.
          Process records that have been selected
              WRITE:/ it_output.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    ENDFORM.                    "user_command</pre></font>
    Thanks
    Venkat.O

  • How to select multiple lines in reports

    Hi,
    how to select multiple lines in a reports and process those selected lines to other activities like BDC.
    Please paste sample report here. or any demo examples . (don't paste ALV report , paste only classical report)
    suppose there are 10 records in output, i want to select 3 records and process other activities like bdc.
    Point will awarded.

    Hi ,
    the o/p in ur case will be a basic list output with a check box enabled in the left .
    Now say there are 10 records in the list output and i have checked 3 of them where checkboxes are enabled .
    And i press a button to submit this to the BDC .
    Here u need to make use of
    READ LINE statement to read the records from the list output and then pass them to the BDC .
    The code would be something like this
    DO .
    Read line index <field> where checkbox <> ' '.
    ENDO.
    You can have a look at the F1 help on read line . This will mkae u clear .
    Hope this gives u an idea.
    Regards,
    Vijay.

  • Selecting multiple lines in a sales order

    Hello documentation says we should be able to select multiple lines in a sales order (for example to cancel them or remove them). Yet we cannot select more than one. Shift and Ctrl do not seem to work.
    Any idea why this does not work ? We are running B1 2007A, patch 37.
    Thanks a lot
    Fabrice

    Hi Fabrice,
    if you have a sales order with hundreds of rows, use the 'Draw Document Wizard -> Customise' option to draw the required rows into the target document. Once all row data has been copied to the target, the row is greyed out in the sales order & can no longer be drawn. As long as the BP accepts partial deliveries, you may copy as much partial data to multiple target documents as necessary. Once you are finished with the sales order & there are rows still open, you may go to Data -> Close & hence close the entire document. There will be no need to delete the remaining rows.
    All the best,
    Kerstin

  • Itunes - how do i select multiple line items not in sequence ?

    itunes - how do i select multiple line items not in sequence ?

    Hold down the Command key and click each in succession.
    To extend the selection across items that ARE contiguous, use the Shift key.

  • SELECTING MULTIPLE LINES OF TEXT

    Is there a way to select multiple lines of text that are not continuous?  e.g. - a list with 10 lines - can you select lines 1, 3, 5, & 7?  I am having to add additional formatting to a Table of Contents that is already done.  I have been using the 'bullets and numbers' to format 1 line at a time but then I cannot get the new numbers to 'align right'.  I want to be able to select all the lines that need the new numbers at once to see if I can get the alingment to work correctly.  I am trying to avoid having to re-do the whole thing.  Any help would be greatly appreciated.

    In order to use an ID genereated TOC you HAVE TO BE using paragraph styles, because theat's eaht the TOC picks up.
    For each paragraph style that you pick up, in the TOC dialog you have the ability to specify both a paragraph style for formatting the entry, and a character style for formatting the number if that should be different.
    Now for the bad news. There is no mechanism whatever for changing the number format for the page number from arabic to roman other than to select it and manually replace the number, in which case selecting anything other than the numbers, one at a time, is counterproductive, or changing the number style on the page itself, which is where it should be happening, in the numbering and section options. How are readers supposed to find page ix if no page in the publication actually carries the number ix?

  • Multiple lines for field description in ALV

    Hi ,
    Is there any way to display the field description in  multiple lines in ALV grid .
    Regards,
    Pradipta

    Hi pradipta,
    1. No its not possible.
    2. At the most, we can set the WIDTH of the
       column, to ACCOMODATE the field description.
    3. We cannot do WRAP as u require.
    regards,
    amit m.

  • Multiple Lines Header and Records in ALV List

    Dear All,
    I am faced with a wierd user requirement to print multiple line header in ALV. Currently we have a classical report where we are displaying a huge text for example 400 characters in a single cell of a column of the report.
    Now we will have to convert this to ALV report where I need to show that data in a single cell. I am wondering how is it possible in ALV list/grid. Please let me know if you guys have any clue.
    Regards,
    Bikramjit

    Hi,
    Did you find a solution for this?, I am also having a similar requirement.
    If you have any work around please share.
    Thanks.

  • MIRO Deselect and select Multiple line items

    Hi All,
    At the time of miro we are taking the reference of PO. In PO we have 1200 lines related to Custom duty, additional custom duty, ecess, clearing and forwarding charges and freight.
    we want to do the MIRO for custom duty, additional duty and freight only, for these we have 600 line items. we need to select these lines one by one. this is time taking job.
    can any body tell me that how we can select these line at once.
    Regards all

    Hi,
    You can make use of Planned Delivery cost in the PO Refernce Tab. This will cover all other costs other than you basic material or service cost.
    Regards,
    amit

  • Select multiple lines in ALV list

    Hi Everyone,
    I have an ALV list which has checkboxes. Now when we select the check boxes and press enter it should  take me back into the program with only those lines in an internal table for which the checkboxes have been clicked. Is this possible.
    Any input is greatly appreciated.
    Thanks
    Kumar.

    yes... perhaps it is in how you are processing it. i am NOT using hotspots. i created a GUI status with a icon, and assigned it to a specific OK_CODE. then, when you display the ALV,
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_grid_title             = w_alv_title
          is_layout                = t_alvlayout
          it_fieldcat              = t_alvfieldcat
          it_events                = t_alveventcat
          it_sort                  = t_alvsortcat
          i_save                   = i_save
          is_variant               = default_layout
          i_default                = 'X'  " Allow Display Variants
          i_callback_program       = w_alv_callback_prog
          i_callback_user_command  = w_alv_command_handler
          i_callback_pf_status_set = w_alv_gui_status_setter
          i_callback_top_of_page   = 'STANDARD_LIST_HEADING'
        tables
          t_outtab                 = t_alvdata
        exceptions
          program_error            = 1
          others                   = 2.
    you specify a command handler callback, with the callback program and form
      w_alv_command_handler = 'ALV_COMMAND_HANDLER'.
      w_alv_callback_prog = sy-repid.
    then the handler would do something like this
    form alv_command_handler using r_ucomm like sy-ucomm
                               rs_selfield type slis_selfield.
      read table alvdata into alvline index rs_selfield-tabindex.
      case r_ucomm.
        when 'DELETE'.
    * make sure at least one line was selected
          read table alvdata into alvline with key select = true.
          if sy-subrc <> 0.
            message i014.
          else.
            call function 'POPUP_TO_CONFIRM'
              exporting
                titlebar              = 'Delete Confirmation'
                text_question         = 'Are you sure?'
                text_button_1         = 'Yes'
                text_button_2         = 'No'
                default_button        = '2'
                display_cancel_button = ' '
              importing
                answer                = answer
              exceptions
                text_not_found        = 1
                others                = 2.
            if sy-subrc = 0 and answer = '1'.
              loop at alvdata into alvline where select = true.
                perform delete_a_message.
              endloop.
    * refresh the list data
              perform load_alvdata.
              rs_selfield-refresh = true.
            endif.
          endif.
        endif.
    * process hotspots
        when '&IC1'.
          case rs_selfield-fieldname.
            when 'FILENAME'.
              submit ylo_newbreed_message_edit
                with p_file = alvline-filename
                with p_change = ' '
                 and return.
            when 'LASTSTS'.
              perform display_messages.
          endcase.
      endcase.
    endform.                    "alv_command_handler
    i cut a lot fo code out of this, so it may be missing some endif or whatever, but as you can see, you check the ok code, and if it matches your GUIstatus button, you loop over the internal table and process the data
    sorry for the long reply. i hope it helps

  • Select Multiple lines in GR PO

    Here's the short version:
    I need to select and delete multiple rows in a Good Receipt PO.
    HOW?
    Long version:
    I support a business where thousands of lines of PO's are entered in,  but when (or if) they will ever arrive is up in the air.  When they show up, we do a GR PO against the PO but have to delete every line that was NOT on the PO so that it stays open to accept later.
    We could also zero out quantities but that would be just as bad.
    SO....
    I need to select and delete multiple rows in a Good Receipt PO.
    HOW? Can it be done?

    The angle we are coming from is more of a functional one, rather than an accounting one.
    Because I need to sell those 5 or 10 lines worth of goods, and I need to have them applied to the open PO when I receive them, I have to remove from the PO all BUT those lines.
    Tomorrow, another 5 or 10 lines worth of stuff may come in and I'll have to do it again.
    The day after that, maybe 20 more lines show up.
    If I can't select and remove many rows at once, I end up with alot of manual work...

  • How to craete Multiple lines in Colum name in ALV using OO concept

    Hi All,
    I have devloped an ALV tree Report using OO Concept, and my column names are very big say like 100 characters.So now i want display that text in 3 or 4 lines.Is there any way that text can be wrapped up and displayed on the subsequent line of the cloum name.
    For eg. My requirement is like below.
    The text to be dispalyed:
    Leave balance for the year ending 31st mar 2005
    Display outout column name should look like this
    " Leave balance for the year
      ending 31st mar2005."
    So as you see i want it in two lines or may be more if it can be fixed.
    Let me know if its possible..
    Thanks
    Umang

    Hi Umang
    This is a very common question but unfortunately there is no way to implement column headers having more than one line.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • How to Select Multiple lines in excel?

    I have about 700 lines and i want to select one full page or 200 lines of the total lines,
    how to do it by using the keyboard or the trackpad  pls help! thank you.
    Jos

    you can select a row by clicking the row header (the number at the very left), then scroll down until you get to the end of the range you want to select, then hold the shift key and click the last row.

Maybe you are looking for

  • Can't open Cannon CR2 Raw image in Photoshop CS2

    I've tried everything I can think of. I downloaded/installed Camera_Raw_5.2 and still can't open any of the 2 DVDs full of images. I'm not the best with the technical side of Adobe Products. Can anyone guide me a bit?

  • My internet speed suddenly went VERY slow on all browser

    I am running on a Mac OS X Lion 10.7.5, 2 Ghz Intel i7, 4GB Ram DDR3. I am experiencing very slow internet speed after some system update some time ago. I have tried using wireless and LAN cable but both results the same. I've tried resetting routers

  • How to get default settings

    I bought a new lumix camera. to play video I had to download quicktime on a provided disk. the first time I did it it gave me an option to make quicktime my default program which it did . It took over my picture files which I didn't like so I uninsta

  • Configuration of Application servers for PROD system in BW3.5

    Hi, We are getting new app servers for our production system (not yet live). Could you tell me or post links to the configuration/settings to be used when setting up these servers? Any thing from recommended parameters to no. of work processes will b

  • Website payment and shopping cart buttons not working on Windows Phone browser

    A customer shopping on our site notified me that the "add to cart" and "view cart" buttons were taking him to the PayPal main site and not the shopping cart. I tried a Windows Phone at the Verizon store and found the same issue. I have tested the sit