Hw 2 display ALV in Table control

Hi experts,
hw we cn display alv output in a tabl cntrl. is dere ny specific fnctn module or v hav 2 use som odr method.
hlpful answrs 'll b suitbly rewrded....

Hi Rohit,
You cant display ALV in Table control.
Both are used for specific requirements and they cant be merged.
Could you let us know, why do you want to disply ALV in Table control ?
Best regards,
Prashant

Similar Messages

  • Difference between ALV and Table control

    Hi folks,
    i want to know the major differences between AlV and table controls.
    i know that table control is designed in screen painter, but i want to know the major diff between Table control and ALV.
    helpful answers will be rewarded.
    Regards,
    Naveen

    Hi Naveen,
    Basically ALV is a way to display the output and Table Control is designed in screen painter through which you can get entries in Table Control, can delete some records etc for further processing and  its not use only for Display.
    <b>ALV is Application List viewer:-</b>
    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. 
    In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. 
    <b>TABLE CONTROL:-</b>
    ABAP offers two mechanisms for displaying and using table data in a screen. These mechanisms are table controls and step loops. Table controls and step loops are types of screen tables you can add to a screen in the Screen Painter.
    Rewards if useful.
    Regards,
    Shilpi

  • Search help (PREM) for personal no. is not coming in ALV grid table control

    hi experts,
    Search help (PREM) for personal no. is not coming in ALV grid table control.
    i have assigned the srch help (prem) to my 'ZFIEXP_PROJALLOC' table for the emp_id.
    but in output it is now showing the help.
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'ZFIEXP_PROJALLOC'.
      ls_fcat-ref_field = 'EMP_ID'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    Then i tried to solve it using the PA0002 . ie.,
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'PA0002'.
      ls_fcat-ref_field = 'PERNR'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    with this it is showing the help in employee code, but, when i click on an empl number, it is not added to my table control and allowing me to add the number by typing them.
    plz help me.
    thanks.

    Hi 
    In the layout give layout-sel_mode  = 'A'.  and
    pass  'A'    to  i_save  exporting parameter to method  set_table_for_first_display.
    The same thing if you are working with function module
    reuse_alv_grid_display.
    Reward points for useful answer.
    Venkat

  • Drag & Drop, ALV or Table Control to Tree Control

    Hi Experts,
    If i want Drag & Drop feature in ALV or Table Control to Tree Control

    Hi,
      refer to the link below:
    http://help.sap.com/saphelp_46c/helpdata/fr/22/a3f5fbd2fe11d2b467006094192fe3/content.htm
    With luck,
    Pritam.

  • ALV vs Table Control

    Hi All,
    Could someone please tell me whether ALV is faster or Table Control. I mean for processing. The features required are Colouring cell, Adding checkbox in cell, adding a link in cell etc.
    I know that this is possible in ALV, but no idea whether it could be done in table control. Please throw some light on this.
    Please let me know the reasons behind one being faster than another.
    Thanks in advance.
    Best regards,
    Prashant

    Hi Prashant,
    ALV Grid is basically used for display puropse. It is more user friendly. There are arious features ( such as coloring, sorting, saving to a local file, sedning by mail etc. ) These featurs make ALV Grid a very good option to display the data .
    However , the table control is not only used to display data take from the database table, but also you can do operation such as deletion of data from database table, insertion of data into the database table and updation also. Yeah it has not got the various features whihc ALV has.
    So table control and ALV Grid , if you are just using for display purpose, then ALV Grid is a better option due to its layout and attractive features. But if you want to do the database operations other than display, table control can be used.
    As far as execution is concerned, I think ALV Grid is faster.
    Regards,
    Kunal.

  • Data Display in the Table Control

    Hi All,
             Please help me know how to fetch the data from the internal table in to the Table Control.  I have defined the internal table with some fields and wrote the select query to fetch the records from database. But Iam unable to get the idea of how to pass the internal table records into the table control.
    Your suggestion will be appreciated.
    Thanks and Regards,
    Murali Krishna Tatoju

    HI
    if your select query is first operation before the screen is displayed.
    then write the select query in PBO.
    in PBO
    module select
    loop at itab with control tc.
    module transfer_itab_to_tc
    endloop
    in program.
    module select
    select query here and get the data.
    endmodule
    module transfer_itab_to_screen.
    move-corresponding itab to t_tab " here t_tab is strucutre from where the fields on Table control has been taken
    endmodule
    Cheerz
    Ram

  • How to display data in Table control?

    Hi Experts,
    Can anyone please explain me how to display the data from two different tables(those two table is related with 1 field) into a single table control?
    For Example: T1 has fields (F1,F2) and
                         T2 has fields (F3,F4) --> here F3 is foreign key for F1
    I need to display the data F1,F2,F3,F4 into the table control.
    Can anyone explain me?
    Thanks in Advance,
    Regards,
    Raghu

    Hi,
    If F3 is foreign key for F1, then both fields will have same values.  Then why do you need to display both F1 and F3?  Either one of them is enough.  Try the following code.
    types: begin of t_table,
                 F1 type T1-F1,
                 F2 type T1-F2,
                 F4 type T2-F4,
              end of t_table.
    data: i_table type standard table of t_table with header line.
    select F1 F2 F4 into table i_table from T1 inner join T2 on T1F1 = T2F3.
    You should create three columns in the table control with names i_table-F1, i_table-F2, i_table-F3.
    After populating the internal table, refresh the control with the following statement.
    REFRESH CONTROL <NAME> FROM SCREEN <SCREEN_NO>.
    All the above statements should be in your PBO Module.
    Regards,
    Hema
    Message was edited by:
    Sorry, Declarations can be in the common include.  Select statement and refresh statement should be in PBO.
            Hema Nagarajan

  • Drag and drop ALV to table control

    Hi all,
    Does anyone know if it is possible to program the drag-and-drop functionality from an ALV list to a table control? I would like to have this feature to let the user enter data on 1 screen. On the left part the user sees an ALV list and on the right the user sees the online transaction. I would like the user to enter data simply by drag and drop instead of having to enter the data.
    Does someone has a sample program for this?
    Regards,
    Kris

    Hi Kris
    I can download the programs and send them to you, but you should give me your e-mail.
    Anyway you can use Drag and Drop if you build your table control by ALV, i.e. ALV GRID.
    But I'm using 4.7 and I don't know how class CL_GUI_ALV_GRID is in your release, I believe the release 4.6B is one of first release whit this class.
    Max

  • Hot to display checkbox in table control

    hi all,
    i am displaying table comtrol. in my table control i have one field,name of the field is Inactive. in this field i have to show chckboxes.
    anybody can send me the code please.
    thanks,
    maheedhar.t

    Hi,
    If you want to display a field of type c as checkbox in tablecontrol.
    After opening screen painter, click the option ChkB for that field while getting the fields from Dictionary/Program Fields -> Get From Program.
    Now drag the box on to your table control.
    <u><i><b>Chk this demo program: DEMO_DYNPRO_TABCONT_LOOP_AT
    & RSDEMO02.</b></i></u>
    <u><i><b>Another way:</b></i></u>
    Go to the edit mode of the screen select the table control column you want to make it as check box and follow the menu EDIT->CONVERT->check box.
    (make sure that column definition in itab/ddtab is of size 1 char)
    regards
    navjot
    Message was edited by:
            navjot sharma

  • Editable ALVs vs Table Controls

    Hi...
    Can somebody give me the advantages and disadvantages of using editable ALV's  (ALV grid) over table controls? I've got a requirement from my client side wherein I have to replace all table controls with editable ALV's and prior to that, I've to submit an understanding document highlighting the advantages and disadvantages of doing the same.  Also, I've heard that SAP is thinking of replacing all existing table controls in its standard screens with editable ALVs. Can somebody send me a link or some article to substantiate this?
    <removed>. Please do help me out asap if you feel like it.
    Thanks and Regards,
    Rakesh
    Edited by: Thomas Zloch on Mar 14, 2010 8:03 PM - adjusted to forum rules

    > And also, if its true that SAP is thinking on replacing table controls with editable ALV's
    SAP usually don't spend time to rewrite existing programs. Many efforts and risks of regression for a so little gain. Really, that would surprise me
    That would be rather easy to show ALV advantages, as you can do almost "nothing" with table controls. So I would begin with the only table control functions:
    - change order of columns
    - hide columns
    - change column size
    - save the layout above, for the user and for everyone
    - number of fixed columns
    - good performance in the WAN as only screen lines are loaded
    ALV can do all of them. The other ALV functions are : see [SAP library - SAP List Viewer for SAP GUI|http://help.sap.com/saphelp_nw2004s/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm]).
    Another difference is that checks are done immediately for current page of table control (when you press enter or scroll, the PAI is triggered), while they are done for the whole lines with ALV (in fact you could do it, but I guess you don't want to spend much time to develop)

  • Problem idn displaying data in table control

    hi
    i have searched almost every forum and tried to execute my program but still it is giving problem.
    means it does not display the data when i execute the trasanction. it keeps tablecontrol blank.
    pls see my code below and give me soloution. plz
    In SE51
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    loop at itab with control tcb.
    module mapdata.
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    loop at itab.
    endloop.
    In SE38
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    select * from zpvcust into table itab.
    *read table itab into tcb.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  mapdata  OUTPUT
          text
    MODULE mapdata OUTPUT.
    zpvcust-custno = itab-custno.
    zpvcust-custname = itab-custname.
    ENDMODULE.                 " mapdata  OUTPUT

    Hi Vikas
    This code you follow the i am sure tou will get the values
    process before output.
      module status_0103.
      module get_data.
      loop at   it_bapi3008_2
           into lw_bapi3008_2
           with control tc_data
           cursor tc_data-current_line.
        module tc_data_get_lines.
      endloop.
    module getdata output.
      call function 'BAPI_AP_ACC_GETOPENITEMS'
        exporting
          companycode       = 'RS01'
          vendor            = name
          keydate           = ket_data
       noteditems           = 'X'
    * IMPORTING
    *   RETURN            =
        tables
          lineitems         =  it_bapi3008_2.
      call function 'BAPI_AR_ACC_GETOPENITEMS'
        exporting
          companycode       = 'RS01'
          customer          = lfa1-kunnr
          keydate           = ket_data
    *      NOTEDITEMS        = ' '
    *      SECINDEX          = ' '
    *    IMPORTING
    *      RETURN            =
        tables
          lineitems         = it_bapi3007_2.
      loop at it_bapi3007_2 into lw_bapi3007_2.
        lw_bapi3008_2-doc_no = lw_bapi3007_2-doc_no.
        lw_bapi3008_2-doc_date = lw_bapi3007_2-doc_date.
        lw_bapi3008_2-lc_amount = lw_bapi3007_2-lc_amount.
        lw_bapi3008_2-db_cr_ind = lw_bapi3007_2-db_cr_ind.
        lw_bapi3008_2-doc_type  =  lw_bapi3007_2-doc_type.
        lw_bapi3008_2-amt_doccur = lw_bapi3007_2-amt_doccur.
        append lw_bapi3008_2 to it_bapi3008_2.
        clear lw_bapi3008_2.
      endloop.
    endmodule.                 " GETDATA  OUTPUT
    module tc_data_get_lines output.
      data g_tc_data_lines type sy-loopc.
      g_tc_data_lines = sy-loopc.
    endmodule.                    "
    try it you will get the values
    Regards Nilesh

  • Module Pool - Table Control - Data not getting displayed in Control

    Hi,
    I have a table contol in my module pool program. In my processing I am filling an internal table & then in my PBO I am linking the internal table to table control. The issue is that even though the internal table is getting filled correctly (found through debugging), the data is not getting populated in table control. Nothing is populated on screen. I am writing part of code below
    Declaration:
    Types: begin of ty_control,
            SELECTED TYPE C,
            TEXT TYPE DPR_CAUSE_T-TEXT,
          end of ty_control.
    CONTROLS :  TBL_CONT TYPE TABLEVIEW USING SCREEN '9001'.
    DATA:       lt_table_cont type TABLE OF ty_control with header line.
    Fields in TBL_CONT:
       TBL_CONT-SELECTED
      TBL_CONT-TEXT
    PBO Flow Logic:
      MODULE STATUS_9001.
    MODULE fill_data.
      LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
      ENDLOOP.
    PAI Flow Logic:
    Loop at lt_table_cont.
       MODULE UPDATE_DATA.
    endloop.
    MODULE USER_COMMAND_9001.
    PLZ let me know what might be the problem. I have been trying to figure out but cant.
    Thanks.

    Hi Sonali,
               When ever you need to do anything with the table control, i mean if u want to display data in table control or you want to validate the data entered in table control Should be done within Loop and Endloop.(PBO or PAI's which ever is appropriate)
    Here the data is not bieng displayed in ur table control because you have not used the MODULE fill_data  between
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    ENDLOOP.
    so do it like this
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    MODULE fill_data 
    ENDLOOP.
    this will solve your problem.
    Regards,
    Syed

  • How to get the Number of lines displayed in  table control in bdc

    Hi,
    when we write a  bdc for a standard transaction, if we encounter a table control, we fill the values for each record like field(01), and the second record field(02) .......and so on..
    if only 3 records are displayed in the screen and if we have 5 records to be filled in the table control, how to write the logic for that?
    how to track of how many lines are getting displayed in the table control .. again it depends on the screen resolution i think..
    useful answers will be rewarded
    shekhar

    Hi,
    Here is the solution code for this :-
    data for controlling paging on screen 0102 
    DATA: W_MAXLINES(2) TYPE N, 
    W_NEXT_LINE(3) TYPE N, 
    W_PAGE(1), "y = page forward, n otherwise 
    W_SCRLEN(2) TYPE I, 
    W_SCRLINE(2) TYPE I. 
    DATA: BEGIN OF W_HDR. 
    INCLUDE STRUCTURE D020S. 
    DATA: END OF W_HDR. 
    DATA: BEGIN OF W_FLD OCCURS 100. 
    INCLUDE STRUCTURE D021S. 
    DATA: END OF W_FLD. 
    DATA: BEGIN OF W_LOG OCCURS 20. 
    INCLUDE STRUCTURE D022S. 
    DATA: END OF W_LOG. 
    DATA: BEGIN OF W_MC OCCURS 20. 
    INCLUDE STRUCTURE D023S. 
    DATA: END OF W_MC. 
    DATA: BEGIN OF W_DYNPRONAME, 
    PROGRAM(8) VALUE 'SAPMM60X', 
    DYNPRO(4) VALUE '0102', 
    END OF W_DYNPRONAME. 
    FORM GET_MAX_LINES. 
    set w_maxlines to the number of var-loop occurrences on the screen so 
    that we know when to page forward on screen 0102 
    also initialise w_next_line to zero for GET_NEXT_LINE 
    this subroutine caters for all cases - including screens without loops 
    CLEAR: W_MAXLINES, 
    W_NEXT_LINE. 
    IMPORT DYNPRO W_HDR 
    W_FLD 
    W_LOG 
    W_MC 
    ID W_DYNPRONAME. 
    LOOP AT W_FLD WHERE LTYP EQ 'L'. 
    MOVE W_FLD-LINE TO W_SCRLINE. "first var-loop line 
    MOVE W_FLD-LBLK TO W_SCRLEN. "depth of loop block 
    EXIT. 
    ENDLOOP. 
    IF SY-SUBRC EQ 0 
    AND W_SCRLEN NE 0. 
    sy-srows = total no of lines on screen 
    w_scrline = actual first line of loop so that 
    w_scrline - 1 = number of heading lines (before loop) 
    4 = no of lines at top of screen - command line, pushbuttons, 2 ulines 
    3 = no of lines after loop - uline & Page count 
    w_scrlen = no of lines in loop block 
    w_maxlines = sy-srows - ( wscrline - 1 ) - 4 - 3 
    and then 1 less but not sure why! 
    W_MAXLINES = SY-SROWS - W_SCRLINE - 1 - 4 - 3. 
    W_MAXLINES = W_MAXLINES - 1.
    W_MAXLINES = W_MAXLINES DIV W_SCRLEN. 
    ELSE. 
    MOVE 99 TO W_MAXLINES. "this required if no screen loop 
    ENDIF. 
    ENDFORM. 
    FORM GET_NEXT_LINE. 
    set w_page if page forward is required 
    W_NEXT_LINE = W_NEXT_LINE + 1. 
    IF W_NEXT_LINE GT W_MAXLINES. 
    W_NEXT_LINE = 1. 
    W_PAGE = 'Y'. 
    ELSE. 
    W_PAGE = 'N'. 
    ENDIF. 
    ENDFORM. 
    Hope it helps.
    reward if helpful.
    Regards,
    Sipra

  • Regarding PAI event display of data in table control

    Hi all,
    I have a drop down list in my module pool screen and based on my selection the value in not getting captured as i have to display table control data (or item level data ) based on the delivery that is selected from the drop down.
    The first level of items are getting displayed in the table control for the first time but after i select the delivery for the next time no delivery is getting captured in the screen field and so on no items are getting changed in the table control.
    Pls let me know how to capture the delivery number selected from the drop down list box and so on i can write the code for displaying the new set of items in the table control for the new delivery number selected.
    Thankyou for your help.
    Amar.

    Hi All,
    I have solved my problum of getting the values in the drop down list using the function module vrm_set_values.
    Earlier it dint capture the values in the list because i am not aware of the key field its having apart from the text field.
    I have passed some numberic value to the key field earlier and the actual text to be displayed in the TEXT field.
    Anyways i came to know that we need to pass the same field values in both key field and text field only then the values wud be captured. So my problum is solved.
    I have another question on the same now
    My requirement is on selecting a value in the dropdown list the delivery items shud come in the dropdown list which is coming.
    I have another drop down in the item level so i wrote the vrm set values in the item level for one field based on that value the other fields in the table control needs to get data.
    I have provided the drop down item level field also but the problum is let us say we have 3 items and in the table control has 15 items that can be displayed. The dropdown for that field shud come only upto 3 records but it is coming for the entire column as the screen field name is same for the entire column.
    example
    f1   f2  f3 are the fields
    and the table control can accomodate 10 records
    Let us say we have 3 line items
    now the drop down is appearing for all the 15 records for field f2 where it shud appear for only  3 records.
    pls let me know if there any option in such a way that we can restrict upto 3 records.
    Thanks in advance.
    Amar.

  • How to display icon status in table control

    hi, i trying to display icon in table control its not displaying
    i given below statment.
    DATA: BEGIN OF WA_MARA,
            ICON1(4) TYPE C,
             END OF WA_MARA.
         INCLUDE <list>.
    MOVE ICON_GREEN_LIGHT TO IT_MARA-ICON1.
    APPEND IT_MARA..
    when i debugging it display green icon but after run the program its display ' @08@ '   in table control.
    how to display green icon in table control help me.

    Hi,
    check the link:
    Table control in custom infotypes

Maybe you are looking for

  • HP U160 with Windows 8.1 Surface Pro3

    I have recently purchased a Surface Pro3 and I own the HP U160 portable monitor.  The monitor works with all of my other laptops running Windows 7, but I can't get it to work with Windows 8.1.  I updated the drivers on the HP website for Windows 8, b

  • Read-only textbox and/or disable buttons in Infopath 2013

    In a InfoPath 2013 custom list form, my requirement is to make textboxes read-only, disable buttons, and/or create new buttons so users can not update fields in a custom list once the user has updated data in the list. Basically after the user hits t

  • Get Import Parameters of a Function Module

    Hi, Is there a way to find the import parameters and their Data Type of a Function Module in any Table?? For example, i know i can find the name and the include of the Funtion Module in TFDIR. Is there anywhere i can find the list of Import Parameter

  • Add and Transfer attachment from purchase Requisition to Purchase order

    Hi, We have implemented ECC 6.0. Our requirement is to add external docs as attachments to PR and these should transferred to PO, later to be submitted to the vendor. We have some info about the badi ME_PROCESS_PO_CUST. is this the right BAdi or do w

  • Problems reported with DFSR

    I have the health report add on running on our recently installed Windows 2012 essential server. I am receiving the following error: The DFS   Replication service stopped replication on volume C:. This occurs when a DFSR JET database is not shut down