Light goes off or System crash During Upload data through BDC Call Transaction ..

Hi Experts ,
                How do I know how many records had been updated in database while uploading the  flat file through BDC call transaction  ,the system suddenly  crash or light  goes off ..............
Thanks and Regards .
Om prakash 

Hi Prakash,
i have already told toy to use bapi to get all the error and success messages, through which you don't need to do all the above stuffs, the first method you have shown is based on algorithm , which might not be correct each time, and the second method is handy.
You can add these code lines in your BDC which will give you all error and success messages
DATA : BEGIN OF options.
         INCLUDE STRUCTURE ctu_params.
DATA : END OF options.
DATA: i_messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE,
       l_message LIKE bapiret2-message.
DATA: p_mode TYPE c.
DATA  BEGIN OF it_error OCCURS 1.
DATA : text(100)  TYPE c.
DATA  END   OF it_error.
DATA  BEGIN OF it_success OCCURS 1.
DATA:  text(100) TYPE c.
DATA  END   OF it_success.
START-OF-SELECTION.
  PERFORM upload_data.
*   Report for success
   PERFORM  success_text.
*   Report for Error
   PERFORM  error_text.
END-OF-SELECTION.
CALL TRANSACTION 'your transaction code' USING bdcdata
                             OPTIONS FROM options
                             MESSAGES INTO i_messtab.
     IF SY-SUBRC NE 0.
       CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
         EXPORTING
           id         = sy-msgid
           number     = sy-msgno
           language   = sy-langu
           textformat = 'ASC'
           message_v1 = sy-msgv1
           message_v2 = sy-msgv2
           message_v3 = sy-msgv3
           message_v4 = sy-msgv4
         IMPORTING
           message    = l_message.
       CONCATENATE l_message '-' wa_input-newko wa_input-wrbtr wa_input-budat INTO it_error-text
       SEPARATED BY ' '.
       APPEND it_error.
     ELSE.
       CONCATENATE 'DATA UPLOADED SUCCESSFULLY :' wa_input-newko  wa_input-wrbtr wa_input-budat
       INTO it_success-text SEPARATED BY ' '.
       APPEND it_success.
     ENDIF.
     REFRESH bdcdata.
     CLEAR: wa_input,l_message.
ENDLOOP.
***ENDLOOP.
endform.
                    " UPLOAD_DATA
FORM success_text .
   LOOP AT it_success.
     AT FIRST.
       WRITE :/10  'Following records successfully uploaded'.
       ULINE.
     ENDAT.
     WRITE :/10  it_success-text.
   ENDLOOP.
ENDFORM.
FORM error_text .
   LOOP AT it_error.
     AT FIRST.
       WRITE :/10  'Following records  are not uploaded'.
       ULINE.
     ENDAT.
     WRITE :/10  it_error-text.
   ENDLOOP.
ENDFORM.

