RUNTIME ERROR - Trying to INSERT dbtab FROM dynamic itab

Hi guys,
I'm trying to do this
INSERT (l_nametab) FROM TABLE <dynamic_table>.
where:
DATA: l_nametab TYPE TABNAME VALUE 'PA0002'.
FIELD-SYMBOLS: <dynamic_table> TYPE STANDARD TABLE.
DATA: dy_table2 type ref to data.
CREATE DATA dy_table2 TYPE STANDARD TABLE OF (l_nametab).
ASSIGN dy_table2->* TO <dynamic_table>
... but I received this runtime error:
DBIF_RSQL_INTERNAL_ERROR
Internal error when accessing a table.
The current ABAP/4 program terminated due to
an internal error in the database interface.
An internal error in the database interface occurred during access to
the data of table "PA0002 ".
The situation points to an internal error in the SAP software
or to an incorrect status of the respective work process.
For further analysis the SAP system log should be examined
(transaction SM21).
For a precise analysis of the error, you should supply
documents with as many details as possible.
Does anybody know how can it be solved?
I'll really apreciate it.
Thanks and Regards.

Hi Max,
How can I upload this data if I'm reading the info from an Input File.
The FM HR_INFOTYPE_OPERATION is useless because the UNAME fild doesn't remain into the record. They really need these field.
The main idea of these program is to read the Input File Line, wich can belong to any infotype.
I'm already reading the Infotype data from the input file and I need to transfer it to the PAXXXX table.
Next, a little explanation of it:
This program is to INSERT DATA INTO HR TABLES...
The FM HR_INFOTYPE_OPERATION is useless in this process...
Only with INSERT dbtab it has to be done!!!
1.- Read HR data from an input file. The data type of the file lines is PRELP.
2.- Get the input file data into an internal table (TYPE PRELP) using the ABAP Method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD.
3.- Get the DDic. Table Name using CONCATENATE 'PA' wa_file-infty INTO l_nametab.
4.- Get the DDic.Struct.Name using CONCATENATE 'P' wa_file-infty INTO l_nametype.
5.- Assign values with the same code:
  FIELD-SYMBOLS: <dyn_table> type standard table,
                 <dyn_wa>,
                 <dyn_field>.
  FIELD-SYMBOLS: <dyn_table2> type standard table,
                 <dyn_wa2>,
                 <dyn_field2>.
  DATA: dy_table2 type ref to data,
        dy_line2  type ref to data.
  DATA: dy_table type ref to data,
        dy_line  type ref to data,
            CREATE DATA dy_table TYPE STANDARD TABLE OF (l_nametype).
            ASSIGN dy_table->* TO <dyn_table>.
            " Create dynamic work area and assign to FS
            CREATE DATA dy_line LIKE LINE OF <dyn_table>.
            ASSIGN dy_line->* TO <dyn_wa>.
            CREATE DATA dy_table2 TYPE STANDARD TABLE OF (l_nametab).
            ASSIGN dy_table2->* TO <dyn_table2>.
            " Create dynamic work area and assign to FS
            CREATE DATA dy_line2 LIKE LINE OF <dyn_table2>.
            ASSIGN dy_line2->* TO <dyn_wa2>.
6.- Convert the Input File Line from PRELP type to PNNNN type with the ABAP method
      CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN            EXPORTING        PRELP  = wa_file
                                                                                IMPORTING        PNNNN  = <dyn_wa>.
7.- As <dyn_wa2> and <dyn_table2> are of PANNNN Data Type, there is an structure with the MANDT field to be assigned to it:
" Type Definition
TYPES: BEGIN OF type_mandt,
          mandt TYPE MANDT,
       END OF type_mandt.
" Structure Definition
DATA: wa_mandt TYPE type_mandt.
" Structure value assignation
wa_mandt-mandt = sy-mandt.
8.- Assign corresponding values and INSERT INTO dbtab
          MOVE-CORRESPONDING <dyn_wa> TO <dyn_wa2>. "XXXX
          MOVE-CORRESPONDING wa_mandt TO <dyn_wa2>.
          APPEND <dyn_wa2> TO <dyn_table2>.
         INSERT (l_nametab) FROM TABLE <dyn_table2> ACCEPTING DUPLICATE KEYS.
9.- In these code line, the menctioned runtime error appears.
I hope it can be solved...
Thanks and regards...

