BDC : to select different rows in table control

Hi,
I have to fill many rows in table control and want to select different row one by one  in increasing order which rows are filled in BDC.
Can anybody suggest me with coding...
thanks
naresh

Hi ,
I am attaching sample code for BDC transaction code is : FV11 , This code is also contains poage down concepts . By using this page down concept you can add number of item fields
Program Name        : ZFV11_NEW
Program Description : To Upload Condition Records-FV11
Author              : Jagadish
Start Date          : 11/06/2007
REPORT zfv11
       NO STANDARD PAGE HEADING LINE-SIZE 255.
   DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
  If it is nessesary to change the data section use the rules:
  1.) Each definition of a field exists of two lines
  2.) The first line shows exactly the comment
      '* data element: ' followed with the data element
      which describes the field.
      If you don't have a data element use the
      comment without a data element name
  3.) The second line shows the fieldname of the
      structure, the fieldname must consist of
      a fieldname and optional the character '_' and
      three numbers and the field length in brackets
  4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE  ***
TABLES : t100.
DATA: BEGIN OF record OCCURS 0,
data element: KSCHA
        kschl(004),               "Condition Type
data element: SELKZ_LIST
      selkz(001),
data element: WERKS_D
        werks(004),               "Plant
data element: ELIFN
        lifnr(010),               "Vendor
data element: MATNR
        matnr(018),               "Material No.
data element: KBETR_KOND
        kbetr(016),               "Amount
data element: KODATAB
        datab(010),               "Condition Validity Date from
data element: KODATBI
        datbi(010),               "Condition Validity To
data element: MWSKZ
        mwsk1(002),
      END OF record.
DATA : BEGIN OF it_new OCCURS 0,                    " Internal Table for Header Data
       kschl(004),
       werks(004),
       lifnr(010),
       END OF it_new.
DATA : BEGIN OF it_item OCCURS 0,                  " Internal table for Item Data
      werks(004),
      lifnr(010),
      matnr(018),
      kbetr(016),
      datab(010),
      datbi(010),
      mwsk1(002),
      END OF it_item.
DATA : cnt(2) TYPE n,
       fld(25) TYPE c.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
DATA : n TYPE n.
DATA:
     BEGIN OF t_data OCCURS 0,
           data TYPE string,
     END   OF t_data.
DATA:BEGIN OF it_mess OCCURS 0,
  msgtyp(5),
   lms(200),
   msgv1(50),
    END OF it_mess.
DATA : p_mode    TYPE c.
DATA:it_msgtab TYPE STANDARD TABLE OF  bdcmsgcoll WITH HEADER LINE,
   it_msgtab1 TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
DATA :  l_mstring(150).
DATA : BEGIN OF bdcdata OCCURS 0.
        INCLUDE STRUCTURE bdcdata.