Similar Messages

  • Error While Uploading Material Master Through Bdc Call Transaction

    Hi Sap Gurus,
    I am doing Bdc call Transaction for Material Master Uploading.
    But After Entering data for 4-5 screen i got a error_
    Field Mara-iprkz doesn,t exit in the screen saplmgmm 4000
    Field Mara-prctr doesn,t exit in the screen saplmgmm 4000
    Field Mbew-stprs doesn,t exit in the screen saplmgmm 4000
    Field Marc-mtvfe doesn,t exit in the screen saplmgmm 4000
    Enter Valuation class.
    This is my Programme....................................
    <removed by moderator>
    Thanks in advance.
    Arindam
    Moderator message: please post only relevant code parts, your post must be less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 16, 2011 9:29 PM

    Sorry for my obvious answer, but you should ask a more precise question.
    Your errors are that you try to enter fields but they don't exist, so it sounds logic.
    And the error "Enter Valuation class." means that the field is mandatory. So you must enter it.
    Re-record the transaction using SHDB (eventually play with the http://wiki.sdn.sap.com/wiki/display/ABAP/Recordduringplay), run it in A display mode, and correct your program.
    Sandra
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MVKE-SKTOF'
                                  'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARC-PRCTR'
                                  wa_mara-prctr."'MUMBAI'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'MARA-IPRKZ'
                                  'D'.

  • Problem during uploading data Using BDC

    While I'm trying to upload data for T.Code J1IS using BDC, Value for the field  Net.***.value ( J_1IASSVAL-J_1IVALNDP) is not getting populated on the screen.
    Pls help.

    Hi,
    This is a Currency Field so you need to pass this to a Char field first and then pass to BDCTAB-FVAL.
    " This is a common problem with BDC with other data types even with Date  and Quantity and Numeric types
    Please note while passing values to BDCTAB all the values should be passed in CHAR form only
    Cheerz
    Ram.

  • Flat  file to upload data using BDC for transaction MM01

    Hi
    I am trying to update data using bdc code has been attached below using a txt file.
    It is updating the first set of data into the table mara ,but  for the rest it is not
    All the data from txt file has being loaded to internal table , but the problem is it does not gets updated from internal table to the database .
    Only the first set of data has been loaded ,<u><b> rest of the data is not loaded</b></u>
    <u><b>content of txt file</b></u>
    zsc     zsc     kg     
    zsv     zsv     kg     
    zsb     zsb     kg
    <u><b>Actual code</b></u>
    report ZMAT_UPLOAD
           no standard page heading line-size 255.
    types declaration..........................................................................
    types : begin of t_mat,
       matnr(20),
       desc(50),
       uom(5),
    end of t_mat.
    internal table and workarea declaration.......................................
    data : i_mat type table of t_mat.
    data : wa_mat type t_mat.
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
         EXPORTING
             FILETYPE   = 'DAT'
         TABLES
             data_tab   = i_mat.
    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 i_mat into wa_mat.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                       'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=AUSW'.
    perform bdc_field       using 'RMMG1-MATNR'
                                        wa_mat-matnr.
    perform bdc_field       using 'RMMG1-MBRSH'
                                        'P'.
    perform bdc_field       using 'RMMG1-MTART'
                                        'ZOH'.
    perform bdc_dynpro   using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                        'X'.
    perform bdc_dynpro   using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                        wa_mat-desc.
    perform bdc_field       using 'BDC_CURSOR'
                                        'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                        wa_mat-uom.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                        'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.

    Hi Sumant,
    just concentrate on bold one
    report ZMAT_UPLOAD
    no standard page heading line-size 255.
    types declaration..........................................................................
    <b>
    data : begin of t_mat occurs 0,
    matnr(20),
    desc(50),
    uom(5),
    end of t_mat.</b>
    internal table and workarea declaration.......................................
    <b>*data : i_mat type table of t_mat.
    *data : wa_mat type t_mat.</b>
    include bdcrecx1.
    start-of-selection.
    moving the flat file content to internal table................................
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILETYPE = 'DAT'
    TABLES
    <b>data_tab = i_mat.---> t_mat.</b>
    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.
    <b>loop at i_mat into wa_mat.------>loop at t_mat.</b>
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '=AUSW'.
    perform bdc_field using 'RMMG1-MATNR'
    <b>wa_mat-matnr.---->t_mat-matnr(change in this for ur wa to t_mat.</b>
    perform bdc_field using 'RMMG1-MBRSH'
    'P'.
    perform bdc_field using 'RMMG1-MTART'
    'ZOH'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'MAKT-MAKTX'
    wa_mat-desc.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-MEINS'.
    perform bdc_field using 'MARA-MEINS'
    wa_mat-uom.
    perform bdc_field using 'MARA-MTPOS_MARA'
    'NORM'.
    perform bdc_transaction using 'MM01'.
    endloop.
    Perform close_group.
    Reward points for helpful answers.
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen
    Message was edited by:
            Pattan Naveen

  • Rggarding upload data through BDC

    Hi guru,
    If anybody have BDC for uploading data for the transaction for J1ID (Customer Exicse Details) .
    then plz send me.
    Thanks

    hi,
       you could get BDC program automatically generated by SAP . Go to t-code SHDB do recording with your t-code after recording a session will be created .After selecting the session if you click the program button a Program will be automatically generated by SAP.Choose Radio button transfer from recording.
                                                                                    with regards,
                                                                                    M.Sreeram.

  • How we can upload the data through BDC for transaction J1ID

    Hi guru
    How w can upload the data for Transaction J1ID.In this we want to upload the data for Customer Excise details. I want to upload the data on behalf of Customer (KUNNR) becasue customer is a primary KEY. Table name: J_1IMOCUST
    Fields. 11 Fields.plz provide some code logic.
    KUNNR     J_1IEXCD     J_1IEXRN     J_1IEXRG     J_1IEXDI     J_1IEXCO     J_1ICSTNO     J_1ILSTNO     J_1IPANNO     J_1IEXCICU     J_1ISERN

    Hi,
    I dont see any difficulties in doing BDC upload for J1ID, You have to record by giving the New Entries button and then enter all the details of customers using table control technique.
    SEARCH SCN for Table Control in BDC
    Regards
    Karthik D

  • Reg Vendor master upload using BDC Call Transaction Method

    Hi All,
    Thanks in advance.
    I am uploading vendor master data using bdc call transaction method for XK01. In that  i am getting an error message that the fields " smtp_addr" ( for email) and "time_zone" (for time zone) doesnot exist on the screen '0110' ( this is the second screen) . the field timezone will be displayed on the screen only when we go for communications button and select the URL field .
    Do anybody have the solution for this problem. if possible can you give me the code for that screen.

    Create a recording via SM35 (menu go to=>recording), this will generate automatically the code for filling your bdcdata-table...

  • How to upload error records in call transaction method

    Hi all,
    While uploading data by using call transaction. If any errors occured, how can we process that  error records to database.
    If all records are processed. How can we display the recent records which where uploaded.
    AdvanceThanks for all.

    Hi Bharath
    You can handle this in many ways. But the easiest option to do is as below,
    once the call transaction ends in error, move that particular upload data to a separate internal table. Then finally download all these data to an error file.
    Besides this after processing all the records diplay the log for error. So that users can modify the error in the file and can use the same for uploading again. For the data that has been processed successfully you can display the log similarly.
    The error as well as sucess messages can be obtained from the messages table.
        CALL TRANSACTION TCODE USING BDCDATA
                         MODE   CTUMODE
                         UPDATE CUPDATE
                         MESSAGES INTO MESSTAB.
    Regards
    Kathirvel

  • How to upload data useing BDC

    hI SAP Guru's
        here i have to upload non-sap data  to sap , in the controling how to MAP the fileds and which T.code have use to please guide me

    Dear Purna,
    You would first need to identify the transaction for which you want to upload the data. For example KE51 to Create Profit Center. You could use BDC or BAPI methods. You can use LSMW tool as well.
    you would need to map SAP fields with the corresponding legacy field. You would prepare a layout for the legacy file and accordingly design BDC.
    Steps:
    1. Fetch Data (Download/Read Dataset/Select from Tables)
    3. Massage data as per SAP format.
    3. Validation Check
    4. Pass valid data to BDC (Call Transaction/Session) or BAPI
    5. In case of session method - session log is generated. In case of Call transaction you can use an internal table with structure BDCMSGCOLL to get messages. In case of BAPI the messages will be returned in return table (strcutre BAPIRET2/BAPIRETTAB).
    Hope this will help.
    Regards,
    Naveen.

  • Upload data into bdc throu word files  for this which fm use

    upload data through bdc from word file which function module use.

    insert new field into standard table. can we create it using append structure.

  • How can i fix my mac book pro. My safari crashes all the time, my screen will turn black for no reason, My iPhoto crashes during upload from my iPhone, I can't highlight anything and I can't drag anything.

    Someone PLEASE help me! I cant figure out what is going on with my computer.  I don't install anything weird, but my brother does.  He's very good at computer tech stuff and is in I.T, but I cant help but blame him for all the problems my Mac is having.  Nothing works like it should.  My safari will randomally crash, my screen will randomally turn back, my iphoto will crash during uploading from my iPhone, I cant highlight anything, I can't drag anything.  When I want to click on something, I have to click over and over again just for it to even register.  I know everything is up to date and recently reset my PRAM.  I'm running Lion and have a lot of room on my hardrive.  I have an external harddrive and I'm wondering if I should just move all of my important files over to it and completly wipe out my computer's hardrive and start from scratch. 

    Some folks can't leave well enough alone, and insist on downloading all sorts of additional "stuff" that ends up making their Mac unstable.
    Standard Mac OS X on properly-operating Hardware does not crash, unless you start installing too many add-ons.
    You can run "just the basics" by holding down the Shift key at Startup. This does one pass of Disk Repair, then loads a minimal set of extensions, and comes up in Safe Mode. If it works OK that way, but crashes in "regular", it's the add-ons.
    There ia another layer of add-on junk that can be added to Safari. If the only remaining problem is Safari crashing, those add-ons can be disabled as well.

  • I using FF-5-Stable. It much slower than Google Chrome 13. & crash during upload ??

    I using FF-5-Stable. It much slower than Google Chrome 13. & crash during upload ??
    it takes too much time to open a page.
    Always Crash during upload..for big or small file..
    It hangs and closed through Task manager or Reboot...

    1. What are you "uploading"?
    2. Have you tried a new Profile? Profiles don't last forever, and after going through a few major version updates "things" slow down, depending upon how much stuff the user has added to Firefox. Personally, I have created a new Profile for every new version of Firefox I have installed, up through Firefox 4.0. Didn't do that for Firefox 5, and probably won't for Firefox 6, due to the new fast release schedule and the fact that Firefox isn't being changed as much from one version to the next as it used to be changed under the 10 to 14 month intervals between major versions.<br />
    http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows

  • Apple TV status light goes off by itself,power cord is on but I'm not watching ATV programes ,I'm just watching tv show on my HD TV.can anyone help?

    Apple TV status light goes off while I was watching tv show on my HD TV not Apple TV .the Apple TV power cord is on,I need to switch the power on and off then the status light goes on  again on Apple TV is this normal?

    i need to turn the power on and off and then the status light come back but if im watching movie or airplay it working fine.if im not watching anything on apple tv but some show on my tv then it happen.

  • Need Help - Light goes off on screen!!

    Have Satelitte Pro A200 and as i am working its like as if the light goes off in the screen, it may switch back on, but usually I have to close the screen down and leave to laptop go into hibernation and then open up again.  this is very frustrating please Help!!!!

    Thank you for using the Toshiba Laptop Forums. Since there have been no posts to this thread in several days, it is being marked "read only" as part of our routine message board maintenance.
    If you still need assistance, please feel free to post a new message or contact the Toshiba Customer Support Center at 1-800-457-7777.
    Trina W
    Moderator

  • TS3048 Even after installing new batteries and switching it on my magic mouse does not work. Sometimes it works but switches off (indicator light goes off) on its own after a few minutes.

    Even after installing new batteries and switching it on my magic mouse does not work. Sometimes it works but switches off (indicator light goes off) on its own after a few minutes.

    Try resetting the PRAM and SMC.  Try making the device a favorite .
    Barry

Maybe you are looking for

  • Data Medium Exchange of Travel Expenses for Finland

    Hi, On sap menu search "Accounting-> Financial Accounting-> Travel Management-> Travel Expenses-> Periodic Processing-> Payment via Data Medium Exchange (DME)-> Change Country Grouping" when i try change to country finland, the following error appear

  • Schema and Table ..

    Hi , Can you please help me out on following questions. 1. How to physicalizing the Logical Model into database Schema AND Tables 2. How to create a Schema and table in oracle 11g. Let me know if scripts are available. 3. How to create a read only us

  • Opening hyperlinks in the same browser window

    Hey Gang! How does one create a hyperlink such that it opens in the same browser window and doesn't keep opening a new window each time? Cheers! Gregory

  • Tutorial: Azure AD integration with Innotas

    Click reply and tell us what you think: Azure AD integration with Innotas Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation

  • Webcam not released on SessionEnd

    We have this prop in our ALCS session: private var _webcams:WebcamSubscriber; when the session ends we simply call close: _webcams.close(); However, the little green light next to the inbuilt cam stays lit on our MBP's. Is there something else we nee