Table control in Reports.....

Hi Champs,
                  How to display the Table Control in report....? If anybody knows please help me....
Thanx in adv,
Reg,
<b>Suresh.V</b>

Hi Lakshman!
         How to do achieve this using grid..... give me some guidence....
Reg,
Suresh.V

Similar Messages

  • Table control in report selection screen

    I have a selection screen with some fields. Now, below these fields, I need a table control in which i will have input parameters with 3 fields so that i can enter data in combinations and use the same while executing the report like an internal table.
    1. I should be able to save it as a Variants.
    2. I should be able to schedule a background job.
    I found similar notes but they dont help me save variants and with job schedules.
    Request your help in this regard.
    Regards
    Kasi

    Hi
    In the selection-screen u can generated a tabstrip:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 100.
    SELECTION-SCREEN END OF BLOCK MAX.
    So the system'll generate a tabstrip in the selection-screen, here it'll load only the screen 100.
    By screen painter u have to create a subscreen 100 where u insert your table control.
    Max

  • Table control in report program

    Hi all...
    Please help me to create a table control in my report program. my requirement is to enable the user to enter two fields (company code and cost center) on the selection screen. I wish to do this using table control..
    example codes will be extremely helpful..
    Thanks in advance..
    -Pranati.

    Hi,
    We can not do the Table control on the selection screen, but we can do the Tab strip control.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    See the below SAP link for the sample programs
    http://help.sap.com/saphelp_46c/helpdata/EN/00/deb23789e95378e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    See the example code
    REPORT   znr1 NO STANDARD PAGE HEADING
                LINE-SIZE 80 LINE-COUNT 60.
    TABLES : sscrfields.
    DATA  activetab(6) TYPE c .
    DATA  mat_des TYPE makt-maktx.
    DATA  pl_des  TYPE t001w-name1 .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-002 FOR FIELD matnr.
    PARAMETERS matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-003 FOR FIELD matnr.
    PARAMETERS werks TYPE t001w-werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.
    *                     DEFAULT SCREEN 002   .
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
      tabs1 = text-002.
      tabs2 = text-003.
      activetab = 'TABS1'.
    AT SELECTION-SCREEN .
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
          activetab = 'TABS1' .
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
          activetab = 'TABS2'.
      ENDCASE.
    START-OF-SELECTION.
      CASE activetab.
        WHEN 'TABS1'.
          SELECT SINGLE maktx  FROM makt INTO pl_des WHERE matnr = matnr.
          WRITE: 'Material ' , matnr , mat_des .
        WHEN 'TABS2'.
          SELECT SINGLE name1  FROM t001w INTO pl_des WHERE werks = werks.
          WRITE: 'Plant ' , werks ,pl_des.
    Regards
    Sudheer

  • Getting data from table control to the report program.

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi,
    in your table control you give some name to that table control say it_cntrl.
    this only serves as the internal table to process the table control data.
    like u can write like this.
    loop at it_cntrl into wa_cntrl.   "wa_cntrl is work area of type it_cntrl table type
    .........        "do your functining
    end loop.
    any clarification get in touch
    thnks

  • Accessing data from Table control

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi gautham,
    1. While designing set the table control as input field.
    2. In ur program create an internal table, with the same structure as your table control.
    3. Whenever an entry is made in the table control, modify your internal table.
    4. While saving use the internal table data to update the custom table.
    If internal table name is same in both screen painter(table control) and in the program then the values will automatically come into the internal table in the program with out programming.
    Otherwise we have programtically transfer the values.
    In the PAI event using move or move-corresponding statement.
    Check the program *RSDEMO02*
    check the links
    http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    Yogesh N

  • Hi abapers how to handle table control in bdc

    hi experts please guide me
    how to handle table control in bdc? could u please explain me briefly  
    thanks and regards

    sayeed,
    Go thru this code it may help you. check bold code for the table control..
    report zsunil_bdc
    no standard page heading line-size 255.
    INTERNAL TABLES *
    DATA: BEGIN OF IT_KNA1 OCCURS 0,
    CUSTOMER LIKE RF02D-KUNNR,
    COMPANY_CODE LIKE RF02D-BUKRS,
    ACCOUNT_GROUP LIKE RF02D-KTOKD,
    TITLE LIKE KNA1-ANRED,
    NAME LIKE KNA1-NAME1,
    SEARCH_TERM LIKE KNA1-SORTL,
    STREET LIKE KNA1-STRAS,
    CITY LIKE KNA1-ORT01,
    POSTAL_CODE LIKE KNA1-PSTLZ,
    COUNTRY LIKE KNA1-LAND1,
    LANGUAGE_KEY LIKE KNA1-SPRAS,
    CNTRY LIKE KNBK-BANKS,
    BANK_KEY LIKE KNBK-BANKL,
    BANK_ACCOUNT LIKE KNBK-BANKN,
    REC_ACCOUNT LIKE KNB1-AKONT,
    END OF IT_KNA1.
    DATA: IT_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: IT_MESSAGES TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    SELECTION SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER P_FILE TYPE RLGRAP-FILENAME DEFAULT 'C:\CUSTOMER.TXT'
    OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    PERFORM HELP_FILE USING P_FILE.
    START OF SELECTION *
    START-OF-SELECTION.
    *UPLOADING THE FILE FROM WORKSTATION
    PERFORM UPLOAD_FILE USING P_FILE.
    *POPULATING DATA.
    PERFORM POPULATE_FILE.
    *& Form HELP_FILE
    text
    -->P_P_FILE text
    form HELP_FILE using p_p_file.
    DATA: L_FILE TYPE IBIPPARMS-PATH.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    IMPORTING
    FILE_NAME = L_FILE.
    P_P_FILE = L_FILE.
    endform. " HELP_FILE
    *& Form UPLOAD_FILE
    text
    -->P_P_FILE text
    form UPLOAD_FILE using p_p_file.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = 'P_P_FILE'
    FILETYPE = 'DAT'
    ITEM = ' '
    FILEMASK_MASK = ' '
    FILEMASK_TEXT = ' '
    FILETYPE_NO_CHANGE = ' '
    FILEMASK_ALL = ' '
    FILETYPE_NO_SHOW = ' '
    LINE_EXIT = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    SILENT = 'S'
    IMPORTING
    FILESIZE =
    CANCEL =
    ACT_FILENAME =
    ACT_FILETYPE =
    TABLES
    data_tab = IT_KNA1
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    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. " UPLOAD_FILE
    *& Form POPULATE_FILE
    text
    --> p1 text
    <-- p2 text
    form POPULATE_FILE .
    DATA: L_STRING TYPE STRING,
    L_COUNTER(2) TYPE N,
    V_INDEX TYPE SY-TABIX.
    LOOP AT IT_KNA1.
    V_INDEX = SY-TABIX.
    AT NEW CUSTOMER.
    READ TABLE IT_KNA1 INDEX V_INDEX.
    IF SY-SUBRC = 0.
    perform bdc_dynpro using 'SAPMF02D' '0105'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02D-KTOKD'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02D-KUNNR'
    IT_KNA1-CUSTOMER.
    perform bdc_field using 'RF02D-BUKRS'
    IT_KNA1-COMPANY_CODE.
    perform bdc_field using 'RF02D-KTOKD'
    IT_KNA1-ACCOUNT_GROUP.
    *PERFORM BDC_FIELD USING 'RF02D-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02D' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'KNA1-SPRAS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'KNA1-ANRED'
    IT_KNA1-TITLE.
    perform bdc_field using 'KNA1-NAME1'
    IT_KNA1-NAME.
    perform bdc_field using 'KNA1-SORTL'
    IT_KNA1-SEARCH_TERM.
    perform bdc_field using 'KNA1-STRAS'
    IT_KNA1-STREET.
    perform bdc_field using 'KNA1-ORT01'
    IT_KNA1-CITY.
    perform bdc_field using 'KNA1-PSTLZ'
    IT_KNA1-POSTAL_CODE.
    perform bdc_field using 'KNA1-LAND1'
    IT_KNA1-COUNTRY.
    perform bdc_field using 'KNA1-SPRAS'
    IT_KNA1-LANGUAGE_KEY.
    perform bdc_dynpro using 'SAPMF02D' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'KNA1-LIFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02D' '0130'.
    PERFORM BDC_FIELD USING 'RF02D-D0130'
    'X'.
    perform bdc_field using 'BDC_CURSOR'
    'KNBK-BANKN(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPMF02D' '0210'.
    perform bdc_field using 'BDC_CURSOR'
    'KNB1-AKONT'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    perform bdc_field using 'KNB1-AKONT'
    IT_KNA1-REC_ACCOUNT.
    perform bdc_dynpro using 'SAPLRSFH' '0100'.
    perform bdc_field using 'BDC_OKCODE'
    '/EBACK'.
    perform bdc_field using 'BDC_CURSOR'
    'RSIODYNP4-LOW(01)'.
    ENDIF.
    ENDAT.
    L_COUNTER = L_COUNTER + 1.
    CLEAR L_STRING.
    CONCATENATE 'KNBK-BANKS(' L_COUNTER ')' INTO L_STRING.
    PERFORM BDC_FIELD USING L_STRING
    IT_KNA1-CNTRY.
    CLEAR L_STRING.
    CONCATENATE 'KNBK-BANKL(' L_COUNTER ')' INTO L_STRING.
    PERFORM BDC_FIELD USING L_STRING
    IT_KNA1-BANK_KEY.
    CLEAR L_STRING.
    CONCATENATE 'KNBK-BANKN(' L_COUNTER ')' INTO L_STRING.
    PERFORM BDC_FIELD USING L_STRING
    IT_KNA1-BANK_ACCOUNT.
    AT END OF CUSTOMER.
    READ TABLE IT_KNA1 INDEX V_INDEX.
    IF SY-SUBRC = 0.
    CALL TRANSACTION 'FD01' USING IT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES
    INTO IT_MESSAGES.
    IF SY-SUBRC <> 0.
    PERFORM EMPLOYEEID_ERROR.
    *ELSE.
    ENDIF.
    WRITE: SY-SUBRC.
    perform message_format_write.
    *ENDIF.
    *WRITE: SY-SUBRC.
    CLEAR IT_BDCDATA.
    REFRESH IT_BDCDATA.
    ENDIF.
    ENDAT.
    ENDLOOP.
    endform. " POPULATE_FILE
    *& Form bdc_dynpro
    text
    -->P_0224 text
    -->P_0225 text
    form bdc_dynpro using value(p_0224)
    value(p_0225).
    IT_BDCDATA-PROGRAM = P_0224.
    IT_BDCDATA-DYNPRO = P_0225.
    IT_BDCDATA-DYNBEGIN = 'X'.
    APPEND IT_BDCDATA.
    CLEAR IT_BDCDATA.
    endform. " bdc_dynpro
    *& Form bdc_field
    text
    -->P_0229 text
    -->P_0230 text
    form bdc_field using value(p_0229)
    value(p_0230).
    IT_BDCDATA-FNAM = P_0229.
    IT_BDCDATA-FVAL = P_0230.
    APPEND IT_BDCDATA.
    CLEAR IT_BDCDATA.
    endform. " bdc_field
    *& Form EMPLOYEEID_ERROR
    text
    --> p1 text
    <-- p2 text
    form EMPLOYEEID_ERROR .
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    DEST = FILLER8
    GROUP = 'Z50583_REC1'
    HOLDDATE = FILLER8
    KEEP = 'X'
    USER = SY-UNAME
    RECORD = FILLER1
    PROG = SY-CPROG
    IMPORTING
    QID =
    EXCEPTIONS
    CLIENT_INVALID = 1
    DESTINATION_INVALID = 2
    GROUP_INVALID = 3
    GROUP_IS_LOCKED = 4
    HOLDDATE_INVALID = 5
    INTERNAL_ERROR = 6
    QUEUE_ERROR = 7
    RUNNING = 8
    SYSTEM_LOCK_ERROR = 9
    USER_INVALID = 10
    OTHERS = 11.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = 'FD01'
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    SIMUBATCH = ' '
    CTUPARAMS = ' '
    TABLES
    dynprotab = IT_BDCDATA
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 2
    OTHERS = 3.
    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. " EMPLOYEEID_ERROR
    *& Form message_format_write
    text
    --> p1 text
    <-- p2 text
    form message_format_write .
    DATA: L_MSG(200).
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    ID = SY-MSGID
    LANG = SY-LANGU
    NO = SY-MSGNO
    V1 = SY-MSGV1
    V2 = SY-MSGV2
    V3 = SY-MSGV3
    V4 = SY-MSGV4
    IMPORTING
    MSG = L_MSG
    EXCEPTIONS
    NOT_FOUND = 1
    OTHERS = 2.
    WRITE: / L_MSG.
    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. " message_format_write
    ~~Guduri

  • How to display a table control in a report

    hi
    how to display a table control in a report

    create a screen in your report.
    Call that screen in your report.
    While designing your screen, use Table control creation wizard to create table control on that screen.
    http://www.planetsap.com/online_pgm_main_page.htm

  • How to Populate Internal table data to Table Control in a Report Program

    Dear All,
           How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
    Thanks in Advance,
    Joseph Reddy

    If you want to use a table control, you will need to create a screen.
    In your report....
    start-of-selection.
    perform get_data.  " Get all your data here
    call screen 100. " Now present to the user.
    Double click on the "100" in your call screen statement.  This will forward navigate you to the screen.  If you have not created it yet, it will ask you if you want to create it, say yes.  Go into screen painter or layout of the screen.  Use the table control wizard to help you along the process.  It will write the code for you.  Since it is an output only table control, it will be really easy with not a lot of code. 
    A better way to present the data to the user would be to give it in a ALV grid.  If you want to go that way, it is a lot easier.  Here is a sample of the ALV function module.  You don't even have to create a screen.
    report zrich_0004
           no standard page heading.
    type-pools slis.
    data: fieldcat type slis_t_fieldcat_alv.
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of imara.
    * Selection Screen
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_matnr for imara-matnr .
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    *  Get_Data
    form get_data.
      select  mara~matnr makt~maktx
                into corresponding fields of table imara
                  from mara
                   inner join makt
                     on mara~matnr = makt~matnr
                        where mara~matnr in s_matnr
                          and makt~spras = sy-langu.
    endform.
    *  WRITE_REPORT
    form write_report.
      perform build_field_catalog.
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                it_fieldcat = fieldcat
           tables
                t_outtab    = imara.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-col_pos    = 3.
      append fc_tmp to fieldcat.
    endform.
    Regards,
    Rich Heilman

  • Data of table control not saved in variant of report

    Hi ppl,
    I have created a report program with some selection parameters.
    Also, I have included a table control on the selection screen (using subscreen).
    The report works perfectly.
    But, when I press the SAVE button on the selection screen to save the data on the selection screen into a variant, the variant only stores the values of the parameters and select-options present on the screen. It is not capturing the data in the table control.
    Please let me know if I need to do some additional coding for this.
    Thanks,
    David.

    Hi David,
    I too struggled a lot to find the solution ....atlast got it....It possible by exporting and importing the table control values to Database Index.
    1. AT SELECTION SCREEN OUTPUT event  triggers when you SAVE and GET the variant.
    2. So write the logic in AT SELECTION-SCREEN OUTPUT event.
    CONSTANTS: c_vari TYPE char30 VALUE
                             '(SAPLSVAR)RSVAR-VARIANT'.
      FIELD-SYMBOLS: <lfs_vari> TYPE ANY.
      ASSIGN: (c_vari) TO <lfs_vari>.
      IF sy-subrc = 0.
        IF <lfs_vari> IS NOT INITIAL.
          IF ok_code = 'SPOS'.
            EXPORT gt_chars[] TO DATABASE vari(tc) ID <lfs_vari>.
          ELSEIF ok_code = space.
            IMPORT gt_chars[] FROM DATABASE vari(tc) ID <lfs_vari>.
          ENDIF.
        ENDIF.
      ENDIF.
    In the above logic if OK_CODE is 'SPOS', that is for saving the variant with the name <lfs_vari>.
    Similarly if the OK_CODE is other than, 'GET'....that is for retrieving the variant. But in case of getting the variant OK_CODE is not filled with 'GET', but variant will be filled. We should take variant filling as base and do as done above.
    It worked for me.....

  • Table Control on a report selection screen -not a dialog transaction screen

    Hi
    Does anyone know of a way to have table control functionality on a report selection-screen? The program needs to be able to run as a background job (ie cannot be a dialog transaction) and we need to be able to save variants with the selection-screen values.
    Any help would be appreciated.
    The key point is we want to allow the user to enter a dynamic number of rows of table data on the selection-screen, save a variant containing that data and execute the program with the variant as a background job.
    Thanks
    Nicole Knight

    Hi Nicole,
    The main problem is how to persist the data.  If you are not able to create a couple of tables then you could always utilise TVARV instead.  On a similar line to my original post you could have the button call a dialog transaction.  In here you could do your normal GUI table control.  When saving the data simply transpose each column into a separate select-option held on TVARV keyed by the 'variant name' + fieldname.  Then retrieve and transpose this back when executing the report.
    Other methods could be storing the data in cluster xy (see EXPORT TO DATABASE command).
    This seems a bit overkill for what would be a couple of maintenance dialogs.
    Cheers,
    Pete
    PS. The view cluster is just a way of hierarchically performing table maintenance across multiple related tables.  It offers a good UI for this purpose (header and item config tables) and is utilised extensively in the IMG.

  • Printing a Table Control AND ALV grid from same report

    Hello,
    I am trying to figure out how to print the output of my report, which consist of a table control and a OO-driven ALV grid under it. i tried several possibilities but I only get the ALV in my spool....?
    Answers will be rewarded !

    Keep a break point in that method. Press print in the ALV, check it stops in the break point. If yes then you can use write statement, the values what ever u r writing it come in the print-out. If the control doesn't stop in the break point then there is some problem in the method declartion.
    Check my code - I written every thing in the global declaration.
                          ALV Class Definition
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
            handle_top_of_list
                FOR EVENT print_top_of_list OF cl_gui_alv_grid,
            handle_end_of_list
                FOR EVENT print_end_of_list OF cl_gui_alv_grid.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    DATA: o_event_receiver   TYPE REF TO lcl_event_receiver.
                          ALV Class Implementation
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_top_of_list.
        DATA: lws_top1(20) TYPE c,
              lws_top2(150) TYPE c,
              lws_top3(150) TYPE c,
              lws_len_file TYPE i,
              lws_file(80) TYPE c,
              lws_file1(100) TYPE c,
              lws_file2(100) TYPE c,
              lws_file3(100) TYPE c.
        WRITE: / text-001.
    *Date
        CONCATENATE text-008 ws_date INTO lws_top1 SEPARATED BY space.
        WRITE : /1 lws_top1.
    Source File Name
        WRITE: / text-009.
        lws_len_file = STRLEN( p_upload ).
        IF lws_len_file < 80.
          MOVE p_upload TO lws_top2.
          WRITE : /1 lws_top2.
        ELSE.
          MOVE p_upload TO lws_file.
          MOVE p_upload+80(48) TO lws_file1.
          DO.
            IF lws_file+79(1) EQ '\'.
              EXIT.
            ELSE.
              CONCATENATE lws_file+79(1) lws_file2 INTO lws_file2.
              SHIFT lws_file RIGHT.
            ENDIF.
          ENDDO.
          IF lws_file2 IS INITIAL.
            MOVE lws_file TO lws_top2.
            WRITE : /1 lws_top2.
            WRITE : /1 lws_file1.
          ELSE.
            CONDENSE lws_file.
            MOVE lws_file TO lws_top2.
            WRITE : /1  lws_top2.
            CONCATENATE lws_file2 lws_file1 INTO lws_file3.
            WRITE : /1  lws_file3.
          ENDIF.
        ENDIF.
      ENDMETHOD.                           "handle_top_of_list
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    Regards,
    Prakash.

  • Data in Table Control vanishes after report execution

    Hi,
    I have created a report program with a table control on its selection screen (on a subscreen).
    The report executes perfectly, but, after the report execution, once the control comes back to the selection screen, the data entered in the table control gets cleared.
    Please let me know how can I retain the data entered in the table control even after the report execution.
    Regards,
    David.

    Hello,
    When control comes back to selection screen. PBO event executes and possibly internal table has got cleared somewhere before that.
    Debug you code to find the exact problem line. You can also add watchpoint for internal table with value initial. So code will break in debug mode whenever internal table is cleared.
    Hope this helps!
    Thanks,
    Augustin.

  • Can't not display the table control in the report

    Hello frnds,
    I m create a module pool pgm using saptechnical  'Demo on using Table Control', 
    execute a report bush buttons are displayed but
    can't Dispaly the table ctrl in the report using screen paiter
    any help me, plz.
    Thanks in advance.

    Hi Kumar,
    Check thsi Program demo_sel_screen_with_tabstrip.
    and also a program on Subscreens in ABAPDOCU
    You need to combine both then only this is possible in Report PRograms
    Cheerz
    Ram

  • Baffling Table Control

    Hi,
    Currently using SAP 4.7 SAPKB62011
    The need was to develop a program, which based on a selection-criteria displays a table(editable) and some changes will be done in the table and data should get saved.
    The best approach I assumed was to
    a) Create a report, define the selection screen parameters
    b) Do validation in at selection-screen
    c) If all validations are proper, select values to be shown in table control
    d) call screen 9000
    Everything is working perfectly, except for adding new lines in table control.
    When I execute select query in AT SELECTION-SCREEN event before calling the screen 9000, then I am not able to add values to table control.
    But if I put the select query in the PBO of screen 9000, I am able to add new values. Only those values which are already present in table control can be changed. I am not able to add any new entries.
    In my opinion, there should not be a select query in PBO, because that query would hit the database in all possible events.
    Any particular reason, why.
    <b>AT SELECTION-SCREEN code</b>
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'ONLI'.
          lv_pernr = p_pernr.
          lv_lifnr = p_lifnr.
    *      SELECT *
    *        FROM zpersoninfo
    *        INTO TABLE lt_zpersoninfo
    *       WHERE personno = lv_pernr.
    *      IF sy-subrc <> 0.
    *      ENDIF.
    *      APPEND INITIAL LINE TO LT_ZPERSONINFO.
          CALL SCREEN 9000.
      ENDCASE.
    <b>Dynpro code</b>
    PROCESS BEFORE OUTPUT.
      MODULE pbo_9000.
    LOOP AT lt_zpersoninfo INTO zpersoninfo WITH CONTROL tablecontrol CURSOR
    tablecontrol-current_line.
        MODULE pbo_tc_9000.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP.
        MODULE pai_tc_9000.
      ENDLOOP.
      MODULE pai_9000.
    <b>PBO_9000</b>
    MODULE pbo_9000 OUTPUT.
      SET PF-STATUS lv_pfstatus.
      pa0315-pernr = lv_pernr.
      SELECT *
        FROM zpersoninfo
        INTO TABLE lt_zpersoninfo
       WHERE personno = lv_pernr.
      IF sy-subrc <> 0.
      ENDIF.
      APPEND INITIAL LINE TO LT_ZPERSONINFO.
    ENDMODULE.                 " PBO_9000  OUTPUT
    <b>PBO 9000 - Table Control Code</b>
    MODULE pbo_tc_9000 OUTPUT.
      LOOP AT SCREEN.
        IF lv_pfstatus = 'DISPLAY'.
          CASE screen-name.
            WHEN 'ZPERSONINFO-SERVICENO'.
              screen-input = '1'.
              screen-active = '1'.
            WHEN 'ZPERSONINFO-MANDATORY'.
              screen-input = '1'.
              screen-active = '1'.
          ENDCASE.
        ELSEIF lv_pfstatus = 'CHANGE'.
          CASE screen-name.
            WHEN 'ZPERSONINFO-SERVICENO'.
              screen-input = '0'.
            WHEN 'ZPERSONINFO-MANDATORY'.
              screen-input = '0'.
          ENDCASE.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.
    Let me know if I have skipped some information, which you may find it useful to find the solution.
    Regards,
    Subramanian V.

    That is because I didn't upate the 'LINES' field in tablecontrol. How silly !!
    Regards,
    Subramanian V.

  • Table Control[Accept Input Only] - "ENTER" Key

    Hi Folks,
    I'm reviving this unanswered thread in relation to table control: when the user press enter, all the values entered disappear.
    [url]Re: Table control (Enter key)[url]
    I have a table control that accepts "ONLY" input, meaning to say, there will be no pre-loading of data in the PBO, so it will loop through the table control itself instead of looping from an internal table.
    Issue: Whenever I press "ENTER" in any column/row of my table control, ALL the values I entered disappear.
    PBO:
    PROCESS BEFORE OUTPUT.
      MODULE CLEAR_OKCODE.
      MODULE LOAD_TABLECTRL.
      LOOP WITH CONTROL TC_DATA.
        MODULE READ_DATA.
      ENDLOOP.
    module READ_DATA output.
      READ TABLE T_DATA INTO WA_DATA INDEX TC_DATA-current_line.
      data : line_count type i.
      "to increase the number of lines in table control dynamically
      describe TABLE t_data lines line_count.
      TC_DATA-lines = line_count + 10.
    endmodule. 
    PAI:
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL TC_DATA.
        MODULE MODIFY_DATA.
      ENDLOOP.
    module MODIFY_DATA input.
    WHEN 'CREATE'.
      "subroutines are here, etc.
    WHEN 'DELETE'.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    endmodule.
    In my ABAP Debug, the value of SY-UCOMM is BLANK whenever I press Enter.
    Thanks.

    Hi
    Your code seems to be rght only the MODIFY statament is useless:
    module READ_DATA output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        ZQID_CHECK-WERKS = WA_ID_CHECK-WERKS.
        ZQID_CHECK-MATNR = WA_ID_CHECK-MATNR.
        ZQID_CHECK-LICHA = WA_ID_CHECK-LICHA.
        ZQID_CHECK-LIFNR = WA_ID_CHECK-LIFNR.
      ELSE.
        CLEAR ZQID_CHECK.
      ENDIF.
    endmodule.
    Now before LOOP of PBO try to set the lines of table control to be display, I've created this report on my system and it works fine:
    .CONTROLS T_CTRL TYPE TABLEVIEW USING SCREEN 100.
    DATA: BEGIN OF ITAB OCCURS 0,
              WERKS LIKE MARC-WERKS,
              MATNR LIKE MARC-MATNR,
              LIFNR LIKE LFA1-LIFNR,
          END   OF ITAB.
    DATA: WA LIKE ITAB.
    START-OF-SELECTION.
      DO 4 TIMES.
        ITAB-WERKS = '5010'.
        ITAB-MATNR = '1234567890'.
        ITAB-LIFNR = '0000000001'.
        APPEND ITAB.
      ENDDO.
      CALL SCREEN 100.
    PROCESS BEFORE OUTPUT.
      MODULE SET_T_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE READ_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
        MODULE MODIFY_DATA.
      ENDLOOP.
    MODULE SET_T_CTRL OUTPUT.
      DESCRIBE TABLE ITAB LINES T_CTRL-LINES.
    ENDMODULE.                 " SET_T_CTRL  OUTPUT 
    MODULE READ_DATA OUTPUT.
      READ TABLE ITAB INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC = 0.
        MOVE-CORRESPONDING ITAB TO WA.
      ELSE.
        CLEAR WA.
      ENDIF.
    ENDMODULE.                 " READ_DATA  OUTPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY ITAB FROM WA INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC NE 0.
        CHECK NOT WA IS INITIAL.
        APPEND WA TO ITAB.
      ENDIF.
    ENDMODULE.                 " MODIFY_DATA  INPUT

