Authorization error while executing IP function in Web

Hi all,
I have an application in WAD which has a planning sequence.
The sequnece runs fine in Modeler.
But while executing the sequence in WAD, it gives me an error that I am not authorized to run the sequence.
Is there any specific authorization that I need here?
Let me know.
Thanks.
Anand

Well I think you do not have the follwoing auth objects added to your role
S_RS_PLSE -->planning functions
S_RS_PLSQ-->planning sequences

Similar Messages

  • To overcome Authorization error while executing a Function module

    Hello Friends,
    In my custom workflow , I need to execute a validation  function module ( SAP standard ) in a dialog step  - Approval step.
    But the issue is approvers will not have authorization to the FM ( They have minimum authorization - Just to approver the custom workflow ) .
    So , I need to know is ther a option to execute the FM using another user ID ( a BATCH user ID ) .
    thanks
    Raghu V

    make the validation task before the dialogue step. a general task will run in background from user WF-BATCH and that wont need to authorization issue...  after completion of this validation you can go for the dialogue step i.e the approval step..
      |
    __u2193__
    | u25BA__| Validation task
      u2193
    __|___
    |_?u25BA_| User decision
      |
      u25CF_______
      u2193       u2193reject
      |
    approve

  • Error while executing planning Function

    Hi All,
    I'm getting some error while executing planning function. Below are errors. Please check and provide solution.
    Errors occurred when executing planning function RTFMPF01/RTFMPG01
    Value 08 of chara Region does not correspond to the attrib.val MI of chara Store
    Value 10 of chara Region does not correspond to the attrib.val RM of chara Store
    Value 11 of chara Region does not correspond to the attrib.val NA of chara Store
    Thanks,
    Vamsi

    Hi,
    Value 08 of chara Region does not correspond to the attrib.val MI of chara Store
    Looks like there is a characteristics relationship which derives the attribute store from Region.
    Check the master data for Region for attribute Store and the corresponding values.
    The values that are maintained in the master data will only be allowed to enter in the cube.
    Thanks
    pratyush

  • Macro Error while executing planning functions or saving data

    Dear All,
    I am getting following error in BEx Analyzer while executing planning function or pressing a save button.
    Note: Excel is 2007 version.
    Cannot run the macro "XXXXXX.xlsx". The macro may not be available in this workbook or all macros may be disabled.
    I changed the settings in Macro Settings (Office Button -> Excel Options -> Trust Center -> Trust Center Settings-> Macro Settings) eventhough it is showing that above message.
    selected ->
    Enalble all macros
    Trust access to VBA project object model.
    If anybody faced this issue kindly reply to this.
    Best Regards,
    SG

    Hello everybody,
    i am facing exactlythe same issue! I am currently running GUI Patch Level 14 and BI Add on Patch Level 10.
    I have also adjusted all necessary settings in Excel Options like Activate all Macros and Trust VBA Coding.
    Does anybody have another Solution.
    As mentioned before Gui Patch 13 and BI Add On Patch 10 obviously arent the solutiuon.
    Best regards
    Janos

  • Authorization Error while executing a program

    Hi All,
               I have developed a program which calls VF02 transaction in background. But while executing it, the program fails with message'No authorization for sales organization XXXX'.
    The users who are executing the program does not have access to VF02 and for security reasons the access can not be given to the users.
    So my question is whether this error is due to no access to 'VF02' or with the sales organization?
    Can we give access to the users according to sales organization rather than giving authorization for VF02 ?
    If not then whats the solution to rectify this error without giving VF02 access to users?
    Please help.
    Thanks,
    Sanujit Acharya

    Hi Sandeep
    The OP's question appears to be 'If I give a custom transaction to a user it seems to then call an object unexpectedly that has a sales organisation value because I'm using it to call VF02".
    Due to SU24 not being updated for the custom transaction I'm guessing.
    A trace would probably assist when working with the functional team to decide what is really needed but I'm a little lost as to what is being asked of either the OP or the security/ABAP teams as this is pretty basic stuff...
    @Sanujit
    I have developed a program which calls VF02 transaction in background. But while executing it
    Have you had this program associated with a custom transaction yet?
    Regards
    David
    Edited by: David Berry on May 28, 2011 5:41 PM (got my sales orders mixed up)
    Edited by: David Berry on May 28, 2011 5:47 PM

  • Error while executing a function

    I had created a function F_GET_PRH_NO_QTY. While using this function in a query system is giving me error as given below :
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "ORION_REPORTS.F_GET_PRH_NO_QTY", line 36
    CREATE OR REPLACE FUNCTION F_GET_PRH_NO_QTY(P_PWH_NO NUMBER)
    RETURN VARCHAR2
    AS
    L_RET_VAL VARCHAR2(4000);
    CURSOR C1 IS
    SELECT REP_NO, REP_QTY
    FROM
    SELECT PRH_NO REP_NO, NVL(PRSO_REP_QTY_BU/IU_CONV_FACTOR/IU_MAX_LOOSE_1,0) REP_QTY
    FROM OT_PR_HEAD, OT_PWO_HEAD, OT_PR_WO_DETAIL, OT_PR_STAGE_OUTPUT, OM_ITEM, OM_ITEM_UOM
    WHERE ITEM_CODE = IU_ITEM_CODE AND ITEM_UOM_CODE = IU_UOM_CODE
    AND PWH_SYS_ID = PRH_REF_SYS_ID (+)
    AND PRH_SYS_ID = PRWD_PRH_SYS_ID -- FROM OT_PR_WO_DETAIL TABLE
    AND PRWD_SYS_ID = PRSO_PRWD_SYS_ID -- FROM OT_PR_STAGE_OUTPUT TABLE
    AND PWH_NO = P_PWH_NO
    M_REP_NO VARCHAR2(40);
    M_REP_QTY VARCHAR2(40);
    M_TEMP1 NUMBER := 0;
    M_RNO_RQTY VARCHAR2(2000);
    BEGIN
    IF C1%ISOPEN THEN
    CLOSE C1;
    END IF;
    OPEN C1;
    LOOP
    FETCH C1 INTO M_REP_NO, M_REP_QTY;
    EXIT WHEN C1%NOTFOUND;
    M_TEMP1 := M_TEMP1 + 1;
    IF M_TEMP1 = 1 THEN
    M_RNO_RQTY := M_REP_NO||'-'||M_REP_QTY;
    ELSE
    M_RNO_RQTY := M_RNO_RQTY||', '||M_REP_NO||' - '||M_REP_QTY;
    END IF;
    END LOOP;
    --RETURN NVL(M_RNO_RQTY,'');
    RETURN L_RET_VAL;
    END;
    Yogesh

    you need to use pipelined function to break into small chunks...
    CREATE OR REPLACE
      FUNCTION F_GET_PRH_NO_QTY
          P_PWH_NO NUMBER)
        RETURN VARCHAR2 PIPELINED
      IS
        L_RET_VAL VARCHAR2(4000);
        v_counter NUMBER := 1;
        v_temp VARCHAR2(4000) := NULL;
        CURSOR C1
        IS
           SELECT REP_NO,
            REP_QTY
             FROM
            (SELECT PRH_NO REP_NO,
              NVL(PRSO_REP_QTY_BU/IU_CONV_FACTOR/IU_MAX_LOOSE_1,0) REP_QTY
               FROM OT_PR_HEAD  ,
              OT_PWO_HEAD       ,
              OT_PR_WO_DETAIL   ,
              OT_PR_STAGE_OUTPUT,
              OM_ITEM           ,
              OM_ITEM_UOM
              WHERE ITEM_CODE = IU_ITEM_CODE
            AND ITEM_UOM_CODE = IU_UOM_CODE
            AND PWH_SYS_ID    = PRH_REF_SYS_ID
            AND PRH_SYS_ID    = PRWD_PRH_SYS_ID  -- FROM OT_PR_WO_DETAIL TABLE
            AND PRWD_SYS_ID   = PRSO_PRWD_SYS_ID -- FROM OT_PR_STAGE_OUTPUT TABLE
            AND PWH_NO        = P_PWH_NO
        M_REP_NO   VARCHAR2(40);
        M_REP_QTY  VARCHAR2(40);
        M_TEMP1    NUMBER := 0;
        M_RNO_RQTY VARCHAR2(2000);
      BEGIN
        IF C1%ISOPEN THEN
          CLOSE C1;
        END IF;
        OPEN C1;
        LOOP
          FETCH C1 INTO M_REP_NO, M_REP_QTY;
          EXIT
        WHEN C1%NOTFOUND;
          M_TEMP1      := M_TEMP1 + 1;
          IF M_TEMP1    = 1 THEN
            M_RNO_RQTY := M_REP_NO||'-'||M_REP_QTY;
          ELSE
            M_RNO_RQTY := M_RNO_RQTY||', '||M_REP_NO||' - '||M_REP_QTY;
          END IF;
        END LOOP;
        LOOP
        v_temp := SUBSTR(v_xml,   v_counter,   4000);
        EXIT
        WHEN v_temp IS NULL;
        pipe ROW(v_temp);
        v_counter := v_counter + 4000;
        END LOOP;
        RETURN ;
      END;
      /untested....
    for executing above
    select * from table(F_GET_PRH_NO_QTY(<your variable inside quotes>))Ravi Kumar

  • Error while executing the function module BAPI_RE_CN_CREATE

    Dear All
    I was using the the function module BAPI_RE_CN_CREATE.  When I am trying to execute the function module I am getting the error message u201CBusiness transaction RECN doest existu201D. While inputting the parameters for the function module I have given RECN   In the input field TRANS. Requesting you to please kindly suggest.
    Regards.
    Varaprasad

    Hi Varaprasad,
    please try the following.
    1. Create a contract manually in the system
    2. Use BAPI_RE_CN_GET_DETAIL to show how the fields and structures are filled.
    3. Check and change the parameters for BAPI_RE_CN_CREATE accordingly.
    Hope that helps.
    Regards, Franz

  • Authorization Error  while executing Workbooks,

    Dear ALL
    We have authorization in place where users are restricted to execute Workbooks PLANT wise.
    For this 0PLANT is kept authorization relevant.
    0PLANT__0COMP_CODE  is Navigational Attribute of 0PLANT also marked as authorization relevant.
    Till now all user were assigned the Analysis authorization A_PLNT_XX as  0PLANT = XX
    But suddenly now the users are getting authorization error of NOT BEING AUTHORIZED .,
    The error log is as shown below.
    Relevant Characteristics for Detailed Authorization Check  
    (Characteristics with Full Authorization Are Not Listed!)
      List of Effective Authorization-Relevant Characteristics for InfoProvider ZMMIMMP05:  
    0PLANT 
    0PLANT__0COMP_CODE 
    0TCAACTVT 
    Subselection (Technical SUBNR) 1  
    Supplementation of Selection for Aggregated Characteristics
      Check Added for Aggregation Authorization:     0PLANT__0COMP_CODE  
      Authorizations missing for aggregation (":")  
    Characteristic  1 
    0PLANT__0COMP_CODE    Empty   
    Entries marked with red do not have aggregation authorization
    You can find more information about this here 1140831
      The authorization check stops here as this selection is no longer needed  
      Message EYE007: You do not have sufficient authorization  
      No Sufficient Authorization for This Subselection (SUBNR)  
    Following CHANMIDs Are Affected:
    51 ( 0PLANT )
      Authorization Check Complete  
    Please let me know the reason for the same.
    Also How can  i track these  changes to avoid such errors
    Regards,
    Ajit

    Hi Ajit,
    The authorization log has been improved constantly and try to make it easy to understand.
    It says:
    Authorizations missing for aggregation (":")
    Characteristic 1
    0PLANT__0COMP_CODE Empty
    Entries marked with red do not have aggregation authorization
    You can find more information about this here 1140831
    So please click the "1140831" which is a hyperlink bringing you to OSS note 1140831.
    The note says:
    1140831  Colon authorization during query execution
    Part 1:  Description of the authorization check
    You require aggregation authorization ("colon authorization") to view
    the values of an authorization-relevant characteristic in aggregated
    form. What does this mean exactly?
    Example:
    The calendar year (0CALYEAR) characteristic is authorization-relevant
    and is contained in the InfoProvider that is in use. You defined a query
    as follows:
    1.  0CALYEAR is in the free characteristics (not in the drilldown)
        without any selections
    - or -
    2.  0CALYEAR does not exist in the query at all.
    In both cases, no 0CALYEAR values are displayed in the query. Also, the
    query is not restricted to any 0CALYEAR values. A colon is required for
    the authorization check in this situation.
    The note contains some more detailed explanation. You could read through it to understand the concept.
    Regards,
    Patricia

  • Error while executing the function

    hi,
    I have a table with the following data.
    T_1          T_2 T_3        T_4
    a.1            1 aa         ff
    a.1            2 ab         ff
    a.2            1 ba         ff
    a.2            2 bb         ff
    a.2            3 bc         ff
    a.2            4 bd         ff
    a.3            1 ca         ff
    a.3            3 cc         ff
    a.4            2 db         ffi want the data in the following way.
    col_1       col_2         col3
    a.1         1,2             aa ,ab
    a.2         1,2 ,3,4       ba,bb,bc,bd
    a.3         1,3             ca,cc
    a.4         2                db         For this , i have written a package as shown below.
    create or replace package t_emp_pkg as
    type typ_emp is record
    tv_t_1 t_Emp.t_1%type,
    tv_t_2 varchar2(20),
    tv_t_3 varchar2(20));
    type typ_emp_tab is table of typ_emp;
    function t_emp_func(pv_value in varchar2) return typ_emp_tab;
    end t_emp_pkg;
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab := typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_1);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_2);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_3);
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    When i executed the function , i got the following error.
    SQL> declare
    2 v t_emp_pkg.typ_emp_tab := t_emp_pkg.typ_emp_tab();
    3 begin
    4 v := t_emp_pkg.t_emp_func('ff');
    5 for i in v.first..v.last loop
    6 dbms_output.put_line(v(i).tv_t_1 ||', '||v(i).tv_t_2||', '||v(i).tv_t_3);
    7 end loop;
    8 end;
    9 /
    declare
    ERROR at line 1:
    ORA-06533: Subscript beyond count
    ORA-06512: at "SCOTT.T_EMP_PKG", line 30
    ORA-06512: at line 4
    but when i am running this queries in anonymous block (i.e) using declare,begin,end , i am getting the data correctly.
      1  declare
      2  pv_value varchar2(5) := 'ff';
      3   cursor c1(v_value varchar2) is
      4  select distinct t_1 from t_emp where t_4 = v_value ;
      5  cursor c2(pv_t_1 varchar2) is
      6  select t_2,t_3 from t_emp
      7  where t_1 = pv_t_1;
      8  --typ_emp_table typ_emp_tab := typ_emp_tab();
      9  t_count number := 0;
    10  c1_cur_rec c1%rowtype;
    11  c2_cur_rec c2%rowtype;
    12  v_temp_value1 varchar2(300);
    13  v_temp_value2 varchar2(300);
    14  begin
    15  open c1(pv_value);
    16  loop
    17  fetch c1 into c1_cur_rec;
    18  exit when c1%notfound;
    19  v_temp_value1 := null;
    20  v_temp_value2 := null;
    21  open c2(c1_cur_rec.t_1);
    22  loop
    23  fetch c2 into c2_cur_rec;
    24  exit when c2%notfound;
    25  v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    26  v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    27  end loop;
    28  close c2;
    29  t_count := t_count+1;
    30  --typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    31  --typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    32  --typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    33  dbms_output.put_line(c1_cur_rec.t_1);
    34  dbms_output.put_line(v_temp_value1);
    35  dbms_output.put_line(v_temp_value2);
    36  end loop;
    37  close c1;
    38* end;
    39  /
    a.2
    ,1,2,3,4
    ,ba,bb,bc,bd
    a.3
    ,1,3
    ,ca,cc
    a.4
    ,2
    ,db
    a.1
    ,1,2
    ,aa,ab
    PL/SQL procedure successfully completed.So can anybody tell me why it is not executing correctly when executing as a function.
    Thanks in advance.

    hi devmiral,
    I am not sure exactly where i am making the mistake. I have modified the package but still i am getting the error.
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab ;
    --:= typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    typ_emp_table := typ_emp_tab(c1_cur_rec.t_1,v_temp_value1,v_temp_value2);
    typ_emp_table.extend;
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    SQL> @t_emp_pkg_body.sql
    Warning: Package Body created with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY T_EMP_PKG:
    LINE/COL ERROR
    36/1     PL/SQL: Statement ignored
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'Thanks in advance.

  • Runtime error while executing 'CUSTOMER_CLEARING' function module

    Hi Experts,
    When I execute fm 'CUSTOMER_CLEARING', I get a run time error that says that there is a type mismatch with respect to
    'I_MODE' parameter used. This dump occurs when there is a call to fm 'POSTING_INTERFACE_START' by this fm. I tried executing it with different values for 'I_MODE' ,such as 'A', 'S', 'E' etc but every time it gave a run time error.
    Kindly suggest what might have gone wrong.
    Thanks in advance,
    Regards,
    Puja

    CALL FUNCTION 'POSTING_INTERFACE_START'
           EXPORTING
                I_CLIENT           = SY-MANDT
                I_FUNCTION         = 'C'           "Call Transaction
                I_GROUP            = XT_BSSPARA-MAPPE
                I_MODE             = I_MODE
                I_HOLDDATE         = XT_BSSPARA-HOLDD
                I_KEEP             = XT_BSSPARA-KEEPM
                I_USER             = XT_BSSPARA-USERN
           EXCEPTIONS
                CLIENT_INCORRECT   = 01
                FUNCTION_INVALID   = 02
                GROUP_NAME_MISSING = 03
                MODE_INVALID       = 04
                UPDATE_INVALID     = 05.
    IF SY-SUBRC NE 0.
      break ruettgers.        "/ JWE P40K041774
        MESSAGE A217(68).       "/ JWE  P40K041774
    ENDIF.
    i think it is happening because of field lenghth declaration, try to find it .
    try like this
    Edited by: kpsgoutam on Nov 18, 2009 2:23 PM

  • Error while executing procedure from the web

    Hi,
    <p>
    I am developing some procedures that I want to execute from an html form. The problem is that when I am trying to execute it in SQL Developer I got the following error:<br>
    Connecting to the database oracle.<br>
    ORA-06502: PL/SQL: numeric or value error<br>
    ORA-06512: at "SYS.OWA_UTIL", line 325<br>
    ORA-06512: at "SYS.OWA_UTIL", line 366<br>
    ORA-06512: at "MMARTA.INSERTPROJECT", line 3<br>
    ORA-06512: at line 10<br>
    Process exited.<br>
    </p>
    <p>
    The procedure is the following:<br>
    create or replace <br>
    procedure insertproject(jnum j.j#%type, jname j.jname%type, city j.city%type) as <br>
    begin <br>
    owa_util.mime_header('text/plain');<br>
    if jpak.insertj(jnum,jname,city)<0 then<br>
    htp.print('The jnum already exists in the database!');<br>
    else <br>
    htp.print('Insert successfull!');<br>
    end if;<br>
    end;<br>
    <br>
    and the function has the following code:
    <br>
    function insertj(jnum j.j#%type, jname j.jname%type, city j.city%type)<br>
    return number is<br>
    x number;<br>
    begin<br>
    Select count(*) into x From J<br>
    Where J#=jnum;<br>
    if x=0 then<br>
    insert into J values(jnum,jname,city);<br>
    commit;<br>
    return 0;<br>
    end if;<br>
    return -1;<br>
    END insertj;<br>
    </p>
    <p>
    Does anyone have any idea why I get this error?
    </p>
    <p>
    Thanks!
    <p/>

    Hi,
    <p>
    The function has the following parameters:<br>
    function insertj(jnum j.j#%type, jname j.jname%type, city j.city%type)<br>
    where j# is varchar2(5), jname is varchar2(35) and city is varchar2(35)<br>.
    I was trying to insert the following values:<br>
    j#:='J11', jname:='JobName' and city:='Paris'.<br>
    </p>
    <p>
    The procedure just calls this function with the same parameters. It is very strange because it is hard to see what the problem is. The line 10 is return 0 in the function where I believe the error comes from. It starts in the procedure and then goes in the function body, if I am interpreting this right.
    </p>
    <p>
    Any idea?
    </p>
    Thanks!

  • Getting error while executing the report in WEB

    Hello Experts,
    I have did validation in my report on selection screen, if that validation is successful then only we can see the report output
    otherwise it's give the error message.
    Validations are working query designer and RSRT but when I run the report in WEB then even if the validation is successful then also I am getting the error message and not able to see the report output.
    I have written the code in user exit for validation.
    Can any one tell me why it is so?
    what needs to do?
    Thanks
    Chetan

    Hi.
    Could you plz explain your validation logic and wich way it done ?
    Could you plz provide error message ?
    Regards.

  • Error while executing planning function with reference data

    Hi,
    I have a two planning functions one is used to upload the file (with out reference data checkbox in planning function RSPLF1) and other planning function ('Referece data'check box is selected in custom planning function RSPLF1) to execute the logic of creating new record along with the flat file data.
    Following data is uplooaded
    Company code | Profit_ctr | calmonth | Amount
    1000                 | 50000      | 01.2011  | 150
    Cube data
    Field1    |  Company code | Profit_ctr | calmonth | Amount
             |  1000                 | 50000      | 01.2011  | 150
    Z1         |  1000                 | 50000      | 01.2011  | 150
    Now I want to change the value from 150 to 200 and when I try to execute with the following data, it is giving dump 'a row with the same key already exists'.
    Company code | Profit_ctr | calmonth | Amount
    1000             | 50000          | 01.2011  | 200
    Ideally in the second execution it should append the new row with Amount value 50 to cube which is the delta value.
    I debugged the issue and found that I_TH_REF_DATA has following data and C_TH_DATA also contains the same records.
    Field1     Company code | Profit_ctr | calmonth | Amount
    #     1000                 | 50000      | 01.2011  | 150
    Z1     1000                 | 50000      | 01.2011  | -150
    Z1     1000                 | 50000      | 01.2011  | 150
    Due to this, record which already exists in C_TH_DATA and trying to append new record with the same combination is failing.
    C_TH_DATA should only contain the source data of Amount 200, but not sure why reference data is coming in C_TH_DATA.
    Could anyone please guide me on how the reference data is getting populated in C_TH_DATA ?
    Thanks in advance
    Edited by: peppy on Aug 3, 2011 5:00 PM
    Edited by: peppy on Aug 3, 2011 8:37 PM

    Hi Peppy,
    C_TH_DATA is hashed table!  According to your post you are trying to append to C_TH_DATA and this results in a dump. Please take a look at the standard planning function to see how SAP is programming the planning functions. E.g. in CL_RSPLFC_REPOST method IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE you can find the following code:
      CREATE DATA l_r_data_wa LIKE LINE OF c_th_data.
      ASSIGN l_r_data_wa->* TO <s_data_wa>.
      CREATE DATA l_r_new_wa LIKE LINE OF c_th_data.
      ASSIGN l_r_new_wa->* TO <s_new_wa>.
    LOOP AT c_th_data INTO <s_data_wa>.
    <s_new_wa> = <s_data_wa>.
    now the SAP code changes the  values, you can do it your way here
    and than write the changes back
            MODIFY TABLE c_th_data FROM <s_data_wa>.
    ENDLOOP:
    Another option is to use the READ statement to check if the record is already in the table. If not, you can use MODIFY otherwise you use INSERT. So you get something like this:
    READ C_TH_DATA from <s_data_wa> transporting no fields.
    if not sy-subrc EQ 0.
      INSERT <s_data_wa> into table C_TH_DATA.
    else.
      MODIFY TABLE c_th_data FROM <s_data_wa>.
    endif.
    Depending on your requirements you can also use the collect  statement.
    If c_th_data shows the reference data as well, you may need to adjust the filter to restrict it to the correct values.
    Hope this helps.
    Best regards
    Matthias Nutt
    SAP Consulting Switzerland

  • Error while executing Kernal function

    Hi All,
    We are getting error for the newly created internet users (SU05). after analysis we found that the error coming from the kernel function "XXPASSNET" with sy-subrc = 32.
    Can any one let me know what causing this issue.
    Thanks in advance.

    Hi Rob,
    thanks for your reply. the note tell that we need to use standard calls. here in this case we areusing WWW_USER_AUTHORITY which was specified by SAP itself. also note that our SAP systen=m version is of 4.6c.
    please let me know if you have any other notes or some thing.
    Regards,
    Vishal Kommera

  • Error while executing function

    hiii all,
    hope doing welll
    iam getting error while executing the function and error is
    ORA-00932: inconsistent datatypes: expected NUMBER got AMPLEX_GRAND1.SYS_PLSQL_75185_9_1

    hii sir this is my function
    create or replace
    FUNCTION FnFetchEmployeesforjobsheet
    v_user_id IN NUMBER
    RETURN FnFetchEmployeesforjobshee_pkg.tt_v_employees_type PIPELINED
    AS
    --declare @manager as int
    v_empid VARCHAR2(20);
    v_compid VARCHAR2(20);
    v_temp NUMBER(1, 0) := 0;
    v_temp_1 SYS_REFCURSOR;
    v_temp_2 TT_V_EMPLOYEES%ROWTYPE;
    BEGIN
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT 1
    FROM user_list
    WHERE Access_level = 0
    AND USER_ID = v_user_id );
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    BEGIN
    SELECT Emp_ID
    INTO v_empid
    FROM User_List
    WHERE USER_ID = v_user_id;
    SELECT Comp_ID
    INTO v_compid
    FROM Employee
    WHERE Emp_ID = v_empid;
    INSERT INTO tt_v_employees
    ( SELECT DISTINCT Emp_id ,
    v_user_id
    FROM employee
    WHERE Comp_ID = v_compid );
    END;
    END IF;
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT 1
    FROM user_list
    WHERE Access_level = 2
    AND USER_ID = v_user_id );
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    BEGIN
    INSERT INTO tt_v_employees
    ( SELECT e.Emp_ID ,
    v_user_id
    FROM employee e
    JOIN user_list ul
    ON ul.Emp_ID = e.Emp_ID
    WHERE USER_ID = v_user_id );
    END;
    END IF;
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT 1
    FROM user_list
    WHERE Access_level = 1
    AND USER_ID = v_user_id );
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    DECLARE
    v_Emp_id VARCHAR2(50);
    BEGIN
    SELECT e.Emp_id
    INTO v_Emp_id
    FROM employee e
    JOIN user_list ul
    ON ul.Emp_ID = e.Emp_ID
    WHERE USER_ID = v_user_id;
    --insert @employees select e.Emp_id,User_ID from employee e inner join user_list ul on ul.Emp_ID = e.Emp_ID   
    --where User_ID = @user_id
    --insert @employees select  Emp_ID from User_List where User_Id=@user_id
    INSERT INTO tt_v_employees
    ( Emp_ID )
    VALUES ( v_Emp_id );
    INSERT INTO tt_v_employees
    --select Emp_ID,@user_id from employee  where Emp_ID = @Emp_id   
    --union    
    SELECT Emp_ID ,
    v_user_id
    FROM employee
    WHERE Managerid = v_Emp_id
    AND STATUS = 1 );
    END;
    END IF;
    OPEN v_temp_1 FOR
    SELECT *
    FROM tt_v_employees;
    LOOP
    FETCH v_temp_1 INTO v_temp_2;
    EXIT WHEN v_temp_1%NOTFOUND;
    PIPE ROW ( v_temp_2 );
    END LOOP;
    END;
    and my table is
    CREATE GLOBAL TEMPORARY TABLE tt_v_employees
    Emp_ID VARCHAR2(8) ,
    USER_ID NUMBER(10,0)
    and i am executing this function ,like this
    select FnFetchEmployeesforjobshee_pkg.FnFetchEmployeesforjobsheet('1') from dual; and getting this error
    SQL Error: ORA-00904: "FNFETCHEMPLOYEESFORJOBSHEE_PKG"."FNFETCHEMPLOYEESFORJOBSHEET": invalid identifier
    00904. 00000 - "%s: invalid identifier"

