How populate the data in table control in  BDC?

pls urgent?

hi,
see the below code .
FORM create_bdc_session .
  DATA : w_saved_tx.
  DATA g_r_itab TYPE typ_itab_rec.
  CLEAR g_t_itab.
  CLEAR g_r_itab.
  LOOP AT g_t_itab INTO g_r_itab.
skip error lines
    IF g_r_itab-ebeln = 'ERROR'.
      CONTINUE.
    ENDIF.
open Bdc session
    AT FIRST.
      PERFORM bdc_open_group.
    ENDAT.
    g_t_itab = g_r_itab.
On change in agreement number
    AT NEW ebeln.
      PERFORM bdc_header.
      CLEAR: w_dtl_cnt_i, w_line_i.
    ENDAT.
save at full page
    IF w_line_i > 11.
      PERFORM bdc_save.
      PERFORM bdc_header_change.
      w_line_i = 1.
    ENDIF.
detail material processing
    PERFORM bdc_detail.
    CLEAR w_saved_tx .
save at end of agreement
    AT END OF ebeln.
      IF w_saved_tx NE 'Y' AND w_dtl_cnt_i > 0.
        PERFORM bdc_save.
      ENDIF.
      w_saved_tx = 'Y'.
    ENDAT.
  ENDLOOP.
  PERFORM bdc_close_group.
ENDFORM.                    " CREATE_BDC_SESSION
*&      Form  BDC_OPEN_GROUP
      text
-->  p1        text
<--  p2        text
FORM bdc_open_group .
  DATA w_user_tx LIKE apqi-userid.
  w_user_tx = sy-uname.
  CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      client              = sy-mandt
      group               = p_bdc
      keep                = 'X'
      user                = w_user_tx
    EXCEPTIONS
      client_invalid      = 01
      destination_invalid = 02
      group_invalid       = 03
      holddate_invalid    = 04
      internal_error      = 05
      queue_error         = 06
      running             = 07
      user_invalid        = 08.
  CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
      WRITE: / 'BDC OPEN ERROR', sy-subrc.
  ENDCASE.
ENDFORM.                    " BDC_OPEN_GROUP
*&      Form  BDC_HEADER
      text
-->  p1        text
<--  p2        text
FORM bdc_header .
  REFRESH bdcdata.
  CLEAR   bdcdata.
determine now if text exists
  CLEAR w_text_lines_i.
Transaction ME31K.
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0200'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
  PERFORM bdc_field       USING 'EKKO-LIFNR' g_t_itab-lifnr.
  PERFORM bdc_field       USING 'RM06E-EVART' 'MK'.
  PERFORM bdc_field       USING 'RM06E-EVRTN' g_t_itab-ebeln.
  PERFORM bdc_field       USING 'EKKO-EKORG'  g_t_itab-ekorg.
  PERFORM bdc_field       USING 'EKKO-EKGRP'  g_t_itab-ekgrp.
Item category is on a detail line, but is entered on the entry screen
  IF g_t_itab-pstyp = '3'.
    g_t_itab-pstyp = 'L'.
  ELSE.
    CLEAR g_t_itab-pstyp.
  ENDIF.
  PERFORM bdc_field       USING 'RM06E-EPSTP' g_t_itab-pstyp.
  PERFORM bdc_field       USING 'RM06E-WERKS' p_nwerks.
  PERFORM bdc_field       USING 'RM06E-LGORT' g_t_itab-lgort.
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0201'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
  PERFORM bdc_field       USING 'EKKO-WAERS' g_t_itab-waers.
  WRITE sy-datum TO w_date_tx DD/MM/YYYY.
  PERFORM bdc_field       USING 'EKKO-KDATB' '01.06.2004'.
  PERFORM bdc_field       USING 'EKKO-KDATE' '31.12.2999'.
  w_tcode = 'ME31K'.
ENDFORM.                    " BDC_HEADER
*&      Form  BDC_SAVE
      text
-->  p1        text
<--  p2        text
FORM bdc_save .
final save
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0220'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '=BU'.
needed for some boxes (save anyway message)
PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
PERFORM bdc_field       USING 'BDC_OKCODE' '=YES'.
Insert the transaction into the BDC session.
  PERFORM bdc_insert USING w_tcode.
  REFRESH bdcdata.
  CLEAR   bdcdata.
ENDFORM.                    " BDC_SAVE
*&      Form  BDC_HEADER_change
      text
