Reg.. Modifying an ALV

Hi Experts,
    I have an ALV report, in which i need to modify a row i.e....
i have displayed the report i need to modify the date and quantity fields.
How do i capture the modified data (i.e...edit data like date, qty) into another internal table....
can any one help me with the answers...
Answers will be rewarded......
Regards,
Kumar

http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm
Editable Alv & oops Concept
Check demo pgm BCALV_EDIT_01 to 08.
I think this will help you.

Similar Messages

  • How to modify Standard ALV Report

    Hello All,
    I have a standard report which displays the data in ALV Grid. This data can also be exported to Excel sheet. I have got an FBI assignment where I have to add some new fields besides the existing ones. Could you please provide me with some documents oe explain me in brief how to modify any standard ALV report.
    Thanks in Advance.
    Saras

    Can't you just add the fields with the layout option in the tcode ?? with other words are all the fields selected in that particular layout the programm comes up with
    if the fields can't be selected a quick sollution can be to make a query with SQ01
    Message was edited by:
            A. de Smidt

  • Modifying standard  ALV report

    Hi while modifying one of the standard alv reports,
    I had to include one more field..
    for that I have made changes to the feild cat and i_tab structure. but the final report is not displaying that additional column
    Can any one help me...
    The report is IW29

    Hi Kalyan,
    Though you have added a new column to the Field Catalog, it MIGHT not get displayed on the output. This is because, it would be in the hidden mode. Try this. Click on the Layout, add this new field and save the layout. You should be able to see your new column now.
    But dont forget to do the same in Quality and Production systems.
    Hope this clarifies your problem
    Enjoy SAP.
    Rajasekhar

  • Reg : Inputfield in ALV

    Hi All,
    I ve 3 columns and 5 rows.
    say,
            c1       c2       c3
    r1      ac1     ac2     ac3
    r2      bc1     bc2     bc3
    r3      cc1     cc2     cc3
    r4      dc1     dc2     dc3
    r5      ec1     ec2     ec3
    now all fields in column c1 and c3 are coming as display mode and c2 coming as input mode.
    In c2 column I want bc2 only should show as a display field.
    how to set the display mode for a single column in a table?
    Plz help me out....

    Hi,
    To achieve this scenario, follw the below steps;
    1.Create an attribute 'READONLY' type BOOLEAN under the same node that is bound to your table.
    2.Bind this attribute with the readonly property of Column 2's input field cell editor.
    Now pass abap_true to disable the cell and abap_false to enable the cell.
    For your scenario, if you want to disable bc2 you need to just modify your internal table as follows;
    " lt_data has the contents of your table
      loop at lt_data into ls_data.
       if sy-tabix eq 2.
        ls_data-readonly = abap_true. " disable the cell in second row ( column will be 2 as we have bound the attribute to col2's cell editor )
        modify lt_data from ls_data index sy-tabix.
       endif.
      endloop.
    "rebind the modfied table
    l_node->bind_table( lt_data ).
    Based on your requirement you can modify the above code. just pass abap_true/abap_false to the readonly field to disable/enable the input field.
    Check this wiki too [How to edit conditionally row of a ALV table in Web Dynpro for ABAP |https://wiki.sdn.sap.com/wiki/display/WDABAP/How%20to%20edit%20conditionally%20row%20of%20a%20ALV%20table%20in%20Web%20Dynpro%20for%20ABAP]
    Regards,
    Radhika.

  • How to update/modify the ALV internal table once it is displayed

    Hi All,
    I have a alv grid report using fm reuse_alv_grid_dispaly. My requirement is to create sales order using bapi (up to here it is working fine) and once the SO is created update the function module tables field with the created sales order.
    Example:
    My alv grid display before creating SO:
    Customer Material    SalesOrder
    1000001  material1 
    My alv grid display after creating SO:
    Customer Material    SalesOrder
    1000001  material1  3025642
    How can I achieve this functionality. Because the field catalog is already displayed, how can I modify/update it by adding the sales order number to it. Experts, suggest me.
    Thanks.

    FORM callback_ucomm USING ucomm LIKE sy-ucomm
                                   selfield TYPE slis_selfield.
    CASE ucomm.
        WHEN 'CRE'.
    * Logic to create sales order here...
    * Show the Sales order column
        CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
          IMPORTING
            et_fieldcat   = gt_fieldcat
          EXCEPTIONS
            no_infos      = 1
            program_error = 2
            OTHERS        = 3.
        if sy-subrc eq 0.
          read table gt_fieldcat into gs_fieldcat with key fieldname = 'VBELN'.
          if sy-subrc eq 0.
            gs_fieldcat-no_out = space.
            gs_fieldcat-tech   = space.
            modify gt_fieldcat from gs_fieldcat index sy-tabix transporting no_out tech.
          endif.
          CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
            EXPORTING
              it_fieldcat          = gt_fieldcat[].
        endif.
    ENDFORM.

  • Reg: Print in ALV List

    Hi Experts,
    I have a requirement where i have to display an ALV List without the TOP OF PAGE contents, but when i click print option in the ALV List i have to print the data with the TOP OF PAGE.
    How can i achieve this. Kindly help at the earliest.
    Thanks and Regards
    Vikram S

    Do as given below.
    Before building fieldscatalog
    perform eventtab_build.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = lt_events
        exceptions
          list_type_wrong = 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.
      read table lt_events with key name = slis_ev_top_of_page
      into ls_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to ls_event-form.
        modify lt_events from ls_event index sy-tabix.
      endif.
      clear ls_event.
    form top_of_page.                                           "#EC CALLED
      data: ls_line type slis_listheader.
      clear gt_list_top_of_page.
      clear ls_line.
      ls_line-typ  = 'S'.
      ls_line-key = text-400.
      append ls_line to gt_list_top_of_page.
      clear ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = text-200.
      ls_line-info = period.
      append ls_line to gt_list_top_of_page.
    if sy-ucomm eq 'PRINT'
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
               i_logo             = 'ENJOYSAP_LOGO'
                it_list_commentary = gt_list_top_of_page.
    endform.                    "top_of_page
    endif.

  • Modify Subtotals ALV

    hi all,
    I want to modify  subtotals in alv OO, somebody knows how can i do that?
    regards.
    Thanks.

    Hi,
    While modifying field catalog , try the following.
    Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
    LOOP AT i_fieldcat ASSIGNING <lfs_fieldcat>.
    CASE <lfs_fieldcat>-fieldname.
    WHEN 'LOSGR'.
    <lfs_fieldcat>-coltext = text-007.
    <lfs_fieldcat>-do_sum = c_x.
    ENDCASE.
    ENDLOOP.
    Or if you want to use field symbols.
    data: total type ref to data,
    subtotal1 type ref to data.
    field-symbols <total> like gt_sflight.
    field-symbols <subtotal1> like gt_sflight.
    call method grid1->get_subtotals
    importing
    ep_collect00 = total
    ep_collect01 = subtotal1.
    assign total->* to <total>.
    assign subtotal1->* to <subtotal1>.
    Hope this helps.
    Thanks
    Arun kayal

  • Reg events in alv

    Hi,
    I created  three radiobuttons  in alv report including with line items.
    whenver double click  line  items , its going next screen.,
    Here my requirement is when i click  one click  radiobutton should selec

    Handling will be same in both the cases. There is no Difference in Handling the events. The same can be handled using the Double click.
    FORM user_command using ucomm type sy-ucomm selfield type slis_selfield.
    CASE ucomm.
    when '&IC1'.
    case selefield-fieldname.  "<---using this you can handle different fields.
    when 'FIELD1'.
    endcase.
    endcase.
    endform.

  • Reg: CheckBox in ALV Grid Display

    Hi all,
    My requirement is to display checkbox field in ALV Grid which is editable.
    And i also need to get all the records that i have selected in ALV grid.
    How can i do it. Kindly Help me with sample codes.
    Its Urgent.
    <REMOVED BY MODERATOR>
    Regards
    Naveen
    Edited by: Alvaro Tejada Galindo on Feb 18, 2008 5:41 PM

    Hi,
    First declare ur itab with the first field of length 1 char,
    Dont mention dat in the field cat.
    Give that field name and itab name in the layout.
    as
      is_layout-box_fieldname = 'CHECK'.
      is_layout-box_tabname   = 'IT_FINAL'.
    u can dispaly ur checkbox in the output dispaly.
    now to read the selected checkboxes u need to read the display with the syntax..
    first describe the table + headre length = w_count.
    FORM sub_read_checkbox.
      DATA: w_cbox TYPE char1.
      REFRESH : it_mail,it_text,it_selected.                   
      REFRESH : it_selected.
      DO w_count TIMES.
        READ LINE sy-index FIELD VALUE  : is_final-cbox  INTO w_cbox.
        IF w_cbox = c_x.
          READ TABLE it_header INTO is_header WITH KEY lifnr = is_header-lifnr
                                                       u_r   = is_header-u_r.
          IF sy-subrc = 0.
            APPEND is_header TO it_selected .
            CLEAR: is_header,w_cbox.
          ENDIF.
        ENDIF.
      ENDDO.
    endform.
    This serves ur purpose.
    Regards............

  • Question reg. modifying latest record in internal table

    Can you tell me if it is possible to modify the last appended record to the internal table?
    I just want to modify the record in the internal table which is appended at the latest. Please tell me the logic for this.
    Thanks a lot,
    Krishen

    Hi try with this:
    DATA line TYPE I.
    DATA wa_itab TYPE LINE OF it_itab.
    DESCRIBE TABLE IT_TABLE LINE line.
    READ TABLE IT_TABLE INTO wa_itab INDEX line.
    WA_TABLE-FIELD = 'new value'.
    MODIFY TABLE IT_TABLE FROM wa_itab
           TRANSPORTING field.
    Best regards.

  • Reg : grandtotals in alv's

    hi friends,
    i am trying to display the grand total using do_sum in  fieldcat.its working fine.
    my doubt is ... what is the field  where this grandtotal be captured ?
    thanks,
    urmila.T

    hi urmila
    just check out this thread
    Re: How to display Grand Total in ALV Grid
    hope this helps
    regards
    Aakash Banga

  • Reg : LOGO in ALV

    HI,
           I am using ALV grid , i used ALV commentry write to attch the logo,
    in the display the logo is coming,
    but while taking the printout the logo is not coming...
    kindly suggest me a solution.
    With Regards,
    S.Barani

    Hi,
    Herewith i am sending the sample coding for log with alv report.
    REPORT  YMS_EXCISE MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350.                              .
    TABLES : J_1IEXCHDR,      " header table
             J_1IEXCDTL,      " item table
             J_1IPART2,       " Excise Part II details
             LFA1,            " vendor master table
             J_1IMOVEND,      " vendor excise details table
             MSEG,            " Document Segment: Material
             MKPF,            " Header: Material Document
             DD07T,           " domain text table
             T001W.           " Plant and Branch Details
    DATA : BEGIN OF IT_CHDR OCCURS 100,
           DOCNO LIKE J_1IEXCHDR-DOCNO,
           DOCYR LIKE J_1IEXCHDR-DOCYR,
           EXNUM LIKE J_1IEXCHDR-EXNUM,
           EXDAT LIKE J_1IEXCHDR-EXDAT,
           WERKS LIKE J_1IEXCHDR-WERKS,
           EXBED LIKE J_1IEXCHDR-EXBED,
           EXCCD LIKE J_1IEXCHDR-EXCCD,
           ECS LIKE J_1IEXCHDR-ECS,
           END OF IT_CHDR.
    DATA : BEGIN OF IT_CDTL OCCURS 100,
           DOCYR LIKE J_1IEXCDTL-DOCYR,
           DOCNO LIKE J_1IEXCDTL-DOCNO,
           EXNUM LIKE J_1IEXCDTL-EXNUM,
           EXDAT LIKE J_1IEXCDTL-EXDAT,
           LIFNR LIKE J_1IEXCDTL-LIFNR,
           MATNR LIKE J_1IEXCDTL-MATNR,
           MAKTX LIKE J_1IEXCDTL-MAKTX,
           CHAPID LIKE J_1IEXCDTL-CHAPID,
           EXBAS LIKE J_1IEXCDTL-EXBAS,
           EXBED LIKE J_1IEXCDTL-EXBED,
           ECS   LIKE J_1IEXCDTL-ECS,
           MENGE LIKE J_1IEXCDTL-MENGE,
           MEINS LIKE J_1IEXCDTL-MEINS,
           RDOC2 LIKE J_1IEXCDTL-RDOC2,
           END OF IT_CDTL.
    DATA TEXT(10).
    DATA : BEGIN OF IT_OUT OCCURS 0,
           SERIALNO LIKE J_1IPART2-SERIALNO,
           TEXT1 LIKE TEXT,
           EXNUM LIKE J_1IEXCDTL-EXNUM,
           EXDAT LIKE J_1IEXCDTL-EXDAT,
           NAME LIKE LFA1-NAME1,
           DDTEXT LIKE DD07T-DDTEXT,
           EXCCD LIKE J_1IEXCHDR-EXCCD,
           BUDAT LIKE MKPF-BUDAT,
           EXBAS LIKE IT_CDTL-EXBAS,
           EXBED LIKE IT_CDTL-EXBED,
           ECS   LIKE IT_CDTL-ECS,
           MATNR LIKE IT_CDTL-MATNR,
           MAKTX LIKE IT_CDTL-MAKTX,
           CHAPID LIKE IT_CDTL-CHAPID,
           MENGE LIKE IT_CDTL-MENGE,
           MEINS LIKE IT_CDTL-MEINS,
           DEL_IND(1),
           END OF IT_OUT.
    DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
    DATA S_NO(4) .
    DATA DB_CNT LIKE SY-TABIX.
    DATA EBELN_T LIKE MSEG-EBELN .
    TYPE-POOLS : SLIS.
    DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
           FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           LS_FTCAT TYPE LVC_S_FCAT,
           SORTCAT TYPE SLIS_T_SORTINFO_ALV,
           SORTCAT_LN  LIKE LINE OF SORTCAT,
           G_REPID LIKE SY-REPID,
           G_BACK_GROUND(70),  "like bapibds01-objkey,
           GS_VARIANT LIKE DISVARIANT,
           G_SAVE ,
           GT_EVENTS TYPE SLIS_T_EVENT,
           ALV_EVENT TYPE SLIS_ALV_EVENT,
           EVENTCAT             TYPE SLIS_T_EVENT,
           EVENTCAT_LN          LIKE LINE OF EVENTCAT,
           LAYOUT_IN            TYPE SLIS_LAYOUT_ALV,
           LAYOUT_IN1           TYPE SLIS_LAYOUT_ALV.
    CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
    'TOP_OF_PAGE',
                GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
    'USER_COMMAND',
                GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
    'BEFORE_OUTPUT'.
      ALV_EVENT TYPE SLIS_ALV_EVENT,
    DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
    DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
    PARAMETERS  WERKS TYPE J_1IEXCHDR-WERKS.
    SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
    PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
                 R2 RADIOBUTTON GROUP GRP.
    SELECTION-SCREEN END OF BLOCK B.
    INITIALIZATION.
      G_REPID = SY-REPID.
      G_SAVE = 'A'.
    PERFORM BUILD_EVENT USING GT_EVENTS[].
      PERFORM ALV_EVENT_INIT.
    AT SELECTION-SCREEN.
      REFRESH LIST_HEADER.
      PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
    START-OF-SELECTION.
    PERFORM ALV_EVENT_INIT.
      G_REPID = SY-REPID.
      G_BACK_GROUND = ' ' .
      IF R1 = 'X'.
        CLEAR R2. CLEAR : REGTYP_1.
        REGTYP_1 = 'A'.
         set titlebar 'BALAJI' with DB_CNT.
      ELSEIF R2 = 'X'.
        CLEAR R1.CLEAR : REGTYP_1.
        REGTYP_1 = 'C'.
         set titlebar 'BALAJI1' with DB_CNT.
      ENDIF.
      SELECT * FROM J_1IPART2
                       INTO CORRESPONDING FIELDS OF TABLE IT_PART2
                       WHERE REGTYP = REGTYP_1 AND
                             TRNTYP = 'GRPO' AND
                             BUDAT IN BUDAT.
                              DOCYR = IT_CDTL-DOCYR AND
                              DOCNO = IT_CDTL-DOCNO.
      LOOP AT IT_PART2.
        SELECT SINGLE * FROM J_1IEXCHDR
                  INTO CORRESPONDING FIELDS OF IT_CHDR
                          WHERE  TRNTYP = 'GRPO' AND
                          DOCYR = IT_PART2-DOCYR AND
                          DOCNO = IT_PART2-DOCNO AND
                          WERKS = WERKS AND
                          exdat IN BUDAT.
                       ORDER BY EXDAT.
        IF SY-SUBRC = 0.
          APPEND IT_CHDR.
        ELSE.
          CONTINUE.
        ENDIF.
    IF SY-SUBRC <> 0.
       MESSAGE E084.
    ENDIF.
      ENDLOOP.
      LOOP AT IT_CHDR.
        SELECT * FROM J_1IEXCDTL
                  INTO CORRESPONDING FIELDS OF IT_CDTL
                FOR ALL ENTRIES IN IT_CHDR
                         WHERE
                          TRNTYP = 'GRPO' AND
                          DOCNO  = IT_CHDR-DOCNO AND
                          DOCYR  = IT_CHDR-DOCYR AND
                          EXNUM  = IT_CHDR-EXNUM AND
                          EXDAT  = IT_CHDR-EXDAT AND
                          WERKS  = IT_CHDR-WERKS.
          IF SY-SUBRC = 0.
            APPEND IT_CDTL.
          ELSE.
            CONTINUE.
          ENDIF.
        ENDSELECT.
      ENDLOOP.
      LOOP AT IT_CDTL.
        CLEAR TEXT.
        DB_CNT = DB_CNT + 1.
        READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
        READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
        IT_OUT-SERIALNO = IT_PART2-SERIALNO.
        SELECT SINGLE NAME1 FROM LFA1
                        INTO IT_OUT-NAME
                        WHERE LIFNR = IT_CDTL-LIFNR.
        SELECT SINGLE * FROM LFA1
                          WHERE LIFNR = IT_CDTL-LIFNR.
        IF LFA1-LAND1 EQ 'IN'.
          TEXT = 'INVOICE'.
          IT_OUT-TEXT1 = TEXT.
        ELSE.
          TEXT = 'BOE'.
          IT_OUT-TEXT1 = TEXT.
        ENDIF.
        SELECT SINGLE * FROM J_1IMOVEND
                        WHERE LIFNR = IT_CDTL-LIFNR.
        SELECT SINGLE * FROM DD07T
                       INTO IT_OUT-DDTEXT
                        WHERE DOMNAME = 'J_1IVTYP' AND
                              DDLANGUAGE = 'EN' AND
                              DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
      IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
    OR
        DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
          DD07T-DDTEXT = 'Dealer'.
        ENDIF.
        IT_OUT-DDTEXT = DD07T-DDTEXT.
       ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
    *goods'.
          DD07T-DDTEXT =
        CLEAR EBELN_T.
        SELECT SINGLE LFBNR FROM MSEG
                            INTO EBELN_T
                            WHERE MBLNR = IT_CDTL-RDOC2 .
        SELECT SINGLE * FROM MSEG
                          WHERE BWART = '106' AND
                                LFBNR = EBELN_T ."and
                               ebeln = ebeln_t.
        IF SY-SUBRC = 0.
          IT_OUT-DEL_IND = 'X'.
        ELSE.
          IT_OUT-DEL_IND = ' '.
        ENDIF.
        SELECT SINGLE BUDAT FROM MKPF
                          INTO IT_OUT-BUDAT
                          WHERE MBLNR = EBELN_T  ."MSEG-LFBNR.
        IT_OUT-EXNUM = IT_CDTL-EXNUM.
        IT_OUT-EXDAT = IT_CDTL-EXDAT.
        IT_OUT-EXCCD = IT_CHDR-EXCCD.
        IT_OUT-EXBAS = IT_CDTL-EXBAS.
        IT_OUT-EXBED = IT_CDTL-EXBED.
        IT_OUT-ECS   = IT_CDTL-ECS.
        IT_OUT-MATNR = IT_CDTL-MATNR.
        IT_OUT-MAKTX = IT_CDTL-MAKTX.
        IT_OUT-CHAPID = IT_CDTL-CHAPID.
        IT_OUT-MENGE = IT_CDTL-MENGE.
        IT_OUT-MEINS = IT_CDTL-MEINS.
        APPEND IT_OUT.
       EX_NO = IT_CDTL-EXNUM.
      ENDLOOP.
    Title Portion
      IF REGTYP_1 = 'A'.
        SET TITLEBAR 'BALAJI' WITH DB_CNT.
      ELSEIF REGTYP_1 = 'C'.
        SET TITLEBAR 'BALAJI1' WITH DB_CNT.
      ENDIF.
      AFIELD-COL_POS = 1.
      AFIELD-FIELDNAME = 'SERIALNO'.
      AFIELD-SELTEXT_L = 'INPUTS'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 2.
      AFIELD-FIELDNAME = 'TEXT1'.
      AFIELD-SELTEXT_L = 'TYPE OF DOC'.
      AFIELD-JUST = 'L'.
      AFIELD-DECIMALS_OUT = '0'.
      AFIELD-NO_ZERO = 'X'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 3.
      AFIELD-FIELDNAME = 'EXNUM'.
      AFIELD-SELTEXT_L = 'DOC.NO'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 4.
      AFIELD-FIELDNAME = 'EXDAT'.
      AFIELD-SELTEXT_L = 'DOC.DATE'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 5.
      AFIELD-FIELDNAME = 'NAME'.
      AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
      AFIELD-NO_ZERO = 'X'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 6.
      AFIELD-FIELDNAME = 'DDTEXT'.
      AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 7.
      AFIELD-FIELDNAME = 'EXCCD'.
      AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
      AFIELD-NO_ZERO = 'X'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 8.
      AFIELD-FIELDNAME = 'BUDAT'.
      AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 9.
      AFIELD-FIELDNAME = 'EXBAS'.
      AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
      AFIELD-DO_SUM             = 'X'.
      AFIELD-JUST = 'R'.
      AFIELD-DECIMALS_OUT = '2'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 10.
      AFIELD-FIELDNAME = 'EXBED'.
      AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
      AFIELD-JUST = 'R'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 11.
      AFIELD-FIELDNAME = 'ECS'.
      AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
      AFIELD-JUST = 'R'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 12.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 13.
      AFIELD-FIELDNAME = 'MAKTX'.
      AFIELD-SELTEXT_L = 'DESCRIPTION'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 14.
      AFIELD-FIELDNAME = 'CHAPID'.
      AFIELD-SELTEXT_L = 'TARIFF-ID'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 15.
      AFIELD-FIELDNAME = 'MENGE'.
      AFIELD-SELTEXT_L = 'QUANTITY'.
      AFIELD-JUST = 'R'.
      AFIELD-DO_SUM             = ' '.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 16.
      AFIELD-FIELDNAME = 'MEINS'.
      AFIELD-SELTEXT_L = 'UOM'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 17.
      AFIELD-FIELDNAME = 'DEL_IND'.
      AFIELD-SELTEXT_L = 'Deleted'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
    * LAYOUT FOR ZEBRA CATLOG
      LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
      LAYOUT_IN-ZEBRA             = 'X'.
      LAYOUT_IN-GET_SELINFOS      = 'X'.
      LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
      LAYOUT_IN-DETAIL_POPUP = 'X' .
    SORTCAT-decimals     = '0'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = G_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          I_SAVE                  = G_SAVE
          IS_VARIANT              = GS_VARIANT
          IT_FIELDCAT             = FIELDCAT
          IT_SORT                 = SORTCAT
          IS_LAYOUT               = LAYOUT_IN
          IT_EVENTS               = EVENTCAT
         I_BACKGROUND_ID         = g_back_ground
        TABLES
          T_OUTTAB                = IT_OUT.
    *&      Form  TOP_OF_PAGE_LIST_HEADER
          text
         -->LIST_HEADERtext
    FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
      DATA : HLINE TYPE SLIS_LISTHEADER,
             TEXT(60) TYPE C.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
    WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE 'PLANT :' TO TEXT.
      WRITE WERKS TO TEXT+8.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-NAME1 TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-STRAS TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-ORT01 TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE 'DATE :' TO TEXT.
      WRITE BUDAT-LOW TO TEXT+7.
      IF BUDAT-HIGH NE ''.
        WRITE 'TO' TO TEXT+18.
        WRITE BUDAT-HIGH TO TEXT+22.
      ENDIF.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
    ENDFORM.                    "TOP_OF_PAGE_LIST_HEADER
    *&      Form  ALV_EVENT_INIT
          text
    FORM ALV_EVENT_INIT .
      CLEAR ALV_EVENT.
      ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
      APPEND ALV_EVENT TO EVENTCAT.
      CLEAR ALV_EVENT.
      ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
      APPEND ALV_EVENT TO EVENTCAT.
       CLEAR ALV_EVENT.
       ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
       ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
       APPEND ALV_EVENT TO GT_EVENTS.
       CLEAR ALV_EVENT.
       ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
       ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
       APPEND ALV_EVENT TO GT_EVENTS.
    ENDFORM.                    "ALV_EVENT_INIT
    *&      Form  ALV_TOP_OF_PAGE
          text
    FORM ALV_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = LIST_HEADER
          I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "ALV_TOP_OF_PAGE
    *&      Form  BUILD_EVENT
          text
         -->P_GT_EVENTS[]  text
    FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = P_EVENTS
        EXCEPTIONS
          LIST_TYPE_WRONG = 1
          OTHERS          = 2.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
    ALV_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
        APPEND ALV_EVENT TO P_EVENTS.
      ENDIF.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
    ALV_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
        APPEND ALV_EVENT TO P_EVENTS.
      ENDIF.
    ENDFORM.                    " BUILD_EVENT
    Thanks,
    Shankar

  • Reg: Modify

    Hi all,
    We have our own Function module in that FM under tables iam passing 3 internal tables.the requirement is (previously we had a single ship to account and now now we have changed it to multiple ship to accounts) Keep on appending first 2 internal tables for multiple ship to accounts but for the third internal table keep on modifying the internal table by adding the values into it based on a particular field.
    Please suggest wht shall i do here.
    If any one is very clear with FM plz give ur ID so tht i can directly be in touch with u.
    Regards,
    Ganesh

    I am not 100% certain about your requirement but the below logic/code to help you.
    itab -->has the data for multiple ship account.
    loop at itab.
      move itab-shipacc to itab1-shipacc.
      append itab1.
      move itab-shipacc to itab2-shipacc.
      append itab2.
      move itab-shipacc to itab3-shipacc.
      move itab-qty to itab3-qty.
      collect itab3.
    endloop.
    In the above code, itab1 and itab2 would have records for multiple shipacc while itab3 would have only one record for each shipacc and you can collect the other values. Make sure to define itab3 with shipacc as the first field and a quantity/value(pack numeric field) as the second.
    Regards
    Anurag

  • Reg:Modify View

    Dear Experts
    Im displaying employee informations inside table UI element, when i select an employee the corresponding employee role and location is displayed in second view.  Im using a table ui element to display role and location of selected employee.
    Everything is working fine but in the second view, which is used to show the role and location of employee contains filter operation.
    the filter operation is working when i include the following code in WDDOMODIFYVIEW of second view.
    data wd_table type ref to cl_wd_table.
    check first_time = abap_true.
    Name of the table UI element to be provided
    wd_table ?= view->get_element( 'TABLE' ).
    wd_this->table_control ?= wd_table->_method_handler.
    *Name of the key attribute of the context node to which the table binding is done to be  provided
    wd_this->table_control->set_key_attribute_name( 'ROLE_NAME' ).
    im also getting the selected employee id in the same WDDOMODIFYVIEW.
    but the the employee id which is passed from the first view is refreshed. and the table is displaying empty rows.
    when i comment the line "check first_time = abap_true."
    the employee information is displayed inside the table but the filter operation is not working.
    any suggestions regarding this?
    Regards
    Arun.P

    This is the code i have written in domodify method
    data wd_table type ref to cl_wd_table.
    check first_time = abap_true.
    Name of the table UI element to be provided
    wd_table ?= view->get_element( 'TABLE' ).
    wd_this->table_control ?= wd_table->_method_handler.
    *Name of the key attribute of the context node to which the table binding is done to be provided
    wd_this->table_control->set_key_attribute_name( 'ROLE_NAME' ).
    In the above code if i comment the 'check first_time = abap_true.'
    The table is populated with values but the filter is not working .
    If i uncomment that code the table get potpulated with corresponding values but filter is not working.
    Regards,
    Arun.P

  • Reg:Modify the screens of the custom table

    Hi all,
    I Have a requirement in which user want to have the screens for a custom table.
    In the first screen there should be fields to be displayed and there should be buttons to add,change,delete the data from the table.
    And in the next screen the data should be displayed.
    For this how should i go..any hints please.do i need to change the table manitanence program or should i create a module pool program..

    It is better to go for a table Maintenance generator.
    Srach the forum with the search string as Table Maintenance Generator.
    YOu will find a lot of threads.
    Check this :
    http://sapstore.blogspot.com/2006/11/table-maintenance-generator.html
    Regards,
    Ravi

Maybe you are looking for

  • Question about upgrading my TLP CS3 license to a commerical license.

    Hi there, I bought my Production Premium CS3 TLP license through an Adobe reseller 18 months ago. I opted for TLP on the reseller's recommendation because at the time i wasn't sure whether i would be switching from a PC platform to Mac platform. Now

  • Nikon D7000 & lenses missing?

    Hi, all!  Just imported new images from my Nikon D7000 into LR3.3; the camera type is recognized, but the lens (the kit 18-105mm VR 3.5/5.6) isn't there.  Downloaded the profile downloader, and that camera/lens combo wasn't in there.  Downloaded the

  • Prolific drivers

    Hi I have read on several links that the prolific usb driver may work with non nokia ca42 cables, how do i know which driver yo download as there seems to be loads, also when i unzip it what do i do then, i have downloaded a couple but dont see what

  • Bex Issue

    We have Fiscal year period in our Bex report. Unexpectly , when we ran our report it showing 000/2006.......012/2006 . before we used to get like 001/2006 to 012/2006 thiis is the right one. Now we need to hide period 000/2006 since its occupy extras

  • Problems installing Creative Cloud

    Why can´t I install the programs on my harddrive created by Creative Coud Packager? I have made i packagde with, for example, Photoshop and Lightroom, and then tried to install from the folder "Build" and the installationfile (and Setup).