Add/change datatype column (scripting)

Hello,
I am writing a script to add default columns and their values to tables. So far for me it's possible to add columns to an existing table in the model.
Next I want to add the value for datatype. I found out there's a method called getDataType(). Until now, I didn't find the 'setter; for this property.
Like other scripts, I started with create a table with columns and then using the API to read the values.
A simplified version of my code:
// get columns array
var myTab = model.getTableSet().getByName("T_POSITIONS");
colArray = myTab.getElementsCollection().toArray();
// loop over columns
for(i = 0; i < colArray.length; i++){
  var dataType = colArray[i].getDataType();
  model.getAppView().log(colArray[i] + " has datatype " + dataType );
  colArray[i].setDataType("VARCHAR2 (1)");
An error occurs when I want to run this script: Cannot find function setDataType in object ID.
I cannot find the right method to add/modify the datatype property.
Any tip would be appreciated.

Hi Bart,
here is what is in XML file for column:
<Column name="FIRST_NAME" id="5E8F1EEC-287E-6496-C568-DFBF6321BD91">
<sourceConnName>FDB11R21</sourceConnName>
<sourceObjSchema>EMPLOYEES</sourceObjSchema>
<sourceObjName>FIRST_NAME</sourceObjName>
<createdBy></createdBy>
<createdTime>2015-01-13 12:45:08 UTC</createdTime>
<commentInRDBMS>First name of the employee. A not null column.</commentInRDBMS>
<ownerDesignName>HR_870</ownerDesignName>
<nullsAllowed>true</nullsAllowed>
<useDomainConstraints>false</useDomainConstraints>
<use>1</use>
<logicalDatatype>LOGDT024</logicalDatatype>
<dataTypeSize>20 BYTE</dataTypeSize>
<autoIncrementCycle>false</autoIncrementCycle>
</Column>
<dataTypeSize>20 BYTE</dataTypeSize>
So you need to set size to "20 BYTE" or "20 CHAR"
Philip

Similar Messages

  • Script to add not null columns to all tables in database

    Hello,
    I need to add 5 not null columns to my existing database (all tables).
    The problem is that i do not want to loose the current data.
    I need a script so that i need not do this manually for each table.
    Can u suggest?
    Vishal

    Hello,
    I need to add 5 not null columns to my existing database (all tables).
    The problem is that i do not want to loose the current data.
    I need a script so that i need not do this manually for each table.
    Can u suggest?
    Vishal I always follow this step
    1) Alter table <<tablename>> add(<<columnname>> <<datatype>>)
    2) Update <<tablename>> set <<columnname>>=<<anyvalue>>
    3) Alter table <<tablename>> modify(<<columnname>> <<datatype>> not null)
    else
    1) rename <<tablename>> to <<tablenamebk>>
    2) drop table <<tablename>>
    3) Alter table <<tablenamebk>> add(<<columnname>> <<datatype>>)
    4) update <<tablenamebk>> set <<columnname>>=<<anyvalue>>
    5) create table <<tablename>> (with additional columns with not null)
    6) insert into <<tablename>> select * from <<tablenamebk>>

  • OBIEE - changing imported column datatypes

    Hi All,
    I am trying to join 2 tables in physical layer but the columns on which I am making join condition have different datatypes defined(one is datetime,another is timestamp).Hence, I am getting error incompatible datatypes can't be joined.
    I don't want to change the columns datatypes in ohysical layer bcz I am not sure if some other report using this rpd might be using the join conditions based on existing datatypes.Is there any alternative to this?
    Please suggest.
    Thanks,
    Neha

    Please try to use this function. it is good if we have sample data for both columns.Please provide if you have issues using following function
    Evaluate( 'to_date(%1,%2)',Evaluate( 'TO_CHAR(%1)' as char,20090101) , 'yyyymmdd')
    Thanks
    NK

  • How to add a formula column in a report

    Hi
    I have made a report based on a query.
    There are 3 columns in the query and all the 3 are displayed.
    Now I want to add a new column (fomula column) to the report.
    I want to write a query inside the formula column. To execute the query col1, col2 and col3 values are required in the formula column.
    Could you please tell me how to add a formula column in the report and how to pass database column value to inside the formula column
    regards

    Here is how you would create a formula column:
    Open data model of the report.
    Formula column button is on the left side of the tool palette.
    Click on that button.
    Now click in the query group where you want to place the formula column.
    You would see a new field something like CF_1. That is the formula column.
    Double click on the field CF_1. It will open property inspector.
    You would see, Datatype of the formula column is Number. Change this as per your requirement.
    Double click on PL/SQL Formula property. It would open up a editor. Here you can write the code.
    And now to access the data model column here, you can use : and column name. i.e. :col1 or :col2, etc
    And remember you have to return the value back to the formula column. Like this: RETURN(some value).
    You can also take a help from here:
    http://download.oracle.com/docs/html/B13895_01/orbr_howto.htm#sthref1309
    Hope this helps.

  • Issue to Add one new column in search Page..

    I have a JSP file of Service Form of Oracle Install Base . In this on select party Site page when search for any item it shows some result as a column. like address , name, country..
    we have to add a new column in that search. means when we search for any Item then with address, Name and country it shows a new column also with that. I have the jsp file of that page "csifLOV.jsp". This is the generic LOV page for any database columns.
    Can anybody please help where to add this new column definition.
    this is code of "csifLOV.jsp".
    <%--
    +==========================================================================+
    | Copyright (c) 2000 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +==========================================================================+
    | FILENAME |
    | csifLOV.jsp |
    | DESCRIPTION |
    | This is the generic LOV page for any database columns |
    | NOTES |
    | |
    | DEPENDENCIES |
    | |
    | HISTORY |
    | 23-Aug-2000 X. Li Created. |
    | $Header: csifLOV.jsp 115.30 2004/06/14 21:05:05 anukal ship $
    +==========================================================================+
    --%>
    <%@ include file="jtfincl.jsp" %>
    <%@ include file="csifContextIncl.jsp" %>
    <%
    csiPageContext.setPermissionName("SupPer");
    csiPageContext.setJspName("csifLOV.jsp");
    csiPageContext.setFormName("LOVForm");
    String jspName = csiPageContext.getJspName();
    String csiFormName = csiPageContext.getFormName();
    String formName = csiFormName;
    appName = "CSI";
    if (CsifutDebug.LOCAL_DEV_ENV)
    Properties param = System.getProperties();
    String prop = param.getProperty("JTFDBCFILE",
    "E:\\myprojects\\dbcfiles\\crmdev04_SCCSIDV1.dbc");
    param.put("JTFDBCFILE", prop);
    prop = param.getProperty("service.Logging.common.filename",
    "E:\\myprojects\\jtflogs\\ebppFW_log");
    param.put("framework.Logging.system.filename", prop);
    prop = param.getProperty("service.Logging.common.filename",
    "E:\\myprojects\\ebppSys_log");
    param.put("framework.Logging.system.filename",prop);
    System.setProperties(param);
    // this may have to change for other people
    // ServletSessionManager.startStandAloneSession(appName,true,
    // "csiuser","welcome");
         ServletSessionManager.startRequest(request,response,
    appName,true,"csiuser","csiuser","Authenticator.system");
    /* Push the logFileName into the cookie for future use */
    oracle.apps.jtf.util.SystemCheck.setJTFCookie();
    // Set cookies for menu rendering
    MenuRenderer.setMenuCookies(request);
    //Added HTML tag with language code for accessibility.
    String CSI_HTML_LANG_CODE;
    CSI_HTML_LANG_CODE = oracle.apps.jtf.util.HtmlUtil.getHtmlLanguageCode();
    if (CSI_HTML_LANG_CODE == null)
    CSI_HTML_LANG_CODE = "en-US";//Added HTML tag with language code for accessibility.
    %>
    <HTML lang="<%=CSI_HTML_LANG_CODE%>">
    <%@ include file="csifStartReqIncl.jsp" %>
    <%@ include file="csifExceptionHandleBegin.jsp" %>
    <jsp:useBean id="lovBean" class="oracle.apps.csi.framework.pb.CsifpbLOVBean" scope="page" />
    <%
    lovBean.init(csiPageContext, request);
    lovBean.process();
    int pageMode = lovBean.getMode();
    if (pageMode == CsifpbBasePageBean.LOVRETURN_MODE) //forward to the caller of the LOV
         if (CsifutDebug.DEBUG)
    CsifutDebug.addMessage("forward URL=" + lovBean.getForwardToURL());
    csiPageContext.setForwardToJSP(lovBean.getForwardToURL());
    %>
    <%@include file="csifForwardIncl.jsp" %>
    <%
    else
    CsifcmException error = lovBean.getException();
    String callerName = lovBean.getJspCallerName();
    String labelSelect=null;
    String labelEnterPartial=null;
    String labelSearch=null;
    String labelTitle=null;
    int origAppID = csiPageContext.getPageAppId();
    String origAppName = csiPageContext.getPageAppName();
    csiPageContext.setPageAppId(542);
    csiPageContext.setPageAppName("CSI");
    Hashtable allLovPrompts = CsifutRegion.getPrompts(csiPageContext, "CSI_FRAMEWORK_LOV");
    csiPageContext.setPageAppId(origAppID);
    csiPageContext.setPageAppName(origAppName);
    if (allLovPrompts != null)
    labelSelect = (String)allLovPrompts.get("CSI_SELECT");
    labelEnterPartial = (String)allLovPrompts.get("CSI_ENTER_PARTIAL");
    labelSearch = (String)allLovPrompts.get("CSI_SEARCH");
    labelTitle = (String)allLovPrompts.get("CSI_LOV_TITLE");
    else
    allLovPrompts = new Hashtable();
    String cancelPrm = (String)allLovPrompts.get("CSIF_CANCEL");
    %>
    <head>
    <title><%=labelTitle%></title>
    <script language="JavaScript">
    function newSearch()
    document.<%=csiFormName%>.<%=CsifpbBasePageBean.PAGE_MODE_PARAM%>.value = '<%=CsifpbBasePageBean.QUERY_MODE%>';
    document.<%=csiFormName%>.submit();
    function returnToCaller()
    // alert("Return to " + "<%=callerName%>" )
    document.<%=formName%>.action = "<%=callerName%>";
    document.<%=formName%>.submit();
    function <%=lovBean.LOV_CANCEL_FUNC%>()
    var LOVForm = document.forms['<%=csiFormName%>'];
    var LOVFieldName = '<%=lovBean.getLOVFieldName()%>';
    var LOVOrigValFieldName = LOVFieldName + '<%=lovBean.LOV_ORIG_VAL_FIELD%>';
    LOVForm.elements[LOVFieldName].value = LOVForm.elements[LOVOrigValFieldName].value;
    LOVForm.elements['<%=CsifpbBasePageBean.PAGE_MODE_PARAM%>'].value = '<%=CsifpbBasePageBean.LOVRETURN_MODE%>';
    LOVForm.elements['<%=CsifpbBasePageBean.MODE_ACTION_PARAM%>'].value = '<%=CsifpbBasePageBean.ACTION_CANCELLED%>';
    LOVForm.action = '<%=lovBean.getJspCallerName()%>';
    LOVForm.submit();
    function onPageLoad()
    document.<%=csiFormName%>.<%=lovBean.getLOVFieldName()%>.focus();
    </script>
    <%=lovBean.renderLovReturnJS()%>
    <%@ include file="jtfscss.jsp" %>
    </head>
    <%@ include file="csifBodyBeginIncl.jsp" %>
    <%
    //if (!CsifutDebug.LOCAL_DEV_ENV)
    if (CsifutTimer.TIME)
    CsifutTimer.start(CsifutTimer.JTF_MENU);
    %>
    <%@ include file="jtfdnbartop.jsp" %>
    <table summary="" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <%
    if (CsifutTimer.TIME)
    CsifutTimer.stop(CsifutTimer.JTF_MENU);
    } // end local_dev_env
    %>
    </td>
    </tr>
    <tr>
    <td>
    <form name="<%=csiPageContext.getFormName()%>" method="post" action="<%=jspName%>">
    <table summary="" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
    <table summary="" width="100%">
    <tr>
    <td> </td>
    <td class="pageTitle" colspan="4"><%=labelSelect%> <%=lovBean.getLOVPageTitle()%>
    </td>
    <td> </td>
    </tr>
    <%@ include file="csifDisplayException.jsp" %>
    <tr>
    <td width="5%"> </td>
    <td width="22.5%"> </td>
    <td width="22.5%"> </td>
    <td width="22.5%"> </td>
    <td width="22.5%"> </td>
    <td width="5%"> </td>
    </tr>
    <tr>
    <td> </td>
    <td>
    <div nowrap align="right" class="promptReadOnly"><%=labelEnterPartial%></div>
    </td>
    <td colspan="3">
    <input type="text" name="<%=lovBean.getLOVFieldName()%>" id="<%=lovBean.getLOVFieldName()%>"
    value="<%=HtmlWriter.preformat(lovBean.getLOVSearchPattern())%>" size="15">
    <input type="button" name="SearchButton" id="SearchButton"
    value="<%=labelSearch%>" onClick="javascript:newSearch()">
    <input type="button" name="CancelButton" id="CancelButton"
    value="<%=cancelPrm%>" onClick="javascript:<%=lovBean.LOV_CANCEL_FUNC%>()">
    </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td colspan="4">
    <hr>
    </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td class="prompt" colspan="4">
    <!-- Search Result goes here -->
    <%
    if (lovBean.getMode() != CsifpbBasePageBean.LOVRETURN_MODE)
    out.print(lovBean.renderLOVValuesTable(labelSelect));
    %>
    <!-- End of Search Result -->
    </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td colspan="4">
    <input type="button" name="CancelButton" value="<%=cancelPrm%>"
    onClick="javascript:<%=lovBean.LOV_CANCEL_FUNC%>()">
    </td>
    <td> </td>
    </tr>
    </table>
    <!-- Content ends here -->
              </td>
         </tr>
         </table>
    <!--Hidden Fields Go Here-->
    <input type="hidden" name="<%=CsifpbLOVBean.LOV_VALUE_SEL_PARAM%>" >
    <%
    if(csiPageContext.isAccessible())
    %>
    <label for="<%=lovBean.getLOVFieldName()%>" class='hidelabel'><%=labelEnterPartial%></label>
    <!-- Kamal for ADA v2 03-Mar-04
    <label for="SearchButton" class='hidelabel'><%=labelSearch%></label>
    <label for="CancelButton" class='hidelabel'><%=cancelPrm%></label>
    -->
    <%
    %>
    <%@ include file="csifHiddenFieldsIncl.jsp" %>
    </form>
    <%@ include file="csifBodyEndIncl.jsp" %>
    </HTML>
    <%
    } // end of if (pageMode == CsifpbBasePageBean.LOVRETURN_MODE ) .. else {
    %>
    <%@ include file="csifExceptionHandleEnd.jsp" %>
    <%@ include file="csifEndReqIncl.jsp" %> <!-- send an end request -->
    Thanks,

    If you are copying the 12KST1C to Z12KST1C and executing the s_alr_8701333 report, you will not see the new column added to Z12KST1C
    With the new Form Z12KST1C, create a new Report Z12KST1C and assign a new TCODE. Also you have to select all rows and column of form Z12KST1C
    TCODE CJE5
    Select the form Z12KST1C
    Extras--Drildown display --Select Rows and columns
    Select the all colhmns by F9
    Hope this helps.
    Edited by: psconsultant on May 20, 2011 8:42 AM

  • Dynamic Table - Add rows and columns in same table

    Hi there,
    I wonder if someone could help please? I'm trying to create and table where a user can add both rows and columns (preferably with separate buttons) but am having trouble trying to figure out how to do this. Is it possible? If so how? I'm not familar with script but have found examples of seprate tables where you can add a row and then another table where you can add columns and essentailly want to merge the two but cannot make it work.
    Any help much appreciated!
    Thanks,
    Ken

    It is great example....you can learn the concepts there and apply....however you may have to think twice before you implement column adding dynamically....because the technique here is make copy of what we already have and reproduce it as a new item and this technique works great for rows as they all have every thing in common. But when it comes to columns it may have unique visible identity as column head and displaying repeatedly the same column head may not look good. Of-Course you can do few extra lines of code and change the column appearance based on users input each time. Situations where users need to add additional column is very unlikely (sure your requirement might be an exception).
    Key in allowing adding/removing instances is managing design mode settings under Object>>Binding>>....and select the checkbox "Repeat <subform/row/...> for Each Data Item" and then set Min, Max and Initial count values.
    Also you need to club your effots by using simple scipt with button clicks....
    for the example refered in URL you posted following is what I did to make the first table allow Adding/Removing Rows....
    1. Opened the form in LC designer.
    2. Add two buttons AddRow & RemoveRow right next to RemoveColumn
    3. For AddRow I used following JS code....
          Table1._Row1.addInstance(1);//that means any time this button is clicked a new instance of Row1 is added use _Row2 or Row3 based on your needs
          var fVersion = new Number(xfa.host.version); // this will be a floating point number like "7.05"
          if (fVersion < 8.0) // do this for Acrobat versions earlier than 8.0
           // make sure that the new instance is properly rendered
           xfa.layout.relayout();
    4.  For RemoveRow I used following JS code....
         Table1._Row1.removeInstance(1);//Syntax is...<objectReference>.removeInstance(<index of the repeating object that needs to be removed>); //in this case since we used 1 alwasys second object from top gets deleted.
          var fVersion = new Number(xfa.host.version); // this will be a floating point number like "7.05"
          if (fVersion < 8.0) // do this for Acrobat versions earlier than 8.0
           // make sure that the new instance is properly rendered
           xfa.layout.relayout();
    5. Now time to update settings at Object>>Binding tab and set "Repeat......" and also set Min, Max and Initial count as explained above.
         Those settings needs to be updated for Row1 (or your choice of row) of the table
    6. Set the Height to Expand of the Subform, where the table is housed....  this is done under Layout pallet
    7. Save the PDF as dynamic template and verify the results...
    If you still run into issues I can send you copy that works on my machine, but you need send me an email at n_varma(AT)lycos.com
    Good luck,

  • Add one more column

    select
                    nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                    nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                    nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                    nvl(appr.ASSIGNED_DATE, org.ASSIGNED_DATE) as ASSIGNED_DATE,
                    nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                    nvl(appr.STATE, org.STATE) as STATE,
                                    org.SEQ as numberoftimesmodified,
                    nvl(appr.PROCESS, org.PROCESS) as PROCESS,
           -- appr.request_comment,
                    appr.seq2
                    from (
                        select a.seq,
                        b.usr_display_name as APPROVER_NAME,
                        b.usr_login as APPROVER,
                        'User' as APPROVER_TYPE,
                        '-' as ASSIGNED_DATE,
                        '-' as STATE,
                        a.seq as numberoftimesmodified,
                '-' as PROCESS
                        from(
                            SELECT 1 as seq, USR_UDF_MANAGER_LOGIN as GID, '' as approver_name, 'user' as approver_type FROM DEVT_OIM.USR WHERE USR_LOGIN =:BENEFICIARY_GID AND :APPLICATION = 'Oracle 11i On demand'
                            UNION
                            select rownum as seq, regexp_substr(:APPROVERPAYLOAD,'[^,]+', 1, level) as gid, '' as approver_name, 'user' as approver_type from dual
                            where :APPLICATION != 'Oracle 11i On demand'
                            connect by regexp_substr(:APPROVERPAYLOAD, '[^,]+', 1, level) is not null
                        ) a
                        inner join DEVT_OIM.usr b on a.gid = b.usr_login
                    ) org
                    left join(
                        select b.numberoftimesmodified as seq, rownum as seq2, a.*
                        from
                            select
                            LEAD(a.ASSIGNEES) OVER(ORDER BY a.numberoftimesmodified) as prev_gid,
                            LEAD(a.pushbacksequence) OVER(ORDER BY a.numberoftimesmodified) as prev_pushbacksequence,
                            a.ASSIGNEES as current_gid,
                            nvl(retrieveGidName(a.ASSIGNEES), '-') as APPROVER_NAME,
                            (DEVT_OIM.TOKNEW(REPLACE(a.ASSIGNEES, ',', ':'))) as APPROVER,
                            'User' as APPROVER_TYPE,
                            a.pushbacksequence,
                            TO_CHAR(a.assigneddate,'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                            case when a.state = 'WITHDRAWN' then TO_CHAR(a.updateddate,'DD-Mon-YYYY HH:MI:SS AM') else TO_CHAR(d.updateddate,'DD-Mon-YYYY HH:MI:SS AM') end as APPROVAL_DATE,
                            a.numberoftimesmodified,
                            case when a.state = 'EXPIRED' then 'Expired' when a.approvalduration is null then 'Pending' when  a.outcome = 'REJECT' then 'Rejected' else 'Approved' end as PROCESS,
                            d.state as process2,
                            case when d.substate = 'REASSIGNED' then 'Reassigned' when d.state = 'INFO_REQUESTED' then 'Request Info' when a.state = 'EXPIRED' then 'Expired'
                                when  a.outcome = 'REJECT' then 'Rejected' when d.substate = 'INFO_SUBMITTED' then 'Submitted' when a.state = 'WITHDRAWN' then 'Withdrawn' when e.state is null then 'Pending' else 'Approved' end as state,
                            e.ASSIGNEES, d.substate
                            from DEVT_SOAINFRA.WFTASKHISTORY a
                            left join DEVT_SOAINFRA.WFTASKHISTORY d on d.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and d.numberoftimesmodified = (a.numberoftimesmodified+1)
                            left join DEVT_SOAINFRA.WFTASKHISTORY e on e.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and e.numberoftimesmodified = (a.numberoftimesmodified-1) and e.ASSIGNEES = a.ASSIGNEES
                            where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY and a.state is not null
                            order by a.numberoftimesmodified
                        ) a
                        inner join (select rownum as numberoftimesmodified, pushbacksequence from (select distinct pushbacksequence from DEVT_SOAINFRA.WFTASKHISTORY a where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY order by pushbacksequence)) b
                        on b.pushbacksequence = a.pushbacksequence
                        where a.prev_gid != a.current_gid or prev_gid is null
                        order by a.numberoftimesmodified
                    ) appr on org.seq = appr.seq
                union
                select
                    nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                    nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                    nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                    nvl(appr.ASSIGNED_DATE, '-') as ASSIGNED_DATE,
                    nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                    nvl(appr.STATE, '-') as STATE,
                                       999 as numberoftimesmodified,
                    nvl(appr.PROCESS, '-') as PROCESS,
                    999 as seq2
                    from(
                        select 999 as seq, '-' as APPROVER, ugp_name as APPROVER_NAME, 'group' as approver_type
                        from DEVT_OIM.UGP ugp
                        where  ugp_name in (
                        SELECT a.it_processor_group FROM ec_admin.ENTITLEMENT a
                            inner join ec_admin.application b on a.application_id = b.application_id
                            WHERE b.extra_field_2 = :APPLICATION
                            and a.module_name = :MODULE
                            and a.site_name = :SITE
                            and a.entitlement_name = DEVT_OIM.TOKNEW(:RESPONSIBILITY)
                            and b.auto_provisioning = 'FALSE')
                    ) org
                    left join(
                    select nvl(grp.APPROVER_NAME, usr.APPROVER_NAME) as APPROVER_NAME,
                    nvl(grp.APPROVER, usr.APPROVER) as APPROVER,
                    nvl(grp.APPROVER_TYPE, usr.APPROVER_TYPE) as APPROVER_TYPE,
                    TO_CHAR((select min(OSI_create) from DEVT_OIM.OSI where request_key = :IDENTIFICATIONKEY),'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                    nvl(grp.APPROVAL_DATE, usr.APPROVAL_DATE) as APPROVAL_DATE,
                    'ASSIGNED' as STATE,
                    999 as numberoftimesmodified,
                    case when nvl(grp.APPROVAL_DATE, usr.APPROVAL_DATE) = '-' then 'Pending' else usr.ost_status end as PROCESS
                    from
                        select b.usr_display_name as APPROVER_NAME, b.usr_login as APPROVER,  'User' as APPROVER_TYPE,
                        TO_CHAR(a.OSI_create,'DD-Mon-YYYY HH:MI:SS AM') as APPROVAL_DATE, 'key' as tbl_key,
                        (select ost_status from DEVT_OIM.UPA_RESOURCE where UPA_RESOURCE_key in (
                                  select max(UPA_RESOURCE_key)
                                  from DEVT_OIM.UPA_RESOURCE a
                                  inner join DEVT_OIM.oiu b on a.oiu_key = b.oiu_key
                                  where b.request_key = :IDENTIFICATIONKEY )) as ost_status
                        from (
                          select osi_assigned_to_usr_key, OSI_create
                          from DEVT_OIM.OSI
                          where request_key = :IDENTIFICATIONKEY and osi_assigned_to_usr_key != 1
                          order by OSI_create desc
                        ) a
                        inner join DEVT_OIM.usr b on a.osi_assigned_to_usr_key = b.usr_key
                        where rownum between 0 and 1
                    ) usr
                    left join
                        select ugp.ugp_name as APPROVER_NAME, '-' as APPROVER, 'Group' as APPROVER_TYPE,
                        '-' as APPROVAL_DATE, 'key' as tbl_key
                        FROM DEVT_OIM.OTI itp
                        inner join DEVT_OIM.UGP ugp on ugp.ugp_key = itp.osi_assigned_to_ugp_key
                        where itp.request_key = :IDENTIFICATIONKEY
                        and :REQUEST_STATUS != 'Request Completed'
                    ) grp
                    on usr.tbl_key = grp.tbl_key
                    order by numberoftimesmodified
                    ) appr on 1=1
                order by numberoftimesmodified, seq2
                   Above is the script and i need to add one more column for the script column name request_comment from the table request_comments, anyone help me in doing so.

    /* Formatted on 2012/06/14 13:19 (Formatter Plus v4.8.8) */
    SELECT X.*, request_comments.request_comment
    FROM(
    SELECT   NVL (appr.approver_name, org.approver_name) AS approver_name, NVL (appr.approver, org.approver) AS approver,
             NVL (appr.approver_type, org.approver_type) AS approver_type, NVL (appr.assigned_date, org.assigned_date) AS assigned_date,
             NVL (appr.approval_date, '-') AS approval_date, NVL (appr.state, org.state) AS state, org.seq AS numberoftimesmodified,
             NVL (appr.process, org.process) AS process,
                                                        -- appr.request_comment,
                                                        appr.seq2
        FROM (SELECT a.seq, b.usr_display_name AS approver_name, b.usr_login AS approver, 'User' AS approver_type, '-' AS assigned_date,
                     '-' AS state, a.seq AS numberoftimesmodified, '-' AS process
                FROM (SELECT 1 AS seq, usr_udf_manager_login AS gid, '' AS approver_name, 'user' AS approver_type
                        FROM devt_oim.usr
                       WHERE usr_login = :beneficiary_gid AND :application = 'Oracle 11i On demand'
                      UNION
                      SELECT     ROWNUM AS seq, REGEXP_SUBSTR (:approverpayload, '[^,]+', 1, LEVEL) AS gid, '' AS approver_name,
                                 'user' AS approver_type
                            FROM DUAL
                           WHERE :application != 'Oracle 11i On demand'
                      CONNECT BY REGEXP_SUBSTR (:approverpayload, '[^,]+', 1, LEVEL) IS NOT NULL) a
                     INNER JOIN
                     devt_oim.usr b ON a.gid = b.usr_login
                     ) org
             LEFT JOIN
             (SELECT   b.numberoftimesmodified AS seq, ROWNUM AS seq2, a.*
                  FROM (SELECT   LEAD (a.assignees) OVER (ORDER BY a.numberoftimesmodified) AS prev_gid,
                                 LEAD (a.pushbacksequence) OVER (ORDER BY a.numberoftimesmodified) AS prev_pushbacksequence,
                                 a.assignees AS current_gid, NVL (retrievegidname (a.assignees), '-') AS approver_name,
                                 (devt_oim.toknew (REPLACE (a.assignees, ',', ':'))) AS approver, 'User' AS approver_type,
                                 a.pushbacksequence, TO_CHAR (a.assigneddate, 'DD-Mon-YYYY HH:MI:SS AM') AS assigned_date,
                                 CASE
                                   WHEN a.state = 'WITHDRAWN'
                                     THEN TO_CHAR (a.updateddate, 'DD-Mon-YYYY HH:MI:SS AM')
                                   ELSE TO_CHAR (d.updateddate, 'DD-Mon-YYYY HH:MI:SS AM')
                                 END AS approval_date,
                                 a.numberoftimesmodified,
                                 CASE
                                   WHEN a.state = 'EXPIRED'
                                     THEN 'Expired'
                                   WHEN a.approvalduration IS NULL
                                     THEN 'Pending'
                                   WHEN a.outcome = 'REJECT'
                                     THEN 'Rejected'
                                   ELSE 'Approved'
                                 END AS process,
                                 d.state AS process2,
                                 CASE
                                   WHEN d.substate = 'REASSIGNED'
                                     THEN 'Reassigned'
                                   WHEN d.state = 'INFO_REQUESTED'
                                     THEN 'Request Info'
                                   WHEN a.state = 'EXPIRED'
                                     THEN 'Expired'
                                   WHEN a.outcome = 'REJECT'
                                     THEN 'Rejected'
                                   WHEN d.substate = 'INFO_SUBMITTED'
                                     THEN 'Submitted'
                                   WHEN a.state = 'WITHDRAWN'
                                     THEN 'Withdrawn'
                                   WHEN e.state IS NULL
                                     THEN 'Pending'
                                   ELSE 'Approved'
                                 END AS state,
                                 e.assignees, d.substate
                            FROM devt_soainfra.wftaskhistory a LEFT JOIN devt_soainfra.wftaskhistory d
                                 ON d.identificationkey = a.identificationkey AND d.numberoftimesmodified = (a.numberoftimesmodified + 1)
                                 LEFT JOIN devt_soainfra.wftaskhistory e
                                 ON e.identificationkey = a.identificationkey
                               AND e.numberoftimesmodified = (a.numberoftimesmodified - 1)
                               AND e.assignees = a.assignees
                           WHERE a.identificationkey = :identificationkey AND a.state IS NOT NULL
                        ORDER BY a.numberoftimesmodified) a
                       INNER JOIN
                       (SELECT ROWNUM AS numberoftimesmodified, pushbacksequence
                          FROM (SELECT DISTINCT pushbacksequence
                                           FROM devt_soainfra.wftaskhistory a
                                          WHERE a.identificationkey = :identificationkey
                                       ORDER BY pushbacksequence)) b ON b.pushbacksequence = a.pushbacksequence
                 WHERE a.prev_gid != a.current_gid OR prev_gid IS NULL
              ORDER BY a.numberoftimesmodified) appr ON org.seq = appr.seq
    UNION
    SELECT   NVL (appr.approver_name, org.approver_name) AS approver_name, NVL (appr.approver, org.approver) AS approver,
             NVL (appr.approver_type, org.approver_type) AS approver_type, NVL (appr.assigned_date, '-') AS assigned_date,
             NVL (appr.approval_date, '-') AS approval_date, NVL (appr.state, '-') AS state, 999 AS numberoftimesmodified,
             NVL (appr.process, '-') AS process, 999 AS seq2
        FROM (SELECT 999 AS seq, '-' AS approver, ugp_name AS approver_name, 'group' AS approver_type
                FROM devt_oim.ugp ugp
               WHERE ugp_name IN (
                       SELECT a.it_processor_group
                         FROM ec_admin.entitlement a INNER JOIN ec_admin.application b ON a.application_id = b.application_id
                        WHERE b.extra_field_2 = :application
                          AND a.module_name = :module
                          AND a.site_name = :site
                          AND a.entitlement_name = devt_oim.toknew (:responsibility)
                          AND b.auto_provisioning = 'FALSE')) org
             LEFT JOIN
             (SELECT   NVL (grp.approver_name, usr.approver_name) AS approver_name, NVL (grp.approver, usr.approver) AS approver,
                       NVL (grp.approver_type, usr.approver_type) AS approver_type,
                       TO_CHAR ((SELECT MIN (osi_create)
                                   FROM devt_oim.osi
                                  WHERE request_key = :identificationkey), 'DD-Mon-YYYY HH:MI:SS AM') AS assigned_date,
                       NVL (grp.approval_date, usr.approval_date) AS approval_date, 'ASSIGNED' AS state, 999 AS numberoftimesmodified,
                       CASE
                         WHEN NVL (grp.approval_date, usr.approval_date) = '-'
                           THEN 'Pending'
                         ELSE usr.ost_status
                       END AS process
                  FROM (SELECT b.usr_display_name AS approver_name, b.usr_login AS approver, 'User' AS approver_type,
                               TO_CHAR (a.osi_create, 'DD-Mon-YYYY HH:MI:SS AM') AS approval_date, 'key' AS tbl_key,
                               (SELECT ost_status
                                  FROM devt_oim.upa_resource
                                 WHERE upa_resource_key IN (SELECT MAX (upa_resource_key)
                                                              FROM devt_oim.upa_resource a INNER JOIN devt_oim.oiu b
                                                                   ON a.oiu_key = b.oiu_key
                                                             WHERE b.request_key = :identificationkey)) AS ost_status
                          FROM (SELECT   osi_assigned_to_usr_key, osi_create
                                    FROM devt_oim.osi
                                   WHERE request_key = :identificationkey AND osi_assigned_to_usr_key != 1
                                ORDER BY osi_create DESC) a
                               INNER JOIN
                               devt_oim.usr b ON a.osi_assigned_to_usr_key = b.usr_key
                         WHERE ROWNUM BETWEEN 0 AND 1) usr
                       LEFT JOIN
                       (SELECT ugp.ugp_name AS approver_name, '-' AS approver, 'Group' AS approver_type, '-' AS approval_date,
                               'key' AS tbl_key
                          FROM devt_oim.oti itp INNER JOIN devt_oim.ugp ugp ON ugp.ugp_key = itp.osi_assigned_to_ugp_key
                         WHERE itp.request_key = :identificationkey AND :request_status != 'Request Completed') grp
                       ON usr.tbl_key = grp.tbl_key
              ORDER BY numberoftimesmodified) appr ON 1 = 1
    ORDER BY numberoftimesmodified, seq2
    ) X, request_comments
    WHERE...

  • Add a Link Column in WAD Report

    Dear All.
    my requirement is to show the link column as a first or last column of the table, user want that if he click the link the outlook should open with the email taking from the vendor.
    All i want to add a new column and place the following (<mailto:vendorattribute?subject=xyz>).
    Can you please let me know how can i achive this in WAD application through Java script or any other way how can i read the value of vendor attribute.
    any help will be highly appreciatable.

    Gurus,
    Any advice?

  • How to add a new column as "Warehouse name" in Goods Receipt PO screen?

    Hi, Experts
    I hope to add a new column or just "display" warehouse name besides Whse column in Goods Receipt PO.  How can I do?
    Thanks

    still not work.
    Maybe I did something wrong in UDF definition. Please help to check.   Thanks
    I named UDF as WhseName, and set it as Alphanumeric and lengh is 20, structure is Regular. And all below check-boxes are not ticked.
    And in Goods Receipt PO screen, I marked the UDF as Visible and Active.
    Then I ALTSHIFF2 in the UDF fields, and FMS screen displayed.
    Then I chose the 3rd one: Search in Existing User-defined value According to Saved Query
    T05
    Auto Refresh when field changes is not ticked.

  • How to add a new column in a report

    Hi all,
    I originally created a report with form. Then I want to add another column to it, but the column added wont display automatically in the report, instead you
    have to go to "action" and manually add the column so it can be diplayed in the report.
    How can I permanently and automatically add it please....thanks

    Hi,
    You can change the column position in interactive report as well. Once you login to your work space, run the report page. In the control when down arrow, click on select columns. Now you can re-arrange the columns as you like using up and down arrows. You can also move the column to DO NOT DISPLAY section if you want to hide any column in default view. Now click on apply.
    Review the report now if it displays correctly then click on the down arrow the control wheel and click on save report. From the dropdown list in the Save field, select "As default report settings". This will save the report for default view.
    It should always display same when you open this report page.
    Hope this helps.
    Regards,
    Tajuddin
    Web://tajuddin.whitepagesbd.com

  • Error while trying to change the Column description in Table Control

    Hi,
    I have created a table control using the wizard in Module Pool.
    When i try to change the column description of the table control or adjust any other element which is already available on the screen and not in table control. It gives me an error
    Unable to transfer data. End Program?
    Any help would be appreciated.
    Thanks
    Sarves S V K

    Hi.,
    Check these  [Table Control Change Column Description|Add new columns in table control in custom screen program;
    and  [Add Columns in Table Control|Re: Table control columns]
    else  delete and create Table control Again..!!
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Add a new column to an "Insert Form" created by HTMLDB Wizard throws Error

    Hi,
    My table design has changed and I had to add 2 new columns.
    The corresponding Insert Form/Report/Update Forms created by the HTMLDB should now reflect the new columns that have been added.
    In report and update forms I did not have a problem but in the Insert form, under Edit Page Process I tried to change the sql and I get the below error
    "Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with "
    My Edit Page Process SQL is as below-(Last two columns are the NEW columns i.e CDPL and CDPLCA)
    insert into "L2ENTRIES"
    ("AUTONUML2E",
    "ROLLNO",
    "AWARDCODE",
    "ROLLCLASSCODE",
    "SURNAME",
    "FORENAME",
    "SEX",
    "DOB",
    "PPSNO",
    "M1",
    "M2",
    "M3",
    "M4",
    "M5",
    "M6",
    "M7",
    "M8",
    "M9",
    "M10",
    "M11",
    "M12",
    "M13",
    "M14",
    "M15",
    "M16",
    "FEES",
    "CNULLS",
    "CDUPPPS",
    "CROLL",
    "CAWARDS",
    "CMODULES",
    "CHECKCHAR",
    "CHECKNO",
    "VALIDPPS",
    "VALIDPPSUK",
    "PPSNOPAD",
    "CDPL",
    "CDPLCA")
    values (
    :P3_AUTONUML2E,
    :P3_ROLLNO,
    :P3_AWARDCODE,
    :P3_ROLLCLASSCODE,
    :P3_SURNAME,
    :P3_FORENAME,
    :P3_SEX,
    :P3_DOB,
    :P3_PPSNO,
    :P3_M1,
    :P3_M2,
    :P3_M3,
    :P3_M4,
    :P3_M5,
    :P3_M6,
    :P3_M7,
    :P3_M8,
    :P3_M9,
    :P3_M10,
    :P3_M11,
    :P3_M12,
    :P3_M13,
    :P3_M14,
    :P3_M15,
    :P3_M16,
    :P3_FEES,
    :P3_CNULLS,
    :P3_CDUPPPS,
    :P3_CROLL,
    :P3_CAWARDS,
    :P3_CMODULES,
    :P3_CHECKCHAR,
    :P3_CHECKNO,
    :P3_VALIDPPS,
    :P3_VALIDPPSUK,
    :P3_PPSNOPAD,
    :P3_CDPL,
    :P3_CDPLCA)
    It will be great if some one can assist me in this matter.
    Thanks.

    Resolved this by a simple ";" at the end of the insert sql.
    I did not think a ";" will be necessary because when you edit the page process a ";" is not visible.

  • How to add 1 more column in standard portal UWL and map the values.

    Hi
    I have one issue/requirement, please help me out on that also.
    In portal UWL, i want to add one more column TICKET ID COLUMN, and ticket id value I  will be putting as work item ID of abap Workflow, so whenever  approver opens his portal UWL, in first column i want to show ticket ID say 00012345, so how to add this ticket ID column in standard portal UWL and how to put/map  value of work item in that column.
    My idea behind this is, when ever say employee wants to know the status about his ticket ID, he can simply ask his manager regarding the ticket status by referring to that ticket ID which manager can easily find in his portal UWL in that extra TICKET ID COLUMN .
    Do I have to change anything in SAP inbox also ? Do i have to add 1 more colum in sap R/3 inbox also ? and will adding 1 more colum in sap inbox (R/3 inbox), will create automatically one more ticket ID colum in portal UWL also ?
    please let me know , as i do not want to add 1 extra column in R/3 inbox, just i want in portal UWL extra ticket ID column should come and i want to put workitem ID generated at the start of workflow, in that colum in portal UWL
    please help me on this.
    Thanks...
    Edited by: User Satyam on May 29, 2011 6:16 AM

    Hi Satyam,
    These are called custom attributes.  Here is a powerpoint that may be able to assist you with the documentation that the other poster gave you too.
    Always remember too when you make a change on the backend R/3 side, you must reregister your UWL connector.  And yes, the column must be available on the backend R/3 side.  We can't create on the fly columns in the UWL, that have no reference to the backend system in this case.
    Beth Maben
    EP - Senior Support Consultant II
    AGS Primary Support
    Global Support Centre Ireland
    Please see the UWL Wiki @
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • How to add a new column in between two other columns

    I need to add a new column in between two other existing columns. Does anyone know how to do that? The ALTER statement adds the column at the end. Can someone give an example.
    Thanks
    Murali
    null

    There is no simpler way of doing this because it is not strictly necessary: you can always see your data in the order you want simply by going SELECT col1, col2, col98, col4, etc. Thus the column order only matters when you execute SELECT * FROM...
    If that really is important enough to you you'll have to drop and re-create the table, for which there are a number of different strategies.
    Your final comment suggests that you don't retain your database build scripts. If you did then rebuilding your constraints would be painless. There is a lesson there. The good news is that if you have TOAD (download from www.quest.com) you can generate DDL scripts from your existing schema.
    HTH, APC

  • Add a for each script to loop through HTTPService?

    I'm using Flash Builder 4 with the Flex 4.1 SDK.  I want to add a "for each" script to loop through my HTTPService XML file so only each nepName displays only once in my dropdown list.  In my XML file I have multiple records associated with nepName.  I would like ALL the records associated with each nepName to populate in my datagrid when it is selected from the dropdown.  Currently in my dropdown there is a nepName entry for each XML tag.  I hope I was able to explain that well enough. I'll try to put my code below so you can see everything I'm working with.
    MXML:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:esri="http://www.esri.com/2008/ags"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="nepInfo.send()">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
        </s:layout>
        <fx:Declarations>
            <s:HTTPService id="nepInfo" url="http://www.epa.gov/owow/estuaries/nep_info.xml"/>
            <!--s:RadioButtonGroup id="optiongroup"/-->
        </fx:Declarations>
        <s:Panel title="NEP Project Information">
            <s:layout>
                <s:VerticalLayout/>
            </s:layout>
            <s:HGroup verticalAlign="middle">
        <mx:Form x="188" y="34" width="338">
        <mx:FormItem label="Search for NEP Information:">
        <s:DropDownList enabled="true" id="dropDownList" prompt="Select NEP" dataProvider="{nepInfo.lastResult.records.record}" labelField="nepName">
        </s:DropDownList>
        </mx:FormItem>
        </mx:Form>       
            </s:HGroup>   
            <mx:DataGrid id="resultsGrid"
                         dataProvider="{dropDownList.selectedItem}"
                         visible="{dropDownList.selectedItem != null}" x="20" y="62" width="1166" height="620">
                <mx:columns>
                    <mx:DataGridColumn dataField="projectName" headerText="Project Name" wordWrap="true"/>
                    <mx:DataGridColumn dataField="projectDescription" headerText="Project Description" wordWrap="true"/>
                    <mx:DataGridColumn dataField="acres" headerText="Acres" wordWrap="true"/>
                    <mx:DataGridColumn dataField="habitatDescription" headerText="Habitat Description" wordWrap="true"/>
                    <mx:DataGridColumn dataField="neportCategory" headerText="Habitat Category" wordWrap="true"/>
                    <mx:DataGridColumn dataField="restorationType" headerText="Restoration Type" wordWrap="true"/>
                    <mx:DataGridColumn dataField="leadPartner" headerText="Lead Partner" wordWrap="true"/>
                </mx:columns>
            </mx:DataGrid>
        </s:Panel>
    </s:Application>
    XML: http://www.epa.gov/owow/estuaries/nep_info.xml
    Thank you in advance for your help!
    -Alison

    ($file, pwd);Assuming "pwd" is meant as the current directory, here a small example :
    TEST@db102 SQL> create or replace procedure test_proc (p1 varchar2, p2 varchar2)
      2  is
      3  begin
      4     dbms_output.put_line (p1||' '||p2);
      5  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ ls -l /tmp/test/*.sql
    -rw-r--r--  1 ora102 dba  69 Apr 18 23:23 /tmp/test/file1.sql
    -rw-r--r--  1 ora102 dba 112 Apr 18 23:23 /tmp/test/file2.sql
    -rw-r--r--  1 ora102 dba 120 Apr 18 23:23 /tmp/test/file3.sql
    $ cat test_proc.sh
    DIR=/tmp/test
    cd $DIR
    ls *.sql | while read file
    do
            echo "Processing file $file"
            sqlplus -s test/test << EOF
    set feed off
    set pages 0
    set serveroutput on
    exec test_proc('$file', '`pwd`');
    exit
    EOF
    done
    $ ./test_proc.sh
    Processing file file1.sql
    file1.sql /tmp/test
    Processing file file2.sql
    file2.sql /tmp/test
    Processing file file3.sql
    file3.sql /tmp/test
    $

Maybe you are looking for

  • Federated free busy information - the recipients mailbox server could not be contacted

    Hi guys, really hoping someone can help with a free busy issue I'm having.   I've configured a new forest with exchange 2013 installed in preparation for moving all AD objects to the newly created forest to resolve a single label domain issue.  The s

  • IPad air audio to Mac via USB

    I would like to connect my iPad Air Lightning Output to my Mac Pro via the Mac Pro USB for input of audio from the iPad to the Mac Pro.  My Mac is connected to my audio equipment via analog audio out and the TOS connector.  I would like to connect th

  • DHTML Links Don't Work

    We recently upgraded from Robohelp HTML 5 to Robohelp HTML 10 and have discovered that our DHTML links no longer work. Does anybody know a quick way to resolve this issue.

  • What is the best and safest way to unlock my iphone4

    i need to use my iphone 4 in australia- i am from the uk. my service provider say they will take 28 dates to unlock the phone, but i am travelling in 2 weeks. i need to know how to unlock the phone so i can use it on a different network in oz any adv

  • Trying to download Lightroom 4 free trial...It's not working?

    Can someone please help? I'm trying to download Lightroom 4 free trial onto my brand new computer. I know there is definitely enough space (1TB), and enough ram etc, but i click the "download" button, and nothing happens. I'm not a huge computer pers