Using to pass the current user while creating a procedure

I have a .sql script that several people use to help set-up test beds but some users call the test procedures from a separate schema. The .sql creates a table (TABLE_A) and then a procedure that when run will create a trigger on a separate table (TABLE_B) that basically writes all info to TABLE_A. The problem is that if the .sql is run under schema SCOTT and then the procedure is run from schema JOE to create a trigger on JOE.TABLE_B, the trigger will try to write copy info to just TABLE_A instead of SCOTT.TABLE_A. My plan is to add a new input variable to the procedure for the schema where the procedure is located and set the default to the schema of the user running the .sql.
I can't seem to figure out how to call the current user and then pass it to a procedure as a DEFAULT input variable. Any help would be greatly appreciated.

OK, sadly, that did not work. What that provided to me was user that runs the procedure. If I run it as SCOTT it gives me SCOTT, but if I run as JOE, it gives me JOE.
I created an example of what I am trying to do (it is all run in a .sql file). Let me know if this is a bad example....
CREATE TABLE TABLE_A (
tranid VARCHAR2(20) Primary Key,
db_user varchar2(100) not null,
     old_val varchar2(100) not null,
create or replace PROCEDURE TestBuild(OWN2 IN VARCHAR2, TNAME2 IN VARCHAR2, LOC2 IN VARCHAR2) IS
OWN VARCHAR2(30);
TNAME VARCHAR2(30);
FNAME VARCHAR2(62);
UNAME VARCHAR2(62);
COL VARCHAR2(30);
ST CHAR;
CONS VARCHAR2(30);
BEGIN
OWN := UPPER(OWN2);
TNAME := UPPER(TNAME2);
FNAME := OWN||'.'||TNAME;
UNAME := OWN||'_'||TNAME;
FILE := SYS.UTL_FILE.FOPEN(LOC2,'TEST_Trig_'||UNAME||'.sql','w');
SYS.UTL_FILE.PUT_LINE(FILE,'-- Test trigger start');
SYS.UTL_FILE.PUT_LINE(FILE,'-- generated '||SYSDATE);
SYS.UTL_FILE.NEW_LINE(FILE,1);
-- The following trigger fires for EVERY row of each statement for
-- the specified table.
SYS.UTL_FILE.PUT_LINE(FILE,'CREATE OR REPLACE TRIGGER Test_trig_'||UNAME||' AFTER INSERT OR UPDATE OR DELETE ON '||FNAME||' ');
SYS.UTL_FILE.PUT_LINE(FILE,' REFERENCING NEW as n OLD as o FOR EACH ROW');
SYS.UTL_FILE.PUT_LINE(FILE,' DECLARE');
SYS.UTL_FILE.PUT_LINE(FILE,' dmltype CHAR(1);');
SYS.UTL_FILE.PUT_LINE(FILE,' tpid VARCHAR2(30);');
SYS.UTL_FILE.PUT_LINE(FILE,' BEGIN');
SYS.UTL_FILE.PUT_LINE(FILE,' tpid := SYS.DBMS_TRANSACTION.LOCAL_TRANSACTION_ID();');
SYS.UTL_FILE.PUT_LINE(FILE,' IF INSERTING THEN dmltype := ''I'';');
SYS.UTL_FILE.PUT_LINE(FILE,' ELSIF UPDATING THEN dmltype := ''U'';');
SYS.UTL_FILE.PUT_LINE(FILE,' ELSIF DELETING THEN dmltype := ''D'';');
SYS.UTL_FILE.PUT_LINE(FILE,' END IF;');
SYS.UTL_FILE.PUT_LINE(FILE,' BEGIN');
SYS.UTL_FILE.PUT_LINE(FILE,' INSERT INTO TABLE_A VALUES (tpid,User,:o.col1);');
SYS.UTL_FILE.PUT_LINE(FILE,' END IF;');
SYS.UTL_FILE.PUT_LINE(FILE,' EXCEPTION WHEN already_there THEN NULL;');
SYS.UTL_FILE.PUT_LINE(FILE,' END;');
SYS.UTL_FILE.PUT_LINE(FILE,' END;');
SYS.UTL_FILE.PUT_LINE(FILE,'/');
SYS.UTL_FILE.PUT_LINE(FILE,'show errors');
SYS.UTL_FILE.NEW_LINE(FILE,1);
SYS.UTL_FILE.FCLOSE_ALL;
dbms_output.put_line('Script for table ['||FNAME||'] created. Now run it in sqlplus. ');
END;

Similar Messages

  • How to change the document type while creating a PO by ME59N

    Hi,
    I  have 2 groups of PR's, for group one the document type is picked as NB and PO is created and for the group 2 it should pick as XYZ and PO should be created using ME59N tcode.
    How to change the document type for group 2 in ME59N? Which user exists to use to change the document type while creating PO in ME59N? 
    Can any one suggest me.

    Hi,
    There a config area, where you can define default PO doc types for a particular Pr doc type. If you maintain the settings properly there, then your requirement can be fulfilled.
    SPRO->IMG->MM->Purchasing->Purchase requisation->Define doc types.
    This will serve your purpose.
    Thanks,
    Srinu

  • Unable to use Datasource.cfc in Admin API - The current user is not authorized to invoke this method

    Hi Everyone,
    I am having some issues accessing the methods in the datasource.cfc in the adminAPI.
    I can successfully load the administrator CFC and am told that I have successsfuly logged in;
    But when I try to subsequently load the datasource.cfc I get an error that the current user is unable to access the method.
    /* Create an Admin API object and call the login method */
                                                      var local = {};
                                                      local.adminObj = createObject("component", "cfide.adminapi.administrator");
                                                      /* Enter your password for the CF Admin */
      /* if you dump this - TRUE is returned */
                                                      local.adminObj.login(adminPassword="my_admin_user_password");
                                                      /* Create an object of datasource component */
                                                      local.dsnObj = createObject("component", "cfide.adminapi.datasource");
      writeDump(local.dsnObj.getDataSources());
    I tried creating separate admin users and passwords - yhinking that perhaps a revent hotfix had stopped the "admin" user from being allowed to use the adminAPI - but changing to a new adminuser yielded the same results.
    I could login to the admin API with the new username and passsword - but could not access the datasource.cfc after that.
    Here is the debug output from the error...
    The current user is not authorized to invoke this method.
    The error occurred in accessmanager.cfc: line 48
    Called from datasource.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 155
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 45
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 1
    -1 : Unable to display error's location in a CFML template.
    Resources:
    Check the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser 
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
    Remote Address 
    127.0.0.1
    Referrer 
    Date/Time 
    22-Apr-13 01:09 PM
    Stack Trace
    at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:/cf10_final/cfusion/wwwro ot/CFIDE/adminapi/accessmanager.cfc:48) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:/cf10_final/cfusion/wwwroot/ CFIDE/adminapi/datasource.cfc:52) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:/inetpub/wwwroot/projectD ir/trunk/Application.cfc:155) at cfApplication2ecfc498167235$funcINIT.runFunction(C:/inetpub/wwwroot/projectDir/trunk/Appl ication.cfc:52) at cfApplication2ecfc498167235._factor5(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: 45) at cfApplication2ecfc498167235.runPage(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc:1 )
    coldfusion.runtime.CustomException: The current user is not authorized to invoke this method. at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799) at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\accessmanager.cfc:48) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\datasource.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:155) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235$funcINIT.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235._factor5(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:45) at cfApplication2ecfc498167235.runPage(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:538) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:234) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:159) at coldfusion.runtime.TemplateProxyFactory.resolveFile(TemplateProxyFactory.java:120) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:138) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:84) at coldfusion.runtime.AppEventInvoker.<init>(AppEventInvoker.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:232) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
    And here is the listed exceptions, beneath the stack trace;
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - java.io.FileNotFoundException - in C:/ColdFusion10/cfusion/wwwroot/WEB-INF/exception/errorcontext.cfm : line 44
             E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc (The system cannot find the path specified)
    This perspn seems to be having the same issue;
    http://forums.adobe.com/message/5051892
    and I agree I don't have "E" drive either!

    I've found a solution to my plight - I don't know if it'll work for you or help you try something that MAY fix it.
    I use a common code set which includes the Application.cfc from a CF Mapping - So, in the application.cfc in the actual website I do this:-
    <cfinclude template="/UberDirectory/Application.cfc">
    Then, in the /UberDirectory/Application.cfc, I was initialising a CFC which checks if the datasource was created for the website. The datasource checking code attempts to log into the Admin API and check & create if necessary the datasource.
    This has previously worked without fail for me - But in this instance it failed!! I was doing two things wrong - Firstly, the CFC should only be called in the Application.cfc in the onRequestStart section as the Application had to be initialised first - This is maybe because I've invoked the application.cfc in a "non-standard" manner.
    Secondly, once I'd moved the CFC invocation into oNRequestStart I saw the following error:-
    The string COOKIE.CFAUTHORIZATION_uber-directory is not a valid ColdFusion variable name.
    I had this as the app name .... <cfset this.name = 'uber-directory'>
    Changedthe dash to an underscore and I was away and could once again check the datasources
    Hope it helps
    Martin

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Using the current user in a Report Trigger (After Param)

    I'd like to give certain access based on the user that is currently logged into the report. We want admin users to have full access while lower users to have access up to a certain date. I'd like to bring the user that is currently connected to be able to be brought in for code comparison.
    I'd like to following code to only apply to certain users:
    DECLARE
    currDate date := to_date(SYSDATE, 'DD-MON-YY');
    currDateMinusMonth date;
    currDay number := to_number(to_char(sysdate, 'DD'));
    currMonth number := to_number(to_char(sysdate, 'MM'));
    currYear varchar2(20) := to_char(sysdate, 'YYYY');
    beginDateInSamples date;
    endDateInSamples date;
    MaxDateOutSamples date;
    BEGIN
    currDateminusmonth := (currDate - 30);
    if(currDateminusmonth >= to_date('01/01/' || currYear, 'mm/dd/yyyy') and (currDateminusmonth <= to_date('03/31/' || currYear, 'mm/dd/yyyy'))) then
    MaxDateOutSamples := to_date('12/31/' || (currYear -1), 'mm/dd/yyyy');
    elsif(currDateminusmonth >= to_date('04/01/' || currYear, 'mm/dd/yyyy') and (currDateminusmonth <= to_date('06/30/' || currYear, 'mm/dd/yyyy'))) then
    MaxDateOutSamples := to_date('03/31/' || currYear, 'mm/dd/yyyy');
    elsif(currDateminusmonth >= to_date('07/01/' || currYear, 'mm/dd/yyyy') and (currDateminusmonth <= to_date('09/30/' || currYear, 'mm/dd/yyyy'))) then
    MaxDateOutSamples := to_date('06/30/' || currYear, 'mm/dd/yyyy');
    elsif(currDateminusmonth >= to_date('10/01/' || currYear, 'mm/dd/yyyy') and (currDateminusmonth <= to_date('12/31/' || currYear, 'mm/dd/yyyy'))) then
    MaxDateOutSamples := to_date('09/30/' || currYear, 'mm/dd/yyyy');
    end if;
    dbms_output.put_line('currDate' || '=' || currDate);
    dbms_output.put_line('currDateMinusMonth' || '=' || currDateMinusMonth);
              dbms_output.put_line('MaxDate' || '=' || MaxDateOutSamples);
    dbms_output.put_line('currMonth' || '=' || currMonth);
    dbms_output.put_line('currYear' || '=' || currYear);
    dbms_output.put_line('currDay' || '=' || currDay);
                   if :INEDATE > (MaxDateOutSamples) then
              srw.message (200,'Please run this report with begin date after'|| MaxDateOutSamples);
                   return (FALSE);
              elsif :INEDATE < (MaxDateOutSamples) then
              return (TRUE);
              end if;
    END;
    Any and all help is MUCH APRRECIATED!!!!!!!!!!!
    Thanks,
    Mike M

    to get the login of the current user you just use USER like:
    IF USER='MYLOGIN' THEN
    .. do some stuff
    END IF;btw.: What do you except your dbms_output.put_line to do ? This will not show anything to the screen.

  • An impersonation error occurred using the security context of the current user. -- Report server is on remote server and file share folder is on local server

    I have deployed a report on the server (e.g. remoteserver\reports) from my local machine. I opened the report in browser in my local machine and created a new subscription with windows file share delivery option.
    But its giving an error "Failure writing file \\localserver\subscriptions\Report1.xls : An impersonation error occurred using the security context of the current user." Here "subscriptions"
    is the folder which I have created in my local machine.
    I followed the instructions found in the link "http://msdn.microsoft.com/en-us/library/ms157386.aspx"
    Please help to solve this issue.

    Hi,
    Thank you for your reply.
    I have followed the same process. The credentials which I have given are same as my PC. But I am getting the same error. Can you please clarify the statement "Service
    account that is using for file share subscription should have write access to shared folder."
    given in the above link?
    I am the one who created the folder and subscribing the report, so probably I have the full write permissions to the shared folder. What is the service account in this context?
    I think the problem is, I am deploying the report on the server and creating the shared folder in the local machine. I tried giving shared folder permissions to the user on the server. But my local machine is in local domain and I cant access the users on
    the remote server. Do I need to create a shared folder on the server? I am new to SSRS. Please help me.
    PS: I have assigned with all roles viz. Browser, Content Manager, Publisher, Report Builder etc. and My Role name (WEBSERVER\User)
    is different from my local user name (domain\username) in domain.

  • How to add the current user to a people picker using javascript coding in document library

    Hi Everyone,
    This is my scenario,
    I have a document library,for this if any user uploads a document,there we have three content types(Ex:content1,content2,content3)
    if the uploaded user is from content 1(here we have four columns name,assigned to ,status,published to) after uploading the document the document has to be updated.so when the document is updated by the user then automatically the published filed people
    picker has to be filled up with the current user name this is done by using java script object model programming.
    i am stuck with this can anyone help me..............
    thanks in advance
    Ramu

    Hi,
    I understand that you want to set a people picker field value automatically to current user. You can use these ECMA scripts on your EditForm.aspx page. Edit the page in SharePoint designer and add the code before a </asp:Content> tag.
     <script type="text/javascript">
    var context = null;
     var web = null;
     var currentUser = null;
    ExecuteOrDelayUntilScriptLoaded(GetUserLoginName, "sp.js");
    function GetUserLoginName() {
    context = new SP.ClientContext.get_current();
     web = context.get_web();
     this._currentUser = web.get_currentUser();
     context.load(this._currentUser);
     context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod),
    Function.createDelegate(this, this.onFailureMethod));
     function onSuccessMethod(sender, args) {
     var today = new Date();
     alert('Name:' + this._currentUser.get_title() + '\n Login:' + this._currentUser.get_loginName()); document.getElementById('ctl00_m_g_9b4b3950_80d8_4e6e_b2fa_241b727d83d4_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').innerHTML=this._currentUser.get_title();//you
    need to change the ID here to you people picker field ID. You can get the id for this field with the help of IE developer tool.
     function onFaiureMethod(sender, args) {
     alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     </script>
    For more information, please refer to this site:
    Get current user’s LoginName Ecmascript Sharepoint 2010:
    http://www.learningsharepoint.com/2011/05/18/get-current-users-loginname-ecmascript-sharepoint-2010/
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • I m not getting the none option while creating apple id without credit card.. i m using iphone 4s

    i m not getting the none option while creating apple id without credit card...i m using iphone 4s

    ( Use a computer and pay Particular Attention to Step 3...)
    Create a New Apple ID without a Credit Card... http://support.apple.com/kb/ht2534

  • HT1212 if my ipad wifi only was stolen can the current user restore use using recovery mode?

    if my ipad mini wifi only was stolen can the current user restore use using recovery mode?
    Activation lock was on before it was taken and it is registered to me

    Not if the thief does not have your AppleID and passcode AND you set
    a password to be entered before the screen can be unlocked.

  • Error while trying to install NI-VISA driver on SUSE LINUX 11.1(The version of gcc in the path does not match the version of gcc used to compile the currently running kernel.)

    hi i am trying to install NI-VISA driver on SUSE LINUX 11.1.
     the error message it shows is
              ******************************** ERROR ****************************************
    * The version of gcc in the path does not match the version of gcc used to    *
    * compile the currently running kernel.  This can cause unpredictable         *
    * behavior in kernel drivers and should be fixed.                             *
    * gcc version: Linux)                                                          *
    * kernel compiled with: 4.3.2                                                 *
    ******************************** ERROR ****************************************
    my kernel source version is 
       linux-8nes:/home/admin # rpm -qi kernel-source
    Name        : kernel-source                Relocations: /usr/src
    Version     : 2.6.27.29                         Vendor: openSUSE
    Release     : 0.1.1                         Build Date: Sun 16 Aug 2009 03:43:52 PM IST
    Install Date: Sat 24 Oct 2009 02:13:12 AM IST      Build Host: rinck
    Group       : Development/Sources           Source RPM: kernel-source-2.6.27.29-0.1.1.src.rpm
    Size        : 309251954                        License: GPL v2 only
    Signature   : RSA/8, Sun 16 Aug 2009 03:57:25 PM IST, Key ID b88b2fd43dbdc284
    Packager    : http://bugs.opensuse.org
    URL         : http://www.kernel.org/
    Summary     : The Linux Kernel Sources
    Description :
    Linux kernel sources with many fixes and improvements.
    Authors:
        Linus Torvalds <[email protected]>
        see /usr/src/linux/CREDITS for more details.
    Source Timestamp: 2009-08-15 17:53:59 +0200
    GIT Revision: 8a413546901c407e96f7fba18574cceeb40452af
    GIT Branch: SLE11_BRANCH
    Distribution: openSUSE 11.1 
    i had also installed GCC 4.3.2.
    it shows the error message as i had posted.
    please kindly help me on this.
    Thanks and regards,
    P.karthick

    Check this solution

  • How to reference the current user ID in an URL  iView

    Hi
      I have created an iview based on URL iview.
      I need to pass the logged on portal user id as parameter to a url.We are using EP6 SP2.
    Can any body help me in this regard.
    Regards
    Sayantan

    Hi SAYANTAN,
    You can create a dynpage that takes the current user id, use it to construct the url,
    and redirects to that url in doProcessBeforeOutput():
    public void doProcessBeforeOutput() throws PageException {
       Form myForm = this.getForm();
       IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();     
       IUser currUser = (IUser)request.getUser().getUser();
       String userid = currUser.getId();
       String url = "http://myUrl.com?userid="+userid;
       myForm.addRawText("<script>");
       myForm.addRawText("open(""+url+"","_self");");
       myForm.addRawText("</script>");      
    Hope that helps,
    Yoav.

  • Updating the VETVG table while creating the purchase order

    hi all,
       I have one requirement to calculated the delivery creation date while creating the Purchase Order. It is calculated based on the delivery date of PO. I have calculated that one but how to update it after calculation. Can any body give a user exit or BADI with implementation which will update the VETVG table while creating the PO.
    Thanks
    rajkumar

    hi sanjay,
    thanks for reply, I am using same BADI(ME_PROCESS_PO_CUST) and implementation(FIELDSELECTION_ITEM_REFKEYS). In this implementation i am setting the shipping data with SET_SHIPPINGDATA method . but after that the values are not updating the EKPV and VETVG tables but it is only showing in the screen. Can you give a idea where to pass these values so it will update the tables.
    thanks
    rajkumar

  • JavaScript:  How do you pass the currently active doc to a dialog in a menu item?

    I'm using Adobe Acrobat 11.0 Standard on Windows 7, and I'm having trouble with the menu item that I'm creating.  The menu item calls a dialog that prompts the user to select a page in the currently active document.  The problem is, I can't figure out how to pass the currently active document to the dialog.  I scoured the rest of the documentation, did searches on Google and here in the Adobe forums, but haven't turned anything up.  The AcroJS API gives the following solution (found under app/methods/execDialog):
    This function attaches the Doc object to the dialog box, then passes the dialog box to the app.execDialog method. The dialog4 object and this function can be at the document level.
       function dotheDialog(dialog,doc)
            dialog.doc = doc;
            var retn = app.execDialog( dialog )
    Finally, the following script can be executed from a mouse-up action, for example.
        dotheDialog( dialog4, this );
    I did this exact thing, but in the dialog, the value of this.numPages still comes out as undefined, indicating that the current document still hasn't been passed.  My own code looks like this:
      function dotheDialog(dialog, thisDoc){
        dialog.doc = thisDoc;
        var retn = app.execDialog(dialog);
      app.addMenuItem({
        cName: "Test Dialogue Box",
        cParent: "Edit",
        cExec: "dotheDialog(templateDialogue, this);"
    where templateDialogue is the name of my own dialog, rather than dialog4.  I'm not sure what the retn variable that they declare in the documentation is for, but I've tried it with and without that part, and it doesn't seem to make a difference.  Does anyone know how to do this?

    Sorry, here it is.  It's also just a small modification of something directly from the API, which is why it still has the date bit in it.
    var templateDialogue = {
      initialize: function (dialog) {
        // Create a static text containing the current date.
        var todayDate = dialog.store()["date"];
        todayDate = "Date: " + util.printd("mmmm dd, yyyy", new Date());
        dialog.load({ "date": todayDate });
      commit:function (dialog) {    // called when OK pressed
        var results = dialog.store();
        var inBounds = (parseInt(results["tPag"]) < this.numPages);
        if(!inBounds){
          app.alert({
            cMsg: "Please enter a valid number for the page from which to make the template." +
            "\n" + parseInt(results['tPag']) + " = parseInt(results['tPag']) !< this.numPages = " +  // I put this in to see the value of this.numPages,
            this.numPages,                                                                           // and it continues to be undefined.
            cTitle: "Page out of Bounds",
            nIcon: 0, nType: 0
        }else{
          var nButton = app.alert({
            cMsg: "Your template is named " + results["tNam"] + " and is made from page " + results["tPag"],
            cTitle: "javascript",
            nIcon: 3, cType: 0
      description:    {
        name: "Personal Data",    // Dialog box title
        align_children: "align_left",
        width: 350,
        height: 200,
        elements:
            type: "cluster",
            name: "Add a page to this documents templates.",
            align_children: "align_left",
            elements:
                type: "view",
                align_children: "align_row",
                elements:
                    type: "static_text",
                    name: "Template Name: "
                    item_id: "tNam",
                    type: "edit_text",
                    alignment: "align_fill",
                    width: 300,
                    height: 20
                type: "view",
                align_children: "align_row",
                elements:
                    type: "static_text",
                    name: "Generating Page: "
                    item_id: "tPag",
                    type: "edit_text",
                    alignment: "align_fill",
                    width: 300,
                    height: 20
                type: "static_text",
                name: "Date: ",
                char_width: 25,
                item_id: "date"
            alignment: "align_right",
            type: "ok_cancel",
            ok_name: "Ok",
            cancel_name: "Cancel"
    Side Question:  Out of curiosity, how would you abort if the user clicks cancel?  I get the feeling that they don't cover it because it's something you're supposed to already know how to do, but...I don't.  Would you just put whatever action you want to take into an if ( button == "Ok" ) type statement so that cancel does nothing?

  • How to get the current user logon to portal?

    Hi Gurus,
    How to get the current user who logged into portal.
    I have a webdynpro requirement where in which I have to get the current user id who loggedinto portal which will be the input parameter of the BAPI(adaptive RFC model) which will return me employee number of the particular user.
    Can anyone send me the code to retrive the user id through webdynpro application..........
    Pts will be rewarded for useful inputs......
    Thanks in Advance,
    Dharani

    Hi Dharani,
    Using UMEfactory u can do that...
    1. create one input field,
    2. create one attribute called Uid
    3. assign Uid attribute to the input field
    4. type the following code in Doinit() method
                String uid = wdContext.currentContextElement().getUid();
         try {
         IUser user = UMFactory.getUserFactory().
         getUserByLogonID(uid);
         String userName = user.getDisplayName();
         } catch (UMException ex) {
          e.toString(); 
    5. after that go to Portal create one iview assign to particular user. then u get into the user details...
    thats it
    Regards,
    P.Manivannan

  • Microsoft Word Has Not Been Installed for the Current User

    Hi, everybody
    I'm just starting our attempt to put together ZfD app packages for MS Office 2007. I've tried 2 different route with poor results for each. I'm looking for guidance and suggestions and, hey really, the simple final solution. :)
    Objectives: Each app package will install locally one of the Office apps (e.g., Word) if it is not installed and then launch it, otherwise it will launch it. It gets installed locally to the C: drive using all the MS default choices, but runs from the desktop ZEN/NAL shortcut. All desktops are XP, not Vista or W7.
    Routes tried and failed...
    1) Simple app, uses distribution and run scripts to figure out if already installed, then installs using network shared drive and config.xml file for just the one app. The result ought to work -- no particular error in the package, those are fixed -- but what happens is something different each time with the MS setup.exe, and it never does complete without its own error (various and different each time). So, this appears to be completely unreliable because launching MS's setup.exe from a simple app is unpredictable and incomplete.
    2) Snapshot of a successful setup.exe and config.xml install. This ALMOST works... well it does in fact work but the snapshotted app gives an error once it finishes launching -- "Microsoft Word Has Not Been Installed for the Current User" -- and exits. From the research I've done on this message, the MS program sees the "wrong" Windows profile on the destination environment, compared to that in the snapshot, and figures it's now been installed from a bootleg copy of Office 2007.
    At this stage all I can think of is expletives. We've paid for everything, I've followed all the usual and customary steps, played by the rules, been polite (and also used the necessary computer swear words), and now I just want to insult everyone in Microsoft's marketing department for ruining everyone's life yet again. Can't we just do this, is it too much to ask!?!
    Please help me. What is really going to work for distributing and maintaining Office 2007 apps using our ZfD environment? ALL USEFUL SUGGESTIONS WELCOME. Thank you. Bless you.
    -Kent S.
    Be strong as a ship and wise as a whale

    These questions are really best in the Microsoft Office Forums.
    These are MS Office Questions not ZEN Questions.
    Novell did not design Microsoft's Office Install.
    I have nothing against snapshots, but it does not work great with the Office
    installs, which you yourself know since you are posting here with problems
    based on that.
    And your other method you are trying with the break out is not working well.
    We also know that from experience.
    We can tell you that the way most people install it and the way most people
    succeed doing it, is by doing it the way recommended and designed by
    Microsoft.
    ZEN does that just fine.
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.
    "KentFSmith" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Thank you, Grimlock (-Grimlock?-)
    >
    > Through a google search I encountered a very close suggestion, and the
    > poster said they couldn't remember the name of a MS utility but that
    > there was one that would break out the individual MSIs from the Office
    > 2007 setup.exe bundle. The dependent app appears to be a simple and
    > possibly elegant solution, but without a good way to break out the MSIs
    > I don't see how to do anything other than with a config.xml ('Config.xml
    > file in the 2007 Office system'
    > (http://technet.microsoft.com/en-us/l.../cc179195.aspx)).
    >
    > Do you know of that utility and where I can find it?
    >
    > There is a lot of history here now of just doing the individual
    > applications. Everyone gets Word and Excel, but much fewer get
    > PowerPoint and Access. All other reasons aside, a compelling one is the
    > reduced number of help calls to the Help Desk here. Occasionally we
    > also just run the whole Office install for someone who needs some of the
    > odd utilities, but that is easily cost-justifiable for us to break them
    > out as exceptions. Otherwise, we focus 90% of our support on just Word
    > and Excel and it pays off nicely.
    >
    > If we switch to putting full Office 2007 on all PCs then there may be a
    > better approach that include other tools than ZfD, such as the fact that
    > we replace 1/3 of all PCs in the organization each year (so that no
    > hardware is more than 3 years "behind"). We could put 1/3 of all Office
    > 2007 installs into the new PC image. But we still need to support all
    > the use of the apps after the install, so ZfD MUST work well, it simply
    > MUST work well or we're screwed, to use the vernacular. Also, just
    > switching from what we've been doing for years -- single app orientation
    > -- means introducing new-ish issues that have to discover and explain to
    > our comrades, and to adjust our orientation with unknown future costs.
    >
    > But that may end up being the simplest adequate solution. And that's
    > what I want.
    >
    > -K
    >
    > grimlock;1883526 Wrote:
    >> Craig Wilson wrote:
    >> > You should really focus on #1.
    >> > Snapshot is not the way to go.
    >> >
    >> > Details about what is Not working or what random behavior may help
    >> folks.
    >> > Ask in the MS forums may help too. dont' mention zenworks.
    >> > Just say you are installing as Administrator from a share and getting
    >> these
    >> > errors.
    >> >
    >> > While not 100% accurate, it should be good enough to get some good
    >> feedback.
    >> >
    >>
    >> Nor is installing 1 app at a time. Install the whole suite, have an
    >> icon for each app that runs the exe for that app with a dependency on
    >> the another app that points to the installer msi.
    >>
    >> If any user runs any app, it will run if the executable is there
    >> (meaning it's been installed). If the executable is not there then it
    >> calls the dependent application (the installer app) and installs it,
    >> and
    >> then runs it.
    >
    >
    > --
    > KentFSmith
    > ------------------------------------------------------------------------
    > KentFSmith's Profile: http://forums.novell.com/member.php?userid=2927
    > View this thread: http://forums.novell.com/showthread.php?t=391573
    >
    >

Maybe you are looking for

  • Please help me to increase the performance of the query

    Hello I am not an oracle expert or developer and i have a problem to resolve. Below is the query and explaiation plan and seeking the help to improve the performance of the query. Our Analysis, The query runs good,takes less one minute and fetches th

  • On a canvas can not appear

    I Tried to draw a simulation on my canvas canvas,but it could not appear only a blank screen. I only change "public class grafik extends java.applet.Applet" in to "class grafik extends java.awt.Canvas" whats wrong with my code?

  • Photos deleted from Iphone by Iphoto, can't find them again

    I wanted to import some of my photos from my iphone to iphoto, After importing im not sure if it asked to delete the rest of the photos, but it did, I lost all my photos. I have tried to find an earlier backup to restore my Iphone but can only find a

  • IPhoto 08, Raw files wont save as Tiff

    I have set my preferences to save Raw files as tiff's after editing, however it will only save as jpeg, anyone have any ideas whats causing the problem

  • Why wont these globals update?

    I have only used globals once or twice before and they always seemed to work out for things like one VI running in the background continusly polling an instrument then have other VI's just read the global. That does not seem to work in this case. The