Capture no: of rows populated already in a table control

Hi All,
I have a situation where i am changing the existing vendor using XK02 but there is a table control in that for filling Bank Acc details.
Let suppose we have 1st row already filled with the details, So now we have enter the new details from the 2nd row. So is there any technique to capture it?
Did any body faced such scenario?
Regards
Jyo

The solution to the above thread would be like
We can select the bank details and any other table control details from the database based on the key Vendor no: and based the count of the records we can increment our counter ot display those details.
Best regards
Jyo

Similar Messages

  • One row as editable and other row as non-editable in table control

    Hi Experts,
               Is this possible to make one row as editable and another row is non editable in table control?
    My Requirement is
    1st row non editable field
    Customer code, description,amount will come from the previous screen this will be non editable for user.
    2nd row editable
    User has to enter the amount in 2nd row here the customer code description will be empty.
    If 4 customer are there
    1,3,5,7 should be non editable and 2,4,6,8 should be editable..
    Pls help me in this issue..
    Thanks in Advance!

    hI
    This is a simple Module POOL program with only Table control and nothing else
    " This is Tested to Enable one row and disabling the next row
    in TOP Include
    controls : tc type tableview using screen 100.
    DATA : OK TYPE SY-UCOMM.
    DATA : ITAB TYPE TABLE OF SPFLI WITH HEADER LINE.
    in PBO
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP AT itab WITH CONTROL tc.
       MODULE TC_MOD.
      ENDLOOP.
    in PAI
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT itab.
      ENDLOOP.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TEST'.
      SET TITLEBAR 'TEST'.
      DESCRIBE TABLE itab LINES tc-lines.
      IF tc-lines = 0.
        tc-lines = 20.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE tc_mod OUTPUT.
      DATA : mod TYPE i.
      LOOP AT SCREEN.
        mod =  tc-CURRENT_LINE MOD 2  .
        IF mod = 1.
          IF screen-name = 'SPFLI-CARRID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " TC_MOD  OUTPUT
    Edited by: Ramchander Krishnamraju on Jan 25, 2011 7:17 AM

  • Field is not populating in BDC from Table Control value????

    Hi Experts,
    After adding a new Quantity (MY_QUANTITY) field to the existing Table control, I populated the data from SAP into it.
    Now, the user will change (if he wants) its value, then he clicks the Push Button by expecting the posting of the Document i.e.in other words. the Control encounters the statement of MY_FORM_CREATE_ABAVN_VIA_BDC in my Prog.
    But, MY_QUANTITY (changed, even not changed too) value/s is not passing in to my BDC_DATA table/code?
    I am doing BDC for ABAVN transaction and wanting the Quantity filed of ''Partial Retirement'' tab to b populated in BDC. So, I am using as,
    SAPLAMDP--Screen 100--Field as ANLA-MENGE (its a Subscreen/Tabs of SAP Screen)
    So,
    1) Problem is with my BDC code?
    2) or, ''SAPLAMDP--Screen 100--Field as ANLA-MENGE'' is this wrong?
    3) or else any other?
    Message was edited by:
            Sridhar
    Message was edited by:
            Sridhar
    Message was edited by:
            Sridhar

    Hai sridhar,
    The problem is within the BDC  Code.
    Because For the effect of adding the field there is no correspong change in bdc is done.So record one more time use the latest one(After adding the field)
    Hope this helps you.
    Regds,
    Rama.Pammi

  • Populating item number in table control

    I have created a custom table control. It is very similar to the VA01 or Vl01N table controls to add items. When the user enters the material name, the item number column needs to be populated.
    Currently I have something like this
    LOOP at i_items.
    MODULE tblcntrl_modify INPUT.
    ENDLOOP
    MODULE tblcntrl_modify INPUT. "PAI
       posnr = sy-stepl * 10.
       more logic for input validation.
    ENDMODULE
    The issue I have is that when I scroll in the table control, the posnr for each item gets recalculated and they get whacked .. so I get a scenario like this
    10 mat1
    20 mat2
    30 mat3
    10 mat4
    40 mat5
    what is the best way to populate the item number. Thank you

    hi,
    u have to make one module in PAI brtn  <b>LOOP-ENDLOOP, CHAIN-ENDCHAIN</b>
    LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      IF itab_det-bill_no <> ' ' .
        CLEAR:net_pr,tax,bil_amt,bil_dt.
        SELECT SINGLE fkdat netwr mwsbk FROM vbrk INTO (bil_dt,net_pr,tax)
        WHERE vbeln = itab_det-bill_no .
        bil_amt = net_pr + tax.
        itab_det-bill_date = bil_dt.
        itab_det-bill_amt = bil_amt.
      ENDIF.
      MODIFY itab_det
        FROM itab_det
        INDEX tab1-current_line.
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>
    here i am fetching Bill Amount and Bill Date according to Entered Bill Number in Table control.
    So i am checking bill number here in If condition and when i press enter that two value automatically populated...
    reward if useful.....

  • Insert multiple Rows at a time in Table control.

    I am Doing Dialog Programming,
    In Table control I have to insert some values,  by clicking on INSERT Button, so now its allowing only single rows to edit..
    But as per my requirenments  "I want atleast 10 Rows should be editable,at a time when user clicks on INSERT."
    Plz have eye on it.
    your suggestions are always welcome.
    Regards
    Vivek

    hi vivek,
    please decleare a field symbol to your table control for example:
    FIELD-SYMBOLS: <tc> TYPE cxtab_control.
    ASSIGN tc TO <tc>.
    the field-symbol <tc> has now the field 'LINES'. here you can declare how many rows you wanna show.
    You should at the rows to your internal table too.
    you can see which fields you can adjust in the structure SCXTAB_CONTROL.
    you can set the field as input field with loop at screen.
    i hope it will help you.
    cheers
    jens

  • Multiple row selection in table control...

    hi...
    i can select one row from table control and display in a list..
    the same thing i want to do for multiple lines...
    thanks..

    use the table control wizard to create a table control on the screen...while going thru the steps, there will be a screen which asks you about the selection column (this is a single character field in your internal table). on this step there is a selection option for single/multiple selection of rows....
    to access the selected records, use...
    loop at itab where sel eq 'X'.
    endloop.
    where
    <b>itab</b> is the underlying internal table for table control and <b>sel</b> is the name of the selection column
    or if u already have a table control on screen...double click and open the properties window...there u can see radio buttons None, Single and Multiple for line selection. choose the multiple option.
    rgds,
    PJ
    Message was edited by: Priyank Jain

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

  • Get selected row in a table control

    What is the best approach to get a selected row, all fields, in a table control?  I see this done in various transactions in MM but do not see how to do this in documentation.
    Thanks

    in the screen flow logic you need something like this:
      LOOP AT t_partner.
           MODULE get_selected_line.
          MODULE process_partner.
      ENDLOOP.
    PAI module get_selected_line :
    MODULE get_selected_line INPUT.
    only get cursor position once....as it's constant within each loop
      IF sy-stepl EQ 1.
        CLEAR wv_cursor_0120.
        GET CURSOR LINE wv_cursor_0120.
        IF wv_cursor_0120 = 0.
          wv_cursor_0120 = 1.
        ENDIF.
    convert the relative line of the screen to the actual line number in the table
        wv_absolute_line = wv_cursor_0120 + tc_partner-top_line - 1.
      ENDIF.
    ENDMODULE.                 " GET_SELECTED_LINE  INPUT
    module process_partner needs to be something like this:
    MODULE process_partner INPUT.
    only process the selected line
    CHECK sy-stepl = wv_cursor_0120.
    CASE ok_code.
    endcase.
    endmodule.

  • Editing one row at a time in a table control

    Good day all
    I need your urgent assistance with the problem below:
    At first time load, the table control needs to allow input on the first line only, validation will then be done through clicking a “check” button.  After the check has been done, table control needs to open up the second row for input and grey out the first one. This sequence needs to follow every time a check has been performed.
    After the check has been done, table control needs to show the previously entered data on the first line but grey it out, and open up only the second row for input.
    The table control has been created using a wizard with an internal table and I am working on dialog/screen programming. The table control has been created as an output control but it needs to perform as both and output and input control.
    I have made changes to the “MODULE tc_create_ph2_get_lines OUTPUT.” Which is created by the wizard as follows:
    The module is in the PBO Section.
    IF it_tab is initial.                                                                 "it_tab being the internal table that stores the data from the table control                        
         DESCRIBE TABLE it_tab LINES lv_num.
               LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> 1.
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ELSE.
    tc_create_ph2-current_line = lv_num + 1.
         LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> lv_num + 1 .
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ENDIF.
      Your assistance will be highly appreciated.

    Hi Dineo,
    This module would make all line non editable except the last line, which will be open for input.
    LOOP AT IT_ST INTO WA_ST WITH CONTROL MATERIAL CURSOR
    MATERIAL-CURRENT_LINE.
        module mod_screen.
       ENDLOOP.
    module MOD_SCREEN output.
       data : tc_lines type n.
       describe table it_st LINES tc_lines.
    *  loop at screen.
         if material-current_line le tc_lines.
          loop at screen.
           screen-input = 0.
           modify screen.
           endloop.
          endif.
    endmodule.
    When checking and saving data, after saving data delete all lines of tc internal table except the last added row, if you want only the last record to appear in the table.

  • Detecting rows marked at table control

    Hello Experts,
    I need to display a message error when trying to delete operations in IW32.
    For that purpose, I am validating the value of a field at user exit ZXBS1U01.
    The problem is that I cant't know the rows I've marked in table control for deleting.
    There is a table (LST), with the number of operations and a field FLG_MARK but this appears with an X (delete), after that user exit.
    There is another structure ( RC27X ) with the index for deleting, but the problem is that it is not available for the last row at the user exit.
    I tried to search for the table control, but I cant find it neither the rows I've marked at ZXBS1U01.
    Can any one help me please ?
    Thanks a lot,
    Lilian.
    CONSTANTS: 
               c_loea(4) VALUE 'LOEA',
               c_valor(22) VALUE '(SAPLCOIH)CAUFVD-AUFNR',
               c_valor4(25) VALUE '(SAPLCODT)LST[]',
               c_valor5(25) VALUE '(SAPLCOVG)RC27X'.
    FIELD-SYMBOLS:
                   <fs_valor> TYPE caufvd-aufnr,
                   <fs_valor4> TYPE STANDARD TABLE,
                   <fs_valor5> TYPE rc27x.
    DATA BEGIN OF t_lst OCCURS 0.
            INCLUDE STRUCTURE rclst.
    DATA END OF t_lst.
    IF sy-tcode = c_iw32 AND sy-ucomm = c_loea AND sy-dynnr = 3010.
      ASSIGN (c_valor4) TO <fs_valor4>.
      IF sy-subrc = 0.
        t_lst[] = <fs_valor4>[].
        ASSIGN (c_valor5) TO <fs_valor5>.
        IF sy-subrc = 0 AND <fs_valor5>-index_act IS NOT INITIAL.
          READ TABLE t_lst INDEX <fs_valor5>-index_act.
          IF sy-subrc = 0.
        validation    *****

    Did you tried Implicit enhancement? From ECC 6.0 version we have Implicit and Explicit, try to find any implicit enhancment after choosing delete operation and write the code in that.

  • Table Control Enable / Disable Row

    Hi,
    I have a table control with 6 columns also screen contains some header input fields.
    Out of 6 columns first two columns are disabled.
    Depending on value entered in certain field in the header I fill the table control. e.g. if the value in certain field is X, table control is filled with say 15 rows, if value is Y, table control is filled with say 5 rows.
    Now my requirement is only those rows which are filled should be disabled. i.e. If user chooses value Y then all rows after 5 should be input enabled.
    But since I have disabled the columns statically complete column remains disabled.
    Can anybody tell me How to enable a particular row in table control ?
    Thanks n Regards,
    Nitin
    Message was edited by: Nitin Pawar

    Say your Table control in TABCON.
    You screen structure is SC_ITAB.
    Your internal table is ITAB.
    In PBO of screen
       LOOP AT ITAB INTO SC_ITAB WITH CONTROL TABCON.
        module SUPPRESS_ROW.
      ENDLOOP.
    In ABAP Module
    MODULE SUPPRESS_ROW.
    IF SC_TAB IS INITIAL.
    LOOP AT SCREEN.
      SCREEN-INPUT = 0.
      MODIFY SCREEN.
      ENDLOOP.
    else.
      LOOP AT SCREEN.
       SCREEN-INPUT = 1.
       MODIFY SCREEN.
      ENDLOOP.
    endif.
    This will help you suppress at row level.
    You may change the if condition to suit your need .
    Cheers
    ENDMODULE.

  • Capture the rows selected in a multiselect table view (BSP)

    Hi,
    My requirement is:
    I have a table view in which I can select multiple rows.
    I will be selecting some rows, and pressing a button.
    Functionality of button is written in Javascript, to open a popup window.
    But how will I capture which all rows were selected ?
    Should I use a Java code or ABAP code ?
    And where should I put that code ?
    I tried calling the method cl_hrrcf_iterator=>get_tv_attr in the Javascript of the button. But it doesnt work. But if its in DO_HANDLE_DATA it works. Why is it like that ?
    Is it possible in BSP, to use the function htmlbevent.obj.getSelectedRows() ? If so, how should the code be ?
    Could you please tell me some of the possible solutions.
    Would definitely appreciate quick replies.
    Thanks,
    Nisha Vengal.

    Hi Nisha,
    You can have the ABAP code itself. I had also faced with then same issue. Use the below piece of code form your requirements.
    In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START*
    *  Data : M_ROW_REF type <Structure type>
    *m_row_ref ?= p_row_data_ref*
    In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START*
    * DATA : CHK TYPE FLAG
    *case p_column_key.*
       when ' <Column Name>'.*
         CHK = m_row_ref-><Column Name>.*
          p_replacement_bee = CL_HTMLB_CHECKBOX=>FACTORY(
                                id                = p_cell_id
                              checked         = CHK ).
    In *Do Request*
    Data : loc_table_event type ref to cl_htmlb_event_tableview
    call method cl_hrrcf_iterator=>get_tv_attr
        exporting
          p_tv_id               = '<Tabe View ID'
          p_component_id        = me->component_id
          po_request            = me->request
        importing
          po_tv_event           = loc_table_event.
    The above methods are used to get the values which are selected in the table view and operated further.
    Reward points if useful.
    Regards,
    Gokul.N

  • Best way to fill a table where some row will already exist

    I have a table of 100,000 Books
    I have a Set 'Books' of 1000 Book Objects. (many of which will already exist in the table)
    I want to add the books not already in the table, I can see a few ways to do this but not sure which is the most efficient.
    A)
    Get a ResultSet from the DB matching a 'SELECT' matching the Books in my Set.
    iterate through ResultSet, removing Books in the Set, leaving the Set containing only Books not in the Table.
    Add all books in Set to Table.
    B)
    Iterate through my Set of Books and add all of my books to the Table in turn
    any Books already in the Table already existing will throw an exception
    Ignore the exception
    C)
    Iterate through my Set of Books and check if each is in the Table
    If already in Table go on to next Book
    otherwise add to Table

    Try it both ways, and see which takes longer.
    Of course once you've done that, you don't need to know because the task is complete. But the information might be useful for the next time.

  • Capturing User Action and populating Standard table

    Hi Friends ,
    I have a requirement , its a classical report and in that based on the user action ( if the user checks a check box that is available in the output screen of the report and saves it) the value should be updated in a standard table as 'X'. I have appended the field in the standard table and now i need to write a logic at user command to populate the zfield that i have added in the table based on the user's input.
    I need to capture the user's action into an internal table and then pass this value into a function module to update the standard table, Can someone suggest me how to proceed further on this issue ? Kindly let me know if you have any sample piece of code related to this scenario...
    thanks in advance.

    DATA: date TYPE d,
          flag TYPE c LENGTH 1,
          wa   TYPE c LENGTH 10.
    START-OF-SELECTION.
      date = sy-datum.
      DO 10 TIMES.
        date = date + sy-index.
        WRITE: / flag AS CHECKBOX, (10) date.
      ENDDO.
    AT LINE-SELECTION.
      DO.
        READ LINE sy-index FIELD VALUE flag
                                       date INTO wa.
        IF sy-subrc <> 0.
          EXIT.
        ELSEIF flag = 'X'.
          WRITE / wa.
        ENDIF.
      ENDDO.

  • Capture field name in table control on double click

    Hi,
    How can I capture the field name of internal table passed to table control on double click?
    I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
    Thanks in advance.
    Regards
    Ramesh.

    Got it.
    We can capture it by using the statement GET CURSOR only.
    GET CURSOR field <field xx> .
    Here the <field xx> is the field name where we have said double click.

