Doubt on bdc's

i was trying my first bdc program. i wanted to record mm03 transaction.
so i went to tcode SHDB, pressed new recording, gave a recording name and t-code mm03 and
started recording. it asked for material number, i just entered one and pressed back to stop recording.
i saved it. then i selected my recording name and pressed on function module to see the code generated.
is this how u do it. does all BDC programs work just by starting with SHDB or its not needed. should a BDC
be written in se38 or se37.
can any bdc program be written without ever recording.

Example:
data:  begin of bdcdata occurs 10.
        include structure bdcdata.
data:  end of bdcdata.
form post_goods_issue  tables   p_processing_protocol
                       structure ws_processing_protocol
                       using    p_temp_vbeln.
  clear bdcdata. refresh bdcdata.
  perform bdc_dynpro using 'SAPMV50A'      "Change Outbound Delivery
                           '4004'.
  perform bdc_field using 'LIKP-VBELN'     "Delivery number
                           p_temp_vbeln.
  perform bdc_field using 'BDC_OKCODE'
                           '=WABU_T'.      "PGI button
  perform bdc_dynpro using 'SAPMSSY0'      "Log screen
                            '0120'.
  perform bdc_field using 'BDC_OKCODE'     "Back
                             '=BACK'.
  perform bdc_dynpro using 'SAPMV50A'      "Change Outbound Delivery
                              '4004'.
  perform bdc_field using 'BDC_OKCODE'     "Back
                          '/EBACKE_T'.
  clear attempts.
  do.
    clear msgtab. refresh msgtab.
    bdcmode = 'N'.
    call transaction 'VL02N' using bdcdata mode bdcmode update 'S'
    messages into msgtab.
       Start new screen                                              *
form bdc_dynpro using program dynpro .
  clear bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  append bdcdata.
endform.                    "bdc_dynpro
       Insert field
form bdc_field using fnam fval.
  clear bdcdata.
  write fnam to bdcdata-fnam .
  write fval to  bdcdata-fval.
  append bdcdata.
endform.                    "bdc_field