-->  p1        text
<--  p2        text
FORM bdc_header_change .
  DATA: w_pos LIKE rm06e-ebelp.
  REFRESH bdcdata.
  CLEAR   bdcdata.
determine now if text exists
  CLEAR w_text_lines_i.
Transaction ME32K.
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0205'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
  PERFORM bdc_field       USING 'RM06E-EVRTN' g_t_itab-ebeln.
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0220'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
  w_pos = g_t_itab-ebelp - 10.
  PERFORM bdc_field       USING 'RM06E-EBELP' w_pos.
  w_tcode = 'ME32K'.
ENDFORM.                    " BDC_HEADER_change
*&      Form  BDC_INSERT
      text
     -->P_W_TCODE  text
FORM bdc_insert  USING    p_w_tcode.
  CALL FUNCTION 'BDC_INSERT'
    EXPORTING
      tcode          = w_tcode
    TABLES
      dynprotab      = bdcdata
    EXCEPTIONS
      internal_error = 01
      not_open       = 02
      queue_error    = 03
      tcode_invalid  = 04.
  CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
      WRITE: / 'BDC INSERT ERROR', sy-subrc.
  ENDCASE.
ENDFORM.                    " BDC_INSERT
*&      Form  BDC_CLOSE_GROUP
      text
-->  p1        text
<--  p2        text
FORM bdc_close_group .
  CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      not_open    = 1
      queue_error = 2
      OTHERS      = 3.
  CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
      WRITE: / 'BDC CLOSE ERROR', sy-subrc.
  ENDCASE.
ENDFORM.                    " BDC_CLOSE_GROUP
*&      Form  bdc_dynpro
      text
     -->P_0658   text
     -->P_0659   text
FORM bdc_dynpro USING program dynpro.
  CLEAR bdcdata.
  bdcdata-program = program.
  bdcdata-dynpro  = dynpro.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
ENDFORM.                    "BDC_DYNPRO
*&      Form  BDC_FIELD
      text
     -->P_0688   text
     -->P_W_POS  text
FORM bdc_field USING field value.
  CLEAR bdcdata.
  bdcdata-fnam = field.
  bdcdata-fval = value.
  APPEND bdcdata.
ENDFORM.                    "BDC_FIELD
*&      Form  load_dataset
      text
-->  p1        text
<--  p2        text
FORM load_dataset .
load dataset
  LOOP AT g_t_itab INTO g_r_itab.
Load dataset with records needed for direct input
    MOVE-CORRESPONDING g_r_itab TO g_t_itab.
    AT NEW ebeln.
      PERFORM load_dataset_mbepoh USING w_phys_outfil1_tx.
    ENDAT.
    PERFORM load_dataset_mbepoi USING w_phys_outfil1_tx.
  ENDLOOP.
ENDFORM.                    " load_dataset
*&      Form  load_dataset_mbepoh
      text
     -->P_W_PHYS_OUTFIL1_TX  text
FORM load_dataset_mbepoh  USING   p_dataset.
  CLEAR rec1.
  MOVE-CORRESPONDING g_t_itab TO rec1.
  rec1-stype = '1'.
  rec1-ernam = sy-uname.
  TRANSFER  rec1 TO p_dataset.
ENDFORM.                    " load_dataset_mbepoh
*&      Form  load_dataset_mbepoi
      text
     -->P_W_PHYS_OUTFIL1_TX  text
FORM load_dataset_mbepoi  USING    p_dataset.
  CLEAR rec2.
fields for MBEPOH
  ADD 1 TO w_good_i.
  MOVE-CORRESPONDING g_t_itab TO rec2.
  rec2-stype = '2'.
  rec2-werks = p_nwerks.
  rec2-ematn = g_t_itab-matnr.
  TRANSFER  rec2 TO p_dataset.
ENDFORM.                    " load_dataset_mbepoi
*&      Form  BDC_DETAIL
      text
-->  p1        text
<--  p2        text
FORM bdc_detail .
  DATA:   w_ktmng_tx(11),
           w_peinh_tx(5) TYPE c,
           w_price_p(13) TYPE p DECIMALS 6,
           w_price2_p(13) TYPE p DECIMALS 2,
           w_price3_p(13) TYPE p DECIMALS 3,
           w_price0_p(13) TYPE p DECIMALS 0,
           w_cent_p TYPE p DECIMALS 2,
           w_peinh_n(5) TYPE n,
           w_price_tx(14).
