Smartforms - difference in auto-generated FM name in different systems

Hi,
The situation is:
I have created a smartform in our Dev application server and tested it to achieve the view I needed. The Dev system generates FM with automatic name /1BCDWB/SF00000005. I have successfuly transported it to our test system and checked with data. After some short time I found an error in smartform and made a fix in a Dev. system. When trying to test it I found that the system modifies the FM name to /1BCDWB/SF00000006. This leads to modification in my source code, from where I call this FM with actual parameters (not test).
The problem occures when I transported both the smartform and report from where I call it to the test system again. I obtained a shortdump with message like:
'...FM /1BCDWB/SF00000006 does not exist...'
After short investigation I have found, that in our Test system this smartform still generates *** and corresponds to *** the FM with name /1BCDWB/SF00000005.
Next, I'm unable to transport FuGr /1BCDWB/SF00000006 from Dev. to Test because it does not have Dev.Class assosiated and asks for Licence Key (furthermore, I'm not sure this should be done in this way).
Now in our Dev system FM named /1BCDWB/SF00000005 corresponds to another smartform (made by me more than year ago).
And, what is pitty, If I try to release a transport with report which calls FM named /1BCDWB/SF00000005 from Dev, I have about 17 extended program errors (during extended program check) saying that 'there is no such FM'...
For me this is missing of some consistency. What should I do to get consistency between our systems back? (means to have corresponding smartform relation to the same FM name in all the systems)
Any help whould be highly appreciated.
Many thanks in advance.
Regards,
Ivaylo Mutafchiev
SAP BC Consumtant

Hi Ivaylo
Smartforms Name are system dependant !
They are dynamically generated.
You have to use :
data : function_name type rs38l_fnam.
  call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname           = 'ZFORM_NAME' "Smartform name
      direct_call        = 'X'
    importing
      fm_name            = function_name
    exceptions
      no_form            = 1
      no_function_module = 2
      others             = 3.
  if sy-subrc <> 0.
  erreur.
  endif.
and then, you call your smartform with :
call function function_name
      exporting
  ARCHIVE_INDEX              =
  ARCHIVE_INDEX_TAB          =
  ARCHIVE_PARAMETERS         =
      control_parameters         = st_ssfctrlop
  MAIL_APPL_OBJ              =
  MAIL_RECIPIENT             =
  MAIL_SENDER                =
      output_options             = st_ssfcompop
      user_settings              = ' '
Good luck,
Regards,
Erwan.
Message was edited by: Erwan LE BRUN

