How to modify changes of table control data in PAI

I have a table control where the columns are brought by dict fields.I am able to bring data into table control through an itab.
Now what i want is whenever user edits data in table control and clicks on save button the corresponding changes should be made in database.
For this according to my understanding we need to (in PAI) modify the changes in itab from the table control and then in SY-UCOMM of SAVE button we need to update in database table using itab.
For this , I am not able to write code for modifying the changes in itab from table control. Here is my code below.Please tell me how to do this.
PROCESS BEFORE OUTPUT.
MODULE FILL_DATA.
LOOP AT ITAB INTO ZEMPLOYEE_MASTER WITH CONTROL EMPTABLE CURSOR
EMPTABLE-CURRENT_LINE.
ENDLOOP.
MODULE STATUS_0001.
PROCESS AFTER INPUT.
LOOP AT ITAB.
   MODULE MODIFY_ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001.
REPORT  ZDATA_FORM1.
TABLES: ZEMPLOYEE_MASTER.
CONTROLS EMPTABLE TYPE TABLEVIEW USING SCREEN 0001.
data: begin of itab occurs 0,
       emp_no like zemployee_master-emp_no,
       name like zemployee_master-name,
       city like zemployee_master-city,
      end of itab,
      rowno TYPE I VALUE 1.
*&      Module  STATUS_0001  OUTPUT
*       text
MODULE STATUS_0001 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_0001  OUTPUT
*&      Module  USER_COMMAND_0001  INPUT
*       text
MODULE USER_COMMAND_0001 INPUT.
  MESSAGE 'Inside INPUT' TYPE 'I'.
CASE SY-UCOMM.
   WHEN 'SAVE'.
     UPDATE zemployee_master.
   WHEN 'EXIT'.
     LEAVE PROGRAM.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0001  INPUT
*&      Module  fill_data  OUTPUT
*       text
MODULE fill_data OUTPUT.
  select emp_no name city from zemployee_master into TABLE itab ORDER BY emp_no.
  Describe table itab lines EMPTABLE-LINES.
ENDMODULE.                 " fill_data  OUTPUT
*&      Module  modify_itab  INPUT
*       text
MODULE modify_itab INPUT.
* MODIFY itab from zemployee_master index
* MESSAGE 'Inside modify_itab' TYPE 'I'.
ENDMODULE.                 " modify_itab  INPUT

Hi
In the following module of your code
MODULE modify_itab INPUT.
MODIFY itab from zemployee_master index tc-current_line " Where TC is the name of the Table control on the Screen
ENDMODULE.
Table control data gets refreshed on *enter*
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2165e990-0201-0010-5cbb-b5c2ad436140
Cheerz
Ramchander Rao.K