Maybe you are looking for

  • How to get the required name name in the HTML output ?

    Hello all. While publishing the project, where can we give our custom name which has to be taken as the title in the HTML file? Thanks in advance, Kartik.

  • Disabling auto switch off Internet Sharing Lumia 7...

    Is there anyway to disable the auto switch off of the auto switch off feature of the Internet Sharing on the Lumia 710? The reason I ask, is that I want to set this up as my main Internet connection at home using the Three UK One Plan Unlimited Data

  • Ieee1394: sbp2: Number of active logins: 357913941

    I have been tortured by my new WesternDigital 320GB external hard drive. I use Dell PowerEdge 350 and 750 with Red Hat Linux 2.6.9-22.EL kernel. The ohci1394 driver is downloaded from oracle site, oracle-firewire-modules-2.6.9-22.EL-1286-1.i686.rpm.

  • Track Mixer or Environment?

    Hi. Fo mixing and viewing tracks/objects........ I use the environment because i can see loads of objects on one page rather than having to scroll along to them like in the track mixer. I have one top row of audio objects, then a lower row of instrum

  • Planning for Components to be Provided in Subcontracting

    Hi all, May I know what is the business rational to plan the requirements to be provided for the components (material provide to vendor) for one subcontractor separately from all other requirements with the use of MRP area (i.e. what is the business