Similar Messages

  • Smartforms have different FM,Program Name in different system

    Hi,
    I have created few Smartforms in our DEV system & imported to QAS & PRD.
    Here I found the Smartform - Function Module, Programs names are different in each system.
    Smartform: Z_SD_INV_LETTER_V3
    Sys                     Function Module
    DEV                       /1BCDWB/SF00000006
    QAS                       /1BCDWB/SF00000002
    PRD                       /1BCDWB/SF00000002
    On import the changes are reflected correctly in the corresponding Function Module & programs
    in each system.
    1. I want to know why there is a change in version of the Function Module/Program in each system.
    2. How are the changes been applied on importing to each system as the version differs.
    Regards
    Vincent

    Hi Guys,
    Thanks for your answers...
    From my investigation found that few tests smartforms was created in DEV system, which was the cause of the problem. My Smartform present versions across the landscape looks as follows:
    Smartform: Z_SD_INV_LETTER_V3
    Sys     Function Module
    DEV    /1BCDWB/SF00000006
    QAS   /1BCDWB/SF00000002
    PRD    /1BCDWB/SF00000002
    In order to maintain all the function module name to be the same across the landscape, is there anything that can be done
    in DEV as follows:
    Smartform: Z_SD_INV_LETTER_V3
    Sys     Function Module
    DEV    /1BCDWB/SF00000002
    QAS   /1BCDWB/SF00000002
    PRD    /1BCDWB/SF00000002
    Like something I could reset the internal number range for the smartforms & load the smartform again and activate or so...?. Please let me know...
    Regards
    Vincent

  • Auto generate login name basis on user first initial and last name... LC designer

    First initial + last name= login name...
    Text field   + text field  = text field....
    can I use javascript to generate the loginname form first name (first Int) and last name???
    For ex... First name: John
                 middle int: k
                 last Name: Doe
                LoginName: jdoe
    var LoginName = getField("LastName").value;
             var FirstName = getField("FirstName").value;
             if (FirstName!="")
             LoginName += " " + FirstName.substring(0,1) + "."
             event.value = LoginName;
    not sure if this is right... please help

    You guys are both using Acrobat JS notation so you're not going to have much luck.
    In LC there's no getField or event.value and values are returned from fields using fieldName.rawValue (or .formattedValue).
    I put this on the Calculate event of the LoginName field:
    var vFirstName = FirstName.rawValue;
    var vLastName = LastName.rawValue;
    if (!(FirstName.isNull || LastName.isNull)) { // if both fields have data
    this.rawValue = vFirstName.substring(0,1) + vLastName;

  • Auto generated types and ps1xml formatting files

    Hello,
    I'm using New-WebServiceProxy to work with a web service... when I call methods of the web service powershell auto generates types, for example, things like "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_webservices_awebservicepage_asmx.TheMethodReturnObjectType"
    1. should I just use that type name in my ps1xml formatting file? I'm wondering if that will be fragile... seems fragile like 'webServiceProxy1' for example, what if there is some scenario it uses '2'? Not sure if I can count on that being consistent?
    2. I started creating custom objects and adding my own type name to them so that type name could be used in the ps1xml file. This works fine. However so far it was for web service methods that returned single instance results.. now I hit a point where I'm
    calling a web service method that will return a collection... so I'm wondering if it would be better to just use the auto generated type name  in the ps1xml or, as I would need to do in this case, actually enter a foreach loop to create a new custom object
    for every object in the returned collection? In other words, for the web service methods I've used so far for this, I simply created my custom object and write-output... for the case of the collection, I would be new-object'ing and write-output'ing within
    that foreach loop.. wondering about performance issues, or if it's just overkill when I could just put that auto generated type name in the ps1xml file and be done with it... 
    not sure if I've asked that very clearly...
    essentially, I'm wondering if it's overkill (from a resource usage perspective) to be creating these custom objects in the case of when there will be a collection, with potentially hundreds of items, when the only reason I'm doing it is for display purposes...
    if it were not an autogenerated type I would simply use the type name in the ps1xml, I'm just not sure if I can do that in this case as I don't know if that typename will *always* be the same?
    any input would be appreciated, thanks

    Hi DJC,
    I haven't rexperienced this, however, to create a .ps1xml file, these examples may be helpful for you:
    Creating a module for powershell with a format file
    discutils / utils / DiscUtils.PowerShell / DiscUtils.Format.ps1xml
    about_Format.ps1xml
    I hope this helps.

  • Filespaces in generated file names - unfortunate

    I'm trying to upload all the files generated by an export to directory. Many of the auto-generated file names use the name of a page (which is displayed in the navigation - so i don't want to remove the spaces).
    This creates files with blanks in the name, and most FTP implementations will choke on this.
    #1 - this should be fixed
    #2 - does anyone have a workaround for managing this?

    Spaces are not valid in web pages. If used, they have to be escaped with %20
    If you want to change the names of files before trying to use them with some web publishing program, this shell script might be of use. It changes spaces to _ makes upper case letters lower case, etc.
    #!/bin/bash
    # Pete keeps giving me photos with bad file names
    for i in *
    do
    OLDNAME="$i"
    NEWNAME=`echo "$i" | tr ' ' '_' | tr A-Z a-z | sed s/-/-/g`
    if [ "$NEWNAME" != "$OLDNAME" ]
    then
    TMPNAME="$i"_TMP
    echo ""
    mv -v -- "$OLDNAME" "$TMPNAME"
    mv -v -- "$TMPNAME" "$NEWNAME"
    fi
    done

  • Different approvers for 2 roles of the same name in 2 different systems

    Hi experts,
    in our SAP landscape we have roles of the same name in different systems. I couldn't find any possibility to select different approvers for these two roles in GRC 5.3 SP08.
    For example role XYZ exists in system P1 and P2. In P1 I want to select only person A as role approver, in system P2 only person B.
    Is there any chance to select an approver for a combination role and system?
    Thanks,
    Manuel

    Hi Manuel,
    Yes. You can create a custom approver determinator. Go to CUP>>Configuration>>Workflow>>Custom approver determinators. Chose create new.
    CAD type: Attribute
    Workflow type: Access Enforcer
    Select your attributes and save.
    Go back. Select your new approver determinator in change mode.
    Click on the Approve button.
    Create logic between the attributes and approvers.
    Modify your role approval stage. Select your new custom approver determinator.
    Regards,
    Vit

  • How to change Auto-generated web service's URL

    Hi,
    is it possible to change/edit the auto-generated url of a web services created with the wizard in SE80 transaction?
    Example:
    Now the wizard generates a URL as following:
    http://<host name>:8080/sap/bc/srt/wsdl/bndg_4BC67655E5155680E10000000A7B0410/wsdl11/allinone/standard/document?sap-client=001
    where the alfa-numeric code 4BC67655E5155680E10000000A7B0410 changes every time I create the service. at the same time and for the reason above, I have to change the LOGICAL DESTINATION with "visual administrator" application to consume the service in SAP Netweaver environment.
    Thanks in advance.
    Luca

    Hi Luca,
    Please refer the below link . it is described that URLs and its Namespaces  . Please check whether its useful.
    [http://help.sap.com/saphelp_nw70/helpdata/EN/8c/780741375cf16fe10000000a1550b0/frameset.htm] .

  • Numbers-Auto Generating a numbered list in a column of cells

    Having trouble creating an auto-generating numbered list in a single column. In text inspector I choose bullets>numbers>start at 1. The first cell is filled in with a "1", but when I hit return or down arrow the 1 disappears. If I go back and type a "1" again, two "1's" appear in the same cell. I'm trying to make a table with 250 rows. Not sure what I'm missing, as I'm new to iWork.

    Numbers can fill a column or row of cells with a pattern. Type the first two numbers in the first two cells, select both cells, then click on the small circle at the lower right of the second cells & drag down to fill however many cells you want. You can see in this picture that it works for other patterns, not just consecutive numbers. I've also used it to fill across month names or dates.

  • HOW TO GET AUTO GENERATED PRIMARY ID KEY BACK FROM AN INSERT STATEMENT IN .

    Just recently I ran into a problem with what seems to be a deficiency in the Oracle Database. When trying to return an auto-generated key as is done in Microsoft's SQL database, it seems Oracle for whatever reason didn't add this capability, the key couldn't be passed back to the .Net call. After tinkering with the .Net software and talking with the Oracle techs, a decent work around to the problem (presented here) comes fairly close. Two things have to be done first before this will work. A sequence has to be created on the Oracle DB. Also a trigger has to be created against the table the keys are going to be returned from.
    The class works by passing to the function 'update_datasets_return' a DataSet with as many tables as you want. The function spins through the tables and put the keys in each row inserted. It's assumed the first row will either be the primary key or some numeric value. This can be changed by modifying the: dt.Columns(0).ColumnName
    Notice the word Inserted. On Updates and Deletes the key value is ignored because it's already present. The routine just updates the database as usual.
    So in other words you could send a table to the function with rows inserted, deleted, or updated and it will take care of them all. One routine for all.
    ' ======================================================================
    ' Created by SEF and Oracle SR: 5607364.993 This is a complete Redo
    ' of the initial concept. SEF...
    ' Sample of sequence and trigger at bottom.
    ' Uses the ODP.NET data provider.
    ' update_datasets_return: Goes thru each table in the dataset and
    ' updates, deletes, or inserts as needed.
    ' If inserting, a 'sequence counter' and a 'trigger'
    ' using the 'before insert' must be present. The sequence
    ' counter is set to auto increment by 1 starting at 1.
    ' The trigger is specific to the table.
    ' Create the trigger and sequence in the database or run the samples
    ' below in PL/SQL. Be sure the logon with a user that has enough rights.
    ' Routine assumes the first column is going to hold the sequence
    ' number. Actually any column could be used. Just change the
    ' dt.Columns(0).ColumnName to whatever you want or leave as default.
    ' The da_RowUpdated sub is where the 'sequence number' gets returned
    ' on each row that is inserted into a table. Routine is ignored on
    ' deletes and updates. SEF...
    ' =======================================================================
    Imports System
    Imports System.Data
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class OracleUpdate
    Private Shared m_conn As OracleConnection
    Private Shared da As New OracleDataAdapter
    Private Shared dt As DataTable
    Private Shared conn As New OracleConnection
    Private Shared dr As DataRow
    Private Shared astep As Long
    Private Shared rwIndex As Integer = 0
    Private Shared tblIndex As Integer = 0
    Public Shared Function update_datasets_return(ByVal constr As String, ByVal ds As DataSet) As DataSet ''ByRef ds As DataSet)
    Dim selectstmt As String
    m_conn = New OracleConnection(constr)
    Try
    m_conn.Open()
    Catch ex As Exception
    Throw New ArgumentException(" Error: connection lost." & ex.Message)
    End Try
    For Each dt In ds.Tables
    ''Uncomment the code only if auto numbering
    ''is NOT turned on for the table being updated. SEF...
    ''rwIndex = 0
    ''For Each dr In dt.Rows
    '' Try
    '' Select Case dr.RowState
    '' Case DataRowState.Added
    '' astep += 1
    '' ' =======================================================
    '' ' This "Try Catch" section created only if auto numbering
    '' ' is NOT turned on for the table being updated. SEF...
    '' ' It's a crude attempt at creating a unique number.
    '' ' A more serious approach would be to use a GUID.
    '' ' Use only if you decide not to have a sequence and a
    '' ' trigger for the table.
    '' ' =======================================================
    '' Try
    '' 'ds.Tables(tblIndex).Rows(rwIndex).Item(0) = astep
    '' Catch
    '' ' ignore the error corrected integer identity so don't randomize it
    '' End Try
    '' dr.Item("createdDate") = Now
    '' dr.Item("changedDate") = Now
    '' Case DataRowState.Modified
    '' dr.Item("changedDate") = Now
    '' End Select
    '' Catch ex As Exception
    '' conn.Close()
    '' conn.Dispose()
    '' Throw New ArgumentException(" Error: update_datasets " & ex.Message)
    '' End Try
    '' rwIndex += 1
    ''Next
    selectstmt = "SELECT * From " & dt.TableName & " Where " & dt.Columns(0).ColumnName & " = " & 0
    da = New OracleDataAdapter(selectstmt, m_conn)
    Dim bldr As OracleCommandBuilder = New OracleCommandBuilder(da)
    AddHandler da.RowUpdated, New Oracle.DataAccess.Client.OracleRowUpdatedEventHandler(AddressOf da_RowUpdated)
    Dim insCmd As OracleCommand = Nothing
    Try
    insCmd = CType(bldr.GetInsertCommand(), OracleCommand)
    Catch ex As Exception
    Throw New Exception("")
    End Try
    insCmd.CommandText += " returning " + dt.Columns(0).ColumnName + " into :seqno"
    insCmd.Parameters.Add(New OracleParameter("seqno", OracleDbType.Int16, _
    4, ParameterDirection.Output, False, CType(0, System.Byte), CType(0, _
    System.Byte), dt.Columns(0).ColumnName, DataRowVersion.Current, Nothing))
    da.InsertCommand = insCmd
    Try
    ' ===========================
    da.Update(ds, dt.TableName)
    ' ===========================
    Catch ex As Exception
    Throw New ArgumentException(" Error: update_datasets_return " & ex.Message)
    End Try
    Next
    m_conn.Close()
    m_conn.Dispose()
    Return ds
    End Function
    Friend Shared Sub da_RowUpdated(ByVal sender As Object, ByVal e As OracleRowUpdatedEventArgs)
    If e.StatementType = StatementType.Insert Then
    e.Row(0) = Int64.Parse(e.Command.Parameters("seqno").Value.ToString())
    End If
    End Sub
    ' ================================================================================
    ' Notes:
    ' =================== How To -- Sample section for PL/SQL ==================================
    ' myTrigger, myTable, mySequence, and myColumn are values you need to supply.
    ' Note: A trigger needs to be created for each table.
    ' A sequence needs to be created only once and referenced each time
    ' in the trigger(s). Or you could create a new sequence each time you
    ' create a trigger. Sort of a waste of effort.
    ' Explanation:
    ' myTrigger = The name you are giving this trigger.
    ' If a trigger with same name already
    ' exist, it will be overwritten.
    ' myTable = Table you want to add the sequence numbers to.
    ' mySequence = Sequence counter you created. Whatever name you called it.
    ' myColumn = The column to update with the sequence number.
    ' =================================================================================
    ' -- Run in PL/SQL or create at DB. --
    ' create or replace trigger myTrigger
    ' before insert on myTable for each row
    ' begin
    ' select mySequence.nextval into :new.myColumn from dual ;
    ' end;
    ' -- Run in PL/SQL or create at DB. --
    ' create sequence mySequence
    ' MINVALUE 1
    ' START WITH 1
    ' INCREMENT BY 1
    ' NOCACHE; can be set to CACHE but sequence may contain gaps.
    ' Explanation of CACHE from: http://www.techonthenet.com/oracle/sequences.php
    ' With respect to a sequence, the CACHE option specifies how many sequence
    ' values will be stored in memory for faster access. The downside of creating
    ' a sequence with a CACHE is that if a system failure occurs, all cached
    ' sequence values that have not be used, will be "lost". This results in
    ' a "gap" in the assigned sequence values. When the system comes back up,
    ' Oracle will CACHE new numbers from where it left off in the sequence,
    ' ignoring the so called "lost" sequence values.
    ' Note: To recover the lost sequence values, you can always execute an
    ' ALTER SEQUENCE command to reset the counter to the correct value.
    ' NOCACHE means that none of the sequence values are stored in memory.
    ' This option may sacrifice some performance, however, you should not encounter
    ' a gap in the assigned sequence values.
    End Class
    C#:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class OracleUpdater2
    private static OracleConnection m_conn;
    private static OracleDataAdapter da = new OracleDataAdapter();
    private static OracleConnection conn = new OracleConnection();
    public static DataTable load_it(string constr, string strqry, string tblName)
    // =====================================================================
    // constr = User Id=myUser;Password=myPass";Data Source=myDataSource
    // strqry = Select * from something?
    // tblName = The table name to fill.
    // =====================================================================
    conn = new OracleConnection(constr);
    conn.Open();
    da = new OracleDataAdapter(strqry, conn);
    OracleCommandBuilder bldr = new OracleCommandBuilder(da);
    DataTable dt = new DataTable(tblName);
    da.Fill(dt);
    conn.Dispose();
    return dt;
    public static DataSet update_datasets_return(string constr, DataSet ds)
    //'ByRef ds As DataSet)
    string selectstmt = null;
    m_conn = new OracleConnection(constr);
    try
    m_conn.Open();
    catch (Exception ex)
    throw new ArgumentException(" Error: connection lost." + ex.Message);
    foreach (DataTable dt in ds.Tables)
    selectstmt = "SELECT * From " + dt.TableName + " Where " +
    dt.Columns[0].ColumnName + " = " + 0;
    da = new OracleDataAdapter(selectstmt, m_conn);
    OracleCommandBuilder bldr = new OracleCommandBuilder(da);
    da.RowUpdated += new
    Oracle.DataAccess.Client.OracleRowUpdatedEventHandler(da_RowUpdated);
    OracleCommand insCmd = null;
    try
    insCmd = (OracleCommand)(bldr.GetInsertCommand());
    catch (Exception ex)
    throw new Exception("" + ex.Message);
    insCmd.CommandText += " returning " + dt.Columns[0].ColumnName + " into
    :seqno";
    insCmd.Parameters.Add(new OracleParameter("seqno", OracleDbType.Int16, 4,
    ParameterDirection.Output, false, System.Convert.ToByte(0),
    System.Convert.ToByte(0), dt.Columns[0].ColumnName, DataRowVersion.Current,
    null));
    da.InsertCommand = insCmd;
    try
    // ===========================
    da.Update(ds, dt.TableName);
    // ===========================
    catch (Exception ex)
    throw new ArgumentException(" Error: update_datasets_return " +
    ex.Message);
    m_conn.Close();
    m_conn.Dispose();
    return ds;
    If you need a working program of how this works, let me know.

    Oh my god, it is too long! You definitely check out types, casting and especially ODP.Net (it does everything for you)... etc. They can help you to simplify your code. I do not have enough time to copy paste it to Studio and understand and solve your issue, so I got title of your message as your main question.
    In Oracle, you can create an autonumber field by using sequences object. This is really useful when you need to create a unique number to act as a primary key.
    Basically you can create a sequence simply typing;
    CREATE SEQUENCE MY_SEQUENCE;
    now you have a sequence called "MY_SEQUENCE"... Then, I advice you select a number from sequence;
    select MY_SEQUENCE.nextval from dual;
    I said I advice actually kinda must, although it called sequence, I cannot be sequential. Do not even try to predict the value. You can be sure that it is unique number so you can use it.
    Then insert you record and use that number part of your primary key. I think that's it. Have fun.

  • How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B

    Hi Friends,
    How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    External Trading Partner is sending the EDI 856 via AS2 URL to our Oracle B2B Server.
    In the inbound 856 agreement, we have checked the option of Funtional Ack and also Functiona Ack handled by B2B is yes.
    We have the outbound agreement which is sending that Functional ack 997 (auto generated by oracle b2b) and we have specified the Outbound AS2 channel of the Partner.
    997 doc is being sent to external partner using AS2 channel, but the filename is generating as '40101'.
    Please can you let me know how to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    Appreciate your valuable answers!!
    Thanks,
    Amirineni

    Amirineni,
    AFAIK, there is no option to set the file name when the 997 is generated automatically by B2B.
    Alternatively, if this is a must requirement, you can generate the FA from backend and  send to B2B with MSG_TYPE =9. In this case, you can set the header with filename (How to set the actionname property in B2B 11g)

  • How to auto-generate a "empno" field at run time in oracle forms 6i

    Hello!
    I have connected to a SCOTT schema. And i am using emp table. At run time mode when i press F8 then the data is displayed in the fields.
    My task is to generate auto "empno" as soon as i run the form. Kindly do the needful.
    Thanks in advance

    Hi Francios,
    I think with your solution our user only able to see the current information in the form.I donot think it will auto generate the empno.
    Dear user,
    I suggest what you can do is to create one sequence in your database and use it to generate automatic
    empno.
    In post query trigger try to implement the idea.
    Suppose in the name of the sequence is empno_seq.
    if emp.empno is null then
    :emp.empno := empno_seq+1;
    end if;
    Try i hope it will work
    Regards
    Rajat

  • How to strip out leading numbers in auto-generated bookmarks?

    For years now my team has used an Acrobat plug-in called Compose, which lets us strip out the leading numbers from bookmarks in PDFs generated from FrameMaker 7.2. (The tool works after the fact, so that all bookmark creation occurs after the PDF is created.)
    For example, these document headings:
    1.1 Intro to Happy Fun Ball
    1.1.1. System Requirements
    1.1.2. Cautionary Information (WARNING)
    are translated to the bookmarks:
    Intro to Happy Fun Ball
    System Requirements
    Cautionary Information (WARNING)
    After evaluating the new Adobe Tech Comm Suite, it seems that Acrobat 9 Extended Pro isn't compatible with the Compose plug-in (or at least, the version we've been using for years).
    Does anyone know if there's a method -- built into either FrameMaker 8 or Acrobat 9 Pro Extended, or in an SDK -- that allows you to auto-generate bookmarks but strip out leading numbers? It seems this is a no-brainer of a feature, yet I can't find it listed anywhere in the Acrobat documentation.
    Other names for this feature might be "wild card" or "text masking," not to mention "strip leading numbers."
    Thanks very much for your help.
    Regards,
    Buster

    The following code can be run from the JavaScript console, but since you're new to this, it might be easier to create a button, paste the code shown below into the Mouse Up event of the button, select the Hand tool and click the button to execute the code, and then delete the button if everything is OK.
    If you need to do this a lot, you should consider setting up a custom menu item or toolbar button that executes this code:
    function removeBookmarkPrefix(bookmark) {
        // Resursive function to remove bookmark prefix
        // Rename bookmark without prefix
        bookmark.name = bookmark.name.replace(/^\S+\s+/, "");
        if (bookmark.children != null) {
            for (var i = 0; i < bookmark.children.length; i++) {
                removeBookmarkPrefix(bookmark.children[i]);
    // Remove all bookmark prefixes, recursively
    removeBookmarkPrefix(bookmarkRoot);
    The code uses what's called a regular expression, which in this case is fairly simple: /^\S+\s+/
    This regular expression means to search the bookmark name for the beginning of the string (^), followed by one or more non-whitespace characters (\S+), followed by one or more white space characters (\s+), and replace all that with an empty string (""), thus removing it. This should work with the bookmark name prefixes you describe.
    The function is called recursively, which is an efficient way to handle the hierarchical structure that the bookmark tree can have.
    If you get stuck, post again.
    George

  • Adobe 7, and opening a pdf file with a auto generated report

    We have upgraded to the latest version of a tool we use to generate reports. The older version, when you exported the report to a PDF file, it would open it in an internet broswer, IE 6/7 in this case, and just display the PDF in the browser.
    With the latest version of the reporting tool, when you export a report to a PDF file, it opens up a blank IE windows, and subsequently opens the autogenerated report in a separate Adobe Reader window, but it does not have the primary focus. It pop's under the blank IE window. This causes a lot of confusion to our employees who are not computer savvy as they are not aware the PDF actually opened since the window did not get primary focus on the screen.
    The company which writes the tool for us says there are no changes to the way it auto generates the pdf file, and insists it has nothing to do with their software.
    We decided to dig a little deeper and only found one difference between the old and the new software.
    Old - Content-Type: application/pdf
    New - Content-Type: application/pdf;charset=UTF-8
    Would that command cause our problems? It almost seems at though Adobe 7 plugin in IE7 doesn't recognize the "charset=UTF-8" and dumps the pdf to the full Adobe reader.
    If anybody has any insight, or would need some more info to help solve the problem just let me know.
    Also, we have to stay with Adobe 7, since all 7000+ computer's this affects have identical images, and upgrading to a new version costs $$$$ and has to go through massive channels.

    Welcome To  Discussions Kathy216!
    If these are files, that are already on the Hard Drive, click once on a pdf document to highlight it.
    Press the Command + I keys, to Get Info.
    Click on the ▼ Disclosure Triangle for Open with:.
    Select Adobe if listed. If it is not listed, select Other..., and navigate to Adobe, and press Add.
    In the Get Info window, click on Change All.
    If these are pdf documents, that you are viewing on the Internet, a handy utility to use is PDF Browser Plugin.
    ali b

  • How to get auto generated column in spring jdbc

    Hi guys ,
    I am using springJDBC and sybase db.
    I think what i am facing is a standard problem but whatever support i am getting from google is not working.
    My problem is :
    "While inserting values in database one colum is autogenerated .....how do i get the value of that column??"
    FYI,
    I have tried using the following code :
    "final String INSERT_SQL = "insert into my_test (name) values(?)";
    final String name = "Rob";
    KeyHolder keyHolder = new GeneratedKeyHolder();
    jdbcTemplate.update(
    new PreparedStatementCreator() {
    public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
    PreparedStatement ps =
    connection.prepareStatement(INSERT_SQL, new String[] {"id"});
    ps.setString(1, name);
    return ps;
    keyHolder);
    // keyHolder.getKey() now contains the generated key"
    but i am getting this error : "java.lang.AbstractMethodError: com.sybase.jdbc2.jdbc.SybConnection.prepareStatement(Ljava/lang/String;I)Ljava/sql/PreparedStatement"
    I think this code works well with Oracle but not with sybase .........does anyone know the solution of this problem .......and by "this problem" i mean how to retrieve auto generate value in spring jdbc ...........without using SimpleJdbcInsert class

    Looking at the previous post it doesn't look like a Spring issue.
    You are using a JDBC driver which does not support getting generated keys so you have 2 choices:
    - Use a different driver that supports generated keys
    - Get the generated key by issuing some vendor specific SQL e.g. 'select @@identity' for SQL server

  • SQL Dev Data Modeller:  Auto-generate Surrogate PKs in the Physical Model ?

    How can I have the logical modeller allow the user to design with logical PKs, but then have surrogate primary keys be auto-generated off sequences by the modeller when it comes to create the physical model - as in conventional application design?
    Without this facility, this tool is useless, IMO.
    I want:
    i). sequences to become the physical PKs by default, and that what were the logical PKs in the logical model, to become a unique key in the physical model.
    ii). I want this set by default when generating the physical model....
    iii). ....with an option to turn this off on a entity-by-entity basis (as not all tables will necessarily require such a surrogate PK; so the logical PK may remain the physical PK).

    It is common practice that physical PKs in Oracle tables are defined from sequences (surrogate PKs), and that the logical PK from the entity becomes a unique key in the table.
    This may not always be the case in every application out there, and some people may disagree, but it is nonetheless a needed feature.
    My new Feature Request is therefore:
    I would like to see the following additions to the product.
    1. In the Preferences -> Data Modeler -> Model -> Logical, a flag that by default indicates whether the designer wishes to opt to enable this feature (ie; have all logical PKs converted to unique keys, and replaced by sequence nos. in the physical model). This flags needs to be there since in real life, albeit erroneously IMO, some people will choose not to opt to use this functionality.
    2. On every entity created in the model, there needs to be a flag that allows to override this default option, as not every table will require a surrogate PK to be generated. Being able to (re)set a flag located on the entity properties (perhaps under 'Engineer To'), will accomplish this.
    3. When Forward Engineering to the physical model from the logical, the following should happen.
    ENTITY  1 ---------->TABLE 1
    ---------------------> P * Surrogate PK
    * Attribute 1 -----> U * Column 1
    * Attribute 2 -----> U * Column 2
    o Attribute 3 ----------> Column 3
    Here you can see,
    - Attributes 1 & 2 (the logical PK) of the entity become a unique key in the table (columns 1 & 2),
    - optional Attribute 3 becomes NULLable column 3,
    - and a physical surrogate PK column is added (type unbounded INTEGER, PRIMARY KEY constraint added).
    From entity DEPT as:   (Examples based on SCOTT schema)
    DEPTNO NUMBER(2) NOT NULL <-- Logical primary key on entity
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    CREATE TABLE DEPT
    (PK_DEPT INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    DEPTNO NUMBER(2) NOT NULL, -- Former logical PK becomes a UK
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13))
    ALTER TABLE DEPT
    ADD CONSTRAINT PK_DEPT PRIMARY KEY (PK_DEPT) USING INDEX PCTFREE 0
    ALTER TABLE DEPT
    ADD CONSTRAINT UKLPK_DEPTNO UNIQUE (DEPTNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_DEPT_SEQ
    CREATE TRIGGER PK_DEPT_SEQ_TRG
    BEFORE INSERT ON DEPT
    FOR EACH ROW
    WHEN (new.PK_DEPT IS NULL)
    BEGIN
    SELECT PK_DEPT_SEQ.NEXTVAL
    INTO :new.PK_DEPT
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_DEPT := PK_DEPT_SEQ.NEXTVAL;
    END;
    From entity EMP as:
    EMPNO NUMBER(4) NOT NULL -- Logical primary key on entity
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    CREATE TABLE EMP
    (PK_EMP INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    FK_DEPT INTEGER, -- New FK to surrogate PK in DEPT table (maybe NOT NULL depending on relationship with parent)
    EMPNO NUMBER(4) NOT NULL, -- Former logical PK becomes a UK
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4),
    HIREDATE DATE,
    SAL NUMBER(7,2),
    COMM NUMBER(7,2),
    DEPTNO NUMBER(2))
    ALTER TABLE EMP
    ADD CONSTRAINT PK_EMP PRIMARY KEY (PK_EMP) USING INDEX PCTFREE 0
    ALTER TABLE EMP
    ADD CONSTRAINT FK_DEPT FOREIGN KEY (FK_DEPT) REFERENCES DEPT (PK_DEPT)
    ALTER TABLE EMP
    ADD CONSTRAINT UKLPK_EMPNO UNIQUE (EMPNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_EMP_SEQ
    CREATE TRIGGER PK_EMP_SEQ_TRG
    BEFORE INSERT ON EMP
    FOR EACH ROW
    WHEN (new.PK_EMP IS NULL)
    BEGIN
    SELECT PK_EMP_SEQ.NEXTVAL
    INTO :new.PK_EMP
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_EMP := PK_EMP_SEQ.NEXTVAL;
    END;
    [NOTE:   I use PCTFREE 0 to define the index attributes for the primary & unique keys since the assumption is that they will in general not get updated, thereby allowing for the denser packing of entries in the indexes and the (albeit minor) advantages that go with it.
    This is certainly always true of a sequence-driven primary key (as it is by its very nature immutable), but if the unique key is likely to be frequently updated, then this PCTFREE option could be user-configurable on a per table basis (perhaps under Table Properties -> unique Constraints).
    For non-sequence-driven primary keys, this storage option could also appear under Table Properties -> Primary Key.
    I notice no storage options exist in general for objects, so you may like to consider adding this functionality overall].
    Associated Issues :
    - Preferences, 'Naming Standard: Templates' should be updated to allow for the unique key/constraint to be called something different, thus highlighting that it comes from the logical PK. I've used 'UKLPK' in this example.
    - Mark the physical PK as being generated from a sequence; perhaps a flag under Table Properties -> Primary Key.
    - When Forward Engineering, if an entity exists without a logical PK, the forward engineering process should halt with a fatal error.
    !!! MODERATOR PLEASE DELETE ME !!!

Maybe you are looking for

  • Blanket Po

    Hi All,    I created Blanket PO, for service material ( With Account Assi u2013 U and Item Cat. - B). But at the time of saving  i got ERROR,  Invoice receive indicator is set we can't save it. When i un-check this indicator in item detail under Invo

  • Why is my 60i video pixelated/choppy when imported into Final Cut Pro X?

    I just bought a brand new Nikon D5200 to get into some indie film making. I put together a quick short the night I got it (http://www.youtube.com/watch?v=uN8OAprluOI) and filmed in 1080p at 24fps. It turned out great, footage looked great, was ready

  • Barcode not displaying/printing in Crystal Report java viewer

    We have written a Crystal report (in Developer XI release 2 with service pack 4 installed) which produces barcode labels.  The barcodes are Code 39 barcodes and are generated by printing the string \*data_field\* in a Code 39 barcode font.  The aster

  • How to delete messages permanently from iPhone

    Hi How I can delete messages permanently from iPhone?

  • ITunes doesn't show all Photoshop Albums for syncing with Apple TV

    I created a new Album in Adobe Photoshop Elements 6.0. When I attempted to sync my new album with my Apple TV, not all of the Photoshop Albums are listed. If I sync my newly created album to my iPod Touch, the entire list is available by scrolling. (