Similar Messages

  • Doubt in BDC

    I have a doubt in BDC,
    They used a standard SAP program (RSBDCBTC_SUB and RFBIBL00) for upload the data for the transaction FBB1. they don’t want the particular record .
    They used a session method for upload the data.
    I know only the session name. how I can delete the particular record.
    Once processed the session.
    Is it possible to delete the delete the record.
    Help me regard this.

    Priya,
    here i can suggest u one thing
    if u want to know the program r report related to that session
    just go to sm35
    select the session then go with analysis
    then in the screen u will get the screens used in that particular program
    when u double click on those screens control leads to that respected screen
    in that if u go with system - > status u will get all the details of the program
    when u double click on the program control leads into that program
    then there u can find all the details related to tables and everything
    i think it helps for u
    Regards,
    naveen

  • Beginner ABAPer asking Doubts in BDC

    Hi Guyz,
    I am a beginner in ABAP. Here i am sending some doubts on BDC . Any Kind of help will be highly Appreciated.
    Thanks,
    SAM
    1>How do we handle all the scrolling funcions(page ups, page downs atc), and values entered into table controls in BDC ?
    2> How do you take care of screen resolution in BDC?

    1) page up and page down ... i donno the actual procedure but this is one of the method...
    i hope this answers both of ur questions...
    After encountering the screen, say u need to select a field in a table. One of the methods is to press <b>Control F</b> on that screen then enter the field name which u want.. and press enter.. then that field will be the <b>first field in the screen resolution</b> ....
    just try this for a normal table like spfli... after going to the table display in <b>SE11 press control F or the Binoculars icon.</b>. then u will get a small window u just type in the name of the field u want.. and press enter .. see what happens,
    suppose ..
    have opened this spfli in se11 transaction and in display mode..
    Now <b>'PERIOD'</b> is the field which is not there in the resolution..
    so i have opened the find option ,provided the field name <b>PERIOD </b>in the field of search window.
    then pressed enter. Now i will get the same screen( spfli display screen ) with <b>period as the first field in that resolution</b> .. Now i can do whatever is i want with this field.. here i have double clicked on the domain of the field PERIOD.
    so u analyse this code....
    *spfli display screen..
    perform bdc_dynpro using 'SAPLSD41' '2200'. ( * spfli display screen , u can use ur screen number here )
    perform bdc_field using 'BDC_OKCODE'
    '=FIND'. (* To open the find window )
    perform bdc_dynpro using 'SAPLSD41' '0114'. ( * This is the find window )
    perform bdc_field using 'BDC_CURSOR'
    'RSDXX-FINDSTR'.
    perform bdc_field using 'BDC_OKCODE'
    '=CANC'. (* OK_CODE for enter )
    perform bdc_field using 'RSDXX-FINDSTR'
    'PERIOD'. ( * Here i am giving the field name which i want to search or which is not there in the resolution or u can give a vaiable name which contains the value <FIELD NAME> ).
    ( Now i got the spfli display screen with period as the first field in the screen resolution )
    perform bdc_dynpro using 'SAPLSD41' '2200'. (*The previous spfli display screen )
    perform bdc_field using 'BDC_OKCODE'
    '=WB_SELECT_OBJECT'. (* OK_CODE to double click on the domain of the field PERIOD )
    perform bdc_field using 'BDC_CURSOR'
    'DD03D-ROLLNAME(01)'.
    reward helpful answers...
    sai ramesh

  • Doubt in BDC (Creation of Production order)

    Hi experts,
         I have a doubt in my bdc, in my bdc i am going to create production order in CO01. its working properly but after entered the date i want to click operation overview and change one particular routing workcenter. But all the workcenter have the same field name of ARBPL, if anyone have a idea plz help its urgent. Point will be sure.
    gowri

    Dear Mr.Gowri Sankar,
    As you have created a BDC for creating production order,
    once after the order creation is over u can goto CO02 and change the work centre,routing details before release.
    Please tell us when do u want to change the work centre & routing details?
    If I'm wrong,please correct me.Also please share the concept of your BDC.
    Regards
    Mangal

  • Simple Doubt in BDC

    Hi friends,
       I am new to BDC .I am just trying a simple code which is written already.
       This is the simple code to fill the transaction VK13 first screen.
      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'
                                           wa_report-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_field       USING 'RV130-SELKZ(01)'
                                            'X'.
      CALL TRANSACTION 'VK13' USING i_bdc_tbl
                              MODE  'A'.
    FORM bdc_dynpro USING program dynpro.
      CLEAR i_bdc_tbl.
      wa_bdc_tbl-program  = program.
      wa_bdc_tbl-dynpro   = dynpro.
      wa_bdc_tbl-dynbegin = 'X'.
      APPEND wa_bdc_tbl TO i_bdc_tbl.
    ENDFORM.                    "BDC_DYNPRO
    FORM bdc_field USING fnam fval.
      CLEAR i_bdc_tbl.
      MOVE fnam TO wa_bdc_tbl-fnam.
      MOVE fval TO wa_bdc_tbl-fval.
      APPEND wa_bdc_tbl TO i_bdc_tbl.
    ENDFORM.                    "BDC_FIELD
    When execute this code it is just showing the empty screen of transaction vk13. It is not filling the condition type field with whatever value i am passing. When go in debugg mode i am not getting the logic again and again it is going to the first screen of vk13 and asking to enter the value whwn the statement CALL TRANSACTION is getting executed. It is clear to me.
    My main doubt is we are clearing the internal table i_bdc_tbl before calling the transaction once we move the value to the specific field.I am not getting what they tried to do there.Simply moving one record to internal table and again clearing it then moving a next record and clearing it again before calling the transaction.
    What we are trying to do by this?Can any one explain me.
    Please help me out in understanding this.
    Thanks in Advance.

    Hi Shri,
    You can go thru these links for more info on BDC:
    http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sap-img.com/bdc.htm
    www.sappoint.com/abap/bdcconcept.pdf
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.planetsap.com/bdc_main_page.htm
    Reward points if this helps.
    Manish

  • Urgent doubt in BDC

    Hi,
        I clling BDC MB11 from Delivery.so,with ref to delivery document the delivery items will placed in MB11.but in case of an error i.e insufficient stock of the components,no special error handliong has to be in place.the error message of the MB11 transaction should be passedback to the screen.how can i achieve it.
    thanks in advance.

    Hi,
    Use FORMAT_MESSAGE Fm to capthuresthe system generated messages.
    Kishore.

  • Doubt in bdc and ale reg

    using we can transfer the data from one system and another system. in ale also we can do same thing. what is the need of using ale

    BDC is used in scenarios where a company decides to do away with an existing ERP system and choses to use a SAP R/3 system in its place(Like from Oracle to SAP, or from any legacy system to SAP).
    In the process, the company wil store all the legacy data in flat files before discarding the original system.
    The flat file data, will have to be uploaded into the R/3 System again. It such cases BDCs/ Batch Iput programs are used.
    ALEs are used in a totally different scenario.
    If the company is using two loosely coupled sap systems, and the same data is to be maintained in both the systems, then you will use ALE concept.
    It is like latching them together and changes made to one system are automatically refelected in the other system as well.
    Regards,
    Ravi

  • Doubt in BDC ( Material master)

    Hi frnds,
      I am creating BDC for material master.In that BDC if i load the data in 'A' mode its work properly. In 'E' Mode in the last page its asking every time for Save, In 'N' Mode its not upload how to do this.
    This is my code :
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    ***********CALL TRANSACTION************************
    CALL TRANSACTION 'MM01' USING bdcdata MODE 'E'
             UPDATE 'A'
            MESSAGES INTO it_bdcmsg.
    Thanks,
    Gowri.

    Hi
    May be in 'A' mode you are manually hitting the SAVE and saving
    The function code/OK code for SAVE is 'BU' like
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
    so you have to write this in the last, then it won't ask in E and N modes
    may be this is missing in the program see and correct.
    Reward points for useful Answers
    Regards
    Anji

  • Doubt in BDC direct input method

    Hi experts
    I dont know how to upload data in SAP data base by using BDC direct input coding method. Can u people explain this with coding?
    Thanks in advance.
    Regards
    Antony

    Hi,
    DI is used when u r going upload large amount of data for single application.
    Better example where direct input method will be used is... uploading the data for material master.....it includes lot of views so its very much difficult to capture all the views and record the tcode and map the data in such conditions its better to go with DI methods
    advantages:
    in session method or CT method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in DI validations can be done set of code so this make the process very fast so its advantageous to upload large amout of data.
    you always use the standard sap provided program for this.
    Here in DI method very important thing is structure of flat file... so to know the structure first of all you have to download the data for one record into the internal table with the use of the same program then with the use of that structure u have to desing the flat file and upload the data.
    Re: re: direct input method
    Award points if useful.
    Thanks,
    Ravee...

  • Simple doubt in BDC  Call Transaction Method

    Hi Friends,
      When i try to call vk13 transaction and pass the screen field values for the second screen and execute it it is displaying properly.But when i try to pass the different value in the bcddata internal table it is changing properly but in the screen it not updating that value.Alawly the screen fields are taking the values passed the first time.But in the internal table which we are oassing to the calltransaction it is changing correctly but not in the corresponding screen fields. Why it is happening so. Can any one help me out of this problem.
    Thanks in Advance.

    I am not passing through the selection screen . It is like iteractive report. when i select the particular line in the list output then the screen fields should take the values from that selected line. First time when i select the line it is taking properly.
    But next time when i select the line the content of the i_bdc_tbl is changing correctly but when it enter in to the transaction it is not taking the values from the i_bdc_tbl. Simply it is displaying the screen fields with the old values. It is not updating the screen fields with the values from the i_bdc_tbl. Why the screen fields are not replaced with the value of i_bdc_tbl? Why it is not getting refreshed with the new values?
    Just i am posting the bdc portion of my code here. So you can help me out on this.
    AT LINE-SELECTION.
      SELECT SINGLE kozgf FROM t685 INTO v_kozgf
                          WHERE kschl = wa_report-kschl.
      SELECT kolnr kotabnr FROM t682i INTO TABLE i_t682i
                     WHERE kozgf = v_kozgf.
      SORT i_t682i BY kolnr.
      READ TABLE i_t682i WITH KEY kotabnr = wa_report-tabna+1(3)
           TRANSPORTING NO FIELDS.
      CHECK sy-subrc = 0.
      v_index = sy-tabix.
      REFRESH i_bdc_tbl.
      l_tabix = '01'.
      PERFORM f_vk13.
      CONCATENATE 'RV13' wa_report-tabna  INTO v_bdc_val_field.
      PERFORM bdc_dynpro      USING v_bdc_val_field '1000'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'F004-LOW'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ONLI'.
      CREATE DATA v_rec  TYPE (wa_report-tabna).
      ASSIGN v_rec->* TO <wa_table>.
      SELECT SINGLE *  FROM (wa_report-tabna) INTO <wa_table>
      WHERE kschl = wa_report-kschl AND matnr = wa_report-matnr AND knumh = wa_report-objectid.
      CALL FUNCTION 'DDIF_FIELDINFO_GET'
        EXPORTING
          tabname        = wa_report-tabna
        TABLES
          dfies_tab      = lwa_tabna
        EXCEPTIONS
          not_found      = 1
          internal_error = 2
          OTHERS         = 3.
      READ TABLE lwa_tabna WITH KEY fieldname = 'KSCHL'.
      p1 = sy-tabix + 1.
      READ TABLE lwa_tabna WITH KEY fieldname = 'MATNR'.
      p2 = sy-tabix.
      LOOP AT lwa_tabna.
        v_field = lwa_tabna-fieldname.
        IF lwa_tabna-position BETWEEN p1 AND p2.
          ASSIGN COMPONENT lwa_tabna-position OF STRUCTURE <wa_table> TO <fld>.
          PERFORM f_vk13_s2 USING lwa_tabna-fieldname <fld>.
        ENDIF.
      ENDLOOP.
      PERFORM bdc_field       USING 'RV130-DATAM'
                                       wa_report-fdate_value_new.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    'ONLI'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'F001'.
      CALL TRANSACTION 'VK13' USING i_bdc_tbl
                              MODE  'A'.
    FORM f_vk13.
      DATA: l_tabix(2) TYPE c.
    *Condition type
      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'
                                     wa_report-kschl.
    *Key combination
      PERFORM bdc_dynpro      USING 'SAPLV14A' '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RV130-SELKZ(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=WEIT'.
      PERFORM bdc_field       USING 'RV130-SELKZ(01)'
      l_tabix = v_index.
      SHIFT l_tabix RIGHT.
      OVERLAY l_tabix WITH '00'.
      CONCATENATE 'RV130-SELKZ(' l_tabix ')' INTO v_bdc_field.
      PERFORM bdc_field       USING v_bdc_field
                                    'X'.
    ENDFORM.                                                    "f_vk13
          FORM BDC_DYNPRO
          This form accepts the program name and screen number
          and places the values into the I_BDC_TBL internal table.
    FORM bdc_dynpro USING program dynpro.
      CLEAR wa_bdc_tbl.
      wa_bdc_tbl-program  = program.
      wa_bdc_tbl-dynpro   = dynpro.
      wa_bdc_tbl-dynbegin = 'X'.
      APPEND wa_bdc_tbl TO i_bdc_tbl.
    ENDFORM.                    "BDC_DYNPRO
          FORM F_BDC_FIELD
        This form accepts the field name and the corresponding value
        for that field and places them into the I_BDC_TBL internal table.
    FORM bdc_field USING fnam fval.
      CLEAR wa_bdc_tbl.
      MOVE fnam TO wa_bdc_tbl-fnam.
      MOVE fval TO wa_bdc_tbl-fval.
      APPEND wa_bdc_tbl TO i_bdc_tbl.
    ENDFORM.                    "BDC_FIELD
    *&      Form  f_vk13_s2
          text
    -->  p1        text
    <--  p2        text
    FORM f_vk13_s2 USING p_fieldname p_fld.
      CONCATENATE wa_report-tabna '-' p_fieldname INTO v_bdc_val_field.
      CHECK NOT p_fld IS INITIAL.
      PERFORM bdc_field USING v_bdc_val_field p_fld.
    ENDFORM.                                                    " f_vk13_s2
    Thanks.

  • Doubts in BDC

    hi friends ,
    i have some questions regarding BDC`s
    1)What is the difference between asynchronous <b>processing & updating</b>???
    2)how can we use programe defined function module in bdc?
    3)purpose of leave-to-transaction ? where it is used ?
    4)when & how is direct input used?
    regards
    Rishi

    Hi Rushikesh,
    Here it is answers for oyu....
    1)What is the difference between asynchronous processing & updating???
    sol: Asynchronous process means first when ever data ispopulsting from the file it is processing the data means dealing out with the data nothing but check the all the data at a time. Asynchronous updating means update all the data at a time means controller doesn't wait for confirmation from the DB.
    2)how can we use programe defined function module in bdc?
    Sol: i think your asking about BDC-OPEN_GROUP, BDC_INSERT,BDC_Close.
    If it is then first upload the data from file to internatl table and then data populated to DB through t-code by using bdcdata strucutre.
    3)purpose of leave-to-transaction ? where it is used ?
    Sol: Suppose your doing the at selection screen validation then we have ti use ths statement like
    IF P_BUKRS IS INITIAL.
    MESSAGE E(001) WITH 'XXXXXXXXXXXXXXXXXX'
    LEAVE TO TRANSACTION ZVAL.
    ENDIF.
    4)when & how is direct input used?
    Sol: Suppose we need ti uplaod the huge (nearly 1 or 2lakksh) records at a time then we can go for direct input method. This means directly hit to DB. First data can be populated to itab then by submitting two standard programs we can uplaod the data to DB.But problem is direct input have restart mechanism means suppose if you will ge error at 99999 record then we have to start agign the process.
    Hope this helps you, reply for queries, Shall post you the updates.
    Regards. 
    Kumar. .

  • Doubt on BDC

    Hi Experts,
         I uploading Data by using BDC for this i use flat file is .CSV file.For uploading that .csv file i am using the function module 'WS_FILENAME_GET' . For this i used the function module for uploading 'WS_FILENAME_GET" .. Then its working fyn. But i am using ECC6.0 version in that for uploading file the Function module is GUI_UPLOAD.
         When i use this function module it comes the runtime error. Please suggest me the function module for uplaoding .CSV files in ECC6.0
                 Thanks in ADVANCE
    Thanks and Regards
    Siri

    Check the code below:
    *& Form upload_csv_file
    To upload CSV file into internal table *
    FORM upload_csv_file .
    CLEAR gv_file.
    gv_file = pa_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = gv_file
    filetype = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = gt_dummy
    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 NE gc_zero_num.
    MESSAGE i006.
    LEAVE LIST-PROCESSING.
    ENDIF.
    Check if the input file is blank
    IF gt_dummy[] IS INITIAL.
    MESSAGE i007.
    LEAVE LIST-PROCESSING.
    ENDIF.
    To remove quotes in the table
    LOOP AT gt_dummy INTO gs_dummy. "#EC CI_LOOP_INTO_WA
    gv_tabix = sy-tabix.
    DO.
    IF gs_dummy CA '"'.
    REPLACE '"' WITH space INTO gs_dummy.
    ELSE.
    WRITE gs_dummy TO gs_dummy NO-GAP.
    CONDENSE gs_dummy.
    MODIFY gt_dummy INDEX gv_tabix FROM gs_dummy.
    EXIT.
    ENDIF.
    ENDDO.
    ENDLOOP.
    ENDFORM. " upload_csv_file
    Reward points if useful.

  • Doubt regarding BDC

    Hi all,
    I developed a BDC.
    Client had asked for a requirement  tat while uploading an excel for eg of 1000 records, and if ter is an error in the 600th record ,as of now it will throw error,but tey were telling BDC shud not stop ter,else it shud discard that particular record and shud continue processing. and at the end it shud display in the output which all wer the recored with error.
    Is this possible n if so how..?
    Please reply..
    Thanks in Advance
    Nitin

    Hi,
    I consider u hv collected all the 1000 records in the excel file into an internal table called it_upload.
    Loop at it_upload into wa_upload.
    *write the BDC code for e.g.,
    PERFORM bdc_dynpro      USING 'SAPMV86E' '0601'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=SICH'.
          PERFORM bdc_field       USING 'BDC_SUBSCR'
                                        'SAPMV86E'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RV86E-KOMMA'.
          PERFORM bdc_field       USING 'RV86E-DAT_STATA'
                                        sy-datum.
          PERFORM bdc_field       USING 'RV86E-ZET_STATA'
                                        '00:00:00'.
          PERFORM bdc_field       USING 'RV86E-KOMMA'
                                        wa_upload-vbeln.
    CALL TRANSACTION <tcode> USING it_bdcdata MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsg.
    COMMIT WORK.
    LOOP AT it_bdcmsg INTO wa_bdcmsg.
            IF wa_bdcmsg-msgtyp = 'S'.
              MOVE wa_bdcmsg-msgv1 TO wa_error.
            ENDIF.
            APPEND  wa_error TO it_error.
    ENDLOOP.
    ENDLOOP.
    Hope this helps.
    Regards,
    Arnab.

  • Doubt rearding bdc

    Hi,
    I am trying out BDC using session method. I am trying t upload  4 field values from a txt file on desktop to sap.
    when I process the session it still calls the screen and asks for the values for vendor creation...why does it not take values directly from the txt file? I tried running it in both foregrund and background In case of background it ends up with incorrect transaction.
    I do not understand
    1.what the parameteer transaction code in bdc insert means
    2.when we say perform [subroutine] using [program name] [screen no]- which is this program and screen number?
    The transaction code that I created uses the program SAPfm02k and screen 100.

    Hi,
    The procedure to create BDC programs:
    Go through each screen by passing the screen number, program name and a flag 'X' for new screen.
    Once you populate your BDC table with the above entries..
    Populate the BDC internal table with the field names and field values in that screen.
    Populate the user command "SY-UCOMM" which you will hit once you are done in populating the fields.
    Now you get into the next screen.. This is how it goes till you save.

  • Doubts on BDC

    Hey guyz,
    here are some BDC queries.
    1> Can we set call transaction in background?????
    I think with mode 'N' we can set it in SM36. But how to handle the errors (BDCMSGCOLL) in this case.
       Normally this method is advisable in case of small number of records and an  immediate processing. Is it necessary to schedule it in Background.....
    2> Can we upload for multiple transactions in a single custom program for session
      method?

    hi Sam,
    For handling errors check out this sample code ...
    REPORT  ztest_report
    NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZRASH.
    *                 Internal Table Declarations                          *
    *--Internal Table for Data Uploading.
    DATA : BEGIN OF IT_FFCUST OCCURS 0,
             KUNNR(10),
             BUKRS(4),
             KTOKD(4),
             ANRED(15),
             NAME1(35),
             SORTL(10),
             STRAS(35),
             ORT01(35),
             PSTLZ(10),
             LAND1(3),
             SPRAS(2),
             AKONT(10),
           END OF IT_FFCUST.
    *--Internal Table to Store Error Records.
    DATA : BEGIN OF IT_ERRCUST OCCURS 0,
             KUNNR(10),
             EMSG(255),
           END OF IT_ERRCUST.
    *--Internal Table to Store Successful Records.
    DATA : BEGIN OF IT_SUCCUST OCCURS 0,
             KUNNR(10),
             SMSG(255),
           END OF IT_SUCCUST.
    *--Internal Table for Storing the BDC data.
    DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_FLAG1(1) VALUE ' ',
    "Flag used for opening session.
           V_TLINES LIKE SY-TABIX,
           "For storing total records processed.
           V_ELINES LIKE SY-TABIX,
           "For storing the no of error records.
           V_SLINES LIKE SY-TABIX.
           "For storing the no of success records.
    *          Selection screen                                            *
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
                 V_SESNAM  LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
    *          Start-of-selection                                          *
    START-OF-SELECTION.
    *-- Form to upload flatfile data into the internal table.
      PERFORM FORM_UPLOADFF.
    *        TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
      WRITE:/ 'Details of the error and success records for the transaction'
      ULINE.
      SKIP.
    *          End of Selection                                            *
    END-OF-SELECTION.
    *-- Form to Generate a BDC from the Uploaded Internal table
      PERFORM FORM_BDCGENERATE.
    *--To write the totals and the session name.
      PERFORM FORM_WRITEOP.
    *&      Form  form_uploadff
    *     Form to upload flatfile data into the internal table.
    FORM FORM_UPLOADFF .
    *--Variable to change the type of the parameter file name.
      DATA : LV_FILE TYPE STRING.
      LV_FILE = V_FNAME.
    *--Function to upload the flat file to the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      =  LV_FILE
    *     FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
    *     HEADER_LENGTH                 = 0
    *     READ_BY_LINE                  = 'X'
    *     DAT_MODE                      = ' '
    *   IMPORTING
    *     FILELENGTH                    =
    *     HEADER                        =
        TABLES
          DATA_TAB                      = IT_FFCUST
        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.
    *--Deleting the headings from the internal table.
        DELETE IT_FFCUST INDEX 1.
    *--Getting the total number of records uploaded.
        DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
      ENDIF.
    ENDFORM.                    " form_uploadff
    *&      Form  Form_bdcgenerate
    *     Form to Generate a BDC from the Uploaded Internal table
    FORM FORM_BDCGENERATE .
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT IT_FFCUST.
        PERFORM POPULATEBDC USING :
                                    'X' 'SAPMF02D' '0105',
                                    ' ' 'BDC_OKCODE'  '/00' ,
                                    ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
                                    ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
                                    ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
                                    'X' 'SAPMF02D' '0110' ,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,
                                    ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
                                    ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,
                                    ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
                                    ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
                                    ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
                                    ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
                                    ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
                                    'X' 'SAPMFO2D' '0120',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0125',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0130',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0340',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0360',
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0210',     
                                    ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0215',
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0220',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0230',     
                                    ' ' 'BDC_OKCODE'  '=UPDA'.
    *--Calling the transaction 'fd01'.
        CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
        MESSAGES INTO IT_CUSTMSG.
        IF SY-SUBRC <> 0.
    *--Populating the error records internal table.
          IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_ERRCUST.
          CLEAR IT_ERRCUST.
    *--Opening a session if there is an error record.
          IF V_FLAG1 = ' '.
            PERFORM FORM_OPENSESSION.
            V_FLAG1 = 'X'.
          ENDIF.
    *--Inserting the error records into already open session.
          IF V_FLAG1 = 'X'.
            PERFORM FORM_INSERT.
          ENDIF.
    *--Populating the Success records internal table.
        ELSE.
          IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_SUCCUST.
          CLEAR IT_SUCCUST.
        ENDIF.
    *--Displaying the messages.
        IF NOT IT_CUSTMSG[] IS INITIAL.
          PERFORM FORM_FORMATMSG.
        ENDIF.
    *--Clearing the message and bdc tables.
        CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
      ENDLOOP.
    *--Getting the total no of error records.
      DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
    *--Getting the total no of successful records.
      DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
    *--Closing the session only if it is open.
      IF V_FLAG1 = 'X'.
        PERFORM FORM_CLOSESESS.
      ENDIF.
    ENDFORM.                    " Form_bdcgenerate
    *&      Form  populatebdc
    *       FOrm to Populate the BDC table.
    FORM POPULATEBDC  USING    VALUE(P_0178)
                               VALUE(P_0179)
                               VALUE(P_0180).
      IF P_0178 = 'X'.
        IT_CUSTBDC-PROGRAM = P_0179.
        IT_CUSTBDC-DYNPRO = P_0180.
        IT_CUSTBDC-DYNBEGIN = 'X'.
      ELSE.
        IT_CUSTBDC-FNAM = P_0179.
        IT_CUSTBDC-FVAL = P_0180.
      ENDIF.
      APPEND IT_CUSTBDC.
      CLEAR IT_CUSTBDC.
    ENDFORM.                    " populatebdc
    *&      Form  FORM_OPENSESSION
    *       Form to Open a session.
    FORM FORM_OPENSESSION .
    *--Variable to convert the given session name into reqd type.
      DATA : LV_SESNAM(12).
      LV_SESNAM = V_SESNAM.
    *--Opening a session.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
         GROUP                     = LV_SESNAM
         HOLDDATE                  = '20040805'
         KEEP                      = 'X'
         USER                      = SY-UNAME
         PROG                      = SY-CPROG
    *  IMPORTING
    *    QID                       =
       EXCEPTIONS
         CLIENT_INVALID            = 1
         DESTINATION_INVALID       = 2
         GROUP_INVALID             = 3
         GROUP_IS_LOCKED           = 4
         HOLDDATE_INVALID          = 5
         INTERNAL_ERROR            = 6
         QUEUE_ERROR               = 7
         RUNNING                   = 8
         SYSTEM_LOCK_ERROR         = 9
         USER_INVALID              = 10
         OTHERS                    = 11
      IF SY-SUBRC <> 0.
        WRITE :/ 'Session not open'.
      ENDIF.
    ENDFORM.                    " FORM_OPENSESSION
    *&      Form  FORM_INSERT
    *       fORM TO INSERT ERROR RECOED INTO A SESSION.
    FORM FORM_INSERT .
    *--Inserting the record into session.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'FD01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = IT_CUSTBDC
        EXCEPTIONS
          INTERNAL_ERROR         = 1
          NOT_OPEN               = 2
          QUEUE_ERROR            = 3
          TCODE_INVALID          = 4
          PRINTING_INVALID       = 5
          POSTING_INVALID        = 6
          OTHERS                 = 7
      IF SY-SUBRC <> 0.
        WRITE :/ 'Unable to insert the record'.
      ENDIF.
    ENDFORM.                    " FORM_INSERT
    *&      Form  FORM_CLOSESESS
    *       Form to Close the Open Session.
    FORM FORM_CLOSESESS .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          NOT_OPEN    = 1
          QUEUE_ERROR = 2
          OTHERS      = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " FORM_CLOSESESS
    *&      Form  FORM_FORMATMSG
    *       Form to format messages.
    FORM FORM_FORMATMSG .
    *--Var to store the formatted msg.
      DATA : LV_MSG(255).
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = SY-MSGID
          LANG      = SY-LANGU
          NO        = SY-MSGNO
          V1        = SY-MSGV1
          V2        = SY-MSGV2
          V3        = SY-MSGV3
          V4        = SY-MSGV4
        IMPORTING
          MSG       = LV_MSG
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC = 0.
        WRITE :/ LV_MSG.
      ENDIF.
      ULINE.
    ENDFORM.                    " FORM_FORMATMSG
    *&      Form  form_writeop
    *       To write the totals and the session name.
    FORM FORM_WRITEOP .
      WRITE :/ 'Total Records Uploaded :',V_TLINES,
               / 'No of Error Records :',V_ELINES,
               / 'No of Success Records :',V_SLINES,
               / 'Name of the Session :',V_SESNAM.
      ULINE.
    ENDFORM.                    " form_writeop

Maybe you are looking for

  • Help!{module_catalogue,15999,} Catalogue module is not showing up at all. Thoughts?

    Followed all the steps in Dreamweaver to insert the Catalogue Module and nothing happens. I can see the module code, but when I preview the page nothing. I have added products to the catalogue, and tried adding multiple modules, still nothing. It's g

  • 23" HD display went black. What now?

    HELP! Is there a DIY diagnostic protocol for a dead 23" Apple Cinema HD Display (2 yrs old)? I use my system everyday in my work, so, I've got to be sure that packing this giant thing up and sending it off for weeks (?) is absolutely the LAST RESORT

  • Sun Access Manager7.1 deployment problem

    We are deploying Sun Access Manager7.1 on Weblogic9.0 running on Solaris 9.0-sparc. Getting following exception - <Jul 20, 2007 9:27:33 PM GMT+05:00> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 7 task for

  • Why my numeric key pad on my wired keyboard wont work with snow leopard?

    Why my numeric key pad on my wired apple keyboard wont work with snow leopard? Thanks - Farshad

  • Problems while storing a BLOB

    Hi I need to store a blob in a MS Access db while receiving a mail, but I can't arrive! This is my code, could anyone help me? Many thanks in advance.                          Blob blob = null;                          PreparedStatement pst2 = con.pr