DATA: END OF bdcdata.
PARAMETERS : p_file1 LIKE rlgrap-filename.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
  PERFORM file_selection.
  PERFORM data_upload.
  PERFORM table_control.
  LOOP AT it_new.
    REFRESH bdcdata.
    PERFORM bdc_dynpro      USING 'SAPMV13A' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RV13A-KSCHL'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'RV13A-KSCHL'
                                  it_new-kschl.
    PERFORM bdc_dynpro      USING 'SAPLV14A' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RV130-SELKZ(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=WEIT'.
    PERFORM bdc_dynpro      USING 'SAPMV13A' '1363'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'KONP-KBETR(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'KOMG-WERKS'
                                  it_new-werks.
    PERFORM bdc_field       USING 'KOMG-LIFNR'
                                  it_new-lifnr.
DATA: "X(5) TYPE N,
         N(5) TYPE N.
   N = 0.
   LOOP AT it_item.
     N = N + 1.
   ENDLOOP.
   "X = 1.
   CNT = 1.
   DO N TIMES.
     IF CNT > 19.
       perform bdc_field       using 'BDC_OKCODE' 'KOMG-MATNR(01)'.
       perform bdc_field       using 'BDC_OKCODE' '=P+'.
       PERFORM bdc_dynpro      USING 'SAPMV13A' '1363'.
       CNT = 1.
     ENDIF.
    cnt = 1.
    LOOP AT it_item WHERE werks EQ it_new-werks AND lifnr EQ it_new-lifnr . "FROM x TO x.
      CONCATENATE 'KOMG-MATNR(' cnt ')' INTO fld.
      PERFORM bdc_field USING fld it_item-matnr.
      CONCATENATE 'KONP-KBETR(' cnt')' INTO fld.
      PERFORM bdc_field USING fld it_item-kbetr.
      CONCATENATE 'RV13A-DATAB(' cnt ')' INTO fld.
      PERFORM bdc_field USING fld it_item-datab.
      CONCATENATE 'RV13A-DATBI(' cnt ')' INTO fld.
      PERFORM bdc_field USING fld it_item-datbi.
      CONCATENATE 'KONP-MWSK1(' cnt ')' INTO fld.
      PERFORM bdc_field USING fld it_item-mwsk1.
      cnt = cnt + 1.
      if cnt = 20.
        perform bdc_field       using 'BDC_OKCODE' 'KOMG-MATNR(19)'.
        perform bdc_field       using 'BDC_OKCODE' '=P+'.
        PERFORM bdc_dynpro      USING 'SAPMV13A' '1363'.
        CNT = 1.
       endif.
CLEAR it_item.
    ENDLOOP.
   ENDDO.
    PERFORM bdc_dynpro      USING 'SAPMV13A' '1363'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'KONP-MWSK1(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=SICH'.
    CALL TRANSACTION 'FV11' USING bdcdata MODE 'A'
                                        UPDATE 'S'
                                       MESSAGES  INTO it_msgtab.
    CLEAR bdcdata[].
    PERFORM error.
  ENDLOOP.
       Start new screen   -Subroutine     for screen s                                      *
FORM bdc_dynpro USING program dynpro.
  CLEAR bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
ENDFORM.                    "BDC_DYNPRO
       Insert field        -Subroutine   for field s                                         *
FORM bdc_field USING fnam fval.
  CLEAR bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  APPEND bdcdata.
ENDFORM.                    "BDC_FIELD
*&      Form  file_selection
FORM file_selection .
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
      field_name    = 'P_FILE1'
    IMPORTING
      file_name     = p_file1.
ENDFORM.                    " file_selection
*&      Form  data_upload
FORM data_upload .
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
   EXPORTING
    I_FIELD_SEPERATOR        =
       i_line_header            =  'X'
       i_tab_raw_data           =  it_raw
       i_filename               =  p_file1
     TABLES
       i_tab_converted_data     = record
    EXCEPTIONS
       conversion_failed        = 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.
ENDFORM.                    " data_upload
*&      Form  error
FORM error .
  LOOP AT it_msgtab.
    IF it_msgtab-msgtyp = 'E'.
      SELECT SINGLE * FROM t100 WHERE sprsl = it_msgtab-msgspra
                                AND   arbgb = it_msgtab-msgid
                                AND   msgnr = it_msgtab-msgnr.
      IF sy-subrc = 0.
        l_mstring = t100-text.
        IF l_mstring CS '&1'.
          REPLACE '&1' WITH it_msgtab-msgv1 INTO l_mstring.
          REPLACE '&2' WITH it_msgtab-msgv2 INTO l_mstring.
          REPLACE '&3' WITH it_msgtab-msgv3 INTO l_mstring.
          REPLACE '&4' WITH it_msgtab-msgv4 INTO l_mstring.
        ELSE.
          REPLACE '&' WITH it_msgtab-msgv1 INTO l_mstring.
          REPLACE '&' WITH it_msgtab-msgv2 INTO l_mstring.
          REPLACE '&' WITH it_msgtab-msgv3 INTO l_mstring.
          REPLACE '&' WITH it_msgtab-msgv4 INTO l_mstring.
        ENDIF.
        CONDENSE l_mstring.
        it_mess-msgtyp = it_msgtab-msgtyp.
        it_mess-lms = l_mstring.
        it_mess-msgv1 = it_msgtab-msgv1.
        APPEND it_mess.
       WRITE: / it_msgtab-msgtyp, l_mstring(150).
      ELSE.
       WRITE: / it_msgtab.
        it_mess-msgtyp = it_msgtab-msgtyp.
        it_mess-lms = l_mstring.
        it_mess-msgv1 = it_msgtab-msgv1.
        APPEND it_mess.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " error
*&      Form  table_Control
FORM table_control .
SORT record BY lifnr matnr.
  LOOP AT record.
    ON CHANGE OF record-lifnr.
      MOVE-CORRESPONDING record TO it_new.
      APPEND it_new.
    ENDON.
    MOVE-CORRESPONDING record TO it_item.
    APPEND it_item.
  ENDLOOP.
ENDFORM.                    " table_Control
Reward if useful
Thanks
Jagadeesh.G

Similar Messages

  • How to select perticular row in table control for BDC

    Hi all
    I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is  material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
    Please Suggest me. it urgent.
    Thanks& Regards,
    RP

    Hi all
    I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is  material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
    Please Suggest me. it urgent.
    Thanks& Regards,
    RP

  • How can we select multiple rows in table control for module pool program?

    hi guru's
                 i cannt able to select multiple table control rows for deletion of records please give any code to select rows?
    regrards,
    satheesh.

    On the Table Control attributes there is a "Selectability" option where you choose one of: None, Single, or Multiple.  In your code you then need to pick up which rows have the selection column set to 'X'.

  • How to get all the index of "selected rows" in table control?

    Hi Gurus,
    I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
    I know that the event for capturing selected row is in PAI.
    I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
    TOP INCLUDE
    YPES: BEGIN OF Y_ZQID_CHECK,
            IDNUM           TYPE ZQID_CHECK-IDNUM,
            WERKS           TYPE ZQID_CHECK-WERKS,
            MATNR           TYPE ZQID_CHECK-MATNR,
            LICHA           TYPE ZQID_CHECK-LICHA,
            LIFNR           TYPE ZQID_CHECK-LIFNR,
            ECOA_S          TYPE ZQID_CHECK-ECOA_S,
            ID_STAT         TYPE ZQID_CHECK-ID_STAT,
            ID_DATE         TYPE ZQID_CHECK-ID_DATE,
            FLAG_MAILCOA(1) TYPE C,
            MARK(1)         TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
           END   OF Y_ZQID_CHECK.
    DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
    PAI
    PROCESS AFTER INPUT.
    * MODULE USER_COMMAND_9004.
    LOOP AT T_ZQIDCHECK_DISCH.
      MODULE READ_TC_DISCH .
    ENDLOOP.
    module READ_TC_DISCH input.
      DATA: W_LINE_SEL TYPE SY-STEPL,
                  W_TABIX    LIKE SY-TABIX.
      GET CURSOR LINE W_LINE_SEL.
      W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
      MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
    If I am selecting single row, I can properly get the selected index via debug.
    BUG:
    When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
    Please see the screenshot.
    [url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
    Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
    Helpful inputs will be appreciated.
    Thanks.
    Jaime
    Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PM

    Hi,
    Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
    Flowlogic.
    LOOP WITH CONTROL TC_01.
         Module Get_Marked.
    ENDLOOP.
    Module Pool
    Module Get_Marked.
    read the data from the internal table where mark  = 'X'.
    this should give you only selected records.
    Endmodule.
    Kindly check the tablecontrol property.
    Regards,
    Ranjith Nambiar

  • How to select all the rows of table control in BDC

    Hi All,
    While I am doing BDC for Transaction Code MC88, After the first screen I will get another screen with tabble control, Here I need to select all the rows of table control, I am assignng the 'X' to the first field of Table Control which is the indicator for selection.
    Here I am getting message called Indicator field is not in program and screen.
    While doing Recording I am not able to record the indicator, Please any one let me know how to record the Entire table control selection.
    Thanks in advance..

    Sorry about that lakshmi. Here is my code.
        PERFORM dynpro USING : 'X'   'SAPMMCP6'          '0105',
                               ' '   'RMCP2-MATNR'       t_matnr,
                               ' '   'RMCP2-WERKS'       t_werks,
                               ' '   'BDC_OKCODE'        '=AKTV'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=MRKE'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=GRAO

  • Selecting rows in table control

    Hi experts,
    I have question regarding selecting rows in table control. How can I select a row when a button is pressed. I cannot use the selection column in this case. Is there any option to achieve my requirement without using the selection column. Thanks.
    regards,
    sriram.

    By,
    Using the Get cursor syntax you can achive the Selected row in Table control.
      DATA : selrow TYPE i,
             selindex TYPE i  .
    * getting the cursor line in Table Control for selected row
      GET CURSOR FIELD selfield LINE selrow.
      selindex = <tablecontrol>-top_line + selrow - 1.
    Prabhu

  • WSo2 BDC to delete line item in table control

    Hi all,
    My requirement is to delete material from wso2 table control.
    The only way to delete a line item in this table control is to select the line in table control and delete it.
    The recording doesnt captures any selection of row.
    Any input on how to caputre particular row ??
    Please dont send me links to work with table control in bdc
    Regards
    Bhanu

    DaveL  wrote:
      I am not aware of any way to make the BDC delete the row, other than by running in 'A'-all mode and letting the user step through each screen and delete the rows that should be deleted.
    Well , if the user has to run it in "A" all screen mode why a BDC is required
    DaveL  wrote:
    Deleting them from the table control would obviously have no effect upon the database table though, would it....it would just hide a row from view in this particular table control
    Really ? Well it will delete it from database too i dont know what makes you think that it wont be deleted from database.
    Anways i have figured out how to capture row selection in BDC .
    Thanks for your reply it proves nothing i guess

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

  • Copy selected values from a table control into another table control

    hi there,
    as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.
    i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)
    i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?

    you're funny
    i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.
    here's my code, maybe you can tell me exactly were i have to change it:
    tc1 = upper table control
    tc2 = lower table control
    SCREEN 0100:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE get_nfo. --> gets data from the dictionary table
      MODULE tc1_change_tc_attr.
      LOOP AT   it_roles_tc1
           INTO wa_roles_tc1
           WITH CONTROL tc1
           CURSOR tc1-current_line.
      ENDLOOP.
      MODULE tc2_change_tc_attr.
      LOOP AT   it_roles_tc2
           INTO wa_roles_tc2l
           WITH CONTROL tc2
           CURSOR tc2-current_line.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT it_roles_tc1.
        CHAIN.
          FIELD wa_roles_tc1-agr_name.
          FIELD wa_roles_tc1-text.
        ENDCHAIN.
        FIELD wa_roles_tc1-mark
          MODULE tc1_mark ON REQUEST.
      ENDLOOP.
      LOOP AT it_roles_tc2.
        CHAIN.
          FIELD wa_roles_tc2-agr_name.
          FIELD wa_roles_tc2-text.
        ENDCHAIN.
        FIELD wa_roles_tc2-mark
          MODULE tc2_mark ON REQUEST.
      ENDLOOP.
      MODULE ok_code.
      MODULE user_command_0100.
    INCLUDE PAI:
    MODULE tc1_mark INPUT.
      IF tc1-line_sel_mode = 2
      AND wa_roles_tc1-mark = 'X'.
        LOOP AT it_roles_tc1 INTO g_tc1_wa2
          WHERE mark = 'X'.    -
    > big problem here is, that no entry has an 'X' there
          g_tc1_wa2-mark = ''.
          MODIFY it_roles_tc1
            FROM g_tc1_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc1
        FROM wa_roles_tc1
        INDEX tc1-current_line
        TRANSPORTING mark.
    ENDMODULE.                    "TC1_MARK INPUT
    MODULE tc2_mark INPUT.
      IF tc2-line_sel_mode = 2
      AND wa_roles_tc2-mark = 'X'.
        LOOP AT it_roles_tc2 INTO g_tc2_wa2
          WHERE mark = 'X'.             -
    > same here, it doesn't gets any data
          g_tc2_wa2-mark = ''.
          MODIFY it_roles_tc2
            FROM g_tc2_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc2
        FROM wa_roles_tc2
        INDEX tc2-current_line
        TRANSPORTING mark.
    ENDMODULE. 
    thx for anybody who can help with this!

  • Unable to delete a row in table control

    Hi,
    I'm unable to delete a row in table control.
    I have defined a selection column for my table control but it is not getting value 'X' when i'm selecting a row for deletion.
    Also, when I press enter, some of the columns in table control are getting initialized. I'm passing these values to the internal table along with other columns.
    Please help.
    Regards,
    Manasee
    Message was edited by: Manasee Chandorkar

    hi,
    kindly chk this.
    PROCESS BEFORE OUTPUT.
    MODULE status_9010.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_to_table.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL tab_control.
    MODULE move_data_from_table.
    ENDLOOP.
    *& Module move_data_to_table OUTPUT
    This is to move the data from the internal table to the table control
    MODULE move_data_to_table OUTPUT.
    This is to move the data from the internal table to the table control
    zmpets_mode-modecode,zmpets_range-rangeid,zmpets_servfacto-factor are column name of table control
    READ TABLE int_factor INDEX tab_control-current_line.
    IF sy-subrc = 0.
    zmpets_mode-modecode = int_factor-modecode.
    zmpets_range-rangeid = int_factor-rangeid.
    zmpets_servfacto-factor = int_factor-factor.
    ENDIF.
    ENDMODULE. " move_data_to_table OUTPUT
    *& Module move_data_from_table INPUT
    Date is moved from the table control to the Internal Table
    MODULE move_data_from_table INPUT.
    To move the data from the table control to internal table 'INT_FACTOR'.
    int_factor-modecode = zmpets_mode-modecode.
    int_factor-rangeid = zmpets_range-rangeid.
    int_factor-factor = zmpets_servfacto-factor.
    int_factor-chk = line.
    *here if the data is there, it will modify
    MODIFY int_factor INDEX tab_control-current_line.
    IF sy-subrc NE 0. "data not exixting in table control . ie new data, then append it
    APPEND int_factor.
    CLEAR int_factor.
    ENDIF.
    ENDMODULE. " move_data_from_table INPUT
    *delete a line from table control
    MODULE user_command_9010 INPUT.
      CASE sy-ucomm.
    When an entry is deleted, and the entry is removed from the table
    control.
        WHEN 'DELETE'.
          PERFORM f_del_frm_tab_cntrl.
      ENDCASE.
    ENDMODULE.
    FORM f_del_frm_tab_cntrl .
      LOOP AT int_factor WHERE chk = 'X'.
        DELETE int_factor WHERE chk = 'X' .
        CONTINUE.
      ENDLOOP.
      CLEAR int_factor.
    ENDFORM.
    for any clarifiaction pls mail me.
    pls reward points, if this helped u.
    regards,
    anversha.
    [email protected]
    Message was edited by: Anversha s

  • How do I deselect a row in table control on scrren?

    Hello All:
         How do I write the code to deselect a row in table control on a screen? This is in dialog programming.
    Thanks.
    Mithun

    I thought that the descriptions given in the Help are clear.
    The ADDRESS function constructs a cell address string from separate row, column, and table identifiers.
    ADDRESS(row, column, [type], [style], [table])
    row: The row number of the address.
    column: The column number of the address.
    I dropped the comments about type, style and table as I don't use them here.
    =IF(ISBLANK(INDIRECT(ADDRESS(ROW(),1))),"",INDIRECT(ADDRESS(ROW(),2))*INDIRECT(A DDRESS(ROW(),3)))
    INDIRECT(ADDRESS(ROW(),1))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 1st one)
    INDIRECT(ADDRESS(ROW(),2))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 2nd one)
    INDIRECT(ADDRESS(ROW(),3))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 3rd one)
    In short, when the formula is applied in row 9 it behaves like:
    =IF(ISBLANK(A9),"",B9*C9)
    The long syntax is required to be able to enter it only once in the header cell as described in the Help and in the PDF User Guide in a chapter entitled "Applying a Formula Once to Cells in a Column or Row".
    As we want to use such a formula, it would be odd to destroy its ability using a different formula in a standard bottom row.
    More, in a footer row, we may use shorter formulas than in other rows.
    In a standard row 10 we would have to write =SUM(D2:D9)
    in a footer row we enter only =SUM(D) which add the contents of every standard cells of the column D.
    This feature is also described in the named resources.
    Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:21:13)

  • Add row based on previous row in table control?

    Dear all,
    I have a table control with some rows. Every row contains one button. On button click i want to add another row with dirrerent data. I want to add content based on button text or another columns (ex text views text,) based on this text view, I have to add row. One button can click any no of times. On every click i want to add row, but desired position and content should be based on button click.  Any help in doing this??
    Cheers,
    Venkys.

    Refer to these old threads referring this table and button problem.
    Adding rows to table
    How to create different rows in table or in ALV?
    and for the current scenario what you can do is ...
    in the eventhandler of the button click .
    find out the row number by using the code to read index.
    then based upon that add the element in the node at the desired position.
    finding the row number
      data indx type i.
          DATA lo_el TYPE REF TO if_wd_context_element.
          lo_el = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
    indx = lo_el->get_index( ).
    and the adding the element at the desired position say n
        DATA lo_nd_zdealer TYPE REF TO if_wd_context_node.
        lo_nd_zdealer = wd_context->get_child_node( name = 'DEALER' ).
    data ls_str type  wd_this->element_dealer.
       ls_str-id = '00023445'.
       ls_str-name = 'sarbjeet'.
       ls_str-location = 'hosiarpur'.
       ls_str-status = '0001'.
       lo_nd_zdealer->bind_structure( new_item = ls_str
       set_initial_elements = abap_false
       index = n
    thanks
    sarbjeet singh

  • Bdc for ip01, data upload in table control

    I was working on a bdc for ip01 . there is a table control - whose 5 rows are visible and I need to fill data upto 6 row . 6th row get filled by scrolling . will scrolling get captured in recording . whether this is possible or not sir . If yes then how?
    Sir please help me.
    With regards,

    Hi
    Scrolling does not get recorded while recording. You can achieve it by having ok_code to p+ or p++.
    Refer the following link for detailed description.
    http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ#BatchInputFAQ-Howtoscrollatablecontrol%3F
    Hope this helps you.
    Regards
    Vinodh

  • Copy selected lines in the table control

    Hi friends,
    I Have a screen 200 in which i have a button COPY and table control.
    In my table control i have 6 lines of data.
    now my requirement is when i select any lines  ie :  let us say i ahve selected 1 , 3 , 5 lines of my table control and when i click on the button COPY of that screen. i need those 3 selected lines 1 , 3 , 5 to be copied again in the table control
    example  :
    line 1         selected
    line2
    line3          selected
    line4
    line5          selected .
    line6
    now my table control should be
    line1
    line2
    line3
    line4
    line5
    line6
    line1
    line3
    line5
    How can i do that
    Regards
    Priyanka.

    I have similar issue...i need help how to accomplish automatic addition on every line.  example (see below)
    this is how it looks right now
    DATE    EMPLOYEE       DEPT JOB     LOT     OPER#     LX_HRS     OP_SETUP     LX_TYPE     COMPLETE
    2/23/2009     M.Paquiao   NB         1960     001     10             1.50                14.00                     S                      NO
    2/24/2009                                                      1.00             14.00                  S                        NO
    2/25/2009                                                      4.50                14.00                  S                    NO
    2/27/2009                                                      3.00             14.00                  S                        NO
    2/28/2009                                                      1.50             14.00                  R                       YES
    3/1/2009                                                      2.00             14.00                  R                  YES
    this what I need it to do when I meant automatic addition of each line:
    DATE   EMPLOYEE     DEPT     JOB     LOT     OPER#     LX_HRS     OP_SETUP     LX_TYPE     COMPLETE
    2/23/2009     M.Paquiao      NB        1960     001     10             1.50        14.00               S         NO
    2/24/2009                                                      2.50             14.00                  S             NO
    2/25/2009                                                      7.00        14.00                  S             NO
    2/27/2009                                                      10.00     14.00               S             NO
    2/28/2009                                                      11.50     14.00               R             YES
    3/1/2009                                                      13.50     14.00               R             YES
    As you can see everything is the same but on column LX_HRS, the first example one is not doing anything addition but on the second example is now doing addition.  This additions were done manually, how can I tell crystal to add each line, in the example above, the
    first example                                              second example: (addition is involved)
    date                lx_hrs                                  date                  lx_hrs
    2/23/09           1.50                                     2/23/09              1.50
    2/24/09           1.00                                     2/24/09              2.50 (sum of : 1.50 + 1.00 was added)
    2/25/09           4.50                                     2/25/09              7.00 (sum of 2.50 (on date 2/24/09 &  4.50 from date 2/25/09 of the first example).

  • Adding one additional row to table control of VA01

    HI all,
    I am working on free goods N:N senario which is not supported by sap standard.
    so we have decided to club all the material on the basis of material group and PSTYV = 'tann' in the table control of va01 and at the end of tann we have to display the free goods .The user exit is USEREXIT_MOVE_FIELD_TO_KOMP.
    Please help in in adding the additional row in table control of va01 (TCTRL_U_ERF_AUFTRAG).
    Even i have gone through all the thread in sdn and tried all the solution but none of the solution is working .
    plz quote solutions....
    thanks..
    Kundal.

    The user exit is USEREXIT_MOVE_FIELD_TO_KOMP
    Are you adding condition records, or adding free materials to VBAP?  If free materials to VBAP, you're in the wrong exit, I think....look for routines that allow you to add to internal table XVBAP in includes named like MV45AFZ*, and remember to set you UPDKZ to 'I'-insert if you're adding new rows.
    Not sure what you mean by not supported by SAP standard;  SAP does support free goods, via config!
    Edited by: BreakPoint on Mar 14, 2011 4:11 PM

Maybe you are looking for

  • Dynamic Column name in a Cursor

    Hello there, How can I access data in cursor's field with dynamic fields names, more illustration follows: My table has columns named as C1,C2,C3 so on defined a cursor cursor_name on that table, I need to access the fields by a loop like this: OPEN

  • How to do Single Column Visble and Invisible

    Hi All, I tried following code for doing Column visible and invisible. But in this when i click single columne all values invisible. I want when i again click on that Column i want to bind previuse value. Means i have taken one Matrix and in that Mat

  • Is CS4 64-bit?

    Adobe has been quiet about 64-bit support for CS4 which I thought was odd as it seems to me to be a major selling point. I assumed this was because MAC was being left as 32-bit only. However, when looking at the system requirements for Master Collect

  • Connectivity of Nokia 6288

    I am having problems connecting my mobile Nokia 6288 to my laptop even having downloaded the required drivers, please advise

  • Trouble Deactivating Photoshop Elements

    I am online but cannot de activate photoshop elements to install a new hard drive! Help!