Similar Messages

  • I keep getting a runtime error, tried reinstalling itunes still doesn't work.  R6034 ituneshelper.exe.  Any ideas on what to do?

    I keep getting a runtime error, tried reinstalling itunes still doesn't work.  R6034 ituneshelper.exe.  Any ideas on what to do?

    Hi Hamshow,
    Thanks for using Apple Support Communities.  This article has steps you can take for the error you're seeing:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Cheers,
    - Ari

  • FRM-92101 RUNTIME error - No HTTP headers received from runform

    Oracle IAS 9.0.4 servers are configured to serve up webforms. The Server is configured to run only forms.Is it possible to run report files from this SERVER.
    Iam getting FRM-92101 RUNTIME error - No HTTP headers received from runform.
    Iam not able to run any reports.
    Thanks
    Himabala

    Hello,
    Q: Is it possible to run reports from Oracle IAS 9.0.4 server that is not running the reports server locally ?.
    A: Yes
    For the error FRM-92101 when using RUN_REPORT_OBJECT, check that the CLASSPATH contains the necessary jar files rwrun.jar and zrclient.jar .
    Regards

  • Runtime error trying to 'check for updates'

    currently using itunes 7.2.0.35 ... trying to upgrade to 7.3
    here's the entire error:
    microsoft visual c++ runtime library
    runtime error!
    program: c:\program files\itunes\itunes.exe
    this application has requested the runtime to terminate in an unusual way. please contact the application's support team for more information
    ..

    I've been having too many crashes with Safari anyway so it needed to go. It's a shame, I like it. I'll give Apple more time to work out the bugs. I've submitted a few problems myself so I've done my part Errors pulling up some secure Web sites, locking up when playing certain videos (even from the apple site), some random crashes, etc... I'll try Safari again later.

  • Runtime Error in Record INsertion to an Infotype

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

  • Portal Runtime Error while executing GP tasks from UWL

    Hi all,
    I am trying to create a process in Guided Procedures.
    The activities involved in this process include calling some standard R/3 transactions.
    For this, I first created Portal Iviews of the SAP R/3 transactions involved. Then In GP Design time, I created corresponding callable objects of type Portal Iviews.
    User's can view the tasks assigned to them in their UWL without any problems. To execute a particular task, user clicks on the corresponding Work item in UWL.
    However, this gives a portal runtime error.
    The log file has the following error.
    com.sap.portal.prt.runtime#sap.com/irj#com.sap.portal.prt.runtime#LAAJ#9176##LTIVSH01.vshodc_LP1_11774250#LAAJ#4474b4ce1db811ddba24001871775ce5#SAPEngine_Application_Thread[impl:3]_33##0#0#Error##Java###04:38_09/05/08_0046_11774250
    [EXCEPTION]
    #1#com.sapportals.portal.prt.runtime.PortalRuntimeException: Exception in SAP Application Integrator occured: Unable to parse template &\#39;<System.ConnectionString>&\#39;; the problem occured at position 0. Cannot process expression <System.ConnectionString> because Invalid System Attribute:
    System: &\#39;SAP_LocalSystem&\#39;,
    Attribute: &\#39;ConnectionString&\#39;.
    Please suggest a solution for this problem.
    Regards,
    Preksha

    Dear Friends
    I have the same with this problem
    Please help us to resolve this problem
    Thanks and best regards

  • Runtime Error in VL01N after upgrade from 4.6c to ECC 6.0

    hi, 
       We are doing a upgrade project from 4.6c to ECC 6.0 and when we are running the VL01n tcode and as soon as we hit enter in easy access screen its throwing a runtime error as " The key of internal table "XLIPS" contains components of type  'X' or "XSTRING". The "READ TABLE XLIPS" statement is not permitted for such tables in a unicode context'. The xlips is declared as:
    DATA: BEGIN OF XLIPS OCCURS 15.
    INCLUDE STRUCTURE LIPSVB.
    DATA: END OF XLIPS.
    so i have checked the lipsvb structure in that i dont find the key fields of type X or XSTRING all are of type CHAR 4. this LIPSVB is the Reference structure for  XLIPS and YLIPS.
    THANKS IN ADVANCE.

    Please  see the  Patch level of the  SD, FI ,etc...
    and  apply  it   the basis   should   find  it  out  .... for  ECC6.0   then  minimum level  of  patches  should  be   upgraded.
    please  ,login to help.sap.com  ... there  in the  search  see the  document   of the pateches  for the   ECC6.0 for SD & FI ... like wise  for  all  Modules  ....
    Reward  points if it is usefulll ...
    Girish

  • Runtime Error in MIGO after upgrade from 4.6c to ECC 6.0

    hi,
        We are doing a upgrade project from 4.6c to ECC 6.0 and when we are posting the MIGO a runtime error is occuring from the method
    "IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE" which is
    in the class "ZCL_IM_MMIM_STK_TRANSFER".
    The error is as follows :
    method IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE
    >>>>>CALL FUNCTION 'Z_MM_STK_TSFR'  
    TABLES     
    T_XMKPF = XMKPF
    T_XMSEG = XMSEG.  
    END METHOD.
    the errror is showing at function  'Z_MM_STK_TSFR'   .
    I would be happy if anyone could give any inputs i hav also put chek in unicode in attributes in main program however still the error is arising.
    thanks in advance

    hi,
         thanks for the inputs i have done the syntax check on the main program and the FM the error which is coming is Field "ENJPREVIEW" is unknown. its neither in one of the specified tables nor defined by a DATA 'statement' . THis error is showing in the include LMEDRUCKF1K.
    Thanks in advance

  • Getting a runtime error in reading long text from production order

    Hi all,
    I am trying to read production order long text and the code is not showing any syntax error but if i execute it i am getting a runtime error as "Text object aufk is not available".
    But i did check for the text object , text id enties in TTXOB and TTXID tables. Also i am able to see the relevant text in tables STXH and STXL, dont know why i am getting this runtime error and unable to debug.
    I tried a lot searching in forums, but they all ask me to write the code in the way i did, so dont know what is the problem.
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                                =  'kopf'
                  LANGUAGE                 =  sy-langu
                  NAME                          = l_name
                  OBJECT                       = 'aufk'
                TABLES
                  LINES                         =  ilines
              write : ilines.
    Regards
    Jessica

    Hey Vijay,
    Thanks for you reply, It worked, i am not getting the runtime error, but also not getting the output.
    am i missing anywrite statements?
    Please check the code and suggest changes if required. i want to see the long text in the production order in the output. should i say write: ilines.?
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                            = 'KOPF'
                  LANGUAGE                      =  sy-langu
                  NAME                          = l_name
                  OBJECT                        = 'AUFK'
                TABLES
                  LINES                         =  ilines
                 write : ilines.
    Regards,
    Jessica.

  • IE 8 "Runtime Error" trying to open PDF with Reader 9.5.1

    I've seen many variants of this problem on the forum.  Running Win7, IE 8, Firefox 14, and Reader 9.5.1.
    For some little while, I've had a problem opening PDF files from links on Webpages that I view in IE8.  I see the following Runtime Error message:
    More recently, I've seen a similar problem with Firefox 14.  The difference is that there's no error message with Firefox ... it opens a new tab, but the browser tab remains blank.
    Could the problem be from installing Reader 9.5.1 recently?  How do I back out that update, and resort to the previous version of Reader -- which ran error free?
    Thanks
    Jerry

    We created a small standalone test application, which just opens a PDF. Same issue was found, with just this one User. Here's the code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            width="1004" height="510" backgroundColor="#000000" creationComplete="windowedapplication1_creationCompleteHandler(event)">
    <fx:Script>
      <![CDATA[
       import mx.events.FlexEvent;
       protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
        myHtml.location = "vt1_04_using_flash_builder.pdf";
      ]]>
    </fx:Script>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:HTML id="myHtml" left="10" right="10" top="10" bottom="10"/>
    </s:WindowedApplication>

  • Runtime Error For Converting Static pdf to Dynamic Xml Form pdf

    Hi All,
    I am converting my static pdf to dynamic xml form pdf using Adoble Livecycle Designer ES 8.2 it is giving runtime error dialog.
    My static pdf size is 12MB and it contains 46 pages(mostly all pages will have images). Do we have any limitations for converting static pdf to dynamic xml form pdf ?
    Error message image file is attatched to this thread.
    Can any body please help me on this.
    Advance Thanks
    Prasad Sagala

    Hi Paul,
    With out dividing into smaller chunks, Do we have any other alternative?
    Because in my other pdf reports having more than 50 pages (in between 100-600). If i want do divide smaller chunks it will be the long process.
    Thanks
    Prasad Sagala

  • Runtime error encounter when getting instance from ResourceFactory

    Hi,
       I'm developing a IView report on the documents' status in the repository, but i have encounter the following runtime error when I get an resource instance from the ResourceFactory,
    <i>Portal Runtime Error
    An Exception occurred while processing a request for:
    IView: N/A
    Component: N/A
    com/sapportals/wcm/repository/IResourceFactory</i>
    My codes are as follows:
    <i>IResourceFactory factory = Resourcefactory.getInstance()</i>
    I try to catch the ResourceException(), but an similar runtime error occured. I'm using PDK EP 6.0_60.2.2
    Thanks for any suggestions/solutions provided.

    Hi,
    did you set the SharingReference attribute in portalapp.xml to "knowledgemanagement, usermanagement" ?
    Best regards,
    Thilo

  • RUNTIME ERROR! While syncing contacts from 9900 to windows contacts

    BlackBerry Desktop Software Version :- 7.1.0.37
    BlackBerry Device Software Version :- 7.1 Bundle 1646 (v7.1.0.523, Platform 5.1.0.393)
    BlackBerry Device :- Bold 9900
    Windows 7
    While syncing contacts to and fro , from the device and windows contacts, experiencing the following Runtime Error :-
    ' Microsoft Visual C++ Runtime Library
    Runtime Error!
    Program: C:\Program ...
    This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. '

    Hi and Welcome to the Community!
    I don't find a specific KB that is exactly on point to your description...perhaps you will have better luck searching:
    http://btsc.webapps.blackberry.com/btsc/microsites/microsite.do
    Otherwise, I'd suggest this thread:
    http://supportforums.blackberry.com/t5/Desktop-Software-for-PC/Cleanly-quot-Starting-Over-quot-with-...
    It starts with a process for cleanly starting over, and there is some discussion, and there is also a post (15) with links to older Desktop Software versions, if those are needed. Note that this is not, by any means, guaranteed to work...but it has worked for many to resolve issues they are having.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Painful error trying to convert to/from decimal minutes

    So I have a timecard application and I am trying to design a popup window that allows a user to apply for additional pay.
    The user supplies an hour time, minutes time and AM/PM (all from drop-downs). Then they supply a length of time in hours and minutes (two different fields) and a reason (also from drop-down).
    I am using collections and that part appears to be working fine with one glitch: it only works if I put in a number of minutes divisible by 3. I anticipate that this is because I have to record the decimal time in another field, and for some reason the conversion I am using is dying. Oracle throws up an error "ORA-06502: PL/SQL: numeric or value error: character to number conversion error" if I try to use say 22 as the number of minutes.
    In the background, I am trying to store these as three fields: the JOB_START_TIME (date), the JOB_END_TIME (date) and TASK_HRS (number 5,2).
    Can someone help me look at my database write query and help me correct this?
    declare
      v_tc       NUMBER   := :P12_TC_ID;
      tc_dy      VARCHAR2(12);
      tc_st      DATE;
      tc_ed      DATE;
      tc_shft    VARCHAR2(3);
      beg_dt     DATE;
      ed_dt      DATE;
      tsk_hrs    NUMBER   := 0;
      tsk_min    NUMBER   := 0;
      tsk_ttl    NUMBER   := 0;
      v_loc      NUMBER;
      v_pycd     VARCHAR2(8);
      v_jbcd     VARCHAR2(8);
    begin
      select to_char(DATE_INDEX,'MM/DD/YYYY'), TC_START_TIME, TC_END_TIME, SHIFT
        into tc_dy, tc_st, tc_ed, tc_shft
        from TC where TC_ID = v_tc;
      for cu in (select TO_NUMBER(c001) u_id, c002 st_hrs, c003 st_min, c004 st_am,
                 c005 ed_hrs, c006 ed_min, c007 ed_am,
                 TO_NUMBER(c009) ttl_hrs, TO_NUMBER(c010) ttl_min,
                 TO_NUMBER(c011) rsn_id
               FROM APEX_COLLECTIONS
               WHERE COLLECTION_NAME = 'SUPP_PAY_REQ') loop
        IF cu.u_id = 0 and cu.rsn_id > 0 THEN     -- new row
          select to_date(tc_dy||' '||cu.st_hrs||':'||cu.st_min||' '||cu.st_am,'MM/DD/YYYY HH:MI AM')
            into beg_dt from dual;
          IF beg_dt < tc_st THEN
            beg_dt   := beg_dt + 1;
          END IF;
          tsk_hrs    := cu.ttl_hrs;
          tsk_min    := ROUND(cu.ttl_min*10/6,2);
          tsk_ttl    := to_number(tsk_hrs||'.'||tsk_min);     <---  This is the problem line
          ed_dt      := beg_dt + tsk_ttl/24;
          select LOCATION_ID, PAY_CODE, OLD_CODE into v_loc, v_pycd, v_jbcd
            from OTHR_RATES where OTHR_RATE_ID = cu.rsn_id;
          INSERT INTO TC_OTHR_JOBS (OTHR_HRLY_JOB_ID, TC_ID,
               JOB_START_TIME, JOB_END_TIME, TASK_HRS, HRLY_RATE_ID, PAY_AMT,
               LOCATION_ID, PAY_CODE, OLD_CODE, JOB_COMMENTS, JOB_ENTRY_FLAG)
           VALUES (SEQ_TC_JOBS.nextval, v_tc,
               beg_dt, ed_dt, tsk_ttl, cu.rsn_id, 0,
               v_loc, v_pycd, v_jbcd, 'Submitted by Employee', 3);
        ------ existing row
        ELSIF cu.u_id > 0 THEN
          select to_date(tc_dy||' '||cu.st_hrs||':'||cu.st_min||' '||cu.st_am,'MM/DD/YYYY HH:MI AM')
            into beg_dt from dual;
          IF beg_dt < tc_st THEN
            beg_dt   := beg_dt + 1;
          END IF;
          tsk_hrs    := cu.ttl_hrs;
          tsk_min    := ROUND(cu.ttl_min*10/6,2);
          tsk_ttl    := to_number(tsk_hrs||'.'||tsk_min);     <---  This is the problem line
          ed_dt      := beg_dt + tsk_ttl/24;
          select LOCATION_ID, PAY_CODE, OLD_CODE into v_loc, v_pycd, v_jbcd
            from OTHR_RATES where OTHR_RATE_ID = cu.rsn_id;
          UPDATE TC_OTHR_JOBS SET JOB_START_TIME = beg_dt, JOB_END_TIME = ed_dt,
               TASK_HRS = tsk_ttl, HRLY_RATE_ID = cu.rsn_id,
               LOCATION_ID = v_loc, PAY_CODE = v_pycd, OLD_CODE = v_jbcd,
               JOB_COMMENTS = 'Submitted by Employee',
               JOB_ENTRY_FLAG = 3, PAY_AMT = 0
           WHERE OTHR_HRLY_JOB_ID = cu.u_id;
          UPDATE TC set PROCESS_FLAG = 30 where TC_ID = v_tc;
        END IF;
      end loop;
    end;

    Okay, got it. It turns out that you have to go one-way on your conversions or the decimal minutes get you hung up. Here's the corrected version that works:
    declare
      v_tc       NUMBER   := :P12_TC_ID;
      tc_dy      VARCHAR2(12);
      tc_st      DATE;
      tc_ed      DATE;
      tc_shft    VARCHAR2(3);
      beg_dt     DATE;
      ed_dt      DATE;
      tsk_hrs    NUMBER   := 0;
      tsk_min    NUMBER   := 0;
      tsk_ttl    NUMBER   := 0;
      min_tst    NUMBER   := 0;
      v_loc      NUMBER;
      v_pycd     VARCHAR2(8);
      v_jbcd     VARCHAR2(8);
    begin
      select to_char(DATE_INDEX,'MM/DD/YYYY'), TC_START_TIME, TC_END_TIME, SHIFT
        into tc_dy, tc_st, tc_ed, tc_shft
        from TC where TC_ID = v_tc;
      for cu in (select TO_NUMBER(c001) u_id, c002 st_hrs, c003 st_min, c004 st_am,
                 c005 ed_hrs, c006 ed_min, c007 ed_am,
                 TO_NUMBER(c009) ttl_hrs, TO_NUMBER(c010) ttl_min,
                 TO_NUMBER(c011) rsn_id
               FROM APEX_COLLECTIONS
               WHERE COLLECTION_NAME = 'SUPP_PAY_REQ') loop
        IF cu.u_id = 0 and cu.rsn_id > 0 THEN     -- new row
          select to_date(tc_dy||' '||cu.st_hrs||':'||cu.st_min||' '||cu.st_am,'MM/DD/YYYY HH:MI AM')
            into beg_dt from dual;
          IF beg_dt < tc_st THEN
            beg_dt   := beg_dt + 1;
          END IF;
          tsk_hrs    := cu.ttl_hrs;
          min_tst    := (tsk_hrs*60 + to_number(cu.ttl_min))/60;
          ed_dt      := beg_dt + min_tst/24;
          select LOCATION_ID, PAY_CODE, OLD_CODE into v_loc, v_pycd, v_jbcd
            from OTHR_RATES where OTHR_RATE_ID = cu.rsn_id;
          INSERT INTO TC_OTHR_JOBS (OTHR_HRLY_JOB_ID, TC_ID,
               JOB_START_TIME, JOB_END_TIME, TASK_HRS, HRLY_RATE_ID, PAY_AMT,
               LOCATION_ID, PAY_CODE, OLD_CODE, JOB_COMMENTS, JOB_ENTRY_FLAG)
           VALUES (SEQ_TC_JOBS.nextval, v_tc,
               beg_dt, ed_dt, min_tst, cu.rsn_id, 0,
               v_loc, v_pycd, v_jbcd, 'Submitted by Employee', 3);
          UPDATE TC set PROCESS_FLAG = 30 where TC_ID = v_tc;
        ------ existing row
        ELSIF cu.u_id > 0 THEN
          select to_date(tc_dy||' '||cu.st_hrs||':'||cu.st_min||' '||cu.st_am,'MM/DD/YYYY HH:MI AM')
            into beg_dt from dual;
          IF beg_dt < tc_st THEN
            beg_dt   := beg_dt + 1;
          END IF;
          tsk_hrs    := cu.ttl_hrs;
          min_tst    := (tsk_hrs*60 + to_number(cu.ttl_min))/60;
          ed_dt      := beg_dt + min_tst/24;
          select LOCATION_ID, PAY_CODE, OLD_CODE into v_loc, v_pycd, v_jbcd
            from OTHR_RATES where OTHR_RATE_ID = cu.rsn_id;
          UPDATE TC_OTHR_JOBS SET JOB_START_TIME = beg_dt, JOB_END_TIME = ed_dt,
               TASK_HRS = min_tst, HRLY_RATE_ID = cu.rsn_id,
               LOCATION_ID = v_loc, PAY_CODE = v_pycd, OLD_CODE = v_jbcd,
               JOB_COMMENTS = 'Submitted by Employee',
               JOB_ENTRY_FLAG = 3, PAY_AMT = 0
           WHERE OTHR_HRLY_JOB_ID = cu.u_id;
          UPDATE TC set PROCESS_FLAG = 30 where TC_ID = v_tc;
        END IF;
      end loop;
    end;

  • Problems trying to insert rows from PL/SQL procedure with existing seq..

    hello. please help me.
    i have a button that is calling an anonymous PL/SQL block and i am struggling with inserting records automatically when this button is clicked. an ordinary before insert DB trigger is launched:
    reate or replace TRIGGER "SPECSYS"."BI_SPEC_INSTRUCTS"
    before insert on "SPEC_INSTRUCTS"
    for each row
    begin
    if :NEW."ID" is null then
    select "SPEC_INSTRUCTS_SEQ".nextval into :NEW."ID" from dual;
    end if;
    end;
    in my PL/SQL I am trying to create a record automatically. stupid question that this undoubtedly is, how do i do this? if i leave the sequence column = null surely the trigger should take care of inserting the sequence into this column automatically?
    i have tried making the sequence column = null, leaving it out altogether (ie specifying all colums except this one on the insert statement) but with no success!

    this is not the problem!