Maybe you are looking for

  • RESTART COMPUTER POP-UP WINDOW ISSUE

    Please help me help me why I keep getting the same restart computer pop-up window lately with no error message at all even though the software update is completely up-to-date.

  • Problems After Installing MSI GTX 760 n760-2gd5/oc

    I had previously bought the MSI GTX 750TI, but decided after a week to return it to get the more powerful MSI GTX 760 card. The 750 had worked without issue with my system when I returned it. I installed the 760, and have had nothing but issues. Afte

  • Restating of Customer and Vendor Documents

    Dear All, Kindly clear some of my doubts related to restating as of year end- What is the procedure for restating vendor and customer accounts as on 31.03.11 if any of the foreign currency transactions are outstanding as on year end? ((This may inclu

  • I'm trying to use the Opening Title effect on iMovie

    for the "neon" theme and for some reason it keeps coming up with the title and then "university of rochester" underneath, but it won't let me edit the university of rochester text. does anyone know why that would be? i go to the university of rochest

  • Smartforms JOB_OUTPUT_INFO-XMLOUTPUT

    hello. i need your help. i create a smartform and generate function module but the export parameter JOB_OUTPUT_INFO dont have XMLOUTPUT structure. i only have  XSFDATA, XSLDATA, CSSDATA. if someone knows why? thks Message was edited by:         ouzou