NavigationTarget parameter handling

Hello Gurus,
I've implemented IF_RS_BBS_BADI_HANDLER for jumping to URL. Now, when I call jump from BEx Analyzer (Excel/Web) it works fine.
But when I display query within portal, jump's not working - it seems that portal clasifies link as internal address and modifes it somehow. And instead of jumping to ERP system it ends on initial page of current BW portal.
Is there any setting on iview or somewhere else to prevent this?
Link looks like this
https://xxxxx.xxx.xxx:port/irj/portal?NavigationTarget=navurl%3A%2F%2Fc8dc184f658f1a9f30fd735307045d55&dropPRTEvent=OBNEvent&BOTechnicalName=sc&BOSystemAlias=SAP_SRM&Operation=displayprof&isOBN=true&SAPSRM_CA_TAB=D_I_BD&sapsrm_boid=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&obn%2esystem=SAP_SRM&obn%2ebo_type=sc&obn%2eoperation=displayprof&ForwardParameters=SAPSRM_CA_TAB%2csapsrm_boid%2cobn%2esystem%2cobn%2ebo_type%2cobn%2eoperation&CurrentWindowId=WIDDefaultExternal1307955753380&NavMode=3
Any help will be appreciated.
BR
Ondrej
Edited by: Ondrej Vach on Jun 29, 2011 2:27 PM

Hi,
Supposu you want to do the disabling and enabling part using radio buttons.
Firstly group the radio buttons in the screen painter, set a function code for them and declare them in the TOP.
Now for the 2nd and 3rd input fields double click on them and set the group name.
In PBO of flow logic
CASE SY-UCOMM.
WHEN 'F_RADIO'.
  IF R1 = 'X'.
   LOOP AT SCREEN.
    IF screen-name = 'field1'.
     Screen-Input = 0.
     Modify Screen.
    ENDIF.
   ENDLOOP.
  ENDIF.
  IF R2 = 'X'.
   LOOP AT SCREEN.
    IF screen-group1 = G1.
     Screen-Input = 0.
     Modify Screen.
    ENDIF.
  ENDLOOP.
ENDIF.
ENDCASE.
Thanks,
Sri.

