Problem in displaying o/p in Table Control

Hi ,
while displaying in table control.
its is displaying  line twice.
I have some contains in iti itab.
which i am displaying itf itab through table control..
i have coded like this...
PROCESS BEFORE OUTPUT.
MODULE STATUS_0112.
LOOP at itf   WITH CONTROL TC  CURSOR tc-current_line.
    MODULE FILL_TABLE_CONTROL.
ENDLOOP.
PROCESS AFTER INPUT.
  MODULE CANCEL AT EXIT-COMMAND.
LOOP at itf.
    module read_table_INPUT.
  ENDLOOP.
MODULE USER_COMMAND_0112.
*&      Module  STATUS_0112  OUTPUT
      text
MODULE STATUS_0112 OUTPUT.
  SET PF-STATUS 'ZTC'.
SET TITLEBAR 'xxx'.
  DESCRIBE TABLE iti LINES  tc-lines.
ENDMODULE.                 " STATUS_0112  OUTPUT
MODULE fill_table_control OUTPUT
MODULE fill_table_control OUTPUT.
loop at iti   .
  READ TABLE  itf with key ingr_code = iti-ingr_code
                           ingr_desc = iti-ingr_desc.
        MOVE iti-INGR_CODE TO ITF-INGR_CODE.
        MOVE iti-INGR_DESC TO ITF-INGR_DESC.
        MOVE iti-CONC TO ITF-CONC.
        MOVE iti-QUANTITY TO ITF-QUANTITY.
        MOVE iti-UOM TO ITF-UOM.
        append ITF  ."index tc-current_line.
        endloop.
ENDMODULE.                    "fill_table_control OUTPUT
can any one help me

loop at iti .
READ TABLE itf with key ingr_code = iti-ingr_code
ingr_desc = iti-ingr_desc.
MOVE iti-INGR_CODE TO ITF-INGR_CODE.
MOVE iti-INGR_DESC TO ITF-INGR_DESC.
MOVE iti-CONC TO ITF-CONC.
MOVE iti-QUANTITY TO ITF-QUANTITY.
MOVE iti-UOM TO ITF-UOM.
append ITF ."index tc-current_line.
endloop
You dont need to append the data , you have to Modify the data.
Problem is with the above code.
Correct to this...
MODULE fill_table_control OUTPUT.
READ TABLE itf index tc-current_line.
MOVE iti-INGR_CODE TO ITF-INGR_CODE.
MOVE iti-INGR_DESC TO ITF-INGR_DESC.
MOVE iti-CONC TO ITF-CONC.
MOVE iti-QUANTITY TO ITF-QUANTITY.
MOVE iti-UOM TO ITF-UOM.
endloop.
ENDMODULE. "fill_table_control OUTPUT
Regards
Vijay Babu Dudla

