Call procedure while creating view in hana.

Can we call procedure while creating a attribute view like
CREATE VIEW "PAYROLLDBTEST"."@HourTransactionView"
"DocEntry",
"DocNum",
"EmpID",
"EmpCode",
"FullName",
"TableName",
"TranName",
"U_FromDate",
"U_ToDate",
"NoOfDays",
"U_FromTime",
"U_ToTime",
"NoOfHours",
"OvertimeHours",
"UnpaidDays",
"Weekends",
"Holidays",
"U_Remarks",
"U_BatchNo",
"ProjectCode"
) AS SELECT
  T0."DocEntry" AS DocEntry,
    T0."DocNum" AS DocNum,
   T0."U_EmpCode" AS EmpID,
CALL PAYROLLDBTEST.GetEmpCodeFromEmployeeID('EmpID')  ,              (getting syntax error here).
    GetEmployeeFullName("@TRANSACTION_HOURS".U_EmpCode) AS FullName,
      T0."U_TransactionType" AS TranCode,
    GetHourTableName("U_TransactionType") AS TableName,
     GetHourTransactionName("U_TransactionType") AS TranName,
    T0."U_FromDate",
    T0. "U_ToDate",
      DAYS_BETWEEN("U_FromDate", "U_ToDate") + 1 AS NoOfDays,
      T0."U_FromTime" AS U_FromTime,
       T0."U_ToTime" AS U_ToTime,
    IFNULL("U_WorkHours", 0) AS NoOfHours,
     IFNULL("U_OvertimeHours", 0) AS OvertimeHours,
    IFNULL("U_PaidDays", 0) AS PaidDays,
     IFNULL("U_UnpaidDays", 0) AS UnpaidDays,
    IFNULL("U_WeekendsCount", 0) AS Weekends,
     IFNULL("U_HolidaysCount", 0) AS Holidays,
      T0."U_Remarks",
       T0."U_BatchNo",
    T0."U_ProjectCode" AS "ProjectCode"
    FROM
    "@TRANSACTION_HOURS" T0
    INNER JOIN
    "OHEM" T1
    ON
     T1."empID" = T0."U_EmpCode";

Hello,
The problem could be a SAPGUI related problem... Whats the current sapgui patch level ? Does it work when you try on another wokstation with the same user ?
Could you please use SAPGUI 720 and update your patch level to 7 ? Then check the behaviour again.
Best regards
Rene

