A buddy api question

Hi all,
Is there any way to make the command baGetFilename to display
only the chosen filename and not the full path of the file?
Thanks

You can do it using the itemDelimiter player property:
r = baGetFilename( "open", "c:\", "", "", 0, "Open", 0, -1,0
_player.itemDelimiter = "\"
put the last item of r
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • How do I open to a specific page or destination in a pdf file using Buddy API Xtra?

    Hello,
    I'm working with a CD ROM catalog that utilizes the Buddy API Xtra to open PDF files when a link is clicked. The client would like to be able to open to a specific page within a pdf file.
    I can open a pdf file using the Buddy API baOpenfile() function but I'm having trouble opening to a specific page when I add #page=4:
    baOpenfile("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf#page=4","normal")
    I've also tried working with the code below which seems to me like it should work... I didn't realize that the "open..." part of it was a function in Director.
    on mouseUp me
      pageNum = 4
      theApp = baShortFileName(baFindApp("pdf"))
      theDoc = baShortFileName("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf")
      theArgs = "/s /A page=" & string(pageNum)   & "&pagemode=bookmarks"
      -- (translates to "/A page=4" in this example)
      open theApp && theArgs && theDoc
    end
    Thoughts?
    Thank you in advance!

    Thank you Dee! This works perfect!
    It would be cool to know how to use bashell() for this.
    The help files give the following examples:
    Result = baShell( Operation, Filename, Args, WorkDir, State )
    ok = baShell( "open", "c:\windows\notepad.exe", "myfile.txt" , "", "normal" )
    ok = baShell( "edit", "myfile.htm" , "", "", "normal" )
    So I tried:
    on mouseUp me
      -- Close the program group
      tWindowList = baWindowList( "" , "pdf" , false )
      if tWindowList <> [] and count(tWindowList) > 0 then  baCloseWindow(tWindowList[1])
      pageNum = 4
      theApp = baFindApp("pdf")
      theDoc = _movie.path & "pdfs\Powder Cores\Magentics Powder Core Catalog.pdf"
      theArgs = "/A "&QUOTE&"page="&string(pageNum)&"=OpenActions"&QUOTE
      baShell( "open", theApp, theDoc , theArgs, "normal" )
    end
    It opens the pdf file without going to a specific page. Any thoughts as to why it wouldn't accept theArgs?
    Thanks again!

  • Is Buddy API baSetDisplay working in Director 11.5 under Windows 7?

    Hello,
    I'm trying to update some of my old games.
    The "baSetDisplay" of Buddy API is not working under Windows 7 in Director 11.5
    Did someone had made it working?
    Any solution to change resolution to have a fullscreen game?
    Thanks
    Sebastien

    Were you looking for someone to test other platforms such as Vista?... or are you looking for verification... or a solution?
    I'm guessing a solution is not going to be available, but I would recommend constraining the video from going off the monitor if you haven't already added that 'feature' for win7 (you can test the OS easily enough using the platform property).
    Anyways, if you can clarify what assistance you are looking for then that'd help.

  • Buddy API HELP

    I have just downloaded Buddy API for Director 11 (windows)
    and it is not working for me. I have downloaded the file and place
    'Buddy API Help.chm', 'Buddy API Xtra.x32' and 'Read me.txt into
    'C:\Program Files\Adobe\Adobe Director 11\Configuration\Xtras'. I
    have also added #namePPC:"Buddy API Xtra", #nameW32:"Buddy API
    Xtra.x32" to the bottom of the xtrainfo.txt file.
    I made a new project and named it 'test.dir' and saved this
    in a filder called 'test' on the desktop. I placed one button on a
    frame and added the code:
    'on mouseUp me
    baOpenFile( the moviePath & "test.txt" , "normal" )
    end
    I created a text file and named it 'test.txt' and saved this
    into the test folder on the desktop.
    I then saved a projector of the project into the same folder.
    When I click on the button, nothing happens???? WHAT AM I
    DOING WRONG?????

    In the Modify, Movies, Xtras list, it will likely be called
    'Buddy API
    Xtra'.
    When you say that you push the button and "nothing happens".
    Do you
    mean that literally? Or do you get an error message of some
    sort? If
    you have not added BuddyAPI into the projector, you should
    get an error
    stating that baOpenFile is not available (or perhaps a less
    useful
    "script error").
    If you are not even getting that, then I assume you are using
    a
    #flashComponent button and you need to go into the Property
    Inspector's
    Flash Component tab and change the 'eventPassMode' to
    #passAlways in
    order to make the button work.

  • Is Buddy Api 4.07 Compatible with Director 12

    I'm trialling Director 12 Win
    Using the demo version and publishing a Mac projector it issues the error 'Can't find the Xtra file "Buddy API Xtra.x32" even though the xtra is in the Xtras folder.
    Anyone know if this is a Demo limitation or an incompatibility between Buddy and D12
    Thanks

    OK .cpio wasn't in the "Adobe Director 12\Configuration\Cross Platform Resources" directory so I put it in.  Launched Director and open the file to publish but got the same error.
    So is this because its a trial version??
    I don't know whether D12 is available as a cloud component.  I wouldn't mind forking out £30/40 to find out if it is being in demo mode that is the issue.  However I don't fancy paying £300 only to be presented with the same error.

  • Overwritre files with Buddy Api

    Hi!
    I am trying to use the Buddy API to move files. I am using
    the MoveFileOn Reboot function which works fine normally. However I
    really need it to overwrite a file that is in the target folder
    with one with the same name. This does not happen, I guess the xtra
    won't overwrite files with the same name. Has anyone come across
    this and found away round it? Got a bit of a nightmare if not.
    Cheers in anticipation,
    Simon

    Result = baCopyFile( SourceFile , DestFile , Overwrite )
    "Always" always copies the file
    "IfNewer" copies the file if SourceFile is newer than
    DestFile
    "IfNotExist" copies only if DestFile does not already exist
    hth
    scott
    StuckInYork wrote:
    > Hi!
    >
    > I am trying to use the Buddy API to move files. I am
    using the MoveFileOn
    > Reboot function which works fine normally. However I
    really need it to
    > overwrite a file that is in the target folder with one
    with the same name. This
    > does not happen, I guess the xtra won't overwrite files
    with the same name. Has
    > anyone come across this and found away round it? Got a
    bit of a nightmare if
    > not.
    >
    > Cheers in anticipation,
    >
    > Simon
    >

  • API Question

    Does the configurator provide a means of accessing the PS API..? I was contemplating createing a UI using C#/C++ or Delphi and COM but if this tool will give me the UI ability while exposing the SDK API for PS then that would be prefered. I looked through the threads and didnt see this question, apologies if its a dupe.
    Also, is there an example of running scripts and actions for PS from a UI element created with the configurator...?
    Thanks
    David

    Hi David,
    may I suggest you to get a look to the Photoshop Panel Developer's Guide here:
    http://www.adobe.com/devnet/photoshop/pdfs/photoshop_panel_developers_guide.pdf
    It gives you advices and examples on how to build photoshop panels in Flash/Flex (with Flex you've plenty of UI element to play with - sliders, drop down lists, etc). I don't think you need patchpanel, or at least I've been able to do my own stuff without it: I've some javascript functions that are called by the panel depending on few sliders and checkbox.
    Anyway, something that prooved to be impossible without writing some temporary image files and managing in fancy ways the input-output stream is to embed in the panel a PixelBender kernel - something that would make the panel a close brother of a Photoshop plugin
    Regards,
    Davide Barranca
    Bologna, Italy

  • Swing API question

    hello.
    my name is james mcfadden and i am a final year computing student at letterkenny IT in ireland. i have a program here that i want you to take a look at. i am using this program among many programs in my final year project. the program compiles and runs. but when it compiles, i get a message from the jGRASP compiler (which always works well for me) saying that i was using a depracated API function. i found out what that depracated API function was. it was the show() function. this function was used in version 1.4.2 of java, but was dropped out of java 5.0. i checked up the java 5.0 API on the web and discovered that the show() function had been replaced by the setVisible(boolean b) function. i don't know how to use this new API function in my code. the question that i have to ask you is: how do i replace the show() function in my code with the setVisible(boolean b) function? Below is the code and the result i got back from the compiler when i compiled the code. thank you very much for your help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class LogOn extends JPanel{
       private static JTextField username=null;
       private static JPasswordField password=null;
       private static JButton button=null;
       public LogOn(){
          setSize(260,160);
          username=new JTextField(15);
          password=new JPasswordField(15);
          JLabel usernameLabel=new JLabel("Username: ");
          JLabel passwordLabel=new JLabel("Password: ");
          add(usernameLabel);
          add(username);
          add(passwordLabel);
          add(password);
          show();
          button=new JButton("Ok");
          add(button);
          button.addActionListener(new ButtonListener());
          JFrame frame=new JFrame("Welcome to Home Entertainment");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.add(this);
          frame.pack();
          frame.setVisible(true);
       private class ButtonListener implements ActionListener{
          public void actionPerformed(ActionEvent e){
             try{
                Demo d = new Demo();
                d.getChoice();
             catch(Exception ex){}
    }----jGRASP exec: javac -g X:\CP4B Project\LogOn.java
    Note: X:\CP4B Project\LogOn.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    ----jGRASP: operation complete.

    Hi James,
    your class extends JPanel. JPanel inherits show from java.awt.Component. If you have a look at the API documentation. The extension path of JPanel is
    java.lang.Object
    java.awt.Component
    java.awt.Container
    javax.swing.JComponent
    javax.swing.JPanel
    javax.swing.JComponent has a method setVisible(<boolean>). That means JPanel has all methods,that are Implemented in JComponent
    So (although I have not yet used it)
    replacing
    show() ;
    by
    setVisible(true) ;
    in your code should do the trick...

  • JDeveloper10g VCS Extension API Question

    Hi.
    I wrote a VCS system for JDeveloper9.0.3 against Microsoft Visual Source Safe, which worked fine. We've now upgraded to 10g, and this system does no longer work, because the JDev's extension API has changed.
    I'm therefore rewriting the system to support the 10g API. But I'm a bit overwhelmed by the changes made to the API. Where do I start?
    1. I wish to implement a new panel in JDev's preferences screen under VersionControl systems which can configure my plugin.
    2. I wish to present files in the Navigator window with overlay icons on files checked in, checked out, not present and such.
    4. I wish to add my plugin to the context menu for the Navigator, so that users can be presented with the choice to perform file operations against VSS.
    3. I wish to present one dialog for single file operations and one for multiple file operations.
    Which classes do I need to extend? Which interfaces do I need to implement?
    Can someone give me directions? The help file for the extension API does not give sufficient answers.

    To answer your other questions:
    The VCSPropertyCustomizer object I've written contains properties I need to use during any VSS operations. Does the IDE store these properties in an easily retrievable place, or do I need to handle this myself.
    You can get a VCSPropertyMap from the Ide like this:
      ((VCSPropertyMap)Ide.getSettings().getData( YOUR_DATA_KEY );
    And another thing, the example above does not describe dialogs on operations like checkin, checkout and so on.
    Would this be implemented in the doitImpl() method in my implementation of VCSAbstractCommand?
    Yes... Below is a snippet from the code for the ClearCase client.
    FWIW, sorry it's so much work to do this. I'm working on an (optional, i.e won't break existing code) way of just writing a simple xml file to integrate version control clients into JDeveloper that should hopefully make everyone's life easier in the future :P
      protected int doitImpl() throws Exception
        final Collection nodes = getNodesToCheckIn();
        if ( nodes.size() <= 0 )
          return NOOP;
        if (! saveDirtyDocuments( nodes ))
          return Command.CANCEL;
        final Map timestampMap = VCSBufferUtils.storeTimestamps( nodes );
        final VCSDirectoryInvokableState invokableState =
            new VCSDirectoryInvokableState( VCSModelUtils.convertNodesToURLs(
                nodes ) );
        final VCSCommandState state = new VCSCommandState( invokableState,
            timestampMap );
        if ( context.getView() instanceof ClearCaseChangeListWindow &&
          !((ClearCaseChangeListWindow)context.getView()).isUsingCheckInDialog() )
          return checkInSilently( nodes, state,
            ClearCaseClient.getInstance().getChangeListCustomizer() );
        else
          return checkIn( nodes, state );
      protected void noOpImpl() throws ClearCaseValidationException
        throw new ClearCaseValidationException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FILTERED_TITLE" ), //NOTRANS
            ResourcePicker.get().getString( "ERROR_CHECKIN_FILTERED" ) ); //NOTRANS
      private int checkInSilently(
        final Collection nodes,
        final VCSCommandState state,
        final VCSOptionsCustomizer customizer )
        Ide.getWaitCursor().show();
        Runnable r = new Runnable()
          public void run()
            try
              doCommitOperationImpl( Ide.getMainWindow(), customizer.getOptions(),
                state );
            catch ( Exception e )
              getExceptionHandler().handleException( e, Ide.getMainWindow() );
            finally
              EventQueue.invokeLater( new Runnable()
                public void run()
                  Ide.getWaitCursor().hide();
                  postCheckIn( state );
        Thread t = new Thread( r, "ClearCase Check In Committer" ); // NOTRANS
        t.start();
        return OK;
      private int checkIn( final Collection nodes,
          final VCSCommandState state )
        throws Exception
        boolean multiCheckin = ( nodes.size() > 1 );
        final VCSOptionsCustomizer customizer =
            new VCSCommentsCustomizer( new ClearCaseCheckinCustomizer(),
            multiCheckin );
        if ( getContext().getView() instanceof ClearCaseChangeListWindow )
          customizer.setOptions(
            ClearCaseClient.getInstance().getChangeListCustomizer().getOptions()
        final JEWTDialog dialog = VCSComponents.createOperationDialog(
          VCSWindowUtils.getCurrentWindow(),
          ResourcePicker.get().getString( "CHECKIN_CAPTION" ), //NOTRANS
          ResourcePicker.get().getString( "CHECKIN_LONG_PROMPT" ), //NOTRANS
          VCSComponents.createFileListerComponent( nodes ),
          customizer.getComponent(),
          "f1_clearcasechkin_html", //NOTRANS
          customizer.getInitialFocusComponent()
        Map options = null;
        if ( ! multiCheckin )
          String checkoutComments = retrieveCheckoutComments( ((Locatable)nodes.
              iterator().next()).getURL() );
          // bug 3067323 - check in dialog does not prepopulate with check out comments
          if ( checkoutComments != null )
            customizer.setOptions( Collections.singletonMap( KEY_SETTING_COMMENTS,
                checkoutComments ) );
        else
          customizer.setOptions( Collections.singletonMap(
              KEY_SETTING_REUSE_COMMENTS, _optionReuseComments ) );
        dialog.addVetoableChangeListener( new VCSDialogCommitter()
          protected final boolean doCommitOperation() throws Exception
            return doCommitOperationImpl(
                dialog, customizer.getOptions(), state);
        boolean dialogSuccessful = ClearCaseDialogRunner.runDialog( dialog );
        postCheckIn( state );
        _optionReuseComments = (Boolean)customizer.getOptions().get(
            KEY_SETTING_REUSE_COMMENTS );
        return (! dialogSuccessful ? Command.CANCEL : Command.OK);
      private void postCheckIn( VCSCommandState state )
        Collection processedUrls = state.getInvokableState().getProcessedURLs();
        if ( processedUrls.size() > 0 )
          VCSBufferUtils.reloadBuffers( state.getTimestampMap() );
        URLFilter filter = VCSURLFilters.createSpecificURLFilter(
          (URL[])processedUrls.toArray( new URL[0] ) );
        ClearCaseClient.getInstance().getStatusCache().clear( filter );
      private boolean doCommitOperationImpl(
          Component dialog, Map options, VCSCommandState state )
          throws Exception
        DeterminateProgressMonitor monitor = new DeterminateProgressMonitor(
          dialog,
          ResourcePicker.get().getString( "CHECKIN_PROGRESS_TITLE" ), //NOTRANS
          ResourcePicker.get().getString( "CHECKIN_WATCHER_DESCRIPTION" ), //NOTRANS
          0,
          -1
        final ClearCaseShellRunner runner = new ClearCaseShellRunner();
        List cmd = new ArrayList();
        cmd.add( "ci" ); //NOTRANS
        Boolean b = (Boolean)options.get( KEY_SETTING_IDENTICAL_CHECKIN );
        if (b != null && b.booleanValue())
          cmd.add( "-ide" ); //NOTRANS
        b = (Boolean)options.get( KEY_SETTING_REUSE_COMMENTS );
        String s = null;
        if (b == null || ! b.booleanValue())
          s = (String)options.get( KEY_SETTING_COMMENTS );
        URL commentFile = writeCommentsFile( s, cmd );
        runner.setCmdList( cmd );
        VCSDirectoryInvokable invokable = new ClearCaseDirectoryInvokable(
            state.getInvokableState(), ClearCaseUtil.FILE_COMMAND_BATCH_SIZE )
          protected final boolean doInvocation2( URL parent, URL[] invokeUrls )
              throws Exception
            String[] filenames = VCSFileSystemUtils.getURLFileNames( invokeUrls );
            runner.setDirURL( parent );
            runner.setOptions( Arrays.asList( filenames ) );
            doInvocationImpl( runner );
            return true;
        invokable.setProgressMonitor( monitor );
        try
          if (! invokable.runInvokable())
            return false;
        finally
          if ( commentFile != null )
            URLFileSystem.delete( commentFile );
        return true;
      private void doInvocationImpl( ClearCaseShellRunner runner ) throws Exception
        runner.exec();
        String error = runner.getErrorText();
        if ( error != null &&
             error.indexOf( "The most recent version on branch" ) >= 0 && //NOTRANS
             error.indexOf( "is not the predecessor of this version" ) >= 0 ) //NOTRANS
          throw new ClearCaseOperationException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FAILED_TITLE" ), //NOTRANS
            ResourcePicker.getPicker( ClearCaseOperationCheckin.class ).getString(
                "ERROR_CHECKIN_FAILED_SUBSUMED" ) ); //NOTRANS
        if (runner.getExitCode() == null ||
            runner.getExitCode().intValue() != 0)
          throw new ClearCaseProcessException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FAILED_TITLE" ), //NOTRANS
            ResourcePicker.getPicker( ClearCaseOperationCheckin.class ).getString(
                "ERROR_CHECKIN_FAILED" ), runner.getErrorText() ); //NOTRANS
      private String retrieveCheckoutComments( URL url )
        // bug 3067323 - check in dialog does not prepopulate with check out comments
        String[] cmd = new String[] { "lsco", "-me", "-fmt", "%c", "-cvi", //NOTRANS
            URLFileSystem.getPlatformPathName( url ) };
        try
          ClearCaseShellRunner runner = new ClearCaseShellRunner();
          URL parent = URLFileSystem.getParent( url );
          if ( url == null )
            return null;
          runner.setCmdArray( cmd );
          runner.setDirURL( parent );
          runner.setQuiet( true );
          runner.exec();
          String output = runner.getOutputText();
          if ( output != null && output.equals( "" ) )
            return null;
          return output;
        catch ( Exception e )
          oracle.ide.util.Assert.printStackTrace( e );
          return null;

  • GraphViz  API  Question

    I am looking for someone with experience working with the GraphViz API. Do you have experience working with GraphViz? If you are such a person, please say ?Hello? to prompt my question. Thank you. Mike

    Hi David,
    may I suggest you to get a look to the Photoshop Panel Developer's Guide here:
    http://www.adobe.com/devnet/photoshop/pdfs/photoshop_panel_developers_guide.pdf
    It gives you advices and examples on how to build photoshop panels in Flash/Flex (with Flex you've plenty of UI element to play with - sliders, drop down lists, etc). I don't think you need patchpanel, or at least I've been able to do my own stuff without it: I've some javascript functions that are called by the panel depending on few sliders and checkbox.
    Anyway, something that prooved to be impossible without writing some temporary image files and managing in fancy ways the input-output stream is to embed in the panel a PixelBender kernel - something that would make the panel a close brother of a Photoshop plugin
    Regards,
    Davide Barranca
    Bologna, Italy

  • E10 API Question

    Since we have in E10 Campaign Canvas and Program Builder, does the Step ID is unique between the two in any instance?
    Of course I am asking the question from an API perspective, so is it safe to assume Step ID (canvas or builder) will be unique per Eloqua instance?

    Correct, the StepID is unique per instance.  Does not matter if it's a PB step or a Canvas step.

  • Buddy upgrade questions?

    My mother and I are going to do a buddy upgrade and I have a few questions. She has the basic phone plan and I have the 30$ smartphone plan. If I use her upgrade to change from my BlackBerry to an iPhone 4S. do I need to purchase the data plan too? She's probably keeping her basic phone so if that's the case how do I change the data plan back to how it was? Like instead of paying $30 each, I take her upgrade and end the data plan on her line and activate it to my line. How do I do this? And will Verizon help me through this if something goes wrong? Sorry if this doesn't make much sense!

        angelasara,
    Congrats on the upgrade! No need to worry, when doing an alternate upgrade, everything on your line and your Mom's line stays the same. If you are hesitant on the process, our customer service line would be happy to process the order. You can reach them at 800-922-0204, or by dialing *611 from your phone.
    Thank you!
    Katie H
    VZW Support
    Follow us on Twitter @VZWSupport

  • JavaMail api question..

    I'am trying to send an e_mail to myself using the javaMail API.
    I have already installed it (and also the Java Activation Framework).
    The code is:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.Properties;
    import java.util.Date;
    import java.io.*;
    public class PruebaMail {
    public static void main(String[] argv) {
              try {
                   Properties props = new Properties();
                   Session sendMailSession;
                   Store store;
                   Transport transport;
                   sendMailSession = Session.getInstance(props, null);
                   props.put("mail.smtp.host", "SMTP.mail.yahoo.com");
                   Message newMessage = new MimeMessage(sendMailSession);
                   newMessage.setFrom(new InternetAddress("[email protected]"));
                   newMessage.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
                   newMessage.setSubject("Prueba 1234");
                   newMessage.setSentDate(new Date());
                   newMessage.setText("Le escribimos para informarle que alguien ha respondido a su consulta");
                   transport = sendMailSession.getTransport("smtp");
                   transport.send(newMessage);
              } catch (MessagingException e1) {
              System.out.println("PruebaMail MessagingException:" + e1.getMessage());
    .. but, issuing C:\>java PruebaMail .. I get this error:
    PruebaMail MessagingException:Sending failed;
    nested exception is:
         javax.mail.MessagingException: Unknown SMTP host: SMTP.mail.yahoo.com;
    nested exception is:
         java.net.UnknownHostException: SMTP.mail.yahoo.com
    so, my question is:
    1. What is wrong in my code. Do you know an available SMTP server which
    allows relaying??
    thanks in advance!

    Reverse this order:
    sendMailSession = Session.getInstance(props, null);
    props.put("mail.smtp.host", "SMTP.mail.yahoo.com");Any property should be set before getting a Session instance.
    If your mail server expects authentication you should give one more property, so the code will be:
    if(user != null) // should be authenticated
      props.put("mail.smtp.auth", "true");
    else
      props.put("mail.smtp.auth", "false");
    props.put("mail.smtp.host", "SMTP.mail.yahoo.com");
    sendMailSession = Session.getInstance(props, null);
    ... // fill newMessage
    if(user != null) { // should be authenticated
      newMessage.saveChanges();
      Transport transport = session.getTransport("smtp");
      transport.connect(mailhost, user, password);
      transport.sendMessage(newMessage, newMessage.getAllRecipients());
      transport.close();
    else
      Transport.send(newMessage);

  • Oracle Install Base API question

    Hi...I need help. I am writing an extension to the Service Fulfillment Manager (SFM) Transactions
    Here is a functional background:
    For all SFM message types, SFM exposes the PL/SQL code in the iMessage studio. iMessage studio is an Oracle EBS Application tool. The PL/SQL for the following message types will be modified:
    ·     Sales Order Shipment - CSISOSHP
    ·     Miscellaneous Receipt - CSIMSRCV
    ·     Receipt into Inventory – CSIPOINV
    The processing logic for each of these transaction types contains a call to an Installed Base package and stores the return status in a variable. For PO Receipt and SO Issue transactions referencing serial numbers prefixed by the Vertical Bar (‘|’) character this call will be bypassed and a successful status placed in the return status variable.
    For PO Receipt and Miscellaneous Receipt transactions referencing serial numbers not prefixed by the Vertical Bar (‘|’) character, the processing logic will be extended to extract the IUID value from the serial numbers table in the Oracle Inventory module (MTL_SERIAL_NUMBERS) and call the public IB Application Programming Interface (API) (CSI_ITEM_INSTANCE_PUB.UPDATE_ITEM_INSTANCE) to update the associated IB instance with the IUID.
    OK, so Question #1:
    I get all I need to do is bypass the code in 2 instances if a bar is found at the beginning of the serial number.. And I can do that. But where is this serial number? I assume it is stored in MTL_SERIAL_NUMBERS but how do I get it?
    The code doesn't have it stored as a variable, and it doesn't seem to have the IB record either. Is there a foreign key? Anyone have imessage studio and can look into that?
    Question #2:
    To update the IB record with the serial number I need to make a call to the below procedure. The thing is, it seems to require the IB instance record. Again, I don't have that cause the code is creating it! Is there some way to get that created record back and pass it into the update procedure?
    PROCEDURE update_item_instance
    p_api_version IN NUMBER
    ,p_commit IN VARCHAR2
    ,p_init_msg_list IN VARCHAR2
    ,p_validation_level IN NUMBER
    ,p_instance_rec IN csi_datastructures_pub.instance_rec
    ,p_ext_attrib_values_tbl IN OUT NOCOPY csi_datastructures_pub.extend_attrib_values_tbl
    ,p_party_tbl IN OUT NOCOPY csi_datastructures_pub.party_tbl
    ,p_account_tbl IN OUT NOCOPY csi_datastructures_pub.party_account_tbl
    ,p_pricing_attrib_tbl IN OUT NOCOPY csi_datastructures_pub.pricing_attribs_tbl
    ,p_org_assignments_tbl IN OUT NOCOPY csi_datastructures_pub.organization_units_tbl
    ,p_asset_assignment_tbl IN OUT NOCOPY csi_datastructures_pub.instance_asset_tbl
    ,p_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec
    ,x_instance_id_lst OUT NOCOPY csi_datastructures_pub.id_tbl
    ,x_return_status OUT NOCOPY VARCHAR2
    ,x_msg_count OUT NOCOPY NUMBER
    ,x_msg_data OUT NOCOPY VARCHAR2
    Thanks for any and all help in advance!

    OK! I found the instance id!
    But when trying to get the IB record, the API fails. Can someone take a look at this...what's wrong?
    msg_data from API call =
    MSG DATA FND FND_AS_UNEXPECTED_ERROR N PKG_NAME CSI_ITEM_INSTANCE_PUB N PROCEDURE_NAME GET_ITEM_INSTANCE_DETAILS N ERROR_TEXT ORA-01008: not all variables bound
    PROCEDURE populate_iuid(
    p_transaction_id IN NUMBER
    IS
    l_api_version CONSTANT NUMBER := 1.0;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_instance_id_lst csi_datastructures_pub.id_tbl;
    l_instance_header_rec csi_datastructures_pub.instance_header_rec;
    l_party_header_tbl csi_datastructures_pub.party_header_tbl;
    l_party_acct_header_tbl csi_datastructures_pub.party_account_header_tbl;
    l_org_unit_header_tbl csi_datastructures_pub.org_units_header_tbl;
    l_instance_rec csi_datastructures_pub.instance_rec;
    l_party_tbl csi_datastructures_pub.party_tbl;
    l_account_tbl csi_datastructures_pub.party_account_tbl;
    l_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
    l_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
    l_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
    l_ext_attrib_values_tbl csi_datastructures_pub.extend_attrib_values_tbl;
    l_pricing_attribs_tbl csi_datastructures_pub.pricing_attribs_tbl;
    l_ext_attrib_tbl csi_datastructures_pub.extend_attrib_values_tbl;
    l_ext_attrib_def_tbl csi_datastructures_pub.extend_attrib_tbl;
    l_asset_header_tbl csi_datastructures_pub.instance_asset_header_tbl;
    l_txn_rec csi_datastructures_pub.transaction_rec;
    l_return_status VARCHAR2(2000) ;
    l_instance_id NUMBER := 0 ;
    l_serial_number VARCHAR2(30);
    l_inventory_item_id NUMBER := 0 ;
    l_iuid VARCHAR2(150);
    CURSOR c_get_serial_numbers( p_transaction_id NUMBER ) IS
    SELECT inventory_item_id, serial_number, attribute1
    FROM mtl_unit_transactions
    WHERE transaction_id = p_transaction_id;
    BEGIN
    -- GET THE SERIAL NUMBER AND INVENTORY ITEM ID BY USING THE TRANSACTION ID
    FOR rec IN c_get_serial_numbers( p_transaction_id ) LOOP
    l_inventory_item_id := rec.inventory_item_id;
    l_serial_number := rec.serial_number;
    l_iuid := rec.attribute1;
    -- GET THE INSTANCE ID BY USING THE SERIAL NUMBER AND INVENTORY ITEM ID
    SELECT instance_id
    INTO l_instance_id
    FROM csi_item_instances
    WHERE inventory_item_id = l_inventory_item_id
    AND serial_number = l_serial_number;
    -- RETRIEVE THE INSTANCE RECORD TO BE UPDATED
    l_instance_rec.instance_id := l_instance_id;
    csi_item_instance_pub.get_item_instance_details(p_api_version => l_api_version
    ,p_commit => fnd_api.g_false
    ,p_init_msg_list => fnd_api.g_false
    ,p_validation_level => fnd_api.g_valid_level_full
    ,p_instance_rec => l_instance_header_rec
    ,p_get_parties => fnd_api.g_true
    ,p_party_header_tbl => l_party_header_tbl
    ,p_get_accounts => fnd_api.g_true
    ,p_account_header_tbl => l_party_acct_header_tbl
    ,p_get_org_assignments => fnd_api.g_true
    ,p_org_header_tbl => l_org_unit_header_tbl
    ,p_get_pricing_attribs => fnd_api.g_false
    ,p_pricing_attrib_tbl =>l_pricing_attribs_tbl
    ,p_get_ext_attribs => fnd_api.g_false
    ,p_ext_attrib_tbl => l_ext_attrib_tbl
    ,p_ext_attrib_def_tbl => l_ext_attrib_def_tbl
    ,p_get_asset_assignments => fnd_api.g_false
    ,p_asset_header_tbl => l_asset_header_tbl
    ,p_resolve_id_columns => fnd_api.g_false
    ,p_time_stamp => SYSDATE
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    );

  • IB API Question (CSI)

    I am using the API csi_item_instance_pub.update_item_instance
    to update an IB instance. If I want to put a value in ATTRIBUTE4, how do I do that?
    csi_item_instance_pub.update_item_instance(p_api_version =>l_api_version
    ,p_commit => 'F'
    ,p_init_msg_list => lc_init_msg_lst
    ,p_validation_level => ln_validation_level
    ,p_instance_rec => l_instance_rec
    ,p_ext_attrib_values_tbl => l_ext_attrib_values_tbl
    ,p_party_tbl => l_party_tbl
    ,p_account_tbl => l_account_tbl
    ,p_pricing_attrib_tbl => l_pricing_attrib_tbl
    ,p_org_assignments_tbl => l_org_assignments_tbl
    ,p_asset_assignment_tbl => l_asset_assignment_tbl
    ,p_txn_rec => l_txn_rec
    ,x_instance_id_lst => l_instance_id_lst
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data);

    It should be a part of l_instance_rec, as in
    l_instance_rec.ATTRIBUTE4 := 'my value';
    HTH
    Alka

Maybe you are looking for