Maybe you are looking for

  • Is there a way to get the highest audio peak to display (and hold) in PPro CS4?

    I have to deliver my projects to a client with the audio mixdown at a specific level, namely, no greater than -6db. It would be great if, while playng back the sequence, the Master level would show, and hold to peak audio level reached. As we know, t

  • Cannot copy multiple events in iCal

    Prior to the upgrade, I was able to copy all my day's events and paste them to a form. Now I'm unable to do so. Am I doing something wrong, or is this something with the upgrade to the new software? Note: I can copy the whole day on my Macbook Pro Re

  • Specifying autoincrement on a field in an entity object declaratively

    Hi, I have a master-detail window where the detail entity has a composite key made up of m_id and d_id where m_id is a foreign key to the master table and d_id is the unique key to the detail table. I have defined the detail entity object and checked

  • Datatype for Characteristic IO.

    Hi, I have an ECC field Royalty Percentage which has a value  say 0.80, Am mapping it to Characteristic IO in BW which has a datatype NUMC. Now this means that Ryalty percentage comes up as 0080 instead of 0.80. What data type do I select so that it

  • CS6 static text field fonts change size on export to iOS

    I've resolved my previous isue with opening my CS5.5 project in CS6 ... but now when I package the project for iOS, all of my text is slightly larger nad offset compared to what Isee in Flash Pro CS6.  I'm using Classic Text - Static Bitmap (no anti