Similar Messages

  • How to fetch the Table Control data to Customer Table(Z-Table) ?

    How to fetch the Table Control data to Customer Table(Z-Table) ?

    Hi Krishna,
    Check this sample programs
    http://www.planetsap.com/online_pgm_main_page.htm
    http://sap.niraj.tripod.com/id29.html
    http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
    Have a look at below links. It will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
    Thanks,
    Reward If helpful.

  • How is table control data handled in Session Method?

    Hi Friends,
    Can any1 plz tell me how is table control data handled in Session Method.
    In Call tran we do it by count. But how in Session Method?
    Thank you.
    Regards,
    Varun.

    Hi,
    u can do it by both methods. u can check out this program. 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.
    report zcustomer_change_bict
           no standard page heading line-size 255.
    include bdcrecx1.
    data: begin of it_record occurs 0,
            kunnr like rf02d-kunnr,
            d0360 like rf02d-d0360,
            anred(30) type c,
            name1(35) type c,
            namev(35) type c,
            telf1(35) type c,
            abtnr(10) type c,
          end of it_record.
    data: begin of it_knvk1 occurs 0,
          anred like knvk-anred,
          end of it_knvk1.
    data: begin of it_knvk2 occurs 0,
          name1 like knvk-name1,
          end of it_knvk2.
    data: begin of it_knvk3 occurs 0,
          namev like knvk-namev,
          end of it_knvk3.
    data: begin of it_knvk4 occurs 0,
          telf1 like knvk-telf1,
          end of it_knvk4.
    data: begin of it_knvk5 occurs 0,
          abtnr like knvk-abtnr,
          end of it_knvk5.
    data : fld(20) type c,
           cnt(2) type n.
    start-of-selection.
      call function 'GUI_UPLOAD'
        exporting
          filename                      = 'C:\CUSTCH.TXT'
         filetype                      = 'ASC'
        has_field_separator            = 'X'
        tables
          data_tab                      = it_record
    exceptions
       file_open_error               = 1
       file_read_error               = 2
       no_batch                      = 3
       gui_refuse_filetransfer       = 4
       invalid_type                  = 5
       no_authority                  = 6
       unknown_error                 = 7
       bad_data_format               = 8
       header_not_allowed            = 9
       separator_not_allowed         = 10
       header_too_long               = 11
       unknown_dp_error              = 12
       access_denied                 = 13
       dp_out_of_memory              = 14
       disk_full                     = 15
       dp_timeout                    = 16
       others                        = 17
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      perform open_group.
      loop at it_record.
        refresh bdcdata.
        refresh: it_knvk1,it_knvk2,it_knvk3,it_knvk4,it_knvk5.
        split it_record-anred at ',' into table it_knvk1.
        split it_record-name1 at ',' into table it_knvk2.
        split it_record-namev at ',' into table it_knvk3.
        split it_record-telf1 at ',' into table it_knvk4.
        split it_record-abtnr at ',' into table it_knvk5.
    screen 101
        perform bdc_dynpro      using 'SAPMF02D' '0101'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-D0360'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
        perform bdc_field       using 'RF02D-KUNNR'
                                      it_record-kunnr.
        perform bdc_field       using 'RF02D-D0360'
                                      it_record-d0360.
    screen 360
        perform bdc_dynpro      using 'SAPMF02D' '0360'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVK-ABTNR(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=ENTR'.
    *perform bdc_field       using 'KNVK-ANRED(01)'
                                 record-ANRED_01_003.
    *perform bdc_field       using 'KNVK-NAMEV(01)'
                                 record-NAMEV_01_004.
    *perform bdc_field       using 'KNVK-NAME1(01)'
                                 record-NAME1_01_005.
    *perform bdc_field       using 'KNVK-TELF1(01)'
                                 record-TELF1_01_006.
    *perform bdc_field       using 'KNVK-ABTNR(01)'
                                 record-ABTNR_01_007.
        move 1 to cnt.
        loop at it_knvk1 .
          concatenate 'knvk-anred( ' cnt ' ) ' into fld.
          perform bdc_field using fld it_knvk1-anred.
          cnt = cnt + 1.
        endloop.
        move 1 to cnt.
        loop at it_knvk2 .
          concatenate 'knvk-name1( ' cnt ' ) ' into fld.
          perform bdc_field using fld it_knvk2-name1.
          cnt = cnt + 1.
        endloop.
        move 1 to cnt.
        loop at it_knvk3 .
          concatenate 'knvk-namev( ' cnt ' ) ' into fld.
          perform bdc_field using fld it_knvk3-namev.
          cnt = cnt + 1.
        endloop.
        move 1 to cnt.
        loop at it_knvk4 .
          concatenate 'knvk-telf1( ' cnt ' ) ' into fld.
          perform bdc_field using fld it_knvk4-telf1.
          cnt = cnt + 1.
        endloop.
        move 1 to cnt.
        loop at it_knvk5 .
          concatenate 'knvk-abtnr( ' cnt ' ) ' into fld.
          perform bdc_field using fld it_knvk5-abtnr.
          cnt = cnt + 1.
        endloop.
    screen 360
        perform bdc_dynpro      using 'SAPMF02D' '0360'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=ENTR'.
        perform bdc_transaction using 'XD02'.
      endloop.
      perform close_group.

  • How can i extend the table control while transfering the data

    hi
    how can i extend the table control while transfering the data.

    Hi,
    For table control we have to handle the page down (P+, or what ever function codes are assigned to that activity) activity with our coding.
    Just check out this code:
    This is the bdc to update the XK01 transaction code (Vendor Creation).
    Here we will use table controls for bankings. Here Iam sending the coding and text files.
    Coding
    REPORT zprataptable2
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
    i1 TYPE i,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
    j1 TYPE i,
    banks LIKE lfbk-banks,
    bankl LIKE lfbk-bankl,
    bankn LIKE lfbk-bankn,
    END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\first1.txt'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\second.txt'
    filetype = 'DAT'
    TABLES
    data_tab = jtab.
    LOOP AT itab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-KTOKK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RF02K-LIFNR'
    itab-lifnr.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    itab-bukrs.
    PERFORM bdc_field USING 'RF02K-EKORG'
    itab-ekorg.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    itab-ktokk.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-LAND1'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFA1-ANRED'
    itab-anred.
    PERFORM bdc_field USING 'LFA1-NAME1'
    itab-name1.
    PERFORM bdc_field USING 'LFA1-SORTL'
    itab-sortl.
    PERFORM bdc_field USING 'LFA1-LAND1'
    itab-land1.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-KUNNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
    cnt = cnt + 1.
    CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-banks.
    CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankl.
    CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankn.
    IF cnt = 5.
    cnt = 0.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=P+'.  " Page down activity
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(02)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-FDGRV'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFB1-AKONT'
    itab-akont.
    PERFORM bdc_field USING 'LFB1-FDGRV'
    itab-fdgrv.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFM1-WAERS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFM1-WAERS'
    itab-waers.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-LIFNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
    ENDLOOP.
    PERFORM close_group.
    **Flat files for the above code***
    Intial screen data file.
    1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
    2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
    Table control Data:
    1 in sb 11000
    1 in sb 12000
    1 in sb 13000
    1 in sb 14000
    1 in sb 15000
    1 in sb 16000
    1 in sb 17000
    1 in sb 18000
    1 in sb 19000
    1 in sb 20000
    1 in sb 21000
    1 in sb 22000
    2 in sb 21000
    2 in sb 22000
    Regards,
    Kumar.

  • How to update record in Table control

    Dear Friends,
      I have table control that has space for 10 records but i need to update 15 record from the flat file which is getting into the table how can i do this.
    Regards,
    MAHENDRA.

    Hi,
    you record for an item and then click on page down and save it.use the loop on this bdc to populate the the bdc table no need to do manually.
    LOOP AT  l_i_dettab_item INTO l_wa_dettab_item..
          l_cursor = l_cursor + 1.
          IF l_cursor GT 1.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=P+'.
          ENDIF.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001- GTIN_VARIANT_TYP'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001-VTWEG'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
          PERFORM bdc_field       USING l_cursor_notation
                                        l_wa_dettab_item-vtweg.
          PERFORM cursor_pos_notation    USING 'V_EAN_DET001-DATEFROM'
                                                  l_cursor
                                        CHANGING  l_cursor_notation.
             PERFORM bdc_field       USING l_cursor_notation
                                        l_v_date.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        l_cursor_notation.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=SAVE'.
        ENDLOOP.
    Here my ok code for page down is =P+  so i am looping on the table control data and then populating the bdc table after this i will populate the remaing info required for the call transaction and refresh bdcdata.
    thats it no need to do recording 1000 times.
    now if u do like this it doesn't depend on the number of records on table control.
    it will take all the records.
    Reward if useful.
    Regards,
    sasi
    Regards,
    sasi

  • How to disable fields in Table control???

    Hi
    How to disable fields in Table control??? I want to disable particular row in table control when enter datas are correct.lets take as example ME41 or ME51 table control.
    Can anyone tell how to do disable in this table control
    Points will be rewarded if its helpful.
    Thanks
    senthil

    If you want to disable the row then you can use
    in pbo module create a module in side loop,
    loop at itab with control tc.
    module change_screen.
    endloop.
    in module,,,,,
    loop at screen.
    if condition.
    screen-input = 0.
    modify screen.
    endif.
    endloop.
    Regards
    Vijay

  • How to bring cursor in Table control??

    Hi to all
    How to bring cursor in Table control when entering into screen
    can anyone tell me??? pls explain with example..
    thanks
    senthil

    Hi,
    Check the below code
    data l_tc_name             like feld-name.
    data l_tc_field_name       like feld-name.
    get actual tc and column                            
      get cursor field l_tc_field_name
                 area  l_tc_name.
    Regards,
    Vind

  • Hi All, How we can handle a table control in bdc - in detail its urgent pls

    Hi All, How we can handle a table control in bdc - in detail its urgent. Please send me the explanation in detail.
    Thanks&regards.
    Bharat

    hi,
    Create Table Control
    • Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    • Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.
    Press Save
    • Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
    table of ZTC_EKKO initial size 0,
    wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
    Press Save and Activate
    • Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    • Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    • Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    • Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module data_retrieval.
    loop at it_ekko into wa_ekko with control TC100.
    module populate_screen.
    endloop.
    PROCESS AFTER INPUT.
    loop at it_ekko.
    endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    check this one
    REPORT ZCALL_TRANS_TAB1 .
    TABLES: LFA1,LFBK,lfb1.
    data: BEGIN OF it_vendor occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    bukrs like lfb1-bukrs,
    END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    BANKS LIKE LFBK-BANKS,
    BANKL LIKE LFBK-BANKL,
    BANKN LIKE LFBK-BANKN,
    koinh like lfbk-koinh,
    END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *& Form f4_help
    form f4_help using p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
    file_name = l_file.
    p_file = l_file.
    endform. " f4_help
    *& Form POPULATE_DATA
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro using 'SAPMF02K' '0106'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-D0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    it_vendor-lifnr.
    perform bdc_field using 'RF02K-BUKRS'
    it_vendor-bukrs.
    perform bdc_field using 'RF02K-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-bankn(03)'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    *********bank details
    CLEAR l_COUNTER.
    LOOP AT IT_BANK WHERE LIFNR = IT_VENDOR-LIFNR.
    l_COUNTER = l_COUNTER + 1.
    clear l_string.
    CONCATENATE 'lfbk-banks(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-banks.
    clear l_string.
    CONCATENATE 'lfbk-bankl(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankl.
    clear l_string.
    CONCATENATE 'lfbk-bankn(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankn.
    endloop.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
    messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform. " POPULATE_DATA
    *& Form FORMAT_MESSAGES
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
    id = it_messages-msgid
    lang = sy-langu
    no = it_messages-msgnr
    v1 = it_messages-msgv1
    v2 = it_messages-msgv2
    v3 = it_messages-msgv3
    v4 = it_messages-msgv4
    importing
    msg = l_msg
    exceptions
    not_found = 1
    others = 2
    write:/ l_msg.
    endloop.
    endform. " FORMAT_MESSAGES
    *& Form bdc_dynpro
    form bdc_dynpro using value(p_program)
    value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_dynpro
    *& Form bdc_field
    form bdc_field using value(p_fnam)
    value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_field
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE1
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_BANK
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform. " upload_file
    *& Form f4_help1
    -->P_P_FILE1 text
    form f4_help1 using p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = l_file1.
    p_file1 = l_file1.
    endform. " f4_help1
    http://sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Sankar

  • Dynamic Changes in Table control

    Hi
    is that possible to change the table control dynamically

    Hi Rob
    my requirement is data upload from Excel to table control is over now
    some of my TL said that if i add more fields and records in that Excel than uplod the data to table control

  • Haw to capture changes in table control?

    Hi friends,
                    please tell me the answar of this question?
                     Haw to capture changes in table control?

    Hi Rinku ,
    module TC100_tab_modify input.
    MOVE-CORRESPONDING tc100_tab TO gt_tab.
    modify GT_tab
        index TC100_TAB-current_line.
    if sy-subrc <> 0.
    append gt_tab .
    endif.
    endmodule.
    Hope this helps.
    Regards
    Caglar

  • How to transport/move a table with data from development to Test to Production

    Hi,
    How to transport/move a table with data from development to Test to Production..? Export-Import a Delivery Unit does only the structure and not the data
    Reg
    Sri

    Hi Sri,
    You cannot transport Data via Transport route in HANA, you can only transport code changes/Structure via DU. For Data movement, you either have a do a export/import from a flat file or replication from a Source System to HANA.
    Thanks Much,
    Abhishek

  • Downloading table control data in excel sheet

    Hi experts,
    I have written a module pool pgm which fetches the data from a table and filled in a table control. Now my requirement is to download this (table control data) in an excel sheet like we download the ALV report data in an excel sheet.
    Can the same downloading option be provided in module pool pgm also?
    Pls tell me how it is possible to download the table control data in an excel sheet in module pool?
    Regards,
    Shanthi

    Hi Shanthi,
    As you can display data in Table Control means data is available in Internal Table
    Give Download Button
    case ok_code.
    when 'DOWN'.
          CALL FUNCTION 'F4_FILENAME'
            IMPORTING
              file_name = path1.
          CALL FUNCTION 'GUI_DOWNLOAD' " Go through FM Documentatin for more Info
            EXPORTING
              filename              = path1
              filetype              = 'ASC'
              write_field_separator = 'X'
            TABLES
              data_tab              = ist_final
              fieldnames            = ist_fc_download " You can provide the Column Heading
            EXCEPTIONS
              OTHERS                = 22.
    endcase.
    Cheerz
    Ram
    Edited by: Rob Burbank on Mar 20, 2010 5:04 PM

  • How to modify the standard table

    plzzzzz answer my qestion.
    how to modify the standard table?
    in my knowedge we have the accese key is it correct or worng

    Hi
    <b>The system asks for access key only of two reasons:</b>
    1) You may be having problem of access rights. You would have to contact basis peopl.
    2) You may try to name an object not complying with the rules. You may have to check with the same.
    the process of getting access key is
    <b>the steps to get access key</b>
    you can also try via transaction OSS1
    In your Inbox, click on 'Registration', then on 'Register Objects', then you will have to choose your installation and give details about your object.
    The details you can get by going to your object and clicking on 'Change' - the pop-up screen which asks you for the access key gives you all the details you need to fill in on OSS1 to get your key.
    <b>or</b>
    U can get Access key from www.service.sap.com
    After getting into the site,select quicklinks, then click s to goto SSCR, in
    that select registration,
    after giving the proper details, u can get the access key
    <b>or</b>
    on sap support portal (sapnet)
    --> key & request
    ---> register SSCR key
    ---> registration
    ---> register developper
    and then choose your rigth installation number
    you can get the access key in this way
    <b>reward if usefull</b>

  • How do I change a photo's date in iPhoto '11 9.2.3?!?

    How do I change a photo's date in iPhoto '11 9.2.3?!?  I've been able to do it before through the "info" link, but don't have that option in this latest version...?  It messes up my chronological event files when people have their camera date set wrong and I can't fix it!  Thanks for any ideas you can provide.
    Mindy

    you can make a smart album for the camera so you can easily select the photos that you need to correct time/date
    LN

  • ABAP HR How to create infotype with table control in it like Infotype 0008

    Hi Experts.
    I need help from u guys. My client requirement is to create custom infotype just like 0008 infotype which contain table control to save amount and wage types. I try to create infotype with table control using PM01, but that table control is in display mode only, i almost search every where to create custom infotype with table control but what ever threads in forum all are they unanswered and most of the threads for creating infotype. But i already done with infotype , but my main problem is table control.
    If any one have some suggestion for this please share with me.
    <removed by moderator> i am looking for positive reply.
    Edited by: Thomas Zloch on Aug 30, 2011 12:54 PM

    Hi
    I've created several infotypes with a Table Control and it is always the same story. You have to create a custom Z table to store the Table Control data (if you can have unlimited records), so in the PSXXXX structure you need to add a TABNR field to link the PAXXXX table and the Z one, just like the type table OM infotypes.
    Then in your code you have to control every possible operation, INS, MOD, DEL... and update the Z table accordingly (the standard code won't do that)
    If your TC fields appear in display mode, take a look at the Groups 1 and 3 in your fields, the must be set with the usual values for a PA infotype.
    If you have more questions, just ask,
    Regards

Maybe you are looking for

  • IMac G5 Stuck While updating to Security Update 2010-001 Client (Leopard)

    Pretty much explains everything in the title. There is a blue screen and my cursor is fading out slowly and then fading in again. If i power it off and on again it works but the update is not there. Should i just ignore it?

  • How do i download Photoshop CS6 Extended Student and Teacher Edition

    how do i download Photoshop CS6 Extended Student and Teacher Edition

  • Issue with Run time parameter values

    Hi All, Am facing an error while loading EBS 11.5.10 Financial data. Problem is, my parameters in the SQL Qualifier query (run time parameters in the SQL query) were not being replaced with appropriate values during run time. This is happening for th

  • Connect by to get parents and grandparents

    Help! I have this: NAME LEVEL Available System Menus 1 Authentication Setup 2 User Maintenance 3 Role Maintenance 3 App Maintenance 3 System Maintenance 3 User -> Role Maintenance 3 Role -> App Maintenance 3 App -> System Maintenance 3 9 rows selecte

  • More than one sales area at 1 catalog

    Hi SDN, We have ecommerce 7.0 for SAP R/3. We have 1 product catalog at the SAP-system. This product catalog contains articles out of 6 different sales areas. In my case 7000 / 90 / 90, 7000 / 90 / 91,  7000 / 90 / 92, 7000 / 90 / 93,  7000 / 90 / 94