How to clear the run time error in ref cursor

good morning every one,
the code as follows
create or replace
procedure Country_sel(key in varchar2)
as
cc Res_RelcountryLan.countrycode%type;
len Res_Language.langname_en%type;
lid Res_Language.langid%type;
ab Res_Language.Abrivation%type;
type refcursorr is ref cursor;
cur refcursorr;
d_stmt varchar2(100);
begin
d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||',
RL.Abrivation from  Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId';
open cur for d_stmt;
loop
fetch cur into cc,lid,len,ab;
if cur%found then
dbms_output.put_line(cc||lid||len||ab);
else
exit;
end if;
end loop;
close cur;
commit;
end  Country_sel;when i am running this code im getting
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "RASOOL.COUNTRY_SEL", line 11
ORA-06512: at line 6can you please help me in getting rid of this problem.
thanking you,
prakash

d_stmt varchar2(100); Increase the size of d_stmt. Your a assigning a larger string
d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||',RL.Abrivation from  Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId'; The size of the above string is more than 100 characters.

Similar Messages

  • How to avoid the run time error  "java.lang.OutOfMemoryError"

    hi
    i have written a code to read a txt file ,i used FileReader to read a file . the code is working well for small txt files. but when i tried to read a large file(greater than 2MB), a run time error called "java.lang.OutofMemoryError" appeared .
    plz suggest the methods to read txt files of large capacity(greater than 25MB) .if possible give an example.

    thanks for ur replies
    i am new to java programming .i am a student persuing B.Tech final semester .i got struck in my project while reading a large txt file(greater than 3MB) . i am now giving a part of code that i had used in my project .it working fine with the txt files less than 3MB ,but when i am treing to read a file greater than 3MB , it is displaying a run time error "java.lang.outofmemoryerror"
    i have tried using "java -Xmx" ,it is working , but is there any better option ??
    here is the part of code:
       FileReader fin;
        al=new ArrayList();
         try
              fin=new FileReader(filename);
         catch(FileNotFoundException e)
           System.out.println("File not foumn");
         return;
    while((i=fin.read())!=-1)
           al.add(new Character((char)i));
         fin.close(); 
         Object obj[]=al.toArray();plz help me
    --santosh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to debug  a run time error encountered while executing ZFunction Module

    Hi all,
    My requirement is to create a ZFunction Module that Generated a sales order
    for multiple line items and works for both Variant Configurable material and a Normal Material.
    I am using BAPI_SLSTRANSACT_CREATEMULTI in my Zfunction Module to create a
    Sales order
    My ZFunction Module works well if I give normal material as input.
    It also works well and generates a sales order if I give all Variant Configurable materials as input.
    But if I give both Variant Configurable material and a normal material it throws a run time error.
    Can some one tell me what is wrong? can some one suggest me how to debug this run time error
    Termination occurred in the ABAP program "SAPLCRM_CONFIG_OW" - in                            
    "CONFIG_TO_CBASE".                                                                          
    The main program was "RS_TESTFRAME_CALL ".                                                                               
    In the source code you have the termination point in line 63
    of the (Include) program "LCRM_CONFIG_OWF02".                                                
    Source Code Extract                                                                               
    Line SourceCde                                                                               
    |   33|                                       LT_CUXI_CUPRT                                       
    |   34|                                       LT_CUXI_CUVAL                                       
    |   35|                                       LT_CUXI_CUVK                                        
    |   36|                                       LS_CUXI_CUCFG.                                      
    37
    |   38|  PERFORM CREATE_PRICING_CSTIC USING IS_CONFIG-CUCFG-CFGINFO.                              
    39
    |   40|* set config to cbase                                                                      
    |   41|  CALL FUNCTION 'COM_CUXI_SET_SINGLE_CFG'                                                  
    |   42|       EXPORTING                                                                           
    |   43|            I_CFG_HEADER          = LS_CUXI_CUCFG                                          
    |   44|            I_ROOT_INSTANCE       = CV_INT_OBJ_NO                                          
    |   45|            I_LOGSYS              = LV_LOGSYS                                              
    |   46|       IMPORTING                                                                           
    |   47|            E_ROOT_INSTANCE       = CV_INT_OBJ_NO                                          
    |   48|       TABLES                                                                               
    |   49|            I_TAB_INSTANCES       = LT_CUXI_CUINS                                          
    |   50|            I_TAB_PART_OF         = LT_CUXI_CUPRT                                          
    |   51|            I_TAB_VALUES          = LT_CUXI_CUVAL                                          
    |   52|            I_TAB_VAR_KEYS        = LT_CUXI_CUVK                                           
    |   53|            I_TAB_RESTRICTIONS    = LT_CUXI_CURES                                          
    |   54|       EXCEPTIONS                                                                          
    |   55|            INVALID_INSTANCE      = 1                                                      
    |   56|            INTERNAL_ERROR        = 2                                                     
    57
    OTHERS                = 3.                                                        58
    |   59|  IF SY-SUBRC <> 0.                                                        
    |   60|    if sy-msgno is initial.                                                      
    |   61|      MESSAGE X010 WITH 'COM_CUXI_SET_SINGLE_CFG'.
    |   62|    else.                                                                             
    |>>>>>|      MESSAGE ID SY-MSGID TYPE 'X' NUMBER SY-MSGNO
    |   64|              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    |   65|    endif.                                                                               
    |   66|  ENDIF.                                                                               
    67
    |   68|ENDFORM.                               " CONFIG_TO_CBASE                                   

    Hey Amit...
    Can I Create a Sales order for VC and Non VC items using BAPI_SLSTRANSACT_CREATEMULTI
    Is it a limitation for BAPI_SLSTRANSACT_CREATEMULTI
    I am trying to create a Sales Order using a Zprogram. I have used BAPI_SLSTRANSACT_CREATEMULTI. If I give the input as Normal material I am able to generate a sale order. If I give the input as VC material I am able to generate a sales order. But if I give both VC and Normal material as input, I get a run time error as follows.
    Is it a limitation for BAPI_SLSTRANSACT_CREATEMULTI that we cannot create a sales order with both VC and Non-VC items or am I missing some data which I need to pass when I give both VC and Non VC items? I get this error only for my Zprogram. But if I try to create an order on screen manually I donu2019t get any error. This happens only if I create an order with my Zprogram.
    Some one please help me u2026I am just stuggling to get this doneu2026
    I dint find any posts that gives me information about this error.
    CUX1 034 u201CNo root instance found in header datau201D                                                                               
    In the source code you have the termination point in line 63                                   of the (Include) program "LCRM_CONFIG_OWF02".

  • How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    Hello,
                  Regarding the skip/force pass/force fail options, when I set the ControlExecFlow to True in Teststand 3.1 and 3.5, in the Sequence Editor the menu options for skip/force pass/force fail are not active for Technician but, when I launch the Operator Interface logged with Technician the options are active. The problem is that if the technician sets one step to one of these options, and change the user to Operator, the test step remains skip/force pass.
                  Is there any possibility without modifying the Operator Interface (at programming level), to reload default values of the steps when changing the user to Operator?
    Thank you,
    Best regards,
    paio

  • How to shorten the running time of NXT brick (TETRIX & MATRIX toolkit)

    Hi
    How to shorten the running time of NXT brick ?
    (TETRIX & MATRIX toolkit running time)
    Software is LabVIEW 2012 for LEGO MINDSTORMS
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    TETRIX_Toolkit_running_time.vi ‏20 KB
    MATRIX_Toolkit_running_time.vi ‏13 KB

    Hi 40123157,
    You are using the module in an appropriate way, and there is no easy way to improve the loop iteration time beyond what you have done. Here are my suggestions:
    1) i2c commands do take a long time. In your application, it may speed up if you only execute Move Motors only when the motor speed has changed.
    2) For this particular example, you are not using the output of Motor Status. If this VI doesn't need to execute it may be removed.
    3) If you must speed up execution beyond this, as an advanced user of LabVIEW, you can create a copy of the Move Motors VI and modify it as you choose. All you have to do for the 'DC Motors' input is use cluster to array on the cluster, as shown below. I think you can speed it up by executing all setup before the loop (set connection type and setup sensor), and removing calculate power value if you're only sending values between -100 and 100.  
    4) Drawing to the screen may be slowing you down here.

  • How to obtain the running time of a task?

    How to obtain the running time of a task? I want to write a program about task progress.
    My email: [email protected]
    Thanks!

    First, Thanks for your code.
    But, I want obtain running time before running it.
    Example:
    class a extends JFrame{
    a() {
    initComponent() ;
    new progressBar(this); // my fancy. (may be other type variant.)
    void initComponent() {
    class progressBar {
    JProgressBar proBar = null ;
    Timer taskTime = null ;
    Double longTime = null ;
    progressBar(JFrame frame) { //JFrame or other.
    longTime = // ??????? You know ?????
    void monitor() {
    taskTime = new Timer(1000, new ActionListener() {
    public void actionPerformed(ActionEvent event) {
    //repaint the proBar code.
    taskTime.start();
    }

  • [Urgent!!]How to control the running time??

    Hi,
    I'm an undergraduate researcher in the University of Michigan. I used NI labVIEW FPGA on my current project and now i meet a problem.
    I have a labview code that has runs with 3 subroutines. they execute one after another for a given time period for each iteration of the entire code. that is i built them in a flat sequence structure inside a large while loop and each of the subroutine is a while loop with several subvi's in it. not that complicated but i have to specify how long each subroutine runs. now i have a problem to set that execution time. i don't know exactly what kind of timing function i shall use. i tried the "Elapsed time" function but that only works for the first iteration. from the second iteration on each subroutine only runs for once, instead of continuing to run until the given time elapsed. so i don't know how to correctly control the running time. It's reallly urgent, so could you please give me some suggestions about it? Thanks a million!!
    Xiaofei

    Thank you for your suggestion!
    sorry but that this method won't help because my code is sort of difficult to put into a for loop .
    the logic is like this: first the output is set to 0 for a user-defined amount of time (means no excitation). secondly it gets excitation and gets output but no data saving is allowed for a user-defined amount of time. at the same time, one paramater is automatically changed. (the reason for not saving data is that there is a transient response when the parameter changes). thirdly, data saving begins with the same
    parameters as before, also for a user-defined amount of time. and then after these three steps one iteration is done. for iterations there is a different parameter, the user defines the range of the parameter and the number of different values in between and the code will do the increment at equal intervals automatically. my problem now is that i don't know how to correctly control the time. i have tried various ways but no one works.
    the second problem is that i don't know how to let it run and not saving data and then saving data without changing everything else. what i have now is to call the same VI twice, once for only running and no data saving and the other for saving data. but then the problem is that in between these two routines, the output suddenly becomes zero and gets excited again after i call it.  My professor said that i cannot let the output become zero, otherwise there is no meaning in waiting for the excitation to become stablee. but then i don't know how to call a VI only once and let it do the saving for only the latter part of the running time. i have been working on this thing for two weeks now and still have no idea....Sorry the problem is long and tedious, but if anyone have any idea about it, please let me know, i will be most grateful. Thanks a million!!!

  • How to get the running time on the page

    Hello ,
    I want to display the running clock and the user who loggin in .
    Pls let me know how to get the running clock display and the username who log in.
    thakns
    kumar

    Hi,
    You can use javascript clock and substitution string APP_USER
    Place this to HTML region source
    <input type="text" id="clock" /><span>&APP_USER.</span>
    <script language="JavaScript">
    function runClock(){
    theTime = window.setTimeout("runClock()", 1000);
    var RightNow = new Date();
    var hrNow = RightNow.getHours();
    var mnNow = RightNow.getMinutes();
    var scNow = RightNow.getSeconds();
    var miNow = RightNow.getTime();
    var mon = RightNow.getMonth() + 1;
    var date = RightNow.getDate();
    var year = RightNow.getFullYear();
    var day = RightNow.getDay();
    if(hrNow == 0) {hour = 12;var ap = " AM";}
    else if(hrNow <= 11) {ap = " AM";hour = hrNow;}
    else if(hrNow == 12) {ap = " PM";hour = 12;}
    else if (hrNow >= 13) {hour = (hrNow - 12);ap = " PM";}
    if(hrNow >= 13) {hour = hrNow - 12;}
    if(mnNow <= 9) {min = "0" + mnNow;}
    else{min = mnNow}
    if (scNow <= 9) {secs = "0" + scNow;}
    else {secs = scNow;}
    var zday=new Array(7)
    if (day==0) {zday="Sunday"};
    if (day==1) {zday="Monday"};
    if (day==2) {zday="Tuesday"};
    if (day==3) {zday="Wednesday"};
    if (day==4) {zday="Thursday"};
    if (day==5) {zday="Friday"};
    if (day==6) {zday="Saturday"};
    var zmon = new Array(12)
    if (mon==1) {zmon="January"};
    if (mon==2) {zmon="February"};
    if (mon==3) {zmon="March"};
    if (mon==4) {zmon="April"};
    if (mon==5) {zmon="May"};
    if (mon==6) {zmon="June"};
    if (mon==7) {zmon="July"};
    if (mon==8) {zmon="August"};
    if (mon==9) {zmon="September"};
    if (mon==10) {zmon="October"};
    if (mon==11) {zmon="November"};
    if (mon==12) {zmon="December"};
    $x('clock').value=""+zday+", "+zmon+" "+date+", "+year+" "+hour+":"+min+":"+secs+ap+"";
    runClock();
    </script>Use styles to get look you like to input and span tag
    Br,Jari

  • How to know the run time of a program..?

    Hi Gurus,
    How to know the exact run time of a program....?
    Suppose i've a program....I've changed the code to improve the performance.
    Now i want to compare run time of older and new one...How to do this...?
    Pls help me ....
    Thanks and Regards,
    Nagarjuna

    Hi,
    go thru the below mentioned code............
    data:   start TYPE i,
              end TYPE i,
              dif TYPE i.
    GET RUN TIME FIELD start.
    SELECT SINGLE bukrs belnr gjahr blart budat
    FROM bkpf
    INTO (cc, doc, fy, doc_ty, pst_dt)
    WHERE bukrs = p_bukrs
    AND belnr = p_belnr
    AND gjahr = p_gjahr.
    GET RUN TIME FIELD end.
    dif = end - start.
    WRITE: /001 'Time for select',
    067 ':', dif, 'microseconds'.
    Reward all helpful answers.
    Thanks

  • How to set the running time of Thread??

    Hello all
    i am new and fresh student to learn Java.
    i want to set a limit time to run a thread.

    public void interrupt()
    Interrupts this thread.
    First the checkAccess method of this thread is invoked, which may cause a SecurityException to be thrown.
    If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
    If this thread is blocked in an I/O operation upon an interruptible channel then the channel will be closed, the thread's interrupt status will be set, and the thread will receive a ClosedByInterruptException.
    If this thread is blocked in a Selector then the thread's interrupt status will be set and it will return immediately from the selection operation, possibly with a non-zero value, just as if the selector's wakeup method were invoked.
    If none of the previous conditions hold then this thread's interrupt status will be set.
    Throws:
    SecurityException - if the current thread cannot modify this thread
    to quote the api
    but in your case Aldaris it would have no effect
    but if you wrote the code as..public void run(){
    while(!interrupted()){
      System.out.println("Pete_The_Hat");
    }then it would break the loop :-)

  • How to reduce the run time of ABAP code (BADI) when it is reading huge data from BPC Cube and thus writing  back huge data to the cube.

    Hi All ,
    In Case of reading huge amount of record from BPC Cube  from BADI code , performing calculations and writing back huge amount of data into the cube , It takes lot of time . If there is any suggestion to read the data  from Cube  or writing data into the cube using some Parallel Processing  methods , Then Please suggest .
    Regards,
    SHUBHAM

    Hi Gersh ,
    If we have a specific server say 10.10.10.10 (abc.co.in) on which we are working, Then under RZ12 we make the following entry  as :
    LOGON GROUP          INSTANCE
    parallel_generators        abc.co.in_10         ( Lets assume : The instance number is 10 )
    Now in SM59 under ABAP Connections , I am giving the following technical settings:
    TARGET HOST          abc.co.in
    IP address                  10.10.10.10
    Instance number          10
    Now if we have a scenario of load balancing servers with following server details (with all servers on different instance numbers ) :
    10.10.10.11   
    10.10.10.13
    10.1010.10
    10.10.10.15
    In this case how can we make the RZ12 settings and SM59 settings such that we don't have to hardcode any IP Address.
    If the request is redirected to 10.10.10.11 and not to 10.10.10.10 , in that case how will the settings be.
    I have raised this question on the below thread :
    How to configure RZ12  and SM59 ABAP connection settings when we have work with Load Balancing servers rather than a specific server .
    Regards,
    SHUBHAM

  • How to improve the run time of this query

    Is there any way to improve this query,
    I have a table which SR_WId with atleast one subtype as 'Break Fix', 'Break/Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint'. then i can have other subtype as 'Break Fix', 'Break/Fix', 'Follow Up', 'Follw-Up','T&'||'M Break Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint'.
    Let me know if this is okay or to modify it.
    SELECT DISTINCT A.SR_WID AS SR_WID
    FROM WC_SR_ACT_SMRY_FS A
    WHERE EXISTS
    (SELECT NULL FROM WC_SR_ACT_SMRY_FS B
    WHERE B.ACT_TYPE = 'Maintenance'
    AND B.ACT_SUBTYPE in ('Break Fix', 'Break/Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint') AND B.NBR_OF_ACTIVITIES = 1 AND B.SR_WID = A.SR_WID
    GROUP BY B.SR_WID
    HAVING COUNT(B.SR_WID) >= 1)
    AND A.ACT_TYPE = 'Maintenance'
    AND A.ACT_SUBTYPE IN ('Break Fix', 'Break/Fix', 'Follow Up', 'Follw-Up','T&'||'M Break Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint')

    SELECT DISTINCT A.SR_WID AS SR_WID
               FROM WC_SR_ACT_SMRY_FS A
              WHERE EXISTS(
                       SELECT   NULL
                           FROM WC_SR_ACT_SMRY_FS B
                          WHERE B.ACT_TYPE = 'Maintenance'
                            AND B.ACT_SUBTYPE IN
                                  ('Break Fix',
                                   'Break/Fix',
                                   'Break Fix/Corrective Maint',
                                   'Break Fix-Corrective Maint')
                            AND B.NBR_OF_ACTIVITIES = 1
                            AND B.SR_WID = A.SR_WID
                       GROUP BY B.SR_WID
                         HAVING COUNT(B.SR_WID) >= 1 )
                AND A.ACT_TYPE = 'Maintenance'
                AND A.ACT_SUBTYPE IN
                      ('Break Fix',
                       'Break/Fix',
                       'Follow Up',
                       'Follw-Up',
                       'T&' || 'M Break Fix',
                       'Break Fix/Corrective Maint',
                       'Break Fix-Corrective Maint');First of all, you can omit the GROUP BY and HAVING part in the sub-select -
    we already know thath the only value for B.SR_WID can be A.SR_WID and
    COUNT(B.SR_WID) will always be at least 1, otherwise the sub-select will
    return nothing.
    As a second step, you could transform EXISTS() into IN():
    SELECT DISTINCT SR_WID
               FROM WC_SR_ACT_SMRY_FS A
              WHERE SR_WID IN(
                       SELECT B.SR_WID
                         FROM WC_SR_ACT_SMRY_FS B
                        WHERE B.ACT_TYPE = 'Maintenance'
                          AND B.ACT_SUBTYPE IN
                                ('Break Fix',
                                 'Break/Fix',
                                 'Break Fix/Corrective Maint',
                                 'Break Fix-Corrective Maint')
                          AND B.NBR_OF_ACTIVITIES = 1)
                AND ACT_TYPE = 'Maintenance'
                AND ACT_SUBTYPE IN
                      ('Break Fix',
                       'Break/Fix',
                       'Follow Up',
                       'Follw-Up',
                       'T&' || 'M Break Fix',
                       'Break Fix/Corrective Maint',
                       'Break Fix-Corrective Maint');

  • Run time error while closing the CRM Order using BAPI

    Hi Experts,
    Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue.
    I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep the order in resolved status only. We will not directly close the order from the CRM tool, instead we have created a custom program for the same purpose.
    For the custom program we will give input as the order number and execute it, this will close the order.
    Here close the order means assigning it to Close status as well assign the reason code.
    We have created some reason codes for closed status.
    So when the program is run the Order moves from resolved status to closed status along with reason code.
    But of late we are facing some problems with this program, it is giving run time error for some CRM orders.
    Run time error message : The ABAP/4 Open SQL array insert results in duplicate database records.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught in procedure "CRM_SERVICE_OS_UPD_OST_DU" "(FUNCTION)", nor was it propagated by a RAISING clause.
    Please find my code which have used in the custom program
    Closing the resolved SOs in the system
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
            EXPORTING
              objnr                     = iv_guid
              user_status          = lc_status_closed
           EXCEPTIONS
             object_not_found          = 1
             status_inconsistent       = 2
             status_not_allowed       = 3
             OTHERS                        = 4.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining status'.
        ENDIF.
    Set reason code
    build lt_subject
        ls_subject-ref_guid = iv_guid.
        ls_subject-katalogart = 'A2'.
        ls_subject-codegruppe = 'ZR000003'.
        ls_subject-code       = 'ZR33'.                      " Reason code
        ls_subject-mode       = 'A'.
        APPEND ls_subject TO lt_subject.
    build lt_ossset
        ls_osset-ref_guid        = iv_guid.
        ls_osset-subject_profile = 'ZREASON03'.
        ls_osset-profile_type    = 'G'.
        ls_osset-subject         = lt_subject.
        APPEND ls_osset TO lt_osset.
    build lt_service_os
        ls_service_os-ref_guid  = iv_guid.
        ls_service_os-ref_kind  = 'A'.
        ls_service_os-osset     = lt_osset.
        APPEND ls_service_os TO lt_service_os.
    build lt_input_fields
        REFRESH: lt_input_fields, lt_field_names.
        CLEAR  : ls_input_fields, ls_field_names.
        ls_field_names-fieldname    = 'CODE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'CODEGRUPPE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'KATALOGART'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'SERVICE_PROFILE'.
        APPEND ls_field_names TO lt_field_names.
        ls_input_fields-ref_guid    = iv_guid.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'SERVICE_OS'.
        ls_input_fields-field_names = lt_field_names.
        APPEND ls_input_fields TO lt_input_fields.
         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            it_service_os     = lt_service_os
          CHANGING
            ct_input_fields   = lt_input_fields
          EXCEPTIONS
            error_occurred    = 1
            document_locked   = 2
            no_change_allowed = 3
            no_authority      = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining reason'.
        ENDIF.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save   = lt_header_guid
            iv_update_task_local = lv_update_task_local
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            document_not_saved   = 1
            OTHERS               = 2.
        IF sy-subrc <> 0.
          WRITE : 'Error at saving'.
        ELSE.
          WRITE : 'Successfully Closed'.
          COMMIT WORK AND WAIT.
        ENDIF.
    Run time error is coming at COMMIT WORK AND WAIT statement.
    Please let me know any corrections are required in the above program.
    When I analyzed the run time error I have found that it trying to insert the record in CRMD_SRV_OSSET for that CRM order, but already one record is present in the table for the same CRM order number.
    For most of the CRM orders there is no entry in this table so they are closing successfully but for a few orders for which there is an entry we are getting the above run time error.
    There is nothing wrong with the orders which have an entry already in the table CRMD_SRV_OSSET, I need to close these kind of orders with out run time error.
    Kindly provide your feedback.

    Hi Dinakar,
    You posted this in APO PPDS forum. This question should go to PP forum where someone could answer it.
    Please close this thread and open a new thread in PP forum so that you could get help quickly from the relevant experts.
    Regards - Pawan

  • How to know the timings of the run time of thr report

    Hi,
    Can you please tell me how to know the run time of the query , i mean how much time it took for the query to dispaly the results .
    Also we have these queries in the workbook. How to refresh the work book . is it enough if i refresh the query.
    Thanks
    Sruthi

    Hi
    How can we check in RSRT tcode?
    And how can we do i RSRTRACE?
    Can  I know the procedure.

  • Run time error

    Dear All,
    During the transaction /n/sapapo/ccr (Reconsilation of transaction data) in client SCP 950, system displays the run time error which are attached herewith.
    This is the activity a used to execute regularly (Daily) and first time i recieved this message - -
    Runtime Errors         ASSERTION_FAILED                                                            
    Date and Time          13.07.2007 10:13:37                                                         
    ShrtText                                                                               
    The ASSERT condition has been violated.                                                       
    What happened?                                                                               
    In the current application program, the system recognized a situation                         
        involving the ASSERT statement that should not occur. A runtime error                         
        occurred, either because there was no activation ID entered or because                        
        the ID of the activation mode used was set to "Cancel.                                        
    What can you do?                                                                               
    Print out the error message (using the "Print" function)                                      
        and make a note of the actions and input that caused the                                      
        error.                                                                               
    To resolve the problem, contact your SAP system administrator.                                
        You can use transaction ST22 (ABAP Dump Analysis) to view and administer                      
         termination messages, especially those beyond their normal deletion                          
        date.                                                                               
    is especially useful if you want to keep a particular message.                                                                               
    Error analysis                                                                               
    The following activation ID was used: "No checkpoint group specified"                                                                               
    If the FIELDS addition was used with this ASSERT statement, the content                       
        of the first 8 fields is as follows:                                                          
        " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    " (not used) "                                                                               
    How to correct the error                                                                               
    Probably the only way to eliminate the error is to correct the program.                                                                               
    You may able to find an interim solution to the problem                                       
        in the SAP note system. If you have access to the note system yourself,                       
        use the following search criteria:                                                                               
    "ASSERTION_FAILED" C                                                                               
    "/SAPAPO/SAPLTIMESTAMP" or "/SAPAPO/LTIMESTAMPU08"                                            
        "/SAPAPO/TIMESTAMP_DIFFERENCE"                                                                
        If you cannot solve the problem yourself and you wish to send                                 
        an error message to SAP, include the following documents:                                                                               
    1. A printout of the problem description (short dump)                                         
           To obtain this, select in the current display "System->List->                              
           Save->Local File (unconverted)".                                                                               
    2. A suitable printout of the system log                                                      
           To obtain this, call the system log through transaction SM21.                              
           Limit the time interval to 10 minutes before and 5 minutes                                 
           after the short dump. In the display, then select the function                             
           "System->List->Save->Local File (unconverted)".                                                                               
    3. If the programs are your own programs or modified SAP programs,                            
           supply the source code.                                                                    
           To do this, select the Editor function "Further Utilities->                                
           Upload/Download->Download".                                                                               
    4. Details regarding the conditions under which the error occurred                            
           or which actions and input led to the error.                                               
    System environment                                                                               
    SAP Release.............. "640"                                                                               
    Application server....... "scmprd"                                                            
        Network address.......... "172.16.10.47"                                                      
        Operating system......... "AIX"                                                               
        Release.................. "5.3"                                                               
        Hardware type............ "0002BFAAD700"                                                      
        Character length......... 16 Bits                                                             
        Pointer length........... 64 Bits                                                             
        Work process number...... 0                                                                   
        Short dump setting....... "full"                                                                               
    Database server.......... "scmprd"                                                            
        Database type............ "ORACLE"                                                            
        Database name............ "SCP"                                                               
        Database owner........... "SAPSCP"                                                                               
    Character set............ "C"                                                                               
    SAP kernel............... "640"                                                               
        Created on............... "Jan 18 2006 20:47:39"                                              
        Created in............... "AIX 1 5 00538A4A4C00"                                              
        Database version......... "OCI_920 "                                                                               
    Patch level.............. "109"                                                               
        Patch text............... " "                                                                               
    Supported environment....                                                                     
        Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE                        
         10.2.0.."                                                                               
    SAP database version..... "640"                                                               
        Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5"                                                                               
    Memory usage.............                                                                     
        Roll..................... 16192                                                               
        EM....................... 196923232                                                           
        Heap..................... 0                                                                   
        Page..................... 98304                                                               
        MM Used.................. 186636840                                                           
        MM Free.................. 1895288                                                             
        SAP Release.............. "640"                                                                               
    User and Transaction                                                                               
    Client.............. 950                                                                      
        User................ "SCMATP"                                                                 
        Language key........ "E"                                                                      
        Transaction......... "/SAPAPO/CCR "                                                           
        Program............. "/SAPAPO/SAPLTIMESTAMP"                                                  
        Screen.............. "SAPMSSY0 1000"                                                          
        Screen line......... 6                                                                        
    Information on where terminated                                                                   
        The termination occurred in the ABAP program "/SAPAPO/SAPLTIMESTAMP" in                       
         "/SAPAPO/TIMESTAMP_DIFFERENCE".                                                              
        The main program was "/SAPAPO/CIF_DELTAREPORT3 ".                                                                               
    The termination occurred in line 61 of the source code of the (Include)                       
         program "/SAPAPO/LTIMESTAMPU08"                                                              
        of the source code of program "/SAPAPO/LTIMESTAMPU08" (when calling the editor                
         610).                                                                               
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    31     lv_time_int_low      TYPE i,                                                            
       32     lv_timediff_int      TYPE i,                                                            
       33     lv_datediff_int      TYPE i,                                                            
       34     lv_time              TYPE t,                                                            
       35     ls_time              TYPE tstr_timestr.                                                 
       36                                                                               
    37 * check timestamp parameter                                                                 
       38 * ASSERT NOT iv_timestamp_high IS INITIAL.                                                  
       39 * ASSERT NOT iv_timestamp_low  IS INITIAL.                                                  
       40 * ASSERT iv_timestamp_low <= iv_timestamp_high.                                             
       41   IF iv_timestamp_high IS INITIAL                                                           
       42   OR iv_timestamp_low  IS INITIAL.                                                          
       43     RAISE invalid_parameter.                                                                
       44   ENDIF.                                                                               
    45   IF iv_timestamp_high < iv_timestamp_low.                                                  
       46     RAISE invalid_parameter.                                                                
       47   ENDIF.                                                                               
    48                                                                               
    49 * prepare timestamps                                                                        
       50 * .. split into date and time integers                                                      
       51   ls_timestamp_high = iv_timestamp_high.                                                    
       52   lv_date_int_high  = ls_timestamp_high-date.                                               
       53   lv_time_int_high  = ls_timestamp_high-time.                                               
       54   ls_timestamp_low  = iv_timestamp_low.                                                     
       55   lv_date_int_low   = ls_timestamp_low-date.                                                
       56   lv_time_int_low   = ls_timestamp_low-time.                                                
       57                                                                               
    58 * .. calc date diff                                                                         
       59 * .. check against max. allowed integer difference                                          
       60   lv_datediff_int = lv_date_int_high - lv_date_int_low.                                     
    >>>>>   ASSERT lv_datediff_int <= lc_datediff_intmax.                                             
       62                                                                               
    63 * calc time diff                                                                               
    64   lv_timediff_int = lv_time_int_high - lv_time_int_low.                                     
       65   IF lv_timediff_int < 0.                                                                   
       66     ADD 86400 TO lv_timediff_int.                                                           
       67     SUBTRACT 1 FROM lv_datediff_int.                                                        
       68   ENDIF.                                                                               
    69                                                                               
    70 * calc total duration                                                                       
       71   lv_duration_int = lv_datediff_int * 86400 + lv_timediff_int.                              
       72   lv_time = lv_timediff_int.                                                                
       73   ls_time = lv_time.                                                                        
       74   ls_duration-hours   = lv_duration_int DIV 3600.                                           
       75   ls_duration-minutes = ls_time-minute.                                                     
       76   ls_duration-seconds = ls_time-second.                                                     
       77                                                                               
    78   ev_duration_packed  = ls_duration.                                                        
       79   ev_duration_integer = lv_duration_int.                                                    
       80 ENDFUNCTION.                                                                               
    Contents of system fields                                                                         
    Name     Val.                                                                               
    SY-SUBRC 0                                                                               
    SY-INDEX 0                                                                               
    SY-TABIX 1                                                                               
    SY-DBCNT 1                                                                               
    SY-FDPOS 6                                                                               
    SY-LSIND 0                                                                               
    SY-PAGNO 0                                                                               
    SY-LINNO 1                                                                               
    SY-COLNO 1                                                                               
    SY-PFKEY                                                                               
    SY-UCOMM                                                                               
    SY-TITLE CIF - Comparison/Reconciliation of Transaction Data                                      
    SY-MSGTY                                                                               
    SY-MSGID                                                                               
    SY-MSGNO 000                                                                               
    SY-MSGV1                                                                               
    SY-MSGV2                                                                               
    SY-MSGV3                                                                               
    SY-MSGV4                                                                               
    Active Calls/Events                                                                               
    No.   Ty.          Program                             Include                             Line   
          Name                                                                               
    5 FUNCTION     /SAPAPO/SAPLTIMESTAMP               /SAPAPO/LTIMESTAMPU08                  61  
          /SAPAPO/TIMESTAMP_DIFFERENCE                                                                
        4 FORM         /SAPAPO/SAPLCIF_DELTA3              /SAPAPO/LCIF_DELTA3F17                349  
          COMPARE_ORDER_HEADER                                                                        
        3 FUNCTION     /SAPAPO/SAPLCIF_DELTA3              /SAPAPO/LCIF_DELTA3U03                125  
          /SAPAPO/CIF_DELTA3_COMP_ORDER                                                               
        2 FUNCTION     /SAPAPO/SAPLCIF_DELTA3              /SAPAPO/LCIF_DELTA3U01                871  
          /SAPAPO/CIF_DELTA3_COMP                                                                     
        1 EVENT        /SAPAPO/CIF_DELTAREPORT3            /SAPAPO/CIF_DELTAREPORT3              189  
          START-OF-SELECTION                                                                          
    Chosen variables                                                                               
    Name                                                                               
    Val.                                                                               
    No.       5 Ty.          FUNCTION                                                                 
    Name  /SAPAPO/TIMESTAMP_DIFFERENCE                                                                
    IV_TIMESTAMP_HIGH                                                                               
    #q1###                                                                               
    02073899                                                                               
    2001125C                                                                               
    IV_TIMESTAMP_LOW                                                                               
    ##q!####                                                                               
    00720899                                                                               
    2011125C                                                                               
    EV_DURATION_INTEGER                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    EV_DURATION_PACKED                                                                               
    000000                                                                               
    00000C                                                                               
    SYST-REPID                                                                               
    /SAPAPO/SAPLTIMESTAMP                                                                         
        0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        2545454254545444554452222222222222222222                                                      
        F31010FF310C49D5341D00000000000000000000                                                      
    %_SPACE                                                                               
    0                                                                               
    0                                                                               
    2                                                                               
    0                                                                               
    LS_TIMESTAMP_HIGH                                                                               
    22000713182959                                                                               
    00000000000000                                                                               
    00000000000000                                                                               
    33333333333333                                                                               
    22000713182959                                                                               
    LV_DATE_INT_HIGH                                                                               
    803363                                                                               
    0042                                                                               
    0C23                                                                               
    LS_TIMESTAMP_HIGH-DATE                                                                               
    22000713                                                                               
    00000000                                                                               
    00000000                                                                               
    33333333                                                                               
    22000713                                                                               
    LV_TIME_INT_HIGH                                                                               
    66599                                                                               
    0002                                                                               
    0147                                                                               
    LS_TIMESTAMP_HIGH-TIME                                                                               
    182959                                                                               
    000000                                                                               
    000000                                                                               
    333333                                                                               
    182959                                                                               
    LS_TIMESTAMP_LOW                                                                               
    20071210182959                                                                               
    00000000000000                                                                               
    00000000000000                                                                               
    33333333333333                                                                               
    20071210182959                                                                               
    LV_DATE_INT_LOW                                                                               
    733021                                                                               
    0025                                                                               
    0BFD                                                                               
    LS_TIMESTAMP_LOW-DATE                                                                               
    20071210                                                                               
    00000000                                                                               
    00000000                                                                               
    33333333                                                                               
    20071210                                                                               
    LV_TIME_INT_LOW                                                                               
    66599                                                                               
    0002                                                                               
    0147                                                                               
    LS_TIMESTAMP_LOW-TIME                                                                               
    182959                                                                               
    000000                                                                               
    000000                                                                               
    333333                                                                               
    182959                                                                               
    SY-UNAME                                                                               
    SCMATP                                                                               
    000000000000                                                                               
    000000000000                                                                               
    544455222222                                                                               
    33D140000000                                                                               
    SCREEN-INPUT                                                                               
    1                                                                               
    0                                                                               
    0                                                                               
    3                                                                               
    1                                                                               
    LV_DATEDIFF_INT                                                                               
    70342                                                                               
    001C                                                                               
    0126                                                                               
    LV_TIMEDIFF_INT                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    SYST                                                                               
    #######################################&#332;###############################################&#19800; C#&#1280;##
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000
        000000000000000000000000000000000000000100000000000000000000000000000000000000000000000D000500
        0000000000000000000000000000000800000004000000000000000000000000000000000000010900000005240000
        0000010200000000000001060100010C0000000C0000000002000000000000000000000000000B000001000803000C
    SY-REPID                                                                               
    /SAPAPO/SAPLTIMESTAMP                                                                         
        0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        2545454254545444554452222222222222222222                                                      
        F31010FF310C49D5341D00000000000000000000                                                      
    %_DUMMY$$                                                                               
    0000                                                                               
    0000                                                                               
    2222                                                                               
    0000                                                                               
    No.       4 Ty.          FORM                                                                     
    Name  COMPARE_ORDER_HEADER                                                                        
    SYST-REPID                                                                               
    /SAPAPO/SAPLCIF_DELTA3                                                                        
        0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        2545454254544445444543222222222222222222                                                      
        F31010FF310C396F45C413000000000000000000                                                      
    GC_APPEND_MODE                                                                               
    3                                                                               
    0                                                                               
    0                                                                               
    3                                                                               
    3                                                                               
    LS_FIELDS_TO_COMPARE-DUEDATE                                                                      
        X                                                                               
    0                                                                               
    0                                                                               
    5                                                                               
    8                                                                               
    SYST                                                                               
    #######################################&#332;###############################################&#19800; C#&#1280;##
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000
        000000000000000000000000000000000000000100000000000000000000000000000000000000000000000D000500
        0000000000000000000000000000000800000004000000000000000000000000000000000000010900000005240000
        0000010200000000000001060100010C0000000C0000000002000000000000000000000000000B000001000803000C
    LS_APO_ORDER-ORDTYPE                                                                               
    5                                                                               
    0                                                                               
    0                                                                               
    3                                                                               
    5                                                                               
    GC_PLANNED_ORDER                                                                               
    5                                                                               
    0                                                                               
    0                                                                               
    3                                                                               
    5                                                                               
    LS_R3_ORDER-STATUSCNF                                                                               
    0                                                                               
    0                                                                               
    2                                                                               
    0                                                                               
    GC_ORDER_STATUS_NO_CONF                                                                               
    1                                                                               
    0                                                                               
    0                                                                               
    3                                                                               
    1                                                                               
    LS_APO_ORDER-STATUSCNF                                                                               
    0                                                                               
    0                                                                               
    2                                                                               
    0                                                                               
    GC_PRED_OUT_DEL                                                                               
    A                                                                               
    0                                                                               
    0                                                                               
    4                                                                               
    1                                                                               
    GC_TND_DELETE                                                                               
    CN                                                                               
    00                                                                               
    00                                                                               
    44                                                                               
    3E                                                

    Dear Sajit,
    Go through the following OSS Notes:
    <a href="https://websmp110.sap-ag.de/form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=901957&_NLANG=E">901957</a>, <a href="https://websmp110.sap-ag.de/form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=1036880&_NLANG=E">1036880</a>, <a href="https://websmp110.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=1067414&_NLANG=E">1067414</a>
    Regards,
    Naveen.

Maybe you are looking for

  • Configuring Outbound and Inbound SMTP mails with SUN Java messaging system

    hi all, i am new to Solaris i have deployed SUN java comuunication Suite. How do i configure my messaging server to send outgoing mails through existing gateway and recieve inbound mails from the same gateway? Currently my server is connected to the

  • ATI Rage Pro 3D

    Hi, I just installed Archlinux on my old PC and I'd like to configure the graphic card properly. With the default settings it works but I see flickering while moving the windows on the screen. Searching the web I found this wiki page, that refers to

  • Digital audio ouput - why no volume control??

    This is a problem that has been around for a while (ie. pre-Leopard). Why is there *no global volume control* when using digital audio output? This includes the inability to mute the output as well as adjust the volume with either the keyboard or the

  • Copy and paste error after lasso

    I take a picture and use a lasso tool, little ants moving around border, I go to edit-copy and get a error that says could not complete the copy command because no pixels selected.  Cannot get pasted to a layer

  • Help!  My hotmail has stopped working since i switched to hotmail safari

    Help!  My Hotmail is not working since I upgraded to hotmail safari for iPad.  It was fine before that, but now I can't reply to emails, open them, check the delete box, get the keyboard to appear etc etc.  Please help- I use hotmail all of the time.