What is table handler error

What is table handler error.. I am geeting it while running an API

set serveroutput on;
declare
p_tp_rec_type OZF_TRADE_PROFILE_PVT.TRADE_PROFILE_REC_TYPE;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_trade_profile_id NUMBER;
begin
p_tp_rec_type.trade_profile_id :=11;
p_tp_rec_type.object_version_number:=2;
p_tp_rec_type.last_update_date :=sysdate;
p_tp_rec_type.last_updated_by :=1191;
p_tp_rec_type.creation_date :=sysdate;
p_tp_rec_type.created_by :=1191;
p_tp_rec_type.last_update_login :=1191;
p_tp_rec_type.request_id :=null;
p_tp_rec_type.program_application_id :=null;
p_tp_rec_type.program_id:=null;
p_tp_rec_type.created_from :=null;
p_tp_rec_type.party_id :=25041;
p_tp_rec_type.site_use_id:= null;
p_tp_rec_type.autopay_flag :='T';
p_tp_rec_type.claim_threshold :=50;
p_tp_rec_type.claim_currency :='USD';
p_tp_rec_type.print_flag :='F';
p_tp_rec_type.internet_deal_view_flag :='F';
p_tp_rec_type.internet_claims_flag:=null;
p_tp_rec_type.autopay_periodicity :=1;
p_tp_rec_type.autopay_periodicity_type :='MONTH';
p_tp_rec_type.payment_method :='CHECK';
p_tp_rec_type.discount_type :=null;
p_tp_rec_type.cust_account_id :=8040;
p_tp_rec_type.cust_acct_site_id :=null;
p_tp_rec_type.vendor_id :=1001;
p_tp_rec_type.vendor_site_id :=1001;
p_tp_rec_type.vendor_site_code:=null;
p_tp_rec_type.context :=null;
p_tp_rec_type.attribute_category :=null;
p_tp_rec_type.attribute1 :=null;
p_tp_rec_type.attribute2 :=null;
p_tp_rec_type.attribute3 :=null;
p_tp_rec_type.attribute4 :=null;
p_tp_rec_type.attribute5 :=null;
p_tp_rec_type.attribute6 :=null;
p_tp_rec_type.attribute7 :=null;
p_tp_rec_type.attribute8 :=null;
p_tp_rec_type.attribute9 :=null;
p_tp_rec_type.attribute10 :=null;
p_tp_rec_type.attribute11 :=null;
p_tp_rec_type.attribute12 :=null;
p_tp_rec_type.attribute13 :=null;
p_tp_rec_type.attribute14 :=null;
p_tp_rec_type.attribute15 :=null;
p_tp_rec_type.org_id :=121;
p_tp_rec_type.days_due :=null;
p_tp_rec_type.pos_write_off_threshold :=null;
p_tp_rec_type.neg_write_off_threshold :=null;
p_tp_rec_type.un_earned_pay_allow_to :=null;
p_tp_rec_type.un_earned_pay_thold_type :=null;
p_tp_rec_type.un_earned_pay_threshold :=null;
p_tp_rec_type.un_earned_pay_thold_flag :='F';
p_tp_rec_type.header_tolerance_calc_code :=null;
p_tp_rec_type.header_tolerance_operand :=null;
p_tp_rec_type.line_tolerance_calc_code:=null;
p_tp_rec_type.line_tolerance_operand :=null;
OZF_TRADE_PROFILE_PVT.Create_Trade_Profile( 1, 'T', 'T', 1, x_return_status, x_msg_count, x_msg_data, p_tp_rec_type, x_trade_profile_id);
dbms_output.put_line('TRADE PROFILE '|| x_trade_profile_id);
dbms_output.put_line('x_return_status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('x_msg_count = '||TO_CHAR(x_msg_count));
dbms_output.put_line('x_msg_data = '|| SUBSTR (x_msg_data,1,255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count LOOP
dbms_output.put_line(I||'.'||SUBSTR(FND_MSG_PUB.Get(p_encoded=>
FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;
commit;

Similar Messages

  • What is a "sync UI Handler" error mean?

    What does a "sync UI handler" error mean? This happens when I try to sync with my PC in itunes. It tells me there are three conflicts that occured when I synced, 2 calendar and 1 music.

    I had the same problem few days ago.
    It appears that MP4 format is a lot restricted, and Quicktime/iTunes does not communicate a lot about that. Tipically, Quicktime does not think that MPeg 4 + MP3 is an acceptable MP4 compination.
    To make them a lot more permissive, just try to rename the file extension to .m4v, it'll do the job in many cases, and worked for me on a lot of files.
    Best regards

  • Every time I switch tabs I get this message "Exc in ev handl: Error: Bad NPObject as private data!" What do I do to stop this message from coming up??

    If I open up firefox & have more than one tab I get this message "Exc in ev handl: Error: Bad NPObject as private data!" whenever I switch tabs. What should I do to fix this problem?? Thanks for your prompt attention to this matter
    -Kipp

    This issue is caused by the McAfee Site Advisor extension
    *https://community.mcafee.com/message/203466
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • What will get rid of "EXC in EV handl: error bad NP object as private data"?

    I am taking some online classes and whenever I am trying to do homework or send in my assignments or take a test this error report comes up: EXC in EV handl: error bad NP object as private data. What does this mean and how do I get rid of it? I need to be able to do my college work online and know that it is getting to the instructor. How can I know if my assignments and test and any other communication with my college are getting to the right place?

    Please see solution in http://kb.mozillazine.org/Problematic_extensions
    for "McAfee Site Advisor".
    (Windows): For best results you should uninstall '''McAfee Site Advisor''' from Control Panel > add/change programs (Programs and Features). Reboot the system. Then Reinstall from http://www.siteadvisor.com/ and reboot the system. When installing refuse other suggested (crapware) applications.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • I don´t get any Java Script referral on the: Exc in ev handl: Error: Bad NPObject as private data, what is then my problem?

    Exc in ev handl: Error: Bad NPObject as private data
    This is the pop up that keeps annoying me in FF. You send me the question: The box that the error is in says something about JavaScript?
    I´m answering NO!

    This issue can be caused by an extension that isn't working properly (McAfee Site Advisor).
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Exc in ev handl: Error: Bad NPObject as private data! what is this an how do i get rid of it...

    Exc in ev handl: Error: Bad NPObject as private data!

    Please see solution in http://kb.mozillazine.org/Problematic_extensions
    for "McAfee Site Advisor".
    (Windows): For best results you should uninstall '''McAfee Site Advisor''' from Control Panel > add/change programs (Programs and Features). Reboot the system. Then Reinstall from http://www.siteadvisor.com/ and reboot the system. When installing refuse other suggested (crapware) applications.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • What is this message mean? Exc in ev handl: Error: Bad NPObject as private data!

    Exc in ev handl: Error: Bad NPObject as private data! Why do I get this message when browsing?

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • I rcvd the following error : Exc in ev handl: Error: Bad NPObject as private data! What cause this problem ? Thanks

    Whenever opening a new link, rcvd the following error : Exc in ev handl: Error: Bad NPObject as private data!

    this issue can be caused by the McAfee Site Advisor extension. See:
    * https://community.mcafee.com/message/203466
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes

  • Owb - error tables giving error info- what war ethey called? - 11.2.0.3

    Hi,
    We are using 11.2.0.3.
    In old 10g we could see various metadata tables storing error info.
    Where are such tables in 11.2.0.3 assume under workspace owners schema?
    Any advice as to table names would be great.
    Thanks

    They have the same names, just the owner is OWBSYS. You need to set workspace before querying them.
    Regards
    ANA GH

  • How to handle Error Handling In Mediator.

    Hi guys,
    Accually my reqirement is need to handle Error exception in Mediator. I am new for Meditor.
    we read source file through Mediator and route the data to Database Table in betwen need to handle Error Handling...What type of Fault handling we can do here..? plese refer any solution and sample interface URL me....Thank you

    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/med_faulthandling.htm#CHDJAADA

  • How to identify what are all the errors appears in process chain,

    Hi all,
    i have a process chain running, but i want to find out what are all the errors that the process chain has thrown
    thanks
    pooja

    Hi Pooja,
    Errors in monitoring:
    SID error
    Reason: If the corresponding master data is missing for the particular transaction data.
             1. Check for the load timing for the respective master data, if it less than an hour  then make the request red and repeat the ip.
             2. If the data is loaded to PSA then you have to delete the request from target and manually push the data to from PSA.
             3. If we are required for selective update then note down the info source from header and find it in RSA1,select the one with ‘Single as postfix’.
             4. Goto ‘data selection’ tab and change the range.
    Tip: change the last 4 digits for from to ‘0000’and the last 4 digit for to     ‘9999’.
            5. Repeat the ip.
             6. In case only of failure in one target goto RSA1 find the PSA, put he request no. and reschedule it.
    Note: IF PSA is present never make the request red rather delete it.
    Replication error
    Reason: Data source replication Failed.
             1. In order to handle this error you should be known to IP, info source and source system.
             2. Goto RSA1, find the data source in the source sys tab.
             3. Right click on the data source and replicate it.
             4. Since all the transformation rules pertaining to this data source need to be reactivated so go to SE38 and execute rs_transtru_activat_all, data source and sys name.
             5. Delete the ‘red’ request from the target.
    Update R not supported
    Reason: The corresponding initialization flag for the ip is lost.
             1. Goto header click on the ip and goto schedule tab and click initialize in the source system, whatever screen appears delete the only request present(the initialization flag).
             2. Goto RSA1, find the ip in the info source (one with the Adhoc initialize flag).
             3. Goto update tab and select ‘Initialize delta process’ try going for ‘with data transfer’.
             4. Reschedule the IP.
    Duplicate Record Error
    Reason: Duplicate error records for the loaded master data.
             1. Goto info package via header or via RSA1.
             2. Goto ‘processing tab’ and change the ip setting, selecting only PSA and ignore duplicate records and re run the ip.
             3. Do remember to change the ip settings back to the original once after the second step.
    ODS activation failure
    Reason: Prerequisites for ODs activation not satisfied i.e. unique key.
             1. Goto ‘maintain variant’.
             2. Check for the ‘QM’ status of the requests in the target they should be green.
             3. Then click the ODS activation tab.
             4. In the screen which appears put the requests for which ODS activation failed.
             5. Activate these and keep on refreshing them until status reverts from green,
    Remember to refresh these requests one at a time.
             6. If requests are red then delete them from target.
             7. Reschedule the IP.
    Note: Never Try activating ODS manually if it is Y1.
    Aggregate Rollup error
    Reason: No aggregate found for the respective rollup.
             1. Click on the variant in which the error occurred.
             2. Goto chain tab and copy the variant and instance.
             3. Run the nestle provided program YBW05.
             4. Put in info in there and put the status as g – ‘green’.
             5. Execute and refresh the status.
    Lock issue
    Reason: The same ip is been locked by other user or may be used by other process chain.
             1. We can see the locked entries and in the transaction SM12.
             2. Wait for the other process to get complete once the ip loads to target in that process then there is no need for running it for the process.
             3. In other case make the request red, when PSA is present then goto environment tab ->schedule->initiate update.
             4. In the box appears select update in the background.
             5. And the manually update the failed IP’s by selecting manual update in the context menu.
    Alfa confirming value error, Time conversion error, Chain didn’t start, Delay due to long running job, Poor system performance,Heirarchy node exist in duplicate.
    Reasons:
      Alfa confirming error: Data format mismatch.
      Time conversion error: Date, time format mismatch.
      Chain didn’t start: A scheduled chain didn’t triggered at the prescribed timing.
    -For all the above error we have to raise a ticket.
    Idoc or TRFC error
    Reason: An Idoc is been stuck somewhere.
             1. Reload the Master Data manually again from Info-package at RSA1.
             2. Release the Idoc.
             3. In the source system level got environment->transaction->Transaction RFC or Data ware housing level.
             4. In the Screen if the status is ‘Transaction Recorded’ it means its stuck goto edit and click Execute LUW or press F6.
             5. If status is ‘Transaction executing’ then it means its fine wait.
             6. Or raise ticket.
    Error Due to short Dump
    Reason: Error due to Short dump could be due to many reasons i.e. memory, table space, lock, error record, page allocation, failed change run.
    Process terminated in the Source system.
               Reason: Sometimes we face that a load has failed due to job Termination at Source System.             
          This happens due to unavailability of the source system or some connectivity problem between source and target systems.
    1.      Make the request red.
    2.      Delete the request from the data target.
    3.      Reschedule the ip.
    4.      If still the job fails raise the ticket.
    And also check in following links:
    Process Chain Errors
    /people/mona.kapur/blog/2008/01/14/process-chain-errors
    Common Process chain errors
    For Data Load Errors check this blog:
    /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks
    Pls assign points if it helps u,
    Thanks & Regards,
    Madhu

  • Handling errors in Reports.

    Hi.
    I wonder how can one handle errors raised during report execution. Suppose I have a report and it's stopping execution due to some Oracle error. I need to log the error in a table. Oracle Reports do not, however, contains any trigger similar to ON-ERROR in Oracle Forms. What to do with this?
    Thanks in advance,
    JackK
    P.s. We're still using Oracle Reports/2000, unfortunately. Then we migrate to 10g.
    Edited by: JackK on Apr 5, 2012 6:49 AM
    No one can help me? :(

    Same for 10g: the is no such thing in Reports as a general on-error trigger.
    However, in 10g the error is visible in the Reports job queue. You can see the job queue via the URL:
    http://<host>:<port>/reports/rwservlet/showjobs?server=<repserver>
    You would see an error like this:
    Error
    Terminated with error: <br>REP-300: : invalid identifier
    etc.

  • To handle errors

    Hi, if tr r 100 records to be updated, if  3, 52 and 99 records are failed ,what happens in case of session  and calltransaction method, how we can correct the errors in both cases and what happens they will update remaining fields or not.

    hi,
    if you use session u can check unprocessed records using SM35 tcode.In sm35 after processing the session you can check error log for unprocessed records depending up on the error message we can modify that particular record.
    In the call transaction method we have to explicitly catch errors using BDCMSGCOLL and FORMAT_messages.
    just check the below coding.
    Handling errors in calltransaction using XK01 tcode.
    REPORT  ZSR_BDC_CT_ERROR1.
    TABLES : RF02K,LFA1.
    DATA: BEGIN OF ITAB OCCURS 0,
             LIFNR LIKE RF02K-LIFNR,
             KTOKK LIKE RF02K-KTOKK,
             NAME1 LIKE LFA1-NAME1,
             SORTL LIKE LFA1-SORTL,
             LAND1 LIKE LFA1-LAND1,
             SPRAS LIKE LFA1-SPRAS,
          END OF ITAB.
    DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           BDCMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    INCLUDE BDCRECX1.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'z:\flatfiles\sr1.txt'
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    LOOP AT ITAB.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0100'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_FIELD       USING 'RF02K-LIFNR'
                                  ITAB-LIFNR.
    PERFORM BDC_FIELD       USING 'RF02K-KTOKK'
                                  ITAB-KTOKK.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0110'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFA1-SPRAS'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_FIELD       USING 'LFA1-NAME1'
                                  ITAB-NAME1.
    PERFORM BDC_FIELD       USING 'LFA1-SORTL'
                                  ITAB-SORTL.
    PERFORM BDC_FIELD       USING 'LFA1-LAND1'
                                  ITAB-LAND1.
    PERFORM BDC_FIELD       USING 'LFA1-SPRAS'
                                  ITAB-SPRAS.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0120'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=ENTR'.
    PERFORM BDC_DYNPRO      USING 'SAPLSPO1' '0300'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=YES'.
    PERFORM BDC_TRANSACTION USING 'XK01'.
    IF SY-SUBRC <> 0.
    *LOOP AT bdcmsg.
    *WRITE: bdcmsg-DYNAME,
          bdcmsg-DYNUMB,
          bdcmsg-MSGTYP,
          bdcmsg-MSGSPRA,
          bdcmsg-MSGID,
          bdcmsg-MSGNR,
          bdcmsg-MSGV1,
          bdcmsg-MSGV2,
          bdcmsg-MSGV3,
          bdcmsg-MSGV4.
    *ENDLOOP.
    READ TABLE BDCMSG WITH KEY MSGTYP = 'E'.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = BDCMSG-MSGID
       LANG            = SY-LANGU
       NO              = BDCMSG-MSGNR
       V1              = BDCMSG-MSGV1
       V2              = BDCMSG-MSGV2
       V3              = BDCMSG-MSGV3
       V4              = BDCMSG-MSGV4
    IMPORTING
       MSG             = BDCMSG-MSGV1
    EXCEPTIONS
      NOT_FOUND       = 1
      OTHERS          = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE : / BDCMSG-MSGV1.
    ENDIF.
    ENDLOOP.
    *perform close_group.

  • Handling errors in bdc

    Hi,
    How to handle errors in bdc call transaction method.
    what is the steps to download errors from bdcmsgcoll into flat file  in call transaction method
    uday

    Hi friend,
      Here is a beautiful example which explains how to trap erroreneous records ..if help full then please give me max reward point.
    REPORT  zgopi_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

  • What are the common errors we wil get in BDC?

    what are the common errors we wil get in BDC?

    hi sunil
    BDC errors are similar to what you get in online transaction. Suppose you enter an invalid material number in online ME21N ( create Po ) system will throw an error and you have to correct it by chnaging a valid material number . Same error you can get in BDC as well. It is very difficult to generalize types of error as errors will depend on the transacation you are doing.
    However some of the common BDC errors are ( Data for Screen Not Found, Field Not available in Screen ). These again are transaction specific and you have to analyze it by calling the transacion in display ALL mode.
    The errors you get depends upon the transaction you are
    running.
    This is how you handle:
    Let's consider you are recording for the transction CJ40
    (Messages table declaration )
    DATA :BEGIN of t_msg occurs 0.
    include structure BDCMSGCOLL.
    DATA END of t_msg.
    Handling it :
    CALL TRANSACTION 'CJ40' using T_BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO t_msg.
    commit work.
    If you want to display the errors in the screen you can use a function module named 'RPY_MESSAGE_COMPOSE'
    This gives you the corresponding message for the message number that you input.
    Below is the sample code
    Loop at t_msg. " Messages internal table
    w_msgid = t_msg-msgid.
    w_msgno = t_msg-msgnr.
    w_msgv1 = t_msg-msgv1.
    w_msgv2 = t_msg-msgv2.
    w_msgv3 = t_msg-msgv3.
    w_msgv4 = t_msg-msgv4.
    CALL FUNCTION 'RPY_MESSAGE_COMPOSE'
    EXPORTING
    LANGUAGE = SY-LANGU
    MESSAGE_ID = w_msgid
    MESSAGE_NUMBER = w_msgno
    MESSAGE_VAR1 = w_msgv1
    MESSAGE_VAR2 = w_msgv2
    MESSAGE_VAR3 = w_msgv3
    MESSAGE_VAR4 = w_msgv4
    IMPORTING
    MESSAGE_TEXT = t_text-text.
    TABLES
    LONGTEXT =
    EXCEPTIONS
    MESSAGE_NOT_FOUND = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    MESSAGE_TEXT contains the message.
    Please reward points if this explanation useful.
    Regards,
    navjot
    reward points

Maybe you are looking for