accumulate lines to determine if page_down required
  ADD 1 TO w_addit_i.
  ADD 1 TO w_dtl_cnt_i.
  ADD 1 TO w_line_i.
  IF w_line_i > 12.
    w_line_i = 2.
    PERFORM bdc_dynpro      USING 'SAPMM06E' '0220'.
    PERFORM bdc_field       USING 'BDC_OKCODE' '=NP'.
  ENDIF.
get material unit of measure
  CLEAR mara-meins.
  SELECT SINGLE * FROM mara WHERE matnr = g_t_itab-matnr.
  w_price_tx = g_t_itab-netpr.
  w_peinh_tx = g_t_itab-peinh.
  IF g_t_itab-ktmng = 0.
    g_t_itab-ktmng = 1.
  ENDIF.
  w_ktmng_tx = g_t_itab-ktmng.
get decimal places of currency
  TCURX-CURRDEC = 2.
  SELECT SINGLE * FROM TCURX WHERE CURRKEY = g_t_itab-waers.
multiply Price
  W_PRICE_P = g_t_itab-netpr.
  CASE TCURX-CURRDEC.
    WHEN 0.
      W_PRICE_P = g_t_itab-netpr * 100.
      W_PRICE0_P = W_PRICE_P.
      W_PRICE_TX = W_PRICE0_P.
    WHEN 2.
      W_PRICE2_P = W_PRICE_P.
      W_PRICE_TX = W_PRICE2_P.
    WHEN 3.
      W_PRICE3_P = W_PRICE_P.
      W_PRICE_TX = W_PRICE3_P.
  ENDCASE.
material overview screen (with enter)
  PERFORM bdc_dynpro     USING 'SAPMM06E' '0220'.
  PERFORM bdc_field      USING 'BDC_OKCODE' '=DETA'.
  PERFORM bdc_field_idx  USING 'RM06E-TCSELFLAG'  'X' w_line_i.
  PERFORM bdc_field_idx  USING 'EKPO-EMATN' g_t_itab-matnr w_line_i.
  PERFORM bdc_field_idx  USING 'EKPO-KTMNG' w_ktmng_tx  w_line_i.
  PERFORM bdc_field_idx  USING 'EKPO-NETPR' w_price_tx w_line_i.
  PERFORM bdc_field_idx  USING 'EKPO-PEINH' w_peinh_tx w_line_i.
  PERFORM bdc_field_idx  USING 'EKPO-BPRME' mara-meins w_line_i.
  PERFORM bdc_field_idx USING 'EKPO-WERKS' p_nwerks w_line_i.
  PERFORM bdc_field_idx USING 'EKPO-LGORT' g_t_itab-lgort w_line_i.
IF g_t_itab-pstyp = '3'.
   g_t_itab-pstyp = 'L'.
ELSE.
   CLEAR g_t_itab-pstyp.
ENDIF.
PERFORM bdc_field_idx USING 'RM06E-EPSTP' g_t_itab-pstyp w_line_i.
item details screen
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0211'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '=OR'.
  PERFORM bdc_field       USING 'EKPO-SPINF' 'B'.
  PERFORM bdc_field       USING 'EKPO-BSTAE' '0001'.
  PERFORM bdc_field       USING 'EKPO-MWSKZ' g_t_itab-mwskz.
  PERFORM bdc_field       USING 'EKPO-IDNLF' g_t_itab-idnlf.
  PERFORM bdc_field       USING 'EKPO-REPOS' 'X'.
  PERFORM bdc_field       USING 'EKPO-EVERS' g_t_itab-evers.
  PERFORM bdc_field       USING 'EKPO-KZABS' 'X'.
  PERFORM bdc_field       USING 'EKPO-NETPR' w_price_tx.  "deliberate
  PERFORM bdc_field       USING 'EKPO-PEINH' w_peinh_tx . "Overwriting
Source list
  PERFORM bdc_dynpro      USING 'SAPLMEOR' '0220'.
  PERFORM bdc_field       USING 'BDC_OKCODE' 'EN'.
  PERFORM bdc_field       USING 'BDC_CURSOR' 'EORD-AUTET(01)'.
  PERFORM bdc_field       USING 'EORD-VDATU(01)' '01062004'.
  PERFORM bdc_field       USING 'EORD-BDATU(01)' '31122999'.
  PERFORM bdc_field       USING 'EORD-FEBEL(01)' ' '.
  PERFORM bdc_field       USING 'EORD-AUTET(01)' '1'.
GOTO Conditions
  PERFORM bdc_dynpro      USING 'SAPMM06E' '0211'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '=KO'.
  PERFORM bdc_dynpro      USING 'SAPMV13A' '0201'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '=BACK'.
