TRIGGER_STATE changes to ERROR in QRTZ_TRIGGERS database table.

Hi,
I have developed an application to schedule processes. I am using QUARTZ triggers to do it.
I am using the database to store job details and trigger states.
for some of the triggers in QRTZ_TRIGGERS table, the TRIGGER_STATE attribute automatically turns to ERROR.
How can i solve this problem?
Is there a way to automatically change this state to WAITING when TRIGGER_STATE is ERROR?
please help..

The Oracle database doesn't support the returning clause for database views using instead-of triggers. ADF BC inherently includes the returning clause, if in a relating EO you have the refresh-after-insert or refresh-after-update property set on for an attribute.
Hope this helps.
CM.

Similar Messages

  • Errors while activating database table.

    Hi all,
    I have added zfields(ztz_stceg and zz_mwsk1) to database table using append structure.
    while trying to save i am getting errors.
    I am attaching the picture, please suggest me why those errors are coming.
    Thanks & regards,
    NarsiReddy.

    Hi,
    In SE11,  open your table in change mode and got menu Extras-> Enahncement Category...
    click  and reset  as  below.
    if your table is one level then set the enhancement category set as using option " can be enhanced(character type or numeric type)" and if your table using deep structure or table then use option " can be enhanced (deep)" option.
    Please try.
    Regards,
    Prasenjit

  • Error while connecting Database Table

    Hi, I am trying to connect to the Oracle Database Table using Out-Of-Box Database Table Adapter. While trying to configure, i am able to connect to the desired database and tables but when i trying to save the configuration i am getting the folllowing error :
    com.waveset.util.XmlParseException: XML Error: 3:16: The markup in the document following the root element must be well-formed.
    Will appreciate any help on this ...
    Thanks

    I have seen that before and we have never been able to find the cause of the issue.
    If you have a support contract log a case, we might be able to find more if we have two cases with the same issue.
    WilfredS

  • Error while creating database table

    Hi
    I am creating a table with 2 key fields of length 255 chars each. its giving me error Key field is greater than 780. Please suggest.
    Regards
    Aditya

    Hi,
    Since table key can be max of 255 length,we rarely make use of a single key field of 255,
    so, reduce the length of field.
    Constraints
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.
    Edited by: Sreesudha Gullapalli on Feb 6, 2009 8:19 AM

  • Are FRM- Errors available as Database Table

    Hello
    In order to make it easier to find an Oracle-Error-Message we have a Database with ORA-, TNS-, ... Messages.
    I have been able to extract even the REP- Messages from the help-file, but could not do it for Forms-Messages. Is there a possibility to get the Messages into a table with Number, Cause, Action?
    Thanks for any answer
    Wimmer Marcus

    Hi Marcus,
    We can post the Form generated Error_code, Error_type and Error_text in to a Oracle Backend Table by writing a Form level 'ON- ERROR' trigger . A sample for the same has be given for your reference
    TRIGGER: ON- ERROR
    SCOPE : FORM LEVEL
    declare
         v_error_code number;
         v_error_type varchar2(5);
         v_error_text varchar2(20);
    begin
         v_error_code := error_code;
         v_error_type := error_type;
         v_error_text := error_text;
         insert into error_message values(v_Error_Type||'-' ||v_Error_code||' : ' ||v_Error_text);
    end;
    Note : you need to create the table error_message with a varchar2(100) column, in the same scheme to which your Front end applications are connected to.
    Hope this should slove your problem
    K V N PRASANT
    DBA/Designer
    ORAMASTERS SOFTWARE INDIA Pvt ltd
    HYDERABAD
    INDIA

  • Change of structure of database table

    A custom database table has been created and is already in use by 10 programs. Now a new requirement has come to add a field i.e. a check box to the database table to be used by one of the 10 programs. Can we change the structure of the database table after activating it and when the table is in use? Please provide me inputs on this.
    Thanks and regards
    Radhika

    Yes. U can change it. But I suggest u to do it through the process of 'Append Structure'.
    If u have any probelm after changing follow this process.
    Goto Utilities > Database Utilities> Activate and Adjust Database
    Awrd Points if useful
    Bhupal

  • Database Table cannot be found when Verify Database

    Post Author: brentlaw
    CA Forum: Other
    I have been using CRW 7 for many years.  I recently upgraded to XI (I have current version).  I can open existing reports and create new reports fine.  The problem is when I Verify Database I get an error message "The Database table <tablename here> cannot be found. Remove this table from the report". 
    This happens to all existing and new created reports.  The data fills correctly when previewing.  The problem only occurs when Verifying Database. 
    I thought it might be an ODBC driver problem so I upgraded my driver to v 3.525.1117.  At least I think I upgraded it I did not check the version before I installed SQL 2005 SP2.  After installing SP2 it seemed to be fine but a week later the problem came back.  Mysterious eh?
    I am trying to launch a report from VB6 using RDC and rpt file.  I get logged in correctly but at .viewreport I get a generic error message.  I am assuming the problem is related the the issue I raise in this forum post.

    Post Author: brentlaw
    CA Forum: Other
    I fixed the problem.  In CR XI Developer Designer window I opened up Database-SetDataSourceLocation.  I noticed that in "Properties" the last item "Use DSN Default Properties": was set to True.  I changed this value to False.  Now this problem is solved.
    I am Not using Windows Authentication I am using SQLServer authentication.  In my code I was passing SQLServer Authentication credentials. 
    I opened up all of my CR 7 reports in CR XI and changed this setting on both the Main and the Subreort property in the SetDataSourceLocation dialog box and now all my reports work.  I am a happy camper.
    I don't know if this is a CR 7 conversion to CR XI only situation or not.  Hope this information helps someone else.

  • Import/insert data from XML into Oracle database tables?

    Hi. (I am using JDeveloper 10.1.3.3.0 and Oracle 10g)
    I have been able to export the data from one of my database tables by using a View Object and .writeXML.
    Now, I want to take an xml file that is formatted in the same way as what is spit out by the writeXML and put that info in my database table. I followed online examples and have tried using .readXML like so:
    Element element = XMLDoc.getDocumentElement();
    vo.readXML(element, -1);
    I know it is sort of working, because at first I got an error message that one of the required attributes was missing. So, I added that attribute to my xml file and ran my code. No errors. But, I checked my database, and the new records were not added.
    Is there something I have done wrong? Or is there perhaps something I left out? I also noticed there were several versions of readXML like readFromXML. Which one should I use and how?
    Thanks.

    KUBA, I changed my code to match your example:
    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    File xmlFile = new File("C:/myfilehere.xml");
    Document doc = db.parse(xmlFile);
    Element element = doc.getDocumentElement();
    vo.readXML(element, -1);
    vo.getDBTransaction().commit();
    I still get no errors, but my database table has no new records.
    Any ideas why?
    Thanks.

  • After REFRESH the cached object is not consistent with the database table

    After REFRESH, the cached object is not consistent with the database table. Why?
    I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
    in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
    Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
    JDeveloper.
    How to make the JDeveloper's offline tables to be synchronized with the underling database tables?

    qkc,
    Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
    John

  • Update a field in view, based on change in one of it's tables.

    Hi,
    I have created a Maintenance view based on three DB tables.
    My requirement is if i change data in one the database tables the view should get automatically updated with the new data.
    Could anyone please soleve my issue, points are definite.
    Thanks and regards,
    raghavendra goutham p.

    Hi,
       any changes to the database field value will
       automatically gets reflected in view .
       please check it.
    Regards
    Amole

  • Toplink JPA forces database table and column names to UPPERCASE! Why?

    I have recently experienced using Toplink JPA while using glassfish ... migrating an existing application to EJB 3.0 persistence. Toplink JPA, as implemented in glassfish, forces tablenames and column names from my code to be uppercase in select statements, etc. as then submitted to the database. Why? I cannot find anything in the EJB 3.0 specs on persistence that even suggests this.
    This created a serious problem for me, in my application. For my code to work I had to change the names of the database tables to all uppercase, even though that meant other of my applications, already written using the original mixed case names of the databases, will no longer work unless I revise the code in those applications! (I am using mySQL as my database.)
    In both Unix/Linux and Java, which are both case sensitive, If I wanted names of files or other items to be uppercase, I would have written them that way. I do not expect some middleware piece of software to muck around with the case of text I have put into my code.
    I am hopeful this 'feature' of the reference implementation of the EJB Persistence API will be corrected in a subsequent version. [Maybe you can tell I am not happy!]
    Thanks for listening to my rant.

    Robert,
    I found that the name I specify in all of my @Table, @Column, ... annotations is used with the case as it is provided.
    If TopLink determines the schema information through defaults then the names it comes up with are definitely upper cased by default.
    Are you specifying the schema information that you want in annotations or XML?
    Doug

  • Modifying database table through ALV-Grid

    Hi all.
    I need to modify a database table (ZNG_SO_HEAD) by entering data in ALV-Grid, which displays its internal table (exact  copy of ZNG_SO_HEAD), and clicking the button ('CHANGE') on the ALV-toolbar. The ALV is already editable, the button already exists. Here is the code. After changing data in ALV and clicking 'CHANGE' on the toolbar the database table ZNG_SO_HEAD remains unchangeable, but i need to change data in it somehow.
    Thanks all.
    REPORT  zng_alv_tc_edit_simp.
    *-- GLOBAL DATA DECLARATIONS FOR ALV
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
    DATA gt_fieldcat TYPE lvc_t_fcat.
    DATA gs_layout TYPE lvc_s_layo.
    TABLES: zng_so_head, zng_cust, zng_vendors.
    *-- STRUCTURE OF INTERNAL TABLE
    TYPES: BEGIN OF in_tab,
            mandt TYPE zng_so_head-mandt,
            so_num TYPE zng_so_head-so_num,          "type numc
            vend_num TYPE zng_so_head-vend_num,      "type numc
            cust_num TYPE zng_so_head-cust_num,      "type numc
            so_date TYPE zng_so_head-so_date,        "type dats
           END OF in_tab.
    *-- INTERNAL TABLE HOLDING LIST DATA
    DATA res_tab TYPE TABLE OF in_tab WITH HEADER LINE.
    *DATA wa_res_tab LIKE LINE OF res_tab.
    *-- FILLING IN INTERNAL TABLE
    SELECT h~mandt h~so_num h~vend_num h~cust_num h~so_date
    INTO TABLE res_tab FROM zng_so_head AS h.
    *       CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *   to add new functional buttons to the alv toolbar
        handle_toolbar
          FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING e_object
                      e_interactive,
    *   to implement user commands
        handle_user_command
          FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING e_ucomm.
    ENDCLASS.             "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD handle_toolbar.
        DATA: ls_toolbar TYPE stb_button.
        MOVE 3 TO ls_toolbar-butn_type.
        CLEAR ls_toolbar.
        MOVE 'CHANGE' TO ls_toolbar-function.
        MOVE icon_change TO ls_toolbar-icon.
        MOVE 'change' TO ls_toolbar-quickinfo.
        MOVE 'change' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar>
      METHOD handle_user_command.
        DATA:l_valid TYPE c.
        CASE e_ucomm.
          WHEN 'CHANGE'.
            CALL METHOD gr_alvgrid->check_changed_data
              IMPORTING
                e_valid = l_valid.
            IF l_valid = 'X'.
              MODIFY zng_so_head FROM res_tab.
            ENDIF.
        ENDCASE.
      ENDMETHOD. "handle_user_command
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    DATA object_ref TYPE REF TO lcl_event_handler.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
    >>>>>>done correctly>>>>>>>>>
    FORM display_alv.
    >>>>>>done correctly>>>>>>>>>
    START-OF-SELECTION.
      CALL SCREEN 100.
    *  MODULE STATUS_0100 OUTPUT
    MODULE display_alv OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      PERFORM display_alv.
      CREATE OBJECT object_ref.
      SET HANDLER object_ref->handle_toolbar FOR gr_alvgrid.
      SET HANDLER object_ref->handle_user_command FOR gr_alvgrid.
    ENDMODULE.                    "display_alv OUTPUT
    *  MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    IF sy-ucomm = 'BACK' OR
         sy-ucomm = 'EXIT' OR
         sy-ucomm = 'CANCEL'.
        LEAVE PROGRAM.
      ELSE.
        CALL METHOD object_ref->handle_toolbar.
        CALL METHOD object_ref->handle_user_command.
      ENDIF.
    ENDMODULE.

    Hello Nikolai,
    I have written a sample code taking care of all the requirements(button in the toolbar and changes saved in database).I have used SPFLI table and the internal table i_spfli.This code works and the change is also made in the database table.
    REPORT  SAMPLE.
    *-- GLOBAL DATA DECLARATIONS FOR ALV
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
    DATA gt_fieldcat TYPE lvc_t_fcat.
    DATA gs_layout TYPE lvc_s_layo.
    Data:i_spfli type table of spfli.
          CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        DATA:l_valid TYPE c.
         DATA: ls_toolbar TYPE stb_button.
        METHODS:
      to add new functional buttons to the alv toolbar
        handle_toolbar
          FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING e_object
                      e_interactive,
      to implement user commands
        handle_user_command
          FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING e_ucomm.
    ENDCLASS.             "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD handle_toolbar.
      CLEAR ls_toolbar.
        MOVE 0 TO ls_toolbar-butn_type.
        MOVE 'CHANGE' TO ls_toolbar-function.
        MOVE 'ICON_CHANGE' TO ls_toolbar-icon.
        MOVE 'change' TO ls_toolbar-quickinfo.
        MOVE 'change' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar>
      METHOD handle_user_command.
        CASE e_ucomm.
          WHEN 'CHANGE'.
            CALL METHOD gr_alvgrid->check_changed_data
              IMPORTING
                e_valid = l_valid.
            IF l_valid = 'X'.
              MODIFY spfli FROM table i_spfli.
            ENDIF.
        ENDCASE.
      ENDMETHOD. "handle_user_command
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    START-OF-SELECTION.
    DATA object_ref TYPE REF TO lcl_event_handler.
    select * from spfli into table i_spfli.
    Call screen 100.
    MODULE STATUS_0100 OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      PERFORM display_alv.
    ENDMODULE.                    "display_alv OUTPUT
    MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    IF sy-ucomm = 'BACK' OR
         sy-ucomm = 'EXIT' OR
         sy-ucomm = 'CANCEL'.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    *& Form display_alv
    FORM display_alv.
    *IF gr_alvgrid IS INITIAL.
    CREATE OBJECT gr_ccontainer
    EXPORTING container_name = gc_custom_control_name.
    CREATE OBJECT gr_alvgrid
    EXPORTING i_parent = gr_ccontainer.
    PERFORM prepare_field_catalog CHANGING gt_fieldcat.
    CREATE OBJECT object_ref.
      SET HANDLER object_ref->handle_toolbar FOR gr_alvgrid.
      SET HANDLER object_ref->handle_user_command FOR gr_alvgrid.
    CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
    is_layout = gs_layout
    CHANGING
    it_outtab = i_spfli[]
    it_fieldcatalog = gt_fieldcat.
    ENDFORM. "display_alv
    *& Form prepare_field_catalog
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    ls_fcat-fieldname = 'CARRID'.
    ls_fcat-ref_table = 'SPFLI'.
    ls_fcat-edit = 'X'.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'CONNID'.
    ls_fcat-ref_table = 'SPFLI'.
    ls_fcat-edit = 'X'.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'DEPTIME'.
    ls_fcat-ref_table = 'SPFLI'.
    ls_fcat-edit = 'X'.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'ARRTIME'.
    ls_fcat-ref_table = 'SPFLI'.
    ls_fcat-edit = 'X'.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    endform.
    Hope this helps.
    Regards,
    Beejal

  • Updating database table with DUPLICATE keys

    i have an internal table having data as follows.
    emp_id     name     date           proj_id  activity_id    Hours  Remarks
    101     Pavan    09.10.2007      123     1         2.00       Coding
    101     Pavan     09.10.2007   124     2         1.00        Documentation
    102     Raj     09.10.2007   123        3         6.00     Testing
    Now i need to update a Ztable with above mentioned data.
    The structure of the Ztable is as follows.
    Mandt     emp_id  name    date    proj_id   activity_id   Hours   Remarks
    NOte: i have ticked both check boxes for the field MANDT in table.
    Rest didnt select the check boxes.
    I believe now the field MANDT alone is a primary key for the z-table.
    NOw i have tried with UPDATE/INSERT statments to update the database table.
    But instead of inserting all the rows, the system is over writing on the same emp_id row.
    Even tried with the statments like INSERT INTO <Ztable> values <Internal table> ACCEPTING DUPLICATE KEYS.
    But its not getting inserted as a separate row in the table.
    Requirement is to insert the multiple rows in the database table without any over writing activity.
    Can anyone give me the code to do this?
    Regards
    Pavan

    Hi Pavan,
        Please let me know what are the key fields in your Ztable. Try with below code it may help you. change the "Ztablename" as your database table name and I_INTERNAL TABLE  as your internal table name. still you are facing the problem please let me know.
    lock the custom table before updating the table.
      CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
      MODE_RSTABLE         = 'E'
         TABNAME              = 'ZTABLENAME'
      VARKEY               =
      X_TABNAME            = ' '
      X_VARKEY             = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
       EXCEPTIONS
         FOREIGN_LOCK         = 1
         SYSTEM_FAILURE       = 2
         OTHERS               = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        INSERT  ZTABLENAME FROM TABLE I_INTERNALTABLE ACCEPTING DUPLICATE KEYS.
        COMMIT WORK.
      ENDIF.
    unlock after updating the custom table After updation is done.
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
        MODE_RSTABLE       = 'E'
         TABNAME            = 'ZTABLENAME'
        VARKEY             =
        X_TABNAME          = ' '
        X_VARKEY           = ' '
        _SCOPE             = '3'
        _SYNCHRON          = ' '
        _COLLECT           = ' '

  • How to change a field of type CHAR of a database table to DATS

    Dear ABAP experts,
    I have a database table: ZLT_aztnew with fields M1, M2, K1, K2, A1, A2, P1, P2, S2, D1, D2,  STD, BES. All these fields are of type 'Character'.  except D2 which is of type DATS. The field D1 is date and is in format DD.MM.YYYY.
    I want to convert this field D1 to type DATS so that I can use a date range through 'selection option' to select other  data of other fields (M1, M2, K1, K2, A1, A2, P1, P2, S2, D1, STD, BES.) related to field D1 from the database table Zlt_aztnew.
    How should I introduce this change (CONVERSION OF D1 CHAR to DATS in the .AZT file upload code itself.
    Problem: If I define D1 as Type  DATS in database table ZLT_AZTNEW then the UPLOAD fails.
    The AZT file upload code is:
    Data  it_string   type stringtab.
    Data  lv_string    type string.
    DATA:  itab  TYPE STANDARD TABLE OF zlt_aztnew.
    DATA:  wa_tab    TYPE zlt_aztnew.
    DATA: file_str1 type string.
    Data: it_tab TYPE STANDARD TABLE OF file_table,
            lw_file LIKE LINE OF it_tab,
            gd_subrc TYPE i.
    SELECTION-SCREEN begin of block blk with frame title text-100.
      SELECTION-SCREEN SKIP 2.
        parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
        window_title = 'Select only Text File'
        default_filename = '.azt'
        multiselection = 'X'
        CHANGING
        file_table = it_tab
        rc = gd_subrc.
    READ TABLE it_tab INTO lw_file INDEX 1.
       p_file = lw_file-FILENAME.
    Start-of-Selection.
      file_str1 = P_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.
    clear wa_tab.
    SPLIT lv_string AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab-D1  wa_tab-STD  wa_tab-BES.
    Append wa_tab to itab.
    Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    DATA: Answer.
    UPDATE zlt_aztnew From Table itab.
    * INSERT ZLT_aztnew From Table itab accepting duplicate keys.
    If sy-subrc NE 0.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
       TITLEBAR                    = 'TITLE '
    *   DIAGNOSE_OBJECT             = ' '
        text_question               = 'Wollen Sie die vorhandenen Inhalte ändern'
       TEXT_BUTTON_1               = 'Ja'(001)
    *   ICON_BUTTON_1               = ' '
       TEXT_BUTTON_2               = 'Nein'(002)
    *   ICON_BUTTON_2               = ' '
       DEFAULT_BUTTON              = '1'
       DISPLAY_CANCEL_BUTTON       = 'X'
    *   USERDEFINED_F1_HELP         = ' '
    *   START_COLUMN                = 25
    *   START_ROW                   = 6
    *   POPUP_TYPE                  =
    *   IV_QUICKINFO_BUTTON_1       = ' '
    *   IV_QUICKINFO_BUTTON_2       = ' '
    IMPORTING
       answer                      = answer
    * TABLES
    *   PARAMETER                   =
    EXCEPTIONS
       TEXT_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.
    IF Answer = '1'.
    WRITE: / 'Die vorhandenen Inhalte war geändernt'.
    MODIFY zlt_aztnew From Table itab.
    ENDIF.
    ENDIF.
    TO introduce a date range and pull data from the database table Zlt_AZTNEW--> I wrote the BELOW code SEPARATELY,
    but after execution, the error I am getting is: Enter a valid Date (for example, 31.03.2014).
    TABLES:   ZLT_aztnew.
    TYPES:  Begin OF ty_AZTN,
             M2   TYPE Zlt_AZTNEW-M2,
             K2   TYPE Zlt_AZTNEW-K2,
             A2   TYPE Zlt_AZTNEW-A2,
             P2   TYPE Zlt_AZTNEW-P2,
             S2   TYPE Zlt_AZTNEW-S2,
             D1   TYPE Zlt_AZTNEW-D1,
             STD  TYPE Zlt_AZTNEW-STD,
             BES  TYPE Zlt_AZTNEW-BES,
           END OF ty_AZTN.
    DATA:   gv_datum  TYPE d.
    DATA:   it_aztn TYPE STANDARD TABLE OF ty_aztn with  header line.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
        date_external                  = zlt_aztnew-D1
    *   ACCEPT_INITIAL_DATE            =
    IMPORTING
       DATE_INTERNAL                  = gv_datum
    * EXCEPTIONS
    *   DATE_EXTERNAL_IS_INVALID       = 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.
           SELECT-OPTIONS: s_datum FOR gv_datum.
          INITIALIZATION.
            s_datum-low  = sy-datum.
            s_datum-high  = sy-datum.
            APPEND s_datum.
    ********** After this further code follows with "SELECT"  wherein I want to use the gv_datum as Where condition.
    SELECT   M2
                      K2
                      A2
                      P2
                      S2
                      D1
                      STD
                      BES
             FROM     ZLt_AZTNEW
             INTO     TABLE it_AZTN
             Where    D1 = gv_datum.
    Please provide me your valuable suggestion to correct any flaw in my code above.
    Looking forward for your reply.
    Best regards
    Chandan Kumar

    Dear Rama,
    Plz refer the following difference in naming conventions as compared to your suggestion:
    it_flat_file --> itab, (internal table for AZT fiel upload and split)
    ls_flat_file ---> wa_itab,
    Ztable --> Zlt_aztnew2,    (Dbase file)
    it_ztable ---> it_zlt_aztnew2, (internal table)
    ls_ztable --> wa_aztnew2,
    I wrote the following code but it is not working. Please also refer the attached screen shot of the database table : ZLT_AZTNEW2.
    Data  it_string   type stringtab.
    Data  lv_string   type string.
    DATA: file_str1 type string.
    Data: it_tab TYPE STANDARD TABLE OF file_table,
          lw_file LIKE LINE OF it_tab,
          gd_subrc TYPE i.
    TYPES: Begin of Ty_itab,
            M2  TYPE Char7,
            K2  TYPE Char3,
            A2  TYPE Char3,
            P2  TYPE Char3,
            S2  TYPE Char3,
            D1  TYPE Char8,
            STD TYPE Char8,
            BES TYPE Char80,
           END OF ty_itab.
    DATA: itab Type Standard Table of ty_itab,
          wa_itab Type ty_itab.
    DATA: it_zlt_aztnew2 type standard table of Zlt_aztnew2,
          wa_aztnew2     TYPE Zlt_aztnew2.
    SELECTION-SCREEN begin of block blk with frame title text-100.
      SELECTION-SCREEN SKIP 2.
        parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
        window_title = 'Select only Text File'
        default_filename = '.azt'
        multiselection = 'X'
        CHANGING
        file_table = it_tab
        rc = gd_subrc.
      READ TABLE it_tab INTO lw_file INDEX 1.
      p_file = lw_file-FILENAME.
    Start-of-Selection.
      file_str1 = P_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.
      Clear wa_itab.
      SPLIT lv_string AT ';' INTO  wa_itab-M2   wa_itab-k2   wa_itab-A2   wa_itab-P2  wa_itab-S2         wa_itab-D1  wa_itab-STD  wa_itab-BES.
      append wa_itab to itab.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_itab-M2,
               11 sy-vline,
               13 wa_itab-k2,
               25 sy-vline,
               27 wa_itab-A2,
               32 sy-vline,
               34 wa_itab-P2,
               39 sy-vline,
               41 wa_itab-S2,
               46 sy-vline,
               48 wa_itab-D1,
               60 sy-vline,
               62 wa_itab-STD,
               72 sy-vline,
               74 wa_itab-BES,
              120 sy-vline.
    ENDLOOP.
    LOOP at itab into wa_itab.
      CLEAR wa_aztnew2.
      wa_aztnew2-D1+0(4) = wa_itab+6(4).
      wa_aztnew2-D1+4(2) = wa_itab+3(2).
      wa_aztnew2-D1+6(2) = wa_itab+0(2).
    Append wa_aztnew2 to it_zlt_aztnew2.
    ENDLOOP.
    MODIFY Zlt_aztnew2 from table it_zlt_aztnew2.
    Looking forward for your suggestiojn.
    Regards
    Chandan

  • DBIF_RSQL_SQL_ERROR with SQL error in the database when accessing a table.

    dear all,
      i have done a system copy from production server into quality server. quality was scrapped and freshly installed with SAP then used the DB flush method to carry out the system copy. i had to change the DBS_ORA_SCHEMA in environment variables to SAP<SOURCE SID> from SAPSR3. the sap version is ECC6.0,DB is ORACLE10.2 on WIN NT.
      after MMC opened, i get "SQL error in the database when accessing a table" error is coming. in SM21, I am getting "Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000 )
    Database error 8103 at SEL access to table TBTCO
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    Database error 8103 at FET access to table TBTCP
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130339 sibqty_Q TY_00 " generated
    Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
    > Short dump "081018 130339 sibqty_Q TY_00 " generated
    Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
    Delete session 001 after error 023
    Database error 8103 at DEL access to table TMSALOGAR
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130432 sibqty_Q TY_00 " generated
    Database error 8103 at FET access to table SNAP
    Run-time error "DBIF_RSQL_SQL_ERROR" occurred
    > Short dump "081018 130432 sibqty_Q TY_00 " generated
    Transaction Canceled SY 002 ( SQL error in the database when accessing a table. )
    Database error 8103 at FET access to table TSP02"
    please find the st22 DUMP:
    ow to correct the error                                                                          |
    Database error text........: "ORA-08103: object no longer exists"
    Internal call code.........: "[RSQL/READ/TBTCO ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "SAPMSSY2" or "SAPMSSY2"
    "INITIATE_JOB_START"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "INITIATE_JOB_START" "(FORM)", or its possible occurrence must be declared in
    the
    RAISING clause of the procedure.
    |   
    please do me this favor if you know to avoid this problem..
    thanks a lot..

    Hello Anuj,
    This is because the COUNT(*) is returning a value which is longer than the INT4 data type it is expecting. If you restrict the selection by introducing a WHERE clause, then you won't get the dump:
    DATA: dyn_from    TYPE string,
          dyn_where   TYPE string,
          gx_sql_err  TYPE REF TO cx_sy_open_sql_error,
          gv_text     TYPE string.
    dyn_from  = `DD01L INNER JOIN DD02L ON DD02L~AS4LOCAL = DD01L~AS4LOCAL AND DD02L~AS4VERS = DD01L~AS4VERS`.
    dyn_where = `DOMNAME LIKE 'Z%'`.
    TRY .
        SELECT COUNT(*) FROM (dyn_from) WHERE (dyn_where).
        WRITE: / sy-dbcnt NO-GROUPING.
      CATCH:  cx_sy_open_sql_db             INTO gx_sql_err,
              cx_sy_dynamic_osql_semantics  INTO gx_sql_err,
              cx_sy_dynamic_osql_syntax     INTO gx_sql_err.
    ENDTRY.
    IF gx_sql_err IS BOUND.
      gv_text = gx_sql_err->get_text( ).
      WRITE: / gv_text.
    ENDIF.
    BR,
    Suhas

Maybe you are looking for