Similar Messages

  • Getting Error ORA-00604 While Creating View from front Ent

    Hello All,
    I am getting ORA-00604 while creating view from the front end. And some time I get Maximum cursor open, It is ok amy be I am opening cursors in while loop. While ORA-00604 is giving lots of truble to me. In help it said to contact Oracle service, I dont know how to do that. Help me.

    Please post your view definition including the complete error_message and also the relevant parts of your code with the while loop.

  • Plz help me create a Procedure with create view cmd

    i want to create a view from the procedure like the following one,
    It creates the proc but while running it show invalid column name please help me;
    create or replace procedure asho2005.mock_pro( fin_fr_dt in date, fin_to_dt in date) is
         ffdt date;
         ftdt date;
    begin
         select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt from dual;
         select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt from dual;
    execute immediate 'create or replace view mock_vu as select a.amt from cbtran a where chq_dt > ffdt and chq_dt <ftdt';
    end;

    i want to create a view from the procedure like the
    following one,
    It creates the proc but while running it show invalid
    column name please help me;
    create or replace procedure asho2005.mock_pro(
    fin_fr_dt in date, fin_to_dt in date) is
         ffdt date;
         ftdt date;
    begin
    select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt
    t from dual;
    select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt
    t from dual;
    execute immediate 'create or replace view mock_vu
    vu as select a.amt from cbtran a where chq_dt > ffdt
    and chq_dt <ftdt';
    end;Hallo,
    your problem is , that execute immediate does't recognize ffdt
    You have to concatenate literals
    create or replace procedure asho2005.mock_pro( fin_fr_dt in date, fin_to_dt in date) is
    ffdt date;
    ftdt date;
    begin
    select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt from dual;
    select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt from dual;
    execute immediate 'create or replace view mock_vu as select a.amt from cbtran a where chq_dt > '''||ffdt||''' and chq_dt <'''||ftd||'''';
    end; BTW, your view doesn't return any rows
    ffdt and < ffdt :-)
    Besides that , it's a very very bad method!
    You must not create views in runtime. Use of literals results in hard parsing .
    The performance will be poor.
    You have to create view in design time, and then simply use select:
    select * from mock_vu where chq_dt > (your_date) and something else
    HTH
    Regards
    Dmytro
    corrected wrong number of quotes (no wonder ) :-)
    Message was edited by:
    Dmytro Dekhtyaryuk

  • Getting prob while creating view in webdynpro ABAP application

    Hi Guys,
    I am facing a problem while creating a view for webdynpro ABAP application. It is giving an error as "ICF service "/sap/public/bc/WebDynpro/ViewDesigner" inactive".
    can anybody let me know how to solve this problem.
                   Thanks In Advance
    Regards
    Ravikumar

    I think check Internet explorer Tools ->Internet Options ->Connections.>Lan Connections> if the proxy or anyting checkbox is clicked coz it doesn't work with Internet on .
    Please reward if useful.

  • Bug in BC4J test query while creating view based on query

    In BC4J while creating a view from query if we test our query , BC4J modify the query with the following one :
    "SELECT * FROM ( " + ourQuery + " ) where 1=2;"
    so for the Query like "SELECT ename,ename from emp" which is a valid query it modifies it to
    "SELECT * FROM ( SELECT ename,ename from emp ) where 1=2;"
    which is an invalid Query and BC4J get a SQLException:column ambiguously defined and Test fails
    BC4J does this modification in query because it doesn't want to Fetch Data from Database and add the where clause
    to the query but in Cases like above this modification doesn't work properly.
    one way to solve the problem is by giving alias name to the columns of query.Is there any other way to do the same as my query is completely Valid and i don't want to change it at all ?

    Hi Jan,
    Actually I am getting my query at run time and based on that I am creating a view.This Query can be given by User of my application and at that time it'll be very painful for me to handle that.
    It's definately a Bug in BC4J as they should not modify the query in this way.Thanx for ur interest in my problem.

  • Table aliases while creating views in KM

    Hello All,
    While executing an interface I noticed that it failed on the LKM step -
    Create View on Source
    (LKM MSQL to MSQL)
    On investigation, I found the error was because of an in invalid alias (alias created was a sql server keyword) that ODI had assigned to the source table. I extracted the code from the KM and I am hoping someone could direct me on how I could modify the KM so that the alias ODI creates is different from what its currently set to.
    TIA
    MN

    MN you dont need to modify the KM , when you click on the required Datastore , you will find the alias name , there change it accordingly or in the Datastore itself. I think that should help you .

  • Error while creating view

     Hello,
    I am trying to create view which is based on multiple source tables and I am receiving following error 
    Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.
    Can anyone know how to resolve this.
    Thanks,

    See MS Support for how to solve it:
    Error message when you run a query in SQL Server 2005: "Internal error: An expression services limit has been reached"
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Error while creating view in component - BT115H_SLSO

    Hi All,
    When I am creating view in the BSP Component workbench(T/code: BSP_WD_CMPWB), I
    am getting the error "Invalid GUI INPUT DATA :INVALID XMLBLOB DATA" shot and suggest me how to come out of this error.
    Component: BT115H_SLSO
    Regards,
    Praveen

    Hello,
    The problem could be a SAPGUI related problem... Whats the current sapgui patch level ? Does it work when you try on another wokstation with the same user ?
    Could you please use SAPGUI 720 and update your patch level to 7 ? Then check the behaviour again.
    Best regards
    Rene

  • Select option "Show this View : in Folder of Content type : {Custom Content Type Name}" while creating view using CSOM

    Hi,
    I am trying to create "View" in a Document Library and need to enable following:
    1. Mark as default View
    2. Folders -> Show this view : in Folders of Content Type : {Custom Content Type name}
    I am using following code which sets "in Folders of Content Type : " to "Folder" rather than selecting custom content type despite passing Content Type ID of custom content type.
    code:
    var itemContentTypes = clientContext.LoadQuery(web.AvailableContentTypes.Where(ct => ct.Name == viewContentType));
    clientContext.ExecuteQuery();
    var itemContentType = itemContentTypes.FirstOrDefault();
    view.ContentTypeId = itemContentType.Id;
    view.DefaultViewForContentType = true;
    view.Update();
    clientContext.ExecuteQuery();
    Please highlight what seems to be missing?
    Thanks
    Sonal

    Hi,
    Before you set the content type ID for the view, you need to add the custom content type to the library firstly.
    You can add the content type to library using OOTB feature “Add from existing site content types” in library settings or using Client Object Model.
    Here is a code snippet for your reference:
    var list = context.Web.Lists.GetByTitle(listTitle);
    list.ContentTypesEnabled = true;
    var contentType = context.Site.RootWeb.ContentTypes.GetById("0x0120");
    list.ContentTypes.AddExistingContentType(contentType);
    context.ExecuteQuery();
    More information about add exist content type using Client Object Model:<o:p></o:p>
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.contenttypecollection.addexistingcontenttype%28v=office.15%29.aspx
    Best regards,
    ZhengyuGuo
    Zhengyu Guo
    TechNet Community Support

  • Webdynpro error while creating "view"

    Hi!
    All,
    I am trying to perform one tutorial provided on sdn website for webdynpro and title of which is "WDA Tutorial I: Getting Started with
    Web Dynpro for ABAP"
    I am using Netweaver 2004s on my desktop.
    When I try to create a view on workbech , it returns with the following error message.
    Service cannot be reached
    What has happened?
    URL http://runner:8001/sap/bc/wdvd call was terminated because the corresponding service is not available.
    Note
    The termination occurred in system KHA with error code 403 and for the reason Forbidden.
    The selected virtual host was 0 .
    What can I do?
    Please select a valid URL.
    If you do not yet have a user ID, contact your system administrator.
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:runner_KHA_01-v:0-s:403-r:Forbidden
    HTTP 403 - Forbidden
    Your SAP Internet Communication Framework Team
    Can anyone help me to resolve this error???
    Cheers
    Khalil.

    Awarding points is a common thing here on SDN.  It is a way to show thanks to those who contribute to your questions.  Next to each response, under the answering person's name, there should be 3 radiobuttons.  You can reward points based on the level of "helpfulness".  10 points if the answer helped to solve your problem, 6 points for a general very helpful answer, and 2 points for a helpful answer.  When you mark as "Solved my problem(10 points), this awards ten points to that person and marks the thread as being solved.  Since you have already marked this thread as "Solved on my own", that closes the thread without rewarding any points.  You can simply reverse this flag, and then select the appropriate points for the answers.  If no answers, solved your problem to your satisfaction, but you still solved the problem, you can award points(6 or 2) to the answers and mark the questions as "solved on my own".  Hope this helps.
    Regards,
    Rich Heilman

  • Set parameter (call procedure) before selecting view

    Dear all,
    we want to query a view from an oracle database. The view requires a workspace to be set using a procedure (background: we want to report Oracle Warehouse Builder execution time. to query the table/view with the performance data a procedure called wb_workspace_management.set_workspace('OWB','OWB') needs to be called at the beginning of the session.
    We have imported the view to OBIEE but don't know how we can set the workspace - execute the procedure - at the beginning of each session.
    Any idea where to go ?
    Regards,
    Knut
    Edited by: knherzog on 20.06.2011 06:44

    Hi Knut,
    I do not understand exactly what you are trying to achieve, but I think you have to take a look at the Connection Pool. Here you can add some scripts / procedures to be executed on connect or disconnect. You can also execute these scripts / procedures before or after query.
    Hope this is what you are looking for.
    Cheers,
    Daan Bakboord
    http://obibb.wordpress.com

  • Conditions while creating views

    Hi,
    I have 2 db tables A and B. And I need to have a condition while joining these two tables. i have a field called date in A and date1 and date 2 in B.
    The condition i would like to incorporate is A-date should lie between B-date1 and B-date2 (B-date1<A-date<B-date2).
    I've tried out Maintenance Views and i can only give a comparative value in the selection conditions (say A-date eq sy-datum).
    Can anyone suggest me how to go about this.
    Thanks in advance...
    Naren

    hi
    good
    go through these links which ll gie you idea about view with join statement.
    http://www.braincorp.com.au/products/information-technology/sql/database-concepts-and-technologies/database-technologies-part-2-introduction-to-sq/
    http://dev.mysql.com/doc/maxdb/en/6d/117c44d14811d2a97400a0c9449261/content.htm
    thanks
    mrutyun^

  • Error while creating views

    Hi all,
    Im creating a view with 2 CO tables(COSP &COSS),i gv join conditions as OBJNR,WRTTP,KSTAR,MANDT. after this i selected tab View/Fields then i selected my table COSP,wherein i selected the other fields which i want,then i saved and did a check and finally activated it.But after activation i get a error that all "<b>Fields are Evaluated as Key fields "</b> <b>The View ignores client dependency of the base tables.</b> After that i saw all the fields in View Flds tab are Checked as Keyfields.Please advice how to solve this error.
    Thanks

    Hi BI,
    The first one is a warning and the second one is an error. The error can be cleared by including the MANDT field in the view from one of the tables. The warning "Fields are Evaluated as Key fields" is because, you have not included all the key fields of the base tables in the view. I mean to say if you include all the key fields from COSP and COSS, you can get rid of this warning. The warning means... since you did not select all the key fields of the base tables of the view, all the display fields of the view are treated as key fields. That is why you see all the fields marked as key fields. You can ignore the warning if you are getting all the required records in the view. Otherwise, include all the key fields from both the tables and the other fields can be deselected as key fields. Hope this helps.
    Thanks and Regards
    Subray Hegde

  • Copying of  pricing procedure while creating follow UP

    Issue :: when we create a follow up Credit memo request from a confirmation,
    the pricing procedure of confirmation should also get copied into the Credit memo ( which is not happening ). irrespecive the Credit memo has its own pricing procedure..... ..
    but when Credit Memo is created, its fetching its own pricing procedure... but we want ... the pricing procedure of Confirmation should also get copied to Credit Memo....
    we all also marked "copy pricing agreements" flag in the config of copy control.
    someone has any idea!!!!!!!!!!!!!!!!!
    Thanks For Reading!!!!!!!!!!!!!

    Good Morning Rob,
    Thanks for the Reminder.
    I really appreciate your efforts.  From the next time, I will keep all the things in my mind before posting any thread.
    Could you please help me out.. if you have any idea regarding my issue.
    Thanks for spending your time for reading this issue.

  • Error ORA-02070:  while creating view - Help Needed.

    ISSUE:
    ~~~~~
    When i am creating the view for the below SQL script I am getting the error as
    ==>ORA-02070:DATABASE DOES NOT SUPPORT OPERATOR NLS_CHARSET_DECL_LEN in this context <==
    Sql script
    ~~~~~~~
    create or replace view test11 as
    WITH x AS
    (SELECT column_name,
    DECODE (column_id, 7,to_char(eff_to_dt,'MMDDRRRR'),
                                       8,active_flg,
                                       9,nm_long,
                                       10,nm_short,
                                       11,rplcmnt_bu_id,
                                       12,pc_cc_cd,
                                       13,tax_cd,
                                       14,bu_type_cd,
                                       15,ledger_cd) COL_VAL_NEW,
    '' COL_VAL_OLD,
                                       fre_id,
                                       bu_id,
    eff_from_dt,
    rec_eff_from_dt,
                                       rec_type
    FROM BUSINESS m, all_tab_columns u
    WHERE table_name = 'BUSINESS'
    AND column_name in ('EFF_TO_DT'
    ,'ACTIVE_FLG'
    ,'NM_LONG'
    ,'NM_SHORT'
    ,'RPLCMNT_BU_ID'
    ,'PC_CC_CD'
    ,'TAX_CD'
    ,'BU_TYPE_CD'
    ,'LEDGER_CD')
    AND rec_type ='A'
    ORDER BY rec_eff_from_dt
    y as
    (SELECT column_name,
    DECODE (column_id, 7,to_char(eff_to_dt,'MMDDRRRR'),
                                       8,active_flg,
                                       9,nm_long,
                                       10,nm_short,
                                       11,rplcmnt_bu_id,
                                       12,pc_cc_cd,
                                       13,tax_cd,
                                       14,bu_type_cd,
                                       15,ledger_cd) COL_VAL_NEW,
    '' COL_VAL_OLD,
                                       fre_id,
                                       bu_id,
    eff_from_dt,
    rec_eff_from_dt,
                                       rec_type
    FROM BUSINESS m, all_tab_columns u
    WHERE table_name = 'BUSINESS'
    AND column_name in ('EFF_TO_DT'
    ,'ACTIVE_FLG'
    ,'NM_LONG'
    ,'NM_SHORT'
    ,'RPLCMNT_BU_ID'
    ,'PC_CC_CD'
    ,'TAX_CD'
    ,'BU_TYPE_CD'
    ,'LEDGER_CD')
    AND rec_type <> 'A'
    ORDER BY rec_eff_from_dt
    a as (select y.column_name,
    y.col_val_new,
    x.col_val_new col_val_old,
    y.fre_id,
    y.bu_id,
    y.eff_from_dt,
    min(y.rec_eff_from_dt),
    y.rec_type
    from y, x
    where (y.fre_id = x.fre_id and y.bu_id = x.bu_id and y.eff_from_dt = x.eff_from_dt and y.column_name = x.column_name
    and nvl(y.col_val_new,'^') <> nvl(x.col_val_new,'~') and y.rec_type ='C')
    group by y.column_name,
    y.col_val_new,
    x.col_val_new,
    y.fre_id,
    y.bu_id,
    y.eff_from_dt,
    y.rec_type)
    select * from a
    union all
    select y.column_name,
    y.col_val_new,
    x.col_val_new,
    y.fre_id,
    y.bu_id,
    y.eff_from_dt,
    min(y.rec_eff_from_dt),
    y.rec_type
    from y, x
    where (y.fre_id = x.fre_id and y.bu_id = x.bu_id and y.eff_from_dt = x.eff_from_dt and y.column_name = x.column_name
    and y.col_val_new = x.col_val_new and y.rec_type ='D')
    group by y.column_name,
    y.col_val_new,
    x.col_val_new,
    y.fre_id,
    y.bu_id,
    y.eff_from_dt,
    y.rec_type
    union all
    SELECT column_name,
    DECODE (column_id, 7,to_char(eff_to_dt,'MMDDRRRR'),
                                       8,active_flg,
                                       9,nm_long,
                                       10,nm_short,
                                       11,rplcmnt_bu_id,
                                       12,pc_cc_cd,
                                       13,tax_cd,
                                       14,bu_type_cd,
                                       15,ledger_cd) COL_VAL_NEW,
    '' COL_VAL_OLD,
                                       fre_id,
                                       bu_id,
    eff_from_dt,
    rec_eff_from_dt,
                                       rec_type
    FROM BUSINESS m, all_tab_columns u
    WHERE table_name = 'BUSINESS'
    AND column_name in ('EFF_TO_DT'
    ,'ACTIVE_FLG'
    ,'NM_LONG'
    ,'NM_SHORT'
    ,'RPLCMNT_BU_ID'
    ,'PC_CC_CD'
    ,'TAX_CD'
    ,'BU_TYPE_CD'
    ,'LEDGER_CD')
    AND rec_type ='A'
    The sql script is nothing but to compare the record to get the attribute level changes.
    Please help me out why the error is being caused.
    Thanks in advance.

    Is one of the used table/view referencing a non-Oracle database with a database link ?
    ORA-02070: database [i]stringstring does not support string in this context
    Cause: The remote database does not support the named capability in the context in which it is used.
    Action: Simplify the SQL statement.

Maybe you are looking for