ENDFORM.                    " BDC_DETAIL
*&      Form  BDC_FIELD_IDX
      text
     -->P_1390   text
     -->P_G_T_ITAB_PSTYP  text
     -->P_W_LINE_I  text
FORM bdc_field_idx USING    field LIKE bdcdata-fnam
                            value  p_index TYPE i.
  DATA: w_index_tx(2).
  UNPACK p_index TO w_index_tx.
  CLEAR bdcdata.
  CONCATENATE field '(' w_index_tx ')' INTO field.
  bdcdata-fnam = field.
  bdcdata-fval = value.
  APPEND bdcdata.
ENDFORM.                    " BDC_FIELD_IDX
regards,

Similar Messages

  • How to transfer data in table control in bdc

    hi
    how to transfer data in table control in bdc . I need the theory regarding this
    bye

    Hi,
    just check in the forum , there is many threads available to ur questions.
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    You can even refer to these related threads
    bdc table control
    Re: table control in bdc
    table control in BDC
    Reward if helpful.
    Thanks
    Naveen khan

  • How to clear data in Table Control.

    hi! all
    How to clear the data in table control.
    i have a Table control which displays column A data from the previous screen and allows to enter column B and column C and i have a button CLEAR, when i click CLEAR button the Data displaying in table control has to be cleared. how to do it.
    Regards,
    Nagulan

    Hi,
    Loop over the internal table of table control & clear data from table control.
    loop at tctab.
    clear tctab.
    modify tctab.
    endloop.
    Best regards,
    Prashant

  • How to delete data in table control

    Hi,
    I am doing module pool programming. After the user enters the data in table control after saving the data. if the user wants to  remove the line item the line item shd be removed from the screen and data base.
    Please Give me vaulable Suggestions
    Regards

    Hi,
    Screen 8002 (with table control) --> select records --> press delete button --> delete selected records
    Now you wan to delete those records selected by the user at runtime when DELETE button is clicked.
    Take another internal table and work area same as the initial internal table and work area used in screen 8002 which is to be used to delete the selected data.
    Take the names of the input/output fields as work_area-field_name and select column in table control as work_area-flag.
    Also take a flag field of size 1 datatype character as the last field in the internal table and work area while declaration.
    You must have passed a code in PBO of the screen for reading internal table into the table control.
    So it reads the internal table into the table control whenever you perform any action on use command.
    All you need to do is to write a code to modify the internal table form the table control while performing any user action.
    Remember to change the LINE SEL option in attributes of table control as MULTIPLE.
    At screen logic,
    PROCESS BEFORE OUTPUT.
      MODULE status_8002. "for pf-status
      LOOP WITH CONTROL po_tab. "po_tab is table control
        MODULE pass_data. "to pass data into table control from internal table
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8002. "for user command(back and exit)
      LOOP WITH CONTROL po_tab.
        MODULE modify_data. "to modify data from table control into table control
      ENDLOOP.
      MODULE delete. "to delete the selected records
    In PBO,
    *&      Module  STATUS_8002 OUTPUT
    MODULE status_8002 OUTPUT.
      SET pf-status 'ZAB_PFSTA'. " pf-status
      DATA : line_count TYPE i.
      DESCIRBE TABLE it_ekpo
      LINES line_count.
      po_tab-lines = line_count + 10.
      " to make table control scrollable
    ENDMODULE.                 " STATUS_8002  OUTPUT
    *&      Module  PASS_DATA  OUTPUT
    MODULE pass_data OUTPUT.
      READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    "it_ekpo is internal table and wa_ekpo is the work area
    In PAI,
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
      "modify records from table control into the internal table
    ENDMODULE.                 " MODIFY_DATA  INPUT
    *&      Module  DELETE  INPUT
    MODULE DELETE INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'DELETE'. "when delete button is clicked
          SORT IT_EKPO BY FLAG DESCENDING. "sort by flag(selection column value)
          CLEAR WA_EKPO1.
          CLEAR WA_EKPO.
          REFRESH IT_EKPO1.
          LOOP AT IT_EKPO INTO WA_EKPO WHERE FLAG = 'X'.
            DATA : J TYPE I.
            CLEAR J.
            J = SY-TABIX. "assign index value if a record is selected
            MOVE-CORRESPONDING WA_EKPO TO WA_EKPO1. "append selected records to another
            "work area and append to another internal table to delete
            APPEND WA_EKPO1 TO IT_EKPO1.
            DELETE IT_EKPO. "delete the selected records from initial internal table
            " to reflect the changes on the table control
          ENDLOOP.
          IF J = 0.
            MESSAGE I006. "if no record selected
          ELSE. "if some records are selected
            DELETE ZEKPO FROM TABLE IT_EKPO1. "delete from database table
            COMMIT WORK.
            IF SY-SUBRC = 0.
              MESSAGE S007. "success message (records deleted)
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " DELETE  INPUT
    Now at PAI, you have delete records and these changes are reflected back to the internal table.
    Now when PBO is executed it will again read the initial internal table and will not show the deleted records.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • How to insert data into table control

    hi experts,,
           i have inserted data into data base table through table control .
    now i want to insert data into table control through database table.
      how to delete data from table control for selected row

    Hi
    go through this link.
    http://www.****************/Tutorials/ABAP/TableControl/Demo.htm

  • 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

  • What is the use of table control in bdc is it same in module pool table con

    Hi,
    What is the use of table control in bdc is it same in module pool table control?
    regards
    eswar

    Hi,
    Table control means it contains as table and it will scroll in vertical and horizontal.
    In module pool by using screen we can create new table control.
    But  BDC table control means here we can populate the data into the table control.
    i.e.if you take VA01 for sales order creation in the belwo of VA01 screen there is table control for the filling of material details so here we will write the code to populate the data into the table control screen.
    Thanks and regards,
    shyla

  • Hi All,What is the concept of table control in bdc

    Hi All,What is the concept of table control in bdc .Can u please explain in brief.How we have to handle the logic for va01 transaction .
    Thanks&regards.
    Bharat

    Hi Kaushik Datta ,
                              I already know for me51 ,but i am getting the problem for va01 while populating the item details in to the table control. The code which i have generated is :
    please see the code and tell me where i should increment  the counter for populating the item details
    report ZBKVA01Y
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       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.
    DATA: BEGIN OF IT_DUMMY OCCURS 0,
          TEXT(1000),
          END OF IT_DUMMY.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of IT_HEADER OCCURS 0,
    data element: AUART
            AUART_001(004),
    data element: VKORG
            VKORG_002(004),
    data element: VTWEG
            VTWEG_003(002),
    data element: SPART
            SPART_004(002),
    data element: BSTKD
            BSTKD_005(035),
    data element: BSTDK
            BSTDK_006(010),
    data element: KUNAG
            KUNNR_007(010),
    data element: KUNWE
            KUNNR_008(010),
    data element: ABHOZ
            ABHOV_009(008),
    data element: ABHOZ
            ABHOB_010(008),
    data element: PRSDT
            PRSDT_011(010),
    END OF IT_HEADER.
    DATA: BEGIN OF IT_ITEM OCCURS 0,
    data element: MATNR
            MABNR_01_012(018),
    data element: KWMENG
            KWMENG_01_013(019),
          end of IT_ITEM.
    *DATA: DATE(10) TYPE C.
    *DATA: I_DATE TYPE SY-DATUM.
    *DATA: I_YEAR(4) TYPE C,
         I_MONTH(2) TYPE C,
         I_DAY(2) TYPE C .
    *DATA:
    End generated data section ***
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        DATA_TAB                      = IT_DUMMY
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    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_dataset using dataset.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-TEXT+0(1) = 'H'.
    IT_HEADER-AUART_001(004) = IT_DUMMY-TEXT+1(4).
    data element: VKORG
    IT_HEADER-VKORG_002(004) = IT_DUMMY-TEXT+5(4).
    data element: VTWEG
    IT_HEADER-VTWEG_003(002) = IT_DUMMY-TEXT+9(2).
    data element: SPART
    IT_HEADER-SPART_004(002) = IT_DUMMY-TEXT+11(2).
    data element: BSTKD
    IT_HEADER-BSTKD_005(035) = IT_DUMMY-TEXT+13(35).
    data element: BSTDK
    IT_HEADER-BSTDK_006(010) = IT_DUMMY-TEXT+48(8).
    data element: KUNAG
    IT_HEADER-KUNNR_007(010) = IT_DUMMY-TEXT+56(10).
    data element: KUNWE
    IT_HEADER-KUNNR_008(010) = IT_DUMMY-TEXT+66(10).
    data element: ABHOZ
    IT_HEADER-ABHOV_009(008) = IT_DUMMY-TEXT+76(6).
    data element: ABHOZ
    IT_HEADER-ABHOB_010(008) = IT_DUMMY-TEXT+82(6).
    data element: PRSDT
    IT_HEADER-PRSDT_011(010) = IT_DUMMY-TEXT+88(8).
    APPEND IT_HEADER.
    CLEAR  IT_HEADER.
    ELSEIF IT_DUMMY-TEXT+0(1) = 'I'.
    data element: MATNR
    IT_ITEM-MABNR_01_012(018) = IT_DUMMY-TEXT+1(18).
    data element: KWMENG
    IT_ITEM-KWMENG_01_013(019) = IT_DUMMY-TEXT+19(15).
    APPEND IT_ITEM.
    CLEAR  IT_ITEM.
    ENDIF.
    ENDLOOP.
    perform open_group.
    LOOP AT IT_HEADER.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-SPART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  IT_HEADER-AUART_001.
    perform bdc_field       using 'VBAK-VKORG'
                                  IT_HEADER-VKORG_002.
    perform bdc_field       using 'VBAK-VTWEG'
                                  IT_HEADER-VTWEG_003.
    perform bdc_field       using 'VBAK-SPART'
                                  IT_HEADER-SPART_004.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  IT_HEADER-BSTKD_005.
    perform bdc_field       using 'VBKD-BSTDK'
                                  IT_HEADER-BSTDK_006.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  IT_HEADER-KUNNR_007.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  IT_HEADER-KUNNR_008.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '04/05'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CHOO'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'VBAK-ABHOV'
                                  IT_HEADER-ABHOV_009.
    perform bdc_field       using 'VBAK-ABHOB'
                                  IT_HEADER-ABHOB_010.
    perform bdc_field       using 'VBKD-PRSDT'
                                  IT_HEADER-PRSDT_011.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG(01)'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  IT_ITEM-MABNR_01_012.
    perform bdc_field       using 'RV45A-KWMENG(01)'
                                  IT_ITEM-KWMENG_01_013.
    perform bdc_transaction using 'VA01'.
    *enddo.
    ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    Thanks&regards.
    Bharat .

  • How to show data through table control

    Hi Experts,
    I have created an table control through wizard using table EKKO.
    I have to populate one internal table( type ekko ), and then show it in output  through table control.
    Please advise, how to do that and in where i have to write the codes.
    I will reward points for every suggestion
    Thanks in advance.
    regards

    hi saubrab,
                    This is kiran kumar.G.I am sending some sample code to populate data into table control check it once.
    i will give input in 100 screen. and display table control in 200 screen.check it once once ..ok....
    SE38 :(CODE)
    *& Module pool       YMODULEPOOL_TABLECONTROL1                         *
    *& DEVELOPER   : KIRAN KUMAR.G                                         *
    *& PURPOSE     : TABLE CONTROL DEMO                                    *
    *& CREATION DT : 17/12/2007                                            *
    *& T.CODE      : YMODTABLECONTROL1                                     *
    *& REQUEST     : ERPK900035                                            *
    PROGRAM  ymodulepool_tablecontrol1.
    Tables
    TABLES: yvbap,  "Sales Document: Item Data
            vbak.   "Sales Document: Header Data
    Controls
    CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 200.
    Global Variables
    DATA: gv_lines    TYPE i,
          gv_lines1   type i,
          gv_temp     type i,
          gv_flag(20) TYPE c VALUE 'DISP',
          gv_mode1    TYPE c,
          gv_mode     TYPE c VALUE 'C'. " C: Change, D :Display
    Internal Table
    DATA: BEGIN OF gt_item OCCURS 0,
            vbeln LIKE vbap-vbeln,  "Sales Document Number
            posnr LIKE vbap-posnr,  "Sales Document Item
            matnr LIKE vbap-matnr,  "Material Number
            matkl LIKE vbap-matkl,  "Material Group
            arktx LIKE vbap-arktx,  "Short Text for Sales Order Item
            cflag,                  "Deletion Indicator
          END OF gt_item.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTABLECONTROL' OF PROGRAM 'YMODULEPOOL_TABLECONTROL'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'DISP'.
          SELECT single vbeln
                        erdat
                        angdt
                        bnddt
                   FROM vbak
                  INTO (vbak-vbeln,vbak-erdat,
                        vbak-angdt,vbak-bnddt)
                  WHERE vbeln = vbak-vbeln.
            IF sy-subrc EQ 0.
    *Fetch the table control data and place them in Internal Table
              SELECT vbeln
                     posnr
                     matnr
                     matkl
                     arktx
                FROM yvbap
                INTO TABLE gt_item
                WHERE vbeln = vbak-vbeln.
              IF sy-subrc EQ 0.
    *NO OF line in the Internal Table
                DESCRIBE TABLE gt_item LINES gv_lines.
                my_table-lines = gv_lines + 20.
              ENDIF.
            ENDIF.
    *Call Screen 200.
            SET SCREEN 200.
          WHEN  'EXIT' OR 'BACK' OR 'CANCEL'.
    *Exit from the Program
            CALL TRANSACTION 'SESSION_MANAGER'.
        ENDCASE.
      ENDMODULE.                 " USER_COMMAND_0100  INPUT
    module STATUS_0200 output.
    SET PF-STATUS 'ZTABLECONTROL1'.
    endmodule.                 " STATUS_0200  OUTPU
    *&      Module  copy_data  OUTPUT
          text
    module copy_data output.
    *Fetch the current line data from the Table control
    read table gt_item index my_table-current_line.
    if sy-subrc eq 0.
    *Populating data into screen fields
    gt_item-vbeln = gt_item-vbeln.
    gt_item-posnr = gt_item-posnr.
    gt_item-matnr = gt_item-matnr.
    gt_item-matkl = gt_item-matkl.
    gt_item-arktx = gt_item-arktx.
    endif.
    SE51:CODE (SCREEN 100)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    SE51 :CODE (SCREEN 200)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
    loop at gt_item with control my_table cursor my_table-current_line.
    module copy_data.
    endloop.
    PROCESS AFTER INPUT.
    loop at gt_item.
    MODULE USER_COMMAND_0200.
    endloop.
                             HAVE A NICE DAY..
    Award points if helpful,kiran kumar.G

  • How to modify data in table control

    hi
    i have created table control where i have displayed  data into table control
    logic used
    screen 200
    PROCESS BEFORE OUTPUT.
    MODULE SELECT_RECORD.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TBC_200'
      MODULE TBC_200_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
      LOOP AT   IT_MARA
           INTO WA_MARA
           WITH CONTROL TBC_200
           CURSOR TBC_200-CURRENT_LINE.
        MODULE TBC_200_GET_LINES.
    *&SPWIZARD:   MODULE TBC_200_CHANGE_FIELD_ATTR
      ENDLOOP.
    MODULE STATUS_0200.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TBC_200'
      LOOP AT IT_MARA.
        CHAIN.
          FIELD WA_MARA-MATNR.
          FIELD WA_MARA-ERSDA.
          FIELD WA_MARA-ERNAM.
          MODULE TBC_200_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD WA_MARA-MARK
          MODULE TBC_200_MARK ON REQUEST.
      ENDLOOP.
      MODULE TBC_200_USER_COMMAND.
    *&SPWIZARD: MODULE TBC_200_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
    module -
    MODULE SELECT_RECORD.
    MODULE SELECT_RECORD OUTPUT.
    SELECT MATNR ERSDA ERNAM
            FROM MARA
            INTO CORRESPONDING FIELDS OF TABLE it_mara.
    ENDMODULE.                 " SELECT_RECORD  OUTPUT
    and
    another thing
    i have made  field  MARA-ERSDA. and  FIELD WA_MARA-ERNAM editable by
    input possible using layout
    so
    now those 2 fields contents  are editable
    i want to know how to edit and save the data
    some body guide.
    and i want to put the lock so that i can update
    can tell how to implement lock.
    Thanks
    Edited by: viju bangalore on Jan 27, 2011 10:40 AM

    Hi Viju,
    In PAI do something like this
    LOOP AT itab.
        MODULE mod_table_control.
    ENDLOOP.
    MODULE user_command_0100.
    at module mod_table_control put this
    MODULE mod_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
      if sy-subrc ne 0.
           insert itab.
      endif.
    ENDMODULE.
    for saving you can create at custom gui status with a save button, and at MODULE user_command_0100 save the data.

  • 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

  • Modifying data in Table Control thr' BDC

    Hi,
    I have a following requirement.
    I need to modify(update/delete) the data in the table control through BDC. The number of records of the table control, seen on the screen are only 4. If i need to modify 11th record, how do i go forward?
    Your help is highly appreciated.
    Regards
    Shankar

    Due to rudeness, your thread is denied.
    Note.  If you want help from people it's best to a) follow the rules, and b) not antagonise those who could help you.
    locked.

  • How to write bdc programme to load the data in table control

    Hi
    i have to write a bdc programme and the data to be filled in table control fileds can any one help me with the code how i have to write it is for cs02 tcode
    thanks and regards
    naveen

    Hi Naveen,
    See the sample code
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29N-DATUV'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=KALL'.
      PERFORM bdc_field       USING 'RC29N-MATNR'
                                    w_matnr.
      PERFORM bdc_field       USING 'RC29N-WERKS'
                                   w_werks.
      PERFORM bdc_field       USING 'RC29N-STLAN'
                                    '1'.
      PERFORM bdc_field       USING 'RC29N-DATUV'
                                    '01/01/2004'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '2110'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=FCPU'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29K-BMENG'.
      PERFORM bdc_field       USING 'RC29K-BMENG'
                                    w_testuph.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0150'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-MENGE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=FCBU'.
      PERFORM bdc_field       USING 'RC29P-MENGE(01)'
                                    w_testuph.
    "For raw material.
      IF NOT w_raw_mat_fg IS INITIAL.
        PERFORM bdc_field       USING 'RC29P-MENGE(02)'
                                   w_testuph.
      ENDIF.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POSNR'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POTX1'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POSNR'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC29P-POTX1'.
      PERFORM bdc_dynpro      USING 'SAPLCSDI' '0150'.
      CALL TRANSACTION 'CS02' USING bdcdata MODE w_display_mode UPDATE 'S'
                 MESSAGES INTO t_message_tab.
    Prabhudas

  • How to display data in Table control?

    Hi Experts,
    Can anyone please explain me how to display the data from two different tables(those two table is related with 1 field) into a single table control?
    For Example: T1 has fields (F1,F2) and
                         T2 has fields (F3,F4) --> here F3 is foreign key for F1
    I need to display the data F1,F2,F3,F4 into the table control.
    Can anyone explain me?
    Thanks in Advance,
    Regards,
    Raghu

    Hi,
    If F3 is foreign key for F1, then both fields will have same values.  Then why do you need to display both F1 and F3?  Either one of them is enough.  Try the following code.
    types: begin of t_table,
                 F1 type T1-F1,
                 F2 type T1-F2,
                 F4 type T2-F4,
              end of t_table.
    data: i_table type standard table of t_table with header line.
    select F1 F2 F4 into table i_table from T1 inner join T2 on T1F1 = T2F3.
    You should create three columns in the table control with names i_table-F1, i_table-F2, i_table-F3.
    After populating the internal table, refresh the control with the following statement.
    REFRESH CONTROL <NAME> FROM SCREEN <SCREEN_NO>.
    All the above statements should be in your PBO Module.
    Regards,
    Hema
    Message was edited by:
    Sorry, Declarations can be in the common include.  Select statement and refresh statement should be in PBO.
            Hema Nagarajan

  • How to maintain data in table control

    plz send a detail description of how to create table control and maintain data in that table control.

    Hello Narendar,
    Check the following link:
    http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
    Also, a table control wizard in Screen Painter(SE51) exists, which takes you step by step through the Table Control generation and also creates code, so you can start using the Table Control right away.
    You can either specify a database table, or use an internal table from program.
    If you want to use internal table, it needs to be predefined in your program, before you start creating the table control.
    Reward if helpful.

