How to color the records in table control.

Hi,
I have created a table control in which i want to add colors to it.
It is possible in reporting,but is it possible in table control.

You can do it,
Just follow the code,...
In PBO...
PROCESS BEFORE OUTPUT.
MODULE STATUS.
LOOP WITH CONTROL TABCTRL.
MODULE MODIFY_100.
ENDLOOP.
MODULE MODIFY_100 OUTPUT.
DATA wa_tabctrl TYPE cxtab_column .
LOOP AT TABCTRL-COLS INTO WA_TABCTRL.
      IF WA_TABCTRL-INDEX =  '1'.       "1- Your Respective Field Column's index
        WA_TABCTRL-SCREEN-COLOR = '2'. "Give your colour
        MODIFY TABCTRL-COLS FROM WA_TABCTRL.
      ENDIF.
ENDLOOP.
ENDMODULE.

Similar Messages

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Reg : Find the records  in Table control

    Dear all
    Im having one requirement in table control .  In my table control totally 100 records contains sales documents
    for Example
    100010
    100020
    100030
    In that Records how to find particluar sale document in table control. How to build find option in table control.
    If possible or not
    Thanks & regards
    Sri

    Hi Sridhar,
    You need to implement amodal screen for this and a Find button above the table control.
    or you can use POPUP_GET_VALUES FM
    after you enter a value in the POP up screen.
    " You need to put some effort to implement this, wish you to implement it successfully as this is possible
    READ TABLE ITAB WITH KEY VBELN = FIND_VBELN. " FIND_VBELN is the field on your find screen.
    if sy-subrc = 0.
    tc-top_line = sy-tabix. " this makes the record visible in the First position
    endif.
    PROCESS AFTER INPUT.
      LOOP AT itab.
        MODULE find.
      ENDLOOP.
    In Program
    MODULE find INPUT.
      DATA : tab TYPE STANDARD TABLE OF sval WITH HEADER LINE.
      REFRESH tab.
      CASE ok_code.
        WHEN 'FIND'.
          clear ok_code.
          tab-tabname = 'VBAK'.
          tab-fieldname = 'VBELN'.
          APPEND tab.
          CALL FUNCTION 'POPUP_GET_VALUES'
            EXPORTING
    *   NO_VALUE_CHECK        = ' '
              popup_title           = 'Find Sales Order'
       start_column          = '5'
       start_row             = '5'
    * IMPORTING
    *   RETURNCODE            =
            TABLES
              fields                = tab
    EXCEPTIONS
       error_in_fields       = 1
       OTHERS                = 2
          IF sy-subrc = 0.
            READ TABLE itab WITH KEY vbeln = tab-value.
            IF sy-subrc = 0.
              tc-top_line = sy-tabix.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " find  INPUT
    Cheerz
    Ram

  • Hi All How 2 add empty record to table control

    Hi All,
    If my table control has 10 records , and I want to add an empty record when i click a push button for that what is the procedure to do it. please send me the source code for that its Urgent.
    Thanks&Regards.
    Bharat Kumar .

    Hi..
    In the PBO Module which is called before the LOOP on Table control .
    Give the code like this..
    DESCRIBE TABLE ITAB.
    if OK_CODE = 'ADD'.
    TABCON-LINES = SY-TFILL + 1.
    ELSE.
    TABCON-LINES = SY-TFILL .
    ENDIF.
    This will give the Additional line always when you click the ADD(some) button.
    <b>Reward if Helpful</b>

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • How to clear the contents of table control

    Hi All,
              How to clear the contents that are present in a Table control. If there is any code Please Let me know.
    I will assign full marks to the correct code.
    Pradeep Kumar Kota.

    Hi
    U need to clear the contenents of internal table used to store the record displayed by table control.
    Every time the PBO is triggered the table control is automatically cleared, so you need only not to transfer any data from internal table to table control.
    So you should show how your PBO if you want a right answer.
    Max

  • How to delete the record in Table

    Hi Guru's,
    i have Table which contain no.of Records.
    i want to deleted one record. if i go to Table maint.Generator....from table itself..
    how to do that... when we deleting the record. can we create new TR for that?
    can anybody tell me.
    Thanks in Advance,
    venkat

    Hi,
    it is answered, here for my table there is no Table Maint.Generator.
    i just explained how i have done it.
    i just simply gone into Debug mode. there
    code = Dele.
    i have given. then i came out from debug mode to Table. there i just got Delete button on application tool bar.
    i selected the record then icliked on Delete button.
    it is got deleted.
    But it is not asking for any new Transport Request.
    Regards,
    Venkat

  • How to execute multiple records in table control

    HI.
    I have a requirement that in table control user will select more than one row and when he clicks 'SAVE' it should go and sit in a custom table. how to pass more than one records.
    thanks & regards.
    sandeep

    Hi Sandeep,
    I understand your requirement .......
    See this standard program........
    <b>" DEMO_DYNPRO_TABCONT_LOOP_AT "</b>
    <b>Understand how DELETE button is working,inorder to delete multiple lines....Copy this program if necessary..OK.
    Simply,Replace DELETE statement with your INSERT statement to push records into your custom table....very easily you can do it.</b>
    <b>Reward all helpful answers.</b><b>
    Hope you problem is solved.</b>
    Regards,
    V.Raghavender.

  • How to proces the record in Table with multiple threads using Pl/Sql & Java

    I have a table containing millions of records in it; and numbers of records also keep on increasing because of a high speed process populating this table.
    I want to process this table using multiple threads of java. But the condition is that each records should process only once by any of the thread. And after processing I need to delete that record from the table.
    Here is what I am thinking. I will put the code to process the records in PL/SQL procedure and call it by multiple threads of Java to make the processing concurrent.
    Java Thread.1 }
    Java Thread.2 }
    .....................} -------------> PL/SQL Procedure to process and delete Records ------> <<<Table >>>
    Java Thread.n }
    But the problem is how can I restrict a record not to pick by another thread while processing(So it should not processed multiple times) ?
    I am very much familiar with PL/SQL code. Only issue I am facing is How to fetch/process/delete the record only once.
    I can change the structure of table to add any new column if needed.
    Thanks in advance.
    Edited by: abhisheak123 on Aug 2, 2009 11:29 PM

    Check if you can use the bucket logic in your PLSQL code..
    By bucket I mean if you can make multiple buckets of your data to be processed so that each bucket contains the different rows and then call the PLSQL process in parallel.
    Lets say there is a column create_date and processed_flag in your table.
    Your PLSQL code should take 2 parameters start_date and end_date.
    Now if you want to process data say between 01-Jan to 06-Jan, a wrapper program should first create 6 buckets each of one day and then call PLSQL proc in parallel for these 6 different buckets.
    Regards
    Arun

  • HOW TO MAKE THE FIELDS ON TABLE CONTROL SCREEN FIXED!!

    Dear all,
    Can you please tell me as to how to make the fields on the table control screen fixed (not respond to the scroll bar) i.e. simillar to MC88 screen , the first two fields are fixed and don't respond to the scroll.
    Please Help!!!!
    Vj

    Hi
    In TC, goto attributes and set 'Fixed columns' as 2. This will fix the first 2 columns.
    Regards
    Navneet

  • SAPUI5: How to set the appearance of Table control?

    Hi there,
    I have a table on my app UI. Now I want simply show the table grid lines (currently, the vertical lines between columns are not shown). Any idea?
    Furthermore, how to set the width of the bord lines or even teh color of the lines?
    Thanks very much in advance!
    Dong Zhu

    Hi,
    The demo link provided by Chandra uses Blue Crystal theme, hence it shows the vertical lines between the columns of the table. If you are using Gold Reflection theme, then to get the vertical lines, you need to play with CSS. Add the below snippet of CSS between <head></head> of your html file.
    <style>
    .sapUiTableTr>td {
                  border-right: 1px solid #cccccc !important;
    </style>
    Thanks & Regards,
    Vishwa

  • How to color the records in a tabular form

    hi,
    i am using oracle 10g forms
    how to change the color of records on conditional basis in a tabular form display.
    thanks

    Well i give u item level to apply it in the whole record including...
    emp , ename & sal
    any way to do it block level u can use Current Record Attribute Property block level but if u programatically do it as mentioned u can have a lock on something resemble to ur case pls have a look at Craig's Oracle Stuff How to Select Multiple Records in a block using Record Groups just to exclude the idea u want to develop.
    Hope this helps...
    Regards,
    Amatu Allah

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • How can we do the validation for non visible records in table control.

    Hi Experts,
      I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
      How can we do the validation for non visible records in table control.
    Regards,
    Bujji

    Hi,
    try validating material before displaying it in table control...'
    Rgds/Abhhi

  • How to save the selected records from Table control in dialog programming

    Hiiiiiiii Every1
    Actually the problem is like this:-
    I have to select some records from table control and then want to save the selected records in DB table.
    Example
    I have some rows having inforamtion bout employees...
    Now what i want is that when i click on 'SAVE' button then these selected rows should be moved into DB table.
    Sachin Dhingra

    see below example, I have added INSERT option after DELETE option.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA cols LIKE LINE OF flights-cols.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
    TABLES demo_conn.
    SELECT * FROM spfli INTO TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
        WHEN 'INSERT'.
          READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              itab1 = itab.
              modify itab1.
            ENDLOOP.
          ENDIF.
          if not itab1 is initial.
            INSERT dbtab FROM TABLE itab1.
          endif.
      ENDCASE.
    ENDMODULE.

Maybe you are looking for

  • Use Mac Mini as access point for PC Laptop using WEP

    Hello, I am having a horrific time getting my PC Laptop to gain access to the internet through my Mac mini while using WEP. While I can gain access very easily with no WEP protection, I am blocked every time when I try to use WEP. I've tried using 64

  • Booting From MAC OS CD?  (It won't)

    Okay, so someone I knew was gonna throw out an iMac. I hate seeing computers go to waste, so I just took it. They didn't have any CDs or anything with it. I turn it on, and obviously can't login. I dunno the password and neither do they. I found that

  • Billing Plan Down Payment

    Dear All, I am creating the Down Payment for Billing Plan.When i am trying to do multiple lines, the total amount of Down Payment deducted in full amount. here is the example : I have created Down Payment Request with 200 Eur and then go to F-29 to c

  • I live in Colombia. How I can buy a song in the Spain store?

    I live in Colombia. How I can buy a song in the Spain store?

  • Using the results of one Query in a workbook as a filter in another query

    Hello! I'd like to have one workbook which my users can execute and the result from one Query (e,g, Customer Account Number) will then be used as a filter in a second query (which would be from a different cube). Can this be done? Cheers.