Similar Messages

  • Parameter handling in  screen painter

    Hi All,
    Hope all are doing fine!!!
    I have designed a screen using screen painter ...
    in that screen ,, i have 2 parameters and 3 input fields ...
    if  1st parameter is ciicked/selected then  1st input field should only be input enabled and other 2 input fields should be input disabled.
    if 2nd parameter is clicked/selected ..., the 1st field should be input disabled and the other 2 fields should be input enabled..
    am designing all these in a screen painter not in a selection criteria.
    pls.. suggest alternatives..
    Thanks in advance
    Jack

    Hi,
    Supposu you want to do the disabling and enabling part using radio buttons.
    Firstly group the radio buttons in the screen painter, set a function code for them and declare them in the TOP.
    Now for the 2nd and 3rd input fields double click on them and set the group name.
    In PBO of flow logic
    CASE SY-UCOMM.
    WHEN 'F_RADIO'.
      IF R1 = 'X'.
       LOOP AT SCREEN.
        IF screen-name = 'field1'.
         Screen-Input = 0.
         Modify Screen.
        ENDIF.
       ENDLOOP.
      ENDIF.
      IF R2 = 'X'.
       LOOP AT SCREEN.
        IF screen-group1 = G1.
         Screen-Input = 0.
         Modify Screen.
        ENDIF.
      ENDLOOP.
    ENDIF.
    ENDCASE.
    Thanks,
    Sri.

  • JSF parameter handling

    Hi to all;
    I would like to ask you, if it is possible to do in JSF with following condition:
    Step 1 of 3 [edit page]
    Parameter 1 : value 1
    Parameter 2 : value 2
    Parameter 3 : value 3
    Parameter 4 : value 4 (new val 4)
    Parameter 5 : value 5 (new val 5)
    Note:
    1) the parameter and its values is spooled from DB using Entity bean
    2) user is allowed to edit any parameter as shown in the page
    Step 2 of 3 [confirm page]
    Parameter 1 : value 1
    Parameter 2 : value 2
    Parameter 3 : value 3
    Parameter 4 : new val 4
    Parameter 5 : new val 5
    Note:
    1) this page is to display all the values has been changed by the user
    2) it has 2 options here, either proceed (submit and update to db) or back (return to previous page by displaying the last history (old & new values)
    Step 3 of 3 [submit page]
    Update DB and display success / error msg
    Please, if you could advise or point me with sample, I am really appreciated for your help, thanks in advance.
    Rgds;
    Yoke Yew

    Hi, thanks for your reply. But, i'm not sure if i could program as following:
    -PwdMgmtEdit.jsp-
    <h:dataTable id="pmPara" value="#{pwdMgmtBean.pmCol}" var="pmEdit" binding="#{pwdMgmtBean.myDataTable}"
              styleClass="table" headerClass="tableHeader" rowClasses="tableRowOdd, tableRowEven" width="600">
    <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{lbl['pm.ival']}" />
                        </f:facet>
                             <h:inputText id="fldval" value="#{pmEdit.fldval}" valueChangeListener="#{pmEdit.editPmCol}"/>
                   </h:column>
              </h:dataTable>
    -PwdMgmtBean.java-
    public class PasswordManagementBean extends CommonBean implements ValueChangeListener {
    private final String CLASS_NAME = "PasswordManagementBean";
    private PasswordManagementDelegate pmDelegate = null;
    private Collection pmCol = null;
    /* Get selected datatable row. */
    private HtmlDataTable myDataTable = null;
    //private PasswordManagementDto myDataItem = new PasswordManagementDto();
    private PasswordManagement myDataItem = new PasswordManagement();
    public PasswordManagementBean() {
    reset();
    pmDelegate = new PasswordManagementDelegate();
    public void editPmCol(ValueChangeEvent event) {
    System.out.println("YY test 2.");
    // Get selected MyData item to be edited.
    myDataItem = (PasswordManagement) myDataTable.getRowData();
    public Collection getPmCol() {
    try {
    pmCol = pmDelegate.getAllPara();
    } catch (ApplicationException e) {
    System.out.println(CLASS_NAME + "-" + e);
    return pmCol;
    public void setPmCol(Collection pmCol) {
    this.pmCol = pmCol;
    public HtmlDataTable getMyDataTable() {
    return myDataTable;
    public void setMyDataTable(HtmlDataTable myDataTable) {
    this.myDataTable = myDataTable;
    public PasswordManagement getMyDataItem() {
    return myDataItem;
    public void setMyDataItem(PasswordManagement myDataItem) {
    this.myDataItem = myDataItem;
    public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException {
    System.out.println("YY test 1.");
    // TODO Auto-generated method stub
    It didn't print the system.out, instead complain with following error:
    Caused by: java.lang.NoSuchMethodException: com.infopro.eserv.app.passwordmanagement.domain.PasswordManagement.editPmCol(javax.faces.event.ValueChangeEvent)
         at java.lang.Class.getMethod(Class.java:1581)
         at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:121)
         ... 30 more
    Suppor,t the method editPmCol i 've added in PwdMgmtBean Pls advise

  • Pass parameter to WD abap iview via Portal link

    Hello all,
    I have created one WD ABAP application and I am accessing the same with the help of URL parameters. I am retrieving these URL parameters in 'HANDLEDEFAULT' event handler of the application window.
    Now client wants to access the same with the help of NavigationParameter so I created relevant iView in portal and I am accessing application using link which is composed of portal link and NavigationTarget parameter.
    My question, If I want to pass application parameters via URL, How do I access the same in my window. Do I need some sort of separate mechanism to take the URL parameters to my application window when application is running on portal?
    Please share your thoughts on this.
    (Same problem explained in link /thread/672163 [original link is broken])
    Thanks in Advance,
    Prashant Jagdale

    Hi Kiran Kumar,
    Thanks for your document but still my problem is not solved. I will try to explain my problem in detail.
    I have developed one WD application and I was accessing the same using link suppose
    http://newdomain.abc.com:8000/sap/bc/webdynpro/sap/zwda_url_parameters?pernr=12345&name=test1&sap-client=200&sap-language=EN
    I was retrieving the values of of pernr and name in 'HANDLEDEFAULT' event handler by adding two parameters as PERNER and NAME. and it is working fine.
    Now this application is running on portal. and I am accessing the same using URL
    http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPage
    but as i want to pass above mentioned parameter (pernr and name) via link, After an investigation, I am thinking to use of Dynamic parameter. So my link will become like
    http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPage&DynamicParameter="pernr=12345&name=test1"
    So, my question is , how I can access these values specified in DynamicParameter in my WD abap iView. Whether they are available in 'HANDLEDEFAULT' event handler using method wdevent->get_data?
    I don't want to pass my parameters using iView property "Application Parameter."
    Please give some inputs on this. Also Please guide me whether I can use some other way to achieve this. but the thing is, i must want to pass the values via URL only.
    Thanks in Advance,
    Prashant Jagdale

  • How to handle multiple fields data

    Hi All,
    My data is :
    FldName           FldTypeCode          Text
    Sandya            02                         nothing
    Raj                 01                         12/Oct/2008
    Lokesh            03                          12546
    Harish             04                          12565.35
    King                01                          12/Nov/2007
    Cobra              02                          texttype In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
    Q) Now My question is How to update all the values.
    Eg: Create procedure procdname (ip_allvalues in typerecord)
    is
    begin
    --statements;
    end;
    the above procedure input parameter can handle all three fields data when they pass,
    1) If the parameter handles, which type i need to create ?
    2) How i need to update multiple records at a time?
    Please can any body...
    Thanks in advance..

    sanjuv wrote:
    In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
    Q) Now My question is How to update all the values.With an update statement. Identify the row with a where condition and then set the new values. That's one of the first reasons why primary keys are used.
    1) If the parameter handles, which type i need to create ?
    2) How i need to update multiple records at a time? If you don't explain how you User Interface is designed to work nobody can tell you anything about it. Anyway for such things there is no need to define any type.
    Usually the application should submit an update command(like the following one) for each row to update.
    update <table_name>
         set field_1= <value1>,
              field_2= <value2>
              field_n= <valuen>
    where <primary key column> = <primary key value of the row to update>Bye Alessandro
    Edited by: Alessandro Rossi on 6-ott-2008 16.37

  • Find out IBase from Handle (inside BADI_IBASE_SAVE_CHCK)

    Hello,
    I have to use BADI_IBASE_SAVE_CHCK to save additional data after IBase data has changed. The BADI has the import parameter HANDLE. Does anybody know how I can find out which IBase stands behind this temporary handle? Thanks in advance...
    Regards, Kay

    I need some help on the same issue .. just wondering if the original requestor has found solution or workaround for this. What we've in this BADI is only the handle number which doesn't seem to mean anything.. IB_COM1_READ_IBASE will not return us the ibase as expected .. the FM needs the ibase to work.

  • Multiple ORACLE_HOME issue

    Hi all,
    I have a RAC (Oracle 10g) environment on AIX machines.
    I have 6 databases located in one "/opt/oracle/rdbms10g" and just one located in "/opt/oracle/rdbms10r1".
    First thing I do is to start those 6 databases (which are starting without any problems) and then I'm changing the ORACLE_SID and ORACLE_HOME to point to the last database in order to start it up and here starts the problem:
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1610612736 bytes
    Fixed Size                  1330600 bytes
    Variable Size             635155032 bytes
    Database Buffers          973078528 bytes
    Redo Buffers                1048576 bytes
    ORA-00205: error in identifying controlfile, check alert log for more infoAnd this is the output in the log file:
    Fri Aug 15 09:40:57 2008
    ORA-00202: controlfile: '+ORADATA/infra/controlfile/current.258.623412077'
    ORA-17503: ksfdopn:2 Failed to open file +ORADATA/infra/controlfile/current.258.623412077
    ORA-15001: diskgroup "ORADATA" does not exist or is not mounted
    ORA-15055: unable to connect to ASM instance
    ORA-04031: unable to allocate 1600 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","parameter handle")
    Fri Aug 15 09:40:57 2008
    Controlfile identified with block size 0
    Fri Aug 15 09:40:57 2008
    ORA-205 signalled during: ALTER DATABASE   MOUNT...I'm trying to enter in ASM but I'm getting this error:
    [email protected]:/>setenv ORACLE_SID +ASM1
    [email protected]:/>setenv ORACLE_HOME /opt/oracle/rdbms10g
    [email protected]:/>asmcmd
    ORA-04031: unable to allocate 1600 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","parameter handle") (DBD ERROR: OCISessionBegin)I have to mention that I'm getting this error ONLY when I'm changing the ORACLE_HOME and ORACLE_SID variables...
    Any advice?
    Best regards,
    MD

    This is the output of env command:
    TERM=xterm
    AUTHSTATE=files
    SHELL=/bin/tcsh
    HOME=/home/oracle
    USER=oracle
    PATH=/opt/oracle/rdbms10r1/bin:/opt/oracle/rdbms10r1/bin:/usr/linux/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:.:/opt/nmon:/opt/oracle/crsi/bin:/opt/oracle/rdbms10g/bin:/opt/ActivePerl-5.8/site/bin:/opt/ActivePerl-5.8/bin:/usr/vac/bin
    TZ=NFT-1DFT
    LANG=en_US
    LOCPATH=/usr/lib/nls/loc
    LC__FASTMSG=true
    ODMDIR=/etc/objrepos
    LOGNAME=oracle
    LOGIN=oracle
    HOSTTYPE=rs6000
    VENDOR=ibm
    OSTYPE=aix
    MACHTYPE=rs6000
    SHLVL=1
    PWD=/
    GROUP=dba
    HOST=bvisbatrac01
    REMOTEHOST=172.18.68.13
    LS_COLORS=no=00:fi=00:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.rtf=00;33:*.sit=01;31:*.pak=01;31:*.rsrc=01;34:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:
    EDITOR=vi
    ORACLE_HOME=/opt/oracle/rdbms10g
    CRS_HOME=/opt/oracle/crs
    ORACLE_SID=+ASM1
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.catand the script for the startup is just the startup command...
    And this is the output of ENV after I reboot the system...
    TERM=xterm
    AUTHSTATE=files
    SHELL=/bin/tcsh
    HOME=/home/oracle
    USER=oracle
    PATH=/usr/linux/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/jav                                                                              a14/jre/bin:/usr/java14/bin:.:/opt/nmon:/opt/oracle/crsi/bin:/opt/oracle/rdbms10                                                                              g/bin:/opt/ActivePerl-5.8/site/bin:/opt/ActivePerl-5.8/bin:/usr/vac/bin
    TZ=NFT-1DFT
    LANG=en_US
    LOCPATH=/usr/lib/nls/loc
    LC__FASTMSG=true
    ODMDIR=/etc/objrepos
    LOGNAME=oracle
    LOGIN=oracle
    HOSTTYPE=rs6000
    VENDOR=ibm
    OSTYPE=aix
    MACHTYPE=rs6000
    SHLVL=1
    PWD=/home/oracle
    GROUP=dba
    HOST=bvisbatrac01
    REMOTEHOST=172.18.68.13
    LS_COLORS=no=00:fi=00:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;3                                                                              1;01:ex=01;32:*.rtf=00;33:*.sit=01;31:*.pak=01;31:*.rsrc=01;34:*.tar=01;31:*.tgz                                                                              =01;31:*.arj=01;31:*.taz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=                                                                              01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.                                                                              tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:
    EDITOR=vi
    ORACLE_HOME=/opt/oracle/rdbms10g
    CRS_HOME=/opt/oracle/crs
    ORACLE_SID=DUMMY1
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.catRegards,
    MD
    Message was edited by:
    MariusD

  • Data Selection in Infopackage not picked.

    Hi,
    I have a generic datasource. I have data selections in the Infopackage. Say, I have Data selection for Plant as "5000". But, data for all Plants are getting pulled for all Plants. Why is this Selection not picked ?
    Thanks.

    hi, what type of datasource is yours.. is the selection parameter handled in the definition of ur datasource?

  • Windows\Temp folder filling fast - how to Dispose the Crystal Objects?

    Post Author: pontupo
    CA Forum: .NET
    So the Windows\Temp folder is fast filling the disk in my
    deployment. Each time a report is opened, a number of files are created
    here. The problem is, of course, probably that I'm not releasing my
    report objects in my code, as the reports can't even be manually
    deleted without shutting down IIS. Well, fair enough. What I can't
    figure out is where to release my reports objects. I have two pages:
    one performs a pre-pass of the report object and generates a dynamic
    page to prompt the user for parameters. This page, I believe, has no
    problems because the report.Close() command is in line with the code
    and is the final statement, but I could be mistaken and this page may also be leaving memory leaks. The second page, however, has the
    CrystalReportsViewer object and actually displays the report to the
    user after setting up the parameters correctly. On this page, I can't
    figure out how/when to call report.Close(). If I do it at the
    page.Dispose event, there seems to be no affect. If I do it at the
    page.Close event, the report will load fine, but if you try to go to
    another page in the report (in the case of multi-page reports) or
    refresh the data, the report object has already been unloaded and the
    CrystalReportsViewer won't be able to find the report document. If I
    wrap my code in one big Try-Catch-Finally (rather than just having a
    Try-Catch around the file load itself) as I've seen suggested elsewhere and place a report.Close()
    command in the Finally, the Finally is executed before the viewer even
    loads the report so I get a file not found error. So where
    can I unload the report object? What I want is to persist the report
    via Sessions (which I do) so that as the user moves between pages of
    the report/refreshes the report will remain loaded, but when the user
    closes the page or browses to another page, perhaps, I want to close
    the report and free the resources so that the temp files are deleted.
    Following are some code samples: Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init        sessionString = Request.QueryString("report")        report = Server.MapPath("reports/") & Request.QueryString("report") & ".rpt"        ConfigureCrystalReport()    End SubPrivate Sub ConfigureCrystalReport()        If (Session(sessionString) Is Nothing) Then            reportDoc = New ReportDocument()            'load the report document            If (IsReportValid()) Then              reportDoc.Load(report)              '******************************              'bunch of other code, authentication              'parameter handling, etc. here              '******************************              Session(sessionString) = reportDoc        Else                Response.Redirect("error.aspx")            End If        Else            reportDoc = CType(Session(sessionString), ReportDocument)        End If    CrystalReportsViewer.ReportSource = reportDoc    End Sub    Private Function IsReportValid() As Boolean        Dim reportIsValid As Boolean = False        Try            If (System.IO.File.Exists(report)) Then 'does the file exist?                'if it does, try to load it to confirm it's a valid crystal report                Dim tryReportLoad As New CrystalDecisions.CrystalReports.Engine.ReportDocument()                tryReportLoad.Load(report)                tryReportLoad.Close()                tryReportLoad.Dispose()                reportIsValid = True            End If        Catch ex As Exception            reportIsValid = False        End Try        Return reportIsValid    End Function'Currently, I've also tried each of the following:Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload        CloseReports(reportDoc)        CrystalReportsViewer.Dispose()        CrystalReportsViewer = Nothing    End Sub    Private Sub CloseReports(ByVal report As ReportDocument)        Dim sections As Sections = report.ReportDefinition.Sections        For Each section As Section In sections            Dim reportObjects As ReportObjects = section.ReportObjects            For Each reportObject As ReportObject In reportObjects                If (reportObject.Kind = ReportObjectKind.SubreportObject) Then                    Dim subreportObject As SubreportObject = CType(reportObject, SubreportObject)                    Dim subReportDoc As ReportDocument = subreportObject.OpenSubreport(subreportObject.SubreportName)                    subReportDoc.Close()                End If            Next        Next        report.Close()    End Sub'This was the solution suggested on another forum. I've also tried:Protected Sub Page_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed        reportDoc.Close()        reportDoc.Dispose()        CType(Session(sessionString), ReportDocument).Close()        Session(sessionString) = Nothing    End Sub'I've also tried wrapping everything inside of the If statement in the ConfigureCrystalReport() method in code to this effect:If (IsReportValid()) Then                Try                    reportDoc.Load(report)Catch e As Exception                    Response.Redirect("error.aspx")                Finally                    reportDoc.Close()                End TryAny advice on this is appreciated. Thanks in advance, Pont

    Post Author: sarasew13
    CA Forum: .NET
    Why are you checking for is valid before closing?  As long as the report object isn't null you should be able to close it (whether it's open or not).  I ran into this same problem when trying to store the report, so now I just store the dataset.  Everything seems to work fine and navigate appropriately so here's more or less how I handle it:
    DataSet myDS;ReportDocument myRPT;
        protected void Page_Load(object sender, EventArgs e)    {        try        {            if (!IsPostBack)            {                //pull variables from previous page if available                //set variables into view state so they'll persist in post backs            }            else            {                //if postback then pull from view state            }
                createReport();    }        catch (Exception err)        {            //handle error        }    }
        private void createReport()    {        myDS = new DataSet();        string rpt;
            rpt = "RPTS/report.rpt";        try        {            if (!IsPostBack || Session&#91;"data"&#93; == null)            {                myDS = getData();//make data call here                Session&#91;"data"&#93; = myDS;            }            else            {                myDS = (DataSet)Session&#91;"data"&#93;;            }
                if (myDS.Tables.Count > 0)//make sure the dataset isn't empty            {                myRPT = new ReportDocument();                myRPT.Load(Server.MapPath(rpt));                myRPT.SetDataSource(myDS.Tables&#91;0&#93;);
                    if (!IsPostBack)                {                    //code to set parameters for report here                }
                    MyViewer.ReportSource = myRPT;            }        }        catch (Exception error)        {            //handle error        }    }
        protected void Page_Unload(object Sender, EventArgs e)    {        try        {            if (myRPT != null)            {                myRPT.Close();            }        }        catch (Exception error)        {            //handle error        }    }

  • SP with input parameters to disable and enable indexes

    I need to build a stored proc script with input paramters to disable indexes and enable indexes of specific tables.
    Parameter would be tablename,schemaname,a value input which will determine if it is for disabling index or enabling index
    I will have a reference table which would hold the specific tables
    Below is the ddl script and sample data for reference
    USE [test]
    GO
    /****** Object:  Table [dbo].[TestingIndex]  DDL  Script Date: 01/27/2014 22:38:39 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[TestingIndex](
    [tablename] [varchar](30) NULL,
    [schemaname] [varchar](10) NULL,
    [Flag] [varchar](1) NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    sample data
    tablename
    schemaname
    Flag
    tableabc
    abc
    y
    tabledef
    def
    y
    tableghi
    ghi
    y
    All I want to do is disable all the indexes of the tables which are present in my reference table by looping through the reference tables.
    Similarly I want to do enable all the indexes of the diabled table using the reference table
    Any help would be appreciated and best way to do it thinking all pros n cons.
    Mudassar

    New code with changes
    USE [TEST]
    GO
    /****** Object: StoredProcedure [dbo].[usp_indexes] Script Date: 1/28/2014 10:11:55 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[usp_indexes1]
    @ref reftable READONLY,
    @input int
    AS
    BEGIN
    ---Declare variables
    DECLARE @tblnm VARCHAR(30), @schnm VARCHAR(10), @flag BIT, @sql VARCHAR(MAX)
    ---Declare cursor
    DECLARE cursor_index CURSOR
    FOR SELECT tablename, schemaname, flag FROM @ref
    --Open cursor
    OPEN cursor_index
    FETCH NEXT FROM cursor_index INTO @tblnm, @schnm, @flag
    WHILE @@FETCH_STATUS = 0
    BEGIN
    if @input =1
    BEGIN
    SET @sql = 'ALTER INDEX ALL ON '[email protected]+'.'[email protected]+' DISABLE '
    print @sql
    EXEC sp_execute @sql;
    END
    else
    BEGIN
    SET @sql = 'ALTER INDEX ALL ON '[email protected]+'.'[email protected]+' REBUILD '
    print @sql
    EXEC sp_execute @sql;
    ALTER INDEX ALL ON dbo.Test1 DISABLE
    END
    FETCH NEXT FROM cursor_index INTO @tblnm, @schnm, @flag
    END
    CLOSE cursor_index
    DEALLOCATE cursor_index
    END
    GO
    result when I execute it gives below message
    (3 row(s) affected)
    ALTER INDEX ALL ONdbo.Test1DISABLE
    Msg 214, Level 16, State 2, Procedure sp_execute, Line 1
    Procedure expects parameter '@handle' of type 'int'.
    ALTER INDEX ALL ONdbo.Test3DISABLE
    Msg 214, Level 16, State 2, Procedure sp_execute, Line 1
    Procedure expects parameter '@handle' of type 'int'.
    ALTER INDEX ALL ONdbo.Test4DISABLE
    Msg 214, Level 16, State 2, Procedure sp_execute, Line 1
    Procedure expects parameter '@handle' of type 'int'.
    DECLARE @ref reftable
    INSERT INTO @ref
    SELECT * FROM testingindex
    EXEC usp_indexes1 @ref,1
    but when I go n check indexing status no tables  have been disabled using the below query it shows still enabled
    select sys.objects.name as 'table',
    sys.indexes.name as 'index',
    is_disabled = case is_disabled
    when '1' then 'disabled'
    when '0' then 'enabled'
    end
    from sys.objects join sys.indexes
    on sys.objects.object_id = sys.indexes.object_id
    where sys.objects.name in('Test1','Test3','Test4' )
    below are my table schema and index script (similar for 3 tables i m using for testing)
    CREATE TABLE [dbo].[Test1](
    [YEAR] [varchar](10) NULL,
    [MONTH] [varchar](10) NULL,
    [MONTH_VAL] [varchar](10) NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    USE [TEST]
    GO
    /****** Object: Index [NonClusteredIndex-20140128-112203] Script Date: 1/28/2014 11:23:48 AM ******/
    CREATE NONCLUSTERED INDEX [NonClusteredIndex-20140128-112203] ON [dbo].[Test1]
    [YEAR] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO
    Mudassar

  • Syntax error in program "SAPLS38E "

    Hi BASIS Gurus,
    I implemented all the SNOTE's as per the recommendation of RSECNOTE and included all the SNOTE in the same request and transported to Quality System , but the TR ended with warning .
    We are now unalbe be run any program in SE38 and even functional modiule , its giving dump error . Please find the error below
    The current ABAP program "SAPLSEWORKINGAREA" had to be terminated because it
    has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "SAPLS38E " in include "LS38EU24
    " in
    line 63:
    "FORM "GET_MASLANGU" does not exist"
    Please also find the STMS Error
    Program SAPLS38E, Include LS38EU24: Syntax error in line 000063
    FORM 'GET_MASLANGU' does not exist
    Please can you help me in this issue.
    Regards,
    Pradeep

    Hi ,
    Please find the list of SNOTES applied
    1075850     Forecast with linear regression model
    1128669     Material forecast: Period fixing incorrect
    1321756     Mass activation: Object activated instead of deleted
    1342064     Insufficient monitoring for SXI_CACHE
    1356215     Missing authorization check in EMMACLS generation program
    1361038     Report RJ-JXINI generates unnecessary source code
    1362972     Industry Solution Migration Workbench: Authorization check
    1363371     FS-CD: Missing authorization checks SAPRGEN_CD
    1450128     Code injection vulnerability in ECC and SAP R/3
    1453457     WebReporting: Unauthorized modification of displayed content
    1453604     Potential information disclosure relating to ECC and SAP R/3
    1453605     Potential information disclosure relating to ECC and SAP R/3
    1469982     Code injection vulnerability in ECC and SAP R/3
    1470094     Authorization check in report H99_B2AFILE missing
    1472395     Unauthorized change of stored contents (agency collections)
    1479762     Missing authority check in SAP_RSADMIN_MAINTAIN
    1481786     Selection field with more than 22 characters is truncated
    1481802     Potential disclosure and modification of persisted data
    1499901     Executing arbitrary code with RSNROGEN
    1509344     Potential disclosure and modification of persisted data
    1514927     Unauthorized modification of displayed content in BW
    1520781     Potential disclosure and modification of code and data
    1523530     Workflow notification: Length restriction in title of e-mail
    1523808     Missing authorization check in CATT or eCATT
    1525695     Update #1 for Note 587410: Missing Authorization Check SE37
    1527823     XI Runtime: Timestamp in XI Cache application log
    1528822     Missing authorization check in WebReporting
    1530392     Missing Authorization Check in SW-Delivery tools
    1531669     Missing Authorization Check
    1536091     Missing Authorization Check in Change logs component.
    1536491     ALE: Missing authorization check in ALE monitoring tool
    1536640     WebReporting:Unauthorized modification of displayed content
    1538218     Potential information disclosure relating to security by WDA
    1542645     Users with hardcoded name & password created in BC-DOC-TER
    1547271     Missing authorization check in RFC with call transaction
    1548848     Potential information disclosure relating to user/processes
    1549999     Missing authorization check in the workflow analysis
    1554030     Missing authorization check in fumo EPS_DELETE_FILE
    1555846     Missing authorization check in WD ABAP tracing tool
    1556749     Unauthorized execution of functions in SAP system
    1557197     Missing authorization check in portal connection
    1560538     Missing authorization check in SCM-APO-INT
    1560649     Hard-coded credentials in BCS
    1563110     Potential information disclosure relating to FM TH_GREP
    1565444     Missing authorization check in Output Server
    1567630     Unauthorized modification of displayed content in BC-DOC-TTL
    1567635     Unauthorized modification of contents displayed in ICF
    1567882     Missing authorization check in BW RFC
    1569550     Unauthorized execution of functions in transaction BAPI
    1570374     Missing Authorization Check in Package Builder
    1570717     Hard-coded credentials in ABAP Workbench
    1571944     Missing Authorization Check in ABAP Workbench
    1572152     Potential ABAP code generation w/o logging
    1572325     Unauthorized modification of displayed content in BW
    1572340     Directory traversal in PSE function modules
    1572345     Hard-coded credentials in ABAP Task Handler
    1572346     Hard-coded credentials in ABAP Test Cockpit
    1572714     Missing Authorization Check in Profile Parameter Handling
    1574226     Unauthorized modification of displayed content in IC Manager
    1575006     Directory Traversal in SPOOL System
    1576055     Dangerous ABAP Commands; DELETE REPORT in RSBTCDRP
    1577155     Unauthorized modif. of displayed content in WD trace tool
    1578393     Hard-coded credentials in BC-SRV-KPR-DMF
    1578473     Directory Traversal in Unicode Migration Tools
    1580017     Code injection vulnerability in TH_GREP
    1580874     Directory traversal in ABAP Syntax Checking
    1581644     Unauthorized modification of displayed content in CRM-BPS
    1581717     Potential disclosure of persisted data in BW RFC
    1582870     ABAP XSS Escaping Support
    1583235     Unauthorized modification of displayed content
    1583286     Poss. disclosure of authorization verifications in RSTXSCRP
    1583301     Missing authorization check in Loans Management
    1584002     Unauthorized modification of contents displayed in ICF
    1586739     Hard-coded credentials in FI-FM
    1587581     Unauthorized use of application functions in workflow (BSP)
    1588869     Potential disclosure of persisted data in FIN-FSCM-TRM
    1589919     Hard-coded credentials in Function Builder
    1590272     Unauthorized modification of stored content:hrrcf_searchhlp
    1591048     QPAP: Potential modification or disclosure of persisted data
    1591146     Missing authorization check in profile maintenance module
    1591349     Missing authorization check in BRF
    1591813     Potential disclosure of persisted data in test code
    1592029     Missing authorization check in customer master data
    1592312     Code injection vulnerability in EC-EIS
    1594644     Potential disclosure of persisted data in the monitors
    1599072     Directory traversal in RE-BD
    1602039     Missing Authorization Check in IS-B-BCA
    1606471     Unauthorized modification of displayed content in workflow
    1607721     Unauthorized modification of displayed content in Unicode Co
    1610299     Unauthorized change to contents in PI message monitoring
    1612983     Unauthorized use of appl. functions in mobile extension
    1614719     Missing authorization check in ETM planning
    1620914     Potential information disclosure relating to passwords
    1625060     Missing authorization check in component IS-B-BCA
    I will try to do the suggested SNOTE manually also.
    Thanks ,
    Pradeep

  • Expdp full and impdp full fails with error....pls help..!(Oracle 11g)

    Hi
    I wanted to refresh my dev environment quickly..
    As we also wanted to migrate from exp/imp to datapump, I tried these..
    Only thing worked for me is impdp on network mode using remap schema.
    1)First i wanted to implement expdp and impdp standard procedures(Full database export/import)
    My expdp failed with the following error on a full export..
    Pls see below:
    C:\Documents and Settings\oracle2>expdp system/<p.w> full=Y directory=DATA_PUMP_DIR dumpfile=OAPFULL.dmp logfile=OAPFULL.log
    Export: Release 11.1.0.7.0 - Production on Thursday, 26 April, 2012 16:12:49
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYSTEM"."SYS_EXPORT_FULL_02":  system/******** full=Y directory=DATA_PUMP_DIR dumpfile=OAPFULL.dmp logfile=OAPFULL.log
    Estimate in progress using BLOCKS method...
    Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 4.351 GB
    Processing object type DATABASE_EXPORT/TABLESPACE
    Processing object type DATABASE_EXPORT/PASSWORD_VERIFY_FUNCTION
    Processing object type DATABASE_EXPORT/PROFILE
    Processing object type DATABASE_EXPORT/SYS_USER/USER
    Processing object type DATABASE_EXPORT/SCHEMA/USER
    Processing object type DATABASE_EXPORT/ROLE
    Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
    Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
    Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
    Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
    Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA
    Processing object type DATABASE_EXPORT/RESOURCE_COST
    Processing object type DATABASE_EXPORT/SCHEMA/DB_LINK
    Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
    Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
    Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY
    Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type DATABASE_EXPORT/CONTEXT
    Processing object type DATABASE_EXPORT/SCHEMA/PUBLIC_SYNONYM/SYNONYM
    Processing object type DATABASE_EXPORT/SCHEMA/SYNONYM
    ORA-39014: One or more workers have prematurely exited.
    ORA-39029: worker 1 with process name "DW01" prematurely terminated
    ORA-31672: Worker process DW01 died unexpectedly.
    Job "SYSTEM"."SYS_EXPORT_FULL_02" stopped due to fatal error at 16:14:562)As the above failed, I tried impdp with network_link import and full=y and its a different issue!
    impdp system/<p.w> NETWORK_LINK=OAPLIVE.WORLD full=y logfile=OAPDRfull2.log table_exists_
    action=REPLACE
    Import: Release 11.1.0.7.0 - Production on Thursday, 26 April, 2012 13:36:01
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** NETWORK_LINK=OAPLIVE.WORLD full=y logfile=OAPDRfull2.log table_exists_action=REPLACE
    Estimate in progress using BLOCKS method...
    Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 4.670 GB
    Processing object type DATABASE_EXPORT/TABLESPACE
    ORA-31684: Object type TABLESPACE:"SYSAUX" already exists
    *************lots more of object already exists errors here............(space limit so cant paste)***************
    ORA-31684: Object type SYNONYM:"GEOPROD"."EXT_POSTAIM_PRESORT_61" already exists
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.DISPATCH_WORK_ITEMS [SYNONYM:"GEOPROD"."EXT_POSTAIM_PRESORT_61"]
    ORA-31600: invalid input value 200001 for parameter HANDLE in function CLOSE
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 569
    ORA-06512: at "SYS.DBMS_METADATA", line 4731
    ORA-06512: at "SYS.DBMS_METADATA", line 792
    ORA-06512: at "SYS.DBMS_METADATA", line 4732
    ORA-06512: at "SYS.KUPW$WORKER", line 2718
    ORA-03113: end-of-file on communication channel
    ORA-02055: distributed update operation failed; rollback required
    ORA-02063: preceding lines from OAPLIVE.WORLD
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 7858
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    242F2F2C     18256  package body SYS.KUPW$WORKER
    242F2F2C      7885  package body SYS.KUPW$WORKER
    242F2F2C      8657  package body SYS.KUPW$WORKER
    242F2F2C      1545  package body SYS.KUPW$WORKER
    241DDF3C         2  anonymous block
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA []
    ORA-31642: the following SQL statement fails:
    SELECT unique ku$.seq# from sys.metanametrans$ ku$ WHERE ku$.htype='DATABASE_EXPORT' AND ku$.model='ORACLE' AND NOT ( ku$.seq#>=(select a.seq# from sys.metanametrans$ a where
       a.model='ORACLE' and a.htype='DATABASE_EXPORT' and a.name ='DATABASE_EXPORT/SCHEMA/SYNONYM')) order by ku$.seq#
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 5002
    ORA-01427: single-row subquery returns more than one row
    ORA-06512: at "SYS.DBMS_
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 7853
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    242F2F2C     18256  package body SYS.KUPW$WORKER
    242F2F2C      7885  package body SYS.KUPW$WORKER
    242F2F2C      2744  package body SYS.KUPW$WORKER
    242F2F2C      8523  package body SYS.KUPW$WORKER
    242F2F2C      1545  package body SYS.KUPW$WORKER
    241DDF3C         2  anonymous block
    Job "SYSTEM"."SYS_IMPORT_FULL_01" stopped due to fatal error at 13:39:48So its basically these 2 issues I want to know how to fix.
    1-expdp error cause and fix
    2-impdp error cause and fix -Also how to avoid object alreay exists error?
    Also for example the package etc. is the same name..but i want new package from LIVE so it means if the same name package, view, etc is there, it wouldnt get updated?
    Any way to overcome this?
    I need it exactly same as LIVE...(with a few exceptions which is small enough i can do after impdp finishes fine)
    Pleaseeeeeeee help!!
    Thanks&Regards.......

    Hi..
    Thanks for the links..I applied the tips on each of them but it didnt work.
    Also my database is 11g so it is not true that this happens on 10g only.
    Things tried:
    1)I tried with different values on parallel parameter but same error
    2)I applied the following:
    alter system set open_cursors=1024 scope=spfile;
    alter system set "_optimizer_cost_based_transformation"=off;
    commit;
    The 3rd link was bit better
    I tried to find out where exactly the error was causesusing
    expdp attach =SYS_EXPORT_FULL_03
    But I cant figure out what the object : PUBLIC
    oracle/context/isearch/GetPage
    is..?
    Does this needs to be excluded from the export?if so, how?
    Can someone help how to fix the error now?
    Processing object type DATABASE_EXPORT/SCHEMA/SYNONYM
    ORA-39014: One or more workers have prematurely exited.
    ORA-39029: worker 1 with process name "DW01" prematurely terminated
    ORA-31672: Worker process DW01 died unexpectedly.
    Job "SYSTEM"."SYS_EXPORT_FULL_03" stopped due to fatal error at 11:29:32
    C:\Documents and Settings\ora2>expdp attach=SYS_EXPORT_FULL_03
    Export: Release 11.1.0.7.0 - Production on Tuesday, 01 May, 2012 11:35:38
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Username: system
    Password:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Job: SYS_EXPORT_FULL_03
      Owner: SYSTEM
      Operation: EXPORT
      Creator Privs: TRUE
      GUID: 8499C802F52A414A8BCACE552DDF6F11
      Start Time: Tuesday, 01 May, 2012 11:37:56
      Mode: FULL
      Instance: geooap
      Max Parallelism: 1
      EXPORT Job Parameters:
      Parameter Name      Parameter Value:
         CLIENT_COMMAND        system/******** parfile=h:\datapump\oapfull.par
      State: IDLING
      Bytes Processed: 0
      Current Parallelism: 1
      Job Error Count: 0
      Dump File: H:\datapump\oapfull.dmp
        bytes written: 4,096
    Worker 1 Status:
      Process Name: DW01
      State: UNDEFINED
      Object Schema: PUBLIC
      Object Name: oracle/context/isearch/GetPage
      Object Type: DATABASE_EXPORT/SCHEMA/PUBLIC_SYNONYM/SYNONYM
      Completed Objects: 766
      Total Objects: 766
      Worker Parallelism: 1

  • Separating number in inputext with comma

    hi all
    I need to separate numbers with comma without using Enter .
    I have an input text and used an clientListner on it : code is bellow
      <f:view>
        <af:document id="d1">  
         <af:resource type="javascript" source="/js/accounting.js"/>
         <af:resource type="javascript" source="/js/functions.js"/>
         <!--<af:resource type="javascript" source="/js/accounting.min.js"/>-->
          <af:form id="f1">
    <af:panelGroupLayout id="pgl1">
    <af:inputText label="Label 1" id="it1">
    <af:clientListener method="formatNum" type="keyUp"/>
    </af:inputText>
            </af:panelGroupLayout>
          </af:form>
        </af:document>
      </f:view>
    I run this JavaScript on HTML page that is OK and my input text show separated number during entering ,
    but I run my above jspx page ,it does not show until press the Enter key ...
    please guide me .... I have an emergency condition please answer me soon
    and then use this function for handling...
    function.js :
    function formatNum(evt) {
        var inputfield = evt.getSource();
        var num = accounting.unformat(inputfield.getValue());
        var formatNum = accounting.formatNumber(num);
        inputfield.setValue(formatNum);
        return true;
    accounting.js
    * accounting.js v0.3.2
    * Copyright 2011, Joss Crowcroft
    * Freely distributable under the MIT license.
    * Portions of accounting.js are inspired or borrowed from underscore.js
    * Full details and documentation:
    * http://josscrowcroft.github.com/accounting.js/
    (function(root, undefined) {
    /* --- Setup --- */
    // Create the local library object, to be exported or referenced globally later
    var lib = {};
    // Current version
    lib.version = '0.3.2';
    /* --- Exposed settings --- */
    // The library's settings configuration object. Contains default parameters for
    // currency and number formatting
    lib.settings = {
    currency: {
    symbol : "$", // default currency symbol is '$'
    format : "%s%v", // controls output: %s = symbol, %v = value (can be object, see docs)
    decimal : ".", // decimal point separator
    thousand : ",", // thousands separator
    precision : 2, // decimal places
    grouping : 3 // digit grouping (not implemented yet)
    number: {
    precision : 0, // default precision on numbers is 0
    grouping : 3, // digit grouping (not implemented yet)
    thousand : ",",
    decimal : "."
    /* --- Internal Helper Methods --- */
    // Store reference to possibly-available ECMAScript 5 methods for later
    var nativeMap = Array.prototype.map,
    nativeIsArray = Array.isArray,
    toString = Object.prototype.toString;
    * Tests whether supplied parameter is a string
    * from underscore.js
    function isString(obj) {
    return !!(obj === '' || (obj && obj.charCodeAt && obj.substr));
    * Tests whether supplied parameter is a string
    * from underscore.js, delegates to ECMA5's native Array.isArray
    function isArray(obj) {
    return nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';
    * Tests whether supplied parameter is a true object
    function isObject(obj) {
    return obj && toString.call(obj) === '[object Object]';
    * Extends an object with a defaults object, similar to underscore's _.defaults
    * Used for abstracting parameter handling from API methods
    function defaults(object, defs) {
    var key;
    object = object || {};
    defs = defs || {};
    // Iterate over object non-prototype properties:
    for (key in defs) {
    if (defs.hasOwnProperty(key)) {
    // Replace values with defaults only if undefined (allow empty/zero values):
    if (object[key] == null) object[key] = defs[key];
    return object;
    * Implementation of `Array.map()` for iteration loops
    * Returns a new Array as a result of calling `iterator` on each array value.
    * Defers to native Array.map if available
    function map(obj, iterator, context) {
    var results = [], i, j;
    if (!obj) return results;
    // Use native .map method if it exists:
    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
    // Fallback for native .map:
    for (i = 0, j = obj.length; i < j; i++ ) {
    results[i] = iterator.call(context, obj[i], i, obj);
    return results;
    * Check and normalise the value of precision (must be positive integer)
    function checkPrecision(val, base) {
    val = Math.round(Math.abs(val));
    return isNaN(val)? base : val;
    * Parses a format string or object and returns format obj for use in rendering
    * `format` is either a string with the default (positive) format, or object
    * containing `pos` (required), `neg` and `zero` values (or a function returning
    * either a string or object)
    * Either string or format.pos must contain "%v" (value) to be valid
    function checkCurrencyFormat(format) {
    var defaults = lib.settings.currency.format;
    // Allow function as format parameter (should return string or object):
    if ( typeof format === "function" ) format = format();
    // Format can be a string, in which case `value` ("%v") must be present:
    if ( isString( format ) && format.match("%v") ) {
    // Create and return positive, negative and zero formats:
    return {
    pos : format,
    neg : format.replace("-", "").replace("%v", "-%v"),
    zero : format
    // If no format, or object is missing valid positive value, use defaults:
    } else if ( !format || !format.pos || !format.pos.match("%v") ) {
    // If defaults is a string, casts it to an object for faster checking next time:
    return ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {
    pos : defaults,
    neg : defaults.replace("%v", "-%v"),
    zero : defaults
    // Otherwise, assume format was fine:
    return format;
    /* --- API Methods --- */
    * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value
    * alias: accounting.`parse(string)`
    * Decimal must be included in the regular expression to match floats (defaults to
    * accounting.settings.number.decimal), so if the number uses a non-standard decimal
    * separator, provide it as the second argument.
    * Also matches bracketed negatives (eg. "$ (1.99)" => -1.99)
    * Doesn't throw any errors (`NaN`s become 0) but this may change in future
    var unformat = lib.unformat = lib.parse = function(value, decimal) {
    // Recursively unformat arrays:
    if (isArray(value)) {
    return map(value, function(val) {
    return unformat(val, decimal);
    // Fails silently (need decent errors):
    value = value || 0;
    // Return the value as-is if it's already a number:
    if (typeof value === "number") return value;
    // Default decimal point comes from settings, but could be set to eg. "," in opts:
    decimal = decimal || lib.settings.number.decimal;
    // Build regex to strip out everything except digits, decimal point and minus sign:
    var regex = new RegExp("[^0-9-" + decimal + "]", ["g"]),
    unformatted = parseFloat(
    ("" + value)
    .replace(/\((.*)\)/, "-$1") // replace bracketed values with negatives
    .replace(regex, '')         // strip out any cruft
    .replace(decimal, '.')      // make sure decimal point is standard
    // This will fail silently which may cause trouble, let's wait and see:
    return !isNaN(unformatted) ? unformatted : 0;
    * Implementation of toFixed() that treats floats more like decimals
    * Fixes binary rounding issues (eg. (0.615).toFixed(2) === "0.61") that present
    * problems for accounting- and finance-related software.
    var toFixed = lib.toFixed = function(value, precision) {
    precision = checkPrecision(precision, lib.settings.number.precision);
    var power = Math.pow(10, precision);
    // Multiply up by precision, round accurately, then divide and use native toFixed():
    return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);
    * Format a number, with comma-separated thousands and custom precision/decimal places
    * Localise by overriding the precision and thousand / decimal separators
    * 2nd parameter `precision` can be an object matching `settings.number`
    var formatNumber = lib.formatNumber = function(number, precision, thousand, decimal) {
      // Resursively format arrays:
    if (isArray(number)) {
    return map(number, function(val) {
    return formatNumber(val, precision, thousand, decimal);
    // Clean up number:
    number = unformat(number);
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(precision) ? precision : {
    precision : precision,
    thousand : thousand,
    decimal : decimal
    lib.settings.number
    // Clean up precision
    usePrecision = checkPrecision(opts.precision),
    // Do some calc:
    negative = number < 0 ? "-" : "",
    base = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + "",
    mod = base.length > 3 ? base.length % 3 : 0;
    // Format the number:
    return negative + (mod ? base.substr(0, mod) + opts.thousand : "") + base.substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : "");
    * Format a number into currency
    * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)
    * defaults: (0, "$", 2, ",", ".", "%s%v")
    * Localise by overriding the symbol, precision, thousand / decimal separators and format
    * Second param can be an object matching `settings.currency` which is the easiest way.
    * To do: tidy up the parameters
    var formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {
    // Resursively format arrays:
    if (isArray(number)) {
    return map(number, function(val){
    return formatMoney(val, symbol, precision, thousand, decimal, format);
    // Clean up number:
    number = unformat(number);
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(symbol) ? symbol : {
    symbol : symbol,
    precision : precision,
    thousand : thousand,
    decimal : decimal,
    format : format
    lib.settings.currency
    // Check format (returns object with pos, neg and zero):
    formats = checkCurrencyFormat(opts.format),
    // Choose which format to use for this value:
    useFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;
    // Return with currency symbol added:
    return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));
    * Format a list of numbers into an accounting column, padding with whitespace
    * to line up currency symbols, thousand separators and decimals places
    * List should be an array of numbers
    * Second parameter can be an object containing keys that match the params
    * Returns array of accouting-formatted number strings of same length
    * NB: `white-space:pre` CSS rule is required on the list container to prevent
    * browsers from collapsing the whitespace in the output strings.
    lib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {
    if (!list) return [];
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(symbol) ? symbol : {
    symbol : symbol,
    precision : precision,
    thousand : thousand,
    decimal : decimal,
    format : format
    lib.settings.currency
    // Check format (returns object with pos, neg and zero), only need pos for now:
    formats = checkCurrencyFormat(opts.format),
    // Whether to pad at start of string or after currency symbol:
    padAfterSymbol = formats.pos.indexOf("%s") < formats.pos.indexOf("%v") ? true : false,
    // Store value for the length of the longest string in the column:
    maxLength = 0,
    // Format the list according to options, store the length of the longest string:
    formatted = map(list, function(val, i) {
    if (isArray(val)) {
    // Recursively format columns if list is a multi-dimensional array:
    return lib.formatColumn(val, opts);
    } else {
    // Clean up the value
    val = unformat(val);
    // Choose which format to use for this value (pos, neg or zero):
    var useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,
    // Format this value, push into formatted list and save the length:
    fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));
    if (fVal.length > maxLength) maxLength = fVal.length;
    return fVal;
    // Pad each number in the list and send back the column of numbers:
    return map(formatted, function(val, i) {
    // Only if this is a string (not a nested array, which would have already been padded):
    if (isString(val) && val.length < maxLength) {
    // Depending on symbol position, pad after symbol or at index 0:
    return padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(" "))) : (new Array(maxLength - val.length + 1).join(" ")) + val;
    return val;
    /* --- Module Definition --- */
    // Export accounting for CommonJS. If being loaded as an AMD module, define it as such.
    // Otherwise, just add `accounting` to the global object
    if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
    exports = module.exports = lib;
    exports.accounting = lib;
    } else if (typeof define === 'function' && define.amd) {
    // Return the library as an AMD module:
    define([], function() {
    return lib;
    } else {
    // Use accounting.noConflict to restore `accounting` back to its original value.
    // Returns a reference to the library's `accounting` object;
    // e.g. `var numbers = accounting.noConflict();`
    lib.noConflict = (function(oldAccounting) {
    return function() {
    // Reset the value of the root's `accounting` variable:
    root.accounting = oldAccounting;
    // Delete the noConflict method:
    lib.noConflict = undefined;
    // Return reference to the library to re-assign it:
    return lib;
    })(root.accounting);
    // Declare `fx` on the root (global/window) object:
    root['accounting'] = lib;
    // Root will be `window` in browser or `global` on the server:
    }(this));

    hi all
    I have an input text that I want to separate it's value with comma
    this is my input text :
    <af:inputText value="#{bindings.LacreditAmt.inputValue}"
    label="#{bindings.LacreditAmt.hints.label}"
    required="#{bindings.LacreditAmt.hints.mandatory}"
    columns="#{bindings.LacreditAmt.hints.displayWidth}"
    shortDesc="#{bindings.LacreditAmt.hints.tooltip}"
    id="it8"
    maximumLength="#{bindings.LacreditAmt.hints.precision}"
    converter="converter.BIGDECIMALMONEYCONVERTER"
    clientComponent="true">
    <f:validator binding="#{bindings.LacreditAmt.validator}"/>
    <!--<af:convertNumber groupingUsed="false"
    pattern="#{bindings.LacreditAmt.format}"/>-->
    <af:clientListener method="handleNumberFormatConversion" type="keyUp"/>
    </af:inputText>
    and use this  java Script for comma separated value :
    problem is : when I used firebug for testing this java Script ,everything is OK and 'result' variable shown
    the correct value (comma separated value) but in fact the correct value did not show
    in input text  !!!!!
    please guide me soon.
    I appreciated in advance
    function handleNumberFormatConversion(evt){
            var inputField = evt.getCurrentTarget();
            var keyPressed = evt.getKeyCode();
            var oldValue = inputField.getSubmittedValue();
            var validKeys = new Array(48,49,50,51,52,53,54,55, 56,57,96,97,98,99,100, 101,102,103,104,105,AdfKeyStroke.ARROWRIGHT_KEY, AdfKeyStroke.ARROWLEFT_KEY, AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.DELETE_KEY, AdfKeyStroke.END_KEY, AdfKeyStroke.ESC_KEY, AdfKeyStroke.TAB_KEY);
            var numberKeys = new Array(48,49,50,51,52,53,54,55, 56,57,96,97,98,99,100, 101,102,103,104,105, AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.DELETE_KEY);
            var isValidKey = false;
            for (var i=0; i < validKeys.length; ++i){
                if (validKeys[i] == keyPressed) {
                    isValidKey = true;
                    break;
            if(isValidKey){
                    var isNumberKey = false;
                for (var n=0; n < numberKeys.length; ++n){
                    if(numberKeys[n] == keyPressed){
                        isNumberKey = true;
                        break;
                if(isNumberKey){
                    var formatLength = 25;
                    if(formatLength == oldValue.length){
                        inputField.setValue(oldValue);
                        evt.cancel();
                    else {
                        var firstNeg = false;
                        var lastNeg = false;
                        if (oldValue.charAt(0) == '(')
                            firstNeg = true;
                        if(oldValue.contains(')')){
                          lastNeg = true;                              
                        oldValue = oldValue.replace('(', "");
                        oldValue = oldValue.replace(')', "");
                        var result = "";
                        while (oldValue.contains(",")) {
                            oldValue = oldValue.replace(",", "");
                        for (i = oldValue.length - 3;i > 0;i -= 3) {
                            result = ",".concat(oldValue.substring(i, i + 3), result);
                        result = oldValue.substring(0, (oldValue.length % 3 == 0) ? 3 : oldValue.length % 3).concat(result);
                        if (firstNeg)
                            result = '(' + result;
                        if (lastNeg) {
                            result = result + ')';
                        inputField.setValue(result);
                        evt.cancel();
                        return true;                   
            else {
                inputField.setValue(oldValue);
                evt.cancel();

  • OCIDescribeAny() to describe a package

    I tried to retrieve information about a package using
    OCIDescribeAny(). My problem is when there is only one procedure
    inside a package, my code doesn't work.If there are over two
    procedures inside a package,my code can retrieve some of
    proceures,then crashed. the following is part of code to
    retrieve the information.Can any one help me to solve this
    problem?
    static void describe_package()
         // package to be described
         text *objptr;
         ub4 objp_len;
         OCIParam* parmh;//parameter handle
         OCIParam* arglst;     //level 0 arguemnt list handle
         OCIParam* arglst1;     //level 1 arguemnt list handle     
         OCIParam* arglst2;//level 2 arguemnt list handle
         OCIParam* arglst3;//level 3 arguemnt list handle
         OCIParam* arg;//level 0 arguemnt handle     
         OCIParam* arg1;//level 1 arguemnt handle
         OCIParam* arg2;//level 2 arguemnt handle
         OCIParam* arg3;//level 3 arguemnt handle
         ub2 numargs, numargs1,numargs2, numargs3;
         ub4 namelen, namelen1, namelen2, namelen3;
         ub4 i, j, k, m;
         //ub2     arglst_type;
         text* name;
         text* name1;
         text* name2;
         text* name3;
         sword retval;
         objptr = pkgname;
         objp_len = strlen(objptr);
         //describe handle
         checkerr (errhp, OCIHandleAlloc((dvoid *) envhp, (dvoid
    **) &dschp,
    (ub4) OCI_HTYPE_DESCRIBE,
    (size_t) 0, (dvoid **) 0));
         if ((retval = (OCIDescribeAny(svchp, errhp, objptr,
    objp_len, OCI_OTYPE_NAME,0,
                                  OCI_PTYPE_PKG,
    dschp))) != OCI_SUCCESS)
              if (retval == OCI_NO_DATA)
              printf("NO DATA: OCIDescribeAny on %s\n",
    &objptr);
         else
    /* OCI_ERROR */
              printf( "ERROR: OCIDescribeAny on %s\n",
    &objptr);
              checkerr(errhp, retval);
              return;
         if (OCIAttrGet(dschp, OCI_HTYPE_DESCRIBE, &parmh, 0,
    OCI_ATTR_PARAM, errhp))
              return ;
         if (OCIAttrGet(parmh, OCI_DTYPE_PARAM, &arglst, 0,
    OCI_ATTR_LIST_SUBPROGRAMS, errhp))
              return ;
         //if (OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
    OCI_ATTR_NUM_PARAMS, errhp))
         //     return ;
         if (arglst)
              OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
    OCI_ATTR_NUM_PARAMS, errhp);
              for (i = 1; i <= numargs; i++)
                   OCIParamGet (arglst, OCI_DTYPE_PARAM,
    errhp, &arg, i);
                   OCIAttrGet (arg, OCI_DTYPE_PARAM, &name,
    &namelen, OCI_ATTR_NAME, errhp);
                   OCIAttrGet (arg, OCI_DTYPE_PARAM,
    &arglst1, 0, OCI_ATTR_LIST_ARGUMENTS, errhp);               
                   if (arglst1)
                        OCIAttrGet
    (arglst1,OCI_DTYPE_PARAM, &numargs1, 0, OCI_ATTR_NUM_PARAMS,
    errhp);
                        for (j = 1; j <= numargs1; j++)
                             OCIParamGet (arglst,
    OCI_DTYPE_PARAM, errhp, &arg1, j);
                             OCIAttrGet (arg1,
    OCI_DTYPE_PARAM, &name1, &namelen1, OCI_ATTR_NAME, errhp);
                             OCIAttrGet (arg1,
    OCI_DTYPE_PARAM, &arglst2, 0, OCI_ATTR_LIST_ARGUMENTS, errhp);
                             if (arglst2)
                                  OCIAttrGet
    (arglst2, OCI_DTYPE_PARAM, &numargs2, 0, OCI_ATTR_NUM_PARAMS,
    errhp);
                                  for (k = 1; k <=
    numargs2; k++)
         OCIParamGet (arglst2, OCI_DTYPE_PARAM, errhp, &arg2, k);
         OCIAttrGet (arg2, OCI_DTYPE_PARAM, &arglst3, 0,
    OCI_ATTR_LIST_ARGUMENTS, errhp);
         OCIAttrGet (arg1, OCI_DTYPE_PARAM, &name2, &namelen2,
    OCI_ATTR_NAME, errhp);
         //OCIAttrGet (name1, OCI_DTYPE_PARAM, &arglst_type, 0,
    OCI_ATTR_DATA_TYPE, errhp);                         
                                       if
    (arglst3)
         OCIAttrGet (arglst3, OCI_DTYPE_PARAM, &numargs3, 0,
    OCI_ATTR_NUM_PARAMS, errhp);
         for (m = 1; m <= numargs3; m++)
         OCIParamGet (arglst3, OCI_DTYPE_PARAM, errhp, &arg3, m);
         OCIAttrGet (arg3, OCI_DTYPE_PARAM, &name3, &namelen3,
    OCI_ATTR_NAME, errhp);
         }//end for m
                                       }//end
    arglst3
                                  }//end for k
                             }//end arglst2
                        } //end for j
                   }//end arglst1
              }//end for i
         }//end arglst
         //free the describe handle
         OCIHandleFree((dvoid *) dschp, (ub4) OCI_HTYPE_DESCRIBE);
    Thanks a lot.

    The arglist starts from 0th position for packages.
    Try for (i=0; i<=numargs-1;++i).

  • Solstice X.25 PAD programming

    Hello,
    I am trying to program a X.25 PAD application with triple X Support ( X.3 / X.28 / X.29 ). I am having problems implementing the triple X parameters...
    There are two header files ( xxx_control.h and xxx.h ) in the SUN-include directories with no comment or other information how to use them. The only reference is in a support-sample ( listen.c ) of an PAD listening-deamon :
    /* * PAD calls need X3/X.28/X.29 parameter handling, so push the *'triple X' module to map PAD parameters to termio ioctls */
    if (ioctl(devd, I_PUSH, "s_xxx") < 0) { perror("push(s_xxx)"); listen_failed = 1; return(-1); }
    Has anyone ever used these SUNLink libraries to provide support ??
    Are there any samples of an existing PAD with triple X support ??
    Thx a lot :-)

    Problem solved.
    License info in /etc/SUNWconn/x25/x25_9.1.lic,x had different port number from combined license file. After port number was changed, to match the port in the combined license file, Sunlink now finds a valid x.25 license!

Maybe you are looking for

  • Problems with windows 7 installation

    I installed my Windows 7 copy from retail disk (thanks to Lenovo's not-so-fast upgrade program) and I'm having the next problems: - Switchable graphics doesn't work, it shows both energy saving and high performance in power manager but even if I clic

  • Save keynote 09 file as 08 file. is this possible?

    I'm getting ready to present at a conference tomorrow morning using a file I created in keynote 09. the av guy's computer has keynote 08 installed. is there some way to save my file to work on his laptop? hoping to avoid using two computers. Roger

  • GROUP BY in SPRY DATASET

    Hi, how can I set a GROUP BY in my Spry-Dataset? I got lots of <city> tags that sometimes contain the same city. And I dont want them all to be shown in the list only 1 time. Thanks for help, Denis

  • Implementing generic data migrator

    Hi, I am planning to implement a data migrator in Java which migrate data from one DB to another. It's not going to dump tables as it is. Source will have some different structure and destination will have different structure. I want to fix destinati

  • BT Austerity measures on email accounts.

    Important changes to your BT email terms Hello, We're changing the terms and conditions for accessing the email that comes with your BT Broadband - BT Yahoo! Mail. From 17 June this year, you'll need to log in to your email account at least once ever