Maybe you are looking for

  • How to use Designer connect BW Query?

    HI friend,     My BO Designer connect BW Query, Can't connt my custom cube's query ( my cbue save on  "IA_InfoArea"  InfoArea), I find one standard cube "0SD_C01" Cube's query could connt .     Why custom CUBE of the QUERY can not  display and connec

  • Performance problem ECC /  CRM WebUi

    I have a performance problem when using CRM functionality FCC (a http i.e. bsp) aplication which makes a query in ECC system.(two systems are in different networks) In real life user is waiting for response in CRM BSP like 60 seconds(really too much)

  • 845PE MAX-FIR Gigabit Lan Prob

    I just got 845PE MAX-FIR last week. But I have prob with Gigabit Lan controller. Windows(2k) detects it alright and says it works ok; however, it can't detect lan cable if I insert it. First, I thought it was prob with lan cable, so I installed old r

  • Changing column datatype value

    Can any body forward me the SQL for changing the datatype value from Varchar2(64) to Varchar2(2) Arif

  • Replacement of OAF LOV with Java\JSP screens?

    Hi All, Am facing performance issue in one of my LOV. Query has been tuned at its best but still behaving worse. Got an idea of embed\invoke the jsp\java screens which can query the data faster. If anyone had already tried this, please let me know yo