Similar Messages

  • 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

  • Listbox displaying dynamic values in table control

    Hi Experts,
    The requirement that I have is that there are two columns in an internal table out of which second one is a listbox.
    There is a need of displaying dynamic values in a row in a listbox according to value entered in first column of the same row, not affecting the listbox values in other rows.
    I am using VRM_SET_VALUES for populating listbox, but it results in populating the listbox in all other rows also.
    Please help.
    Thanks,
    Garima

    Hi Thanks for the link..
    But my problem is something else.
    I want the same listbox of a column in a table control to show me different values in different rows on the basis of value in another column .
    Regards,
    Garima

  • How to display Quantity fields in Table control

    Hi,
    I need to display quantity fields in my table control based on the resb-meins field. i.e. I need a feature similar  to qname of ALV Grid Control in Table control.
    Can any body help me.
    Regards,
    Srinivas

    hi,
    use the charecter filed and   convert u field in to charecter
    check this link
    Re: character to decimal conversion
    ~linganna

  • Problem when creating list box in table control

    Hi every body ,
                      I am placing a list box in table control ,  the list box is coming perfectly but
    when I am scrolling  or pressing enter the data in that field is clearing.
       if I remove the list box , and i enter the data directly and scrolling or press enter
    the data is not clearing.
    But only for list box only it is be having like that
    what is the problem?
      the code is as follows
    *{   INSERT         DEVK935807                                        1
    *&      Module  glaccuontlist  INPUT
          text
    module glaccuontlist input.
    type-pools vrm.
    tables: zglaccount.
    data:
            name  type vrm_id,
            list  type vrm_values,
            value like line of list.
           clear:value.
           refresh: list.
            name = 'ACGL_ITEM-HKONT'.
            select * from zglaccount.
             value-key = sy-dbcnt.
             value-text = zglaccount-hkont.
             append value to list.
             clear value.
            endselect.
          call function 'VRM_SET_VALUES'
            exporting
              id                    = name
              values                = list
          EXCEPTIONS
            ID_ILLEGAL_NAME       = 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.
    endmodule.                 " glaccuontlist  INPUT
    *}   INSERT
    thanks in advance.\
    srinivas.

    Hi srinivasa,
    try it.
    select * from zglaccount.
    <b>value-key = zglaccount-hkont.</b>
    value-text = zglaccount-hkont.
    append value to list.
    clear value.
    endselect.
    Regards
    Allan Cristian

  • 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.

  • Help in disabling display of record in table control

    Hi all,
    I need to disable the display of record from an internal table in table control.
    I have the folllowing code:
    PROCESS BEFORE OUTPUT.
    Set status & title; possibly disable Proceed option
      MODULE status_0410.
    Fill table control with data
      LOOP AT ts_cor
           INTO z2rlcr_screen_struc
           WITH CONTROL tc_cor
           CURSOR tc_cor-current_line.
        MODULE modify_screen.
      ENDLOOP.
    module modify_screen output.
    Don't allow any input for lines that would fail:
      if z2rlcr_screen_struc-status_code <> c_yellow or
         w_proceed = space.
         w_help_screen = c_yes.
      Iterate through screen
        loop at screen.
        Set screen input to 'off' if screen element is...
          if screen-name = 'Z2RLCR_SCREEN_STRUC-MANCODE' or
             screen-name = 'Z2RLCR_SCREEN_STRUC-REASDESC'.
            screen-input = c_off.
          endif.
          modify screen.
        endloop.
      endif.
    Do not show the line if the line is deleted.
      if z2rlcr_screen_struc-del_line eq 'X'.
    here I need the help if del_line eq 'X' then I should disable the
    display of the whole record.
      endif.
    endmodule.                 " MODIFY_SCREEN  OUTPUT
    I hope its clear.
    Any help will be appreciated.
    Thanks
    Sukumar.

    Hi Sukumar,
    Do you mean to say that the entry that you deleted should not be displayed in the table control?
    If that is the case,then I think the following code can help you.
    I had a similar requirement in my project and this is the code that I used.
    Go through it and you will understand it.
    CASE SY-COMM.
      WHEN 'DELETE'.
    ****To delete the seleceted line from table control****
          LOOP AT tb_schedule.           "tb-schedule is the name of the internal table used for table control.
            IF tb_schedule-mark = 'X'.
    **tb_schedule is the internal table(same structure as tb_schedule) to hold the deleted entries.***
              MOVE-CORRESPONDING tb_schedule TO tb_schedule_del.
              APPEND tb_schedule_del.
              DELETE tb_schedule.
            ENDIF.
          ENDLOOP.
    **to remove the deleted valules in the Ztable**
    LOOP AT tb_schedule_del.
        ztm09_eket-ebeln = ztm09_ekko-ebeln.
        ztm09_eket-ebelp = tb_schedule_del-ebelp.
        ztm09_eket-etenr = tb_schedule_del-etenr.
        ztm09_eket-menge = tb_schedule_del-menge.
        ztm09_eket-eindt = tb_schedule_del-eindt.
    ****Delete the entries into schedule table***
        Delete ztm09_eket.
      ENDLOOP.
    Hope this code will help you.
    Revert for any querries.
    Reward points if helpfull.
    Regards,
    Kashyap

  • Problem with the date field in Table Control

    I have created a table control in my module programming. One of the column in the table control is a date field which is I/O field.
    Now if I enter a value in date field column and hit enter the date field is reset. I dont want the field to get reset and accept valid date field.
    I have set type of the column as DATS and I havent used any dictionary fields. The column is from the internal table in the program.
    Please suggest

    In your PAI, in the LOOP AT <itab> did you
    - check date validity
    - update internal table
    * Sample
    LOOP AT itab.
      FIELD itab-field MODULE checkfield.
      MODULE updateitab.
    ENDLOOP.
    Look also at SAP documentation like [Table Controls|http://help.sap.com/abapdocu/en/ABENTABLE_CONTROL1_ABEXA.htm] or [Table Controls in ABAP Programs|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Raymond

  • Problem in displaying rows in a table.

    Hi
    i have a query region and a results table .
    i have a details button in results table which will fetch results in to the details table.
    once i click the details button of a selected row i get the results into details table.
    now the problem is after applying (commiting transaction) if i click on the another rows details button details table results are not changing..
    what might be the problem...

    Hi,
    i have a vendor name which is lov item.from there i will get the vendorid
    In islovevent() i am capturing that value and passing the same to the initdetails in amimpl
    which in turn calls initquery in voimpl
    the problem is page details are refrshing fine if i dont add a row to the table .the problem arises only when i add a row...
    when i add a row and try saving it.it saves properly. but when i go to vendor lov and selects another vendor ..the details are remianing same....
    the code i used for above :
    CO CODE:
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if ("SearchVendorName".equals(lovInputSourceId))
    String vendorId=pageContext.getParameter("VendorIDfrm");
    Serializable[] parameters={vendorId };
    am.invokeMethod("initExemptionDetails",parameters);
    AM CODE:
    public void initExemptionDetails(String vendorid){
    ExemptionVOImpl vo = getExemptionVO1();
    if (vo == null) {
    throw new OAException("CLE", "CLE_F272_VO_NULL");
    vo.initExemptionQuery(vendorid);
    VOIMPL CODE:
    public void initExemptionQuery(String vendor_id){
    setWhereClause(null);
    reset();
    setNamedWhereClauseParam("VENDOR_ID",Integer.parseInt(vendor_id));
    executeQuery();
    AND LAST BUT NOT LEAST WHICH IS CAUSING THE ERROR CODE FOR ADDING A ROW:
    ExemptionVOImpl vo = getExemptionVO1();
    if (vo != null)
    vo.setMaxFetchSize(0);
    vo.executeQuery();
    Row row = vo.createRow();
    if (vo.getFetchedRowCount() == 0)
    vo.insertRow(row);
    else
    { vo.insertRowAtRangeIndex(vo.getRowCountInRange(),row); }
    vo.setCurrentRow(row);
    row.setNewRowState(row.STATUS_INITIALIZED);
    please help me out:::

  • Table Control in ITS is getting wrongly displayed

    Hi All,
    I Have developed a program(say abc) and created a screen for that program(abc).
    My issue is that,i have kept the table control in the box .
    When i execute the screen in se80 under the program(abc) ,its displaying properly ( i mean table control is inside the box).
    I have created an internet service program in se80 where i am passing the transaction code of  that program(abc) in the parameters tab.
    **problem is***
    but when i execute the internet service program(xyz) after publishing then the
    table control is coming out of the box in ESS ,
    i mean the width of the table control is not getting reduced.
    It(table control) has to get fit inside the box.
    even though its working properly through screen.
    please help me out of this issue.
    thanks,
    bhavani.
    Edited by: BHAVANI MADIREDDY on Jul 26, 2008 9:53 AM

    Hi ,
    I have set vertical scroll bar to 'X' but still when I scroll the scroll bar the counter is getting incremented and the last entered value is appended many times in the table control.
    What can be done to overcome this issue?

  • Status control icon  display in table control

    Hi,
    In the workarea the field of status control icon is showing Red/green/yellow that is ok but when i am modifying the internal table from this work area then text(Red or green something...) is coming insted of status Icon.
    So how to modify internal table from this workarea so that i can display icon in my table control's internal table ?Your input is highly appreciated..
    Thanx
    Prince  Raja

    DATA : c_green(4) TYPE c VALUE '@08@',
           c_red(4) TYPE c VALUE '@0A@'.
          IF flag = 'X'.
            READ TABLE it_output INTO is_output WITH KEY
                                      bukrs = is_final-bukrs
                                      anln1 = is_final-anln1
                                      anln2 = is_final-anln2
                                      BINARY SEARCH.
            IF sy-subrc = 0.
              is_output-c_icon  = c_green.
              is_output-leabg_n = is_final-leabg.
              is_output-message = it_return-message.
    * Modify the output internal table with the changed new values
              MODIFY it_output FROM is_output
                               TRANSPORTING c_icon leabg_n message
                               WHERE bukrs = is_output-bukrs
                                 AND anln1 = is_output-anln1
                                 AND anln2 = is_output-anln2.
            ENDIF.
    Regards
    Gopi

  • Display check box in a Table Control in MPP Programs

    Hi,
    I need to display checkbox in my table control in my MPP screen, can any body help.
    Regards,
    Srinivas

    Hi ,
    just add the following code in your jsp page---
    for (int i = 1; i <= no_of_rows ; i++){
         for (int j = 1; j <= no_of_columns ; j++){
              if(i%2!=0){
    mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL2);
    else{
         mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL3);     
    as it is obvious,this code is to set different colors in alternative rows.
    myTableView is the id of TableView.
    Refer this link for different colors...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/26/f79241e9129f09e10000000a155106/frameset.htm---
    Hope this helps.
    Regards,
    Swarna
    Message was edited by: SwarnaDeepika

  • How to use Generic Object Services(GOS) for each table control record.

    Dear Expert,
                       I am using generic object services for document attachment but i am facing a problem while attaching document to a table control row. my requirement is to attach separate document for each and every row of table control but  i am unable to attach document row wise of the table control.for each row GOS should display corresponding attached document not all the attached document.
    Thanks in Advanced
    Bhuwan Tiwari
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM

    You haven't explained what object and object key you're using, nor have you provided any indication of how you implemented the GOS attachment functionality.  You need to provide more information to resolve an issue like this.

  • List Box with Variable Entries in a Table Control

    Hi ,
       I have a requirement where a certain column F of the table control should be designed as dropdown list box. The problem is, i have to populate different entries for field F in each row of the Table control.
                                       Field List
    First Line -                   A,B,C
    Second Line -              A,B
    Third Line     -             A
    Is it possible in ABAP to achieve this . I should not use an input help. Can i achieve this with Drop down list ?
    Regards,
    Krishna Chaitanya . A

    Hi Priyaranjan,
    Assoon as you enter records and save it it gets saved , that is ok , but when you do scroll system goes to PAI , so you need to chk the value of ok_code when scroll button is pressed and write the code according to that .
    more over you need to increase the number of lines that can be displayed in a particular table control .
    Try this it may help you .
    <i>Reward points if helpful.</i>
    Regards,
    Amber S

  • Module Pool with Table Control.

    Hi,
    I have developed two screens .
    in the first screen the user enters the data and press the Next Push button then
    in the second screen it should display data in the table control.
    For that purpose I have written code.
    when the user press Next Button then I wrote like this.
    case ok_code.
       when 'NEXT'.
            CALL SCREEN '9001'.
    ENDCASE.
    AND In the PBO Event of the Screen 9001 I have written a Function Module to Popup the data
    in the table control.
    But the problem is when the user press the Next Button it is displaying table control without
    data. But when the press the Back button and again he press the Next Button then it is displaying.
    So, Where is the Problem ?
    How can I correct it ?
    Bye,
    Satya.

    Hi
    IN PAI
    case ok_code.
    when 'NEXT'.
    select the data into an internal table using the entered fields in the first screen.
    so data is there in ITAB.
    CALL SCREEN '9001'.
    ENDCASE.
    in PBO.
    between loop..
    MOVE the internal table data to the table control fields
    endloop.
    see the help for TC
    syntax:
    CONTROLS .
    if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.
    u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.
    Go through this urls.
    www.****************
    www.sap-img.com
    Check the below links.
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://sap.niraj.tripod.com/id25.html
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for

  • To run a program

    I have a class which resides in some other package another class in another package. I need to run one class from another class can any one help me out both classes are stand alone classes. Both can be executed individualy also.

  • I have a 2010 macbook pro 2010 13.3" laptop that will not update from 10.6.3

    I have an Apple macBook pro that will not update at all. It is a 13.3 model the initial load is 10.6.3. The battery is dead as well and the pram seems to not hold as well, time reset even when plugged in on restart. any update leads to the spinning w

  • Powershell import-spweb fails with "parent does not exist" error.

    So, I have a sp 2010 site at http://myfarm/sites/it/d22 and I want to copy the contents to http://myfarm/sites/bb/d62 . I perform Export-SPWeb -Identity  http://myfarm/sites/it/d22  -Path d:\temp\d22  -IncludeUserSecurity –IncludeVersions All  -NoFil

  • Moving to a new Mac - TM Backup Fails

    Greetings, I just retired my older PowerMac G4 (Quicksilver) and used migration assistant to move all my data to the new iMac - worked perfectly. Before I made this transfer, I ran a final time machine backup on the PowerMac. I figured I'd just be ab

  • New install photoshop cs3 after crash

    Hi, Can some one help me to register the product photoshop cs3 after a crash. The key is not accepted . I tried this via internet, phone . It is a valid key (on the box). When I tried this via the phone , I got the message , you will be transferred t