Maybe you are looking for

  • IPhone 4S Won't Charge After iOS7 Update

    After installing ios7 update my phone fails to charge properly. When on: plug in charger : 'this device may not be supported' --- my option? 'dismiss' on every plug in this message appears. When off: battery icon appears when charger is plugged in, a

  • JDK installation on Windows 8, 64 bit OS

    Hi, I am trying to install JDK 6/7 on my new 64 bit Windows 8 OS. However none of the installation completes. Moment I click on the installer pop up comes with following message : "Java SE development Kit 6 Update 45 (64-bit) Setup is preparing the i

  • Application Properties file

    Hi, I have a java DC which should be able to read some application properties like mdm.servername mdm.repositoryname mdm.username I have tried using the ApplicationConfigHandler class in which I created a EAR and Web Module DC and when I run this web

  • Computer not recognizing Shuffle

    Hi, I went to plug in my iPod shuffle to load songs and iTunes won't pop up, and it seems that the computer is just not recognizing it. I also tried it in my Windows computer, and I'm experiencing the same problem. I took it to the Apple store closes

  • Mass Closure of PO through an ABAP development

    Hi , I have a requirement of a mass closure of Purchase Orders supplied through an upload file , by marking the 'Delivery Complete Indicator ' for all line items in each PO . Is there any BAPI or Function Module for the same ? BAPI_PO_CHANGE does not