Reading Inactive objects using repo API

Hi,
Is there a way to read inactive objects that resides inside a package using XSJS repo APIs. Also, How do we delete such objects. I have written code that would do the same for active version of objects only. But, not sure how to perform the same for inactive objects. Little pointer in this direction would be great.
Thanks in Advance,
Vikas.

The Repository XSJS APIs are not documented nor released for external usage. Please do not discuss SAP internal only APIs on the public forums.  As you are an SAP employee you should use the internal forums for such internal API questions. 
I would add that even internally at SAP we aren't supposed to use the XSJS Repository APIs any longer.  Please convert your code to use the REST Repository APIs instead.

Similar Messages

  • Asynchronous read & write by using Asynchronous api provided in nio-java 7

    HI,
    I am trying to write a small program to implement **asynchronous read & write by using Asynchronous api provided in nio in java 1.7** in windows machine.
    i tried the following code to write a small string to a file asynchronously.file is getting created but the contents are not dispalying.
         static long startTime = System.currentTimeMillis();
         static long endTime;
         static long execTime;
         public static void main(String[] args) {
              String path = "C:\\AsynchWrite.txt";
              Path file = Paths.get(path);
              final AsynchronousFileChannel channel;
              long pos = 1;
              try {
                   OpenOption[] options = { StandardOpenOption.CREATE,
                             StandardOpenOption.WRITE, StandardOpenOption.SYNC };
                   channel = AsynchronousFileChannel.open(file, options);
                   ByteBuffer buffer = ByteBuffer.allocate(1000);
                   String writeThis = "Testing by writing a line";
                   byte[] src = writeThis.getBytes();
                   buffer.put(src);
                   channel.write(buffer, pos, null,
                             new CompletionHandler<Integer, Object>() {
                                  @Override
                                  public void completed(Integer result, Object attachment) {
                                       System.out.println("completed successfully");
                                       System.out.println("start time :" + startTime);
                                       endTime = System.currentTimeMillis();
                                       System.out.println("end time : " + endTime);
                                       execTime = endTime - startTime;
                                       System.out.println("Execution Time :" + execTime);
                                       System.out.println("Execution Time(ms) :"
                                                 + execTime);
                                       try {
                                            channel.force(true);
                                            channel.close();
                                       } catch (IOException e) {
                                            // TODO Auto-generated catch block
                                            e.printStackTrace();
                                  @Override
                                  public void failed(Throwable exc, Object attachment) {
                                       // TODO Auto-generated method stub
                                       System.out.println("failed!!");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }Please help me out
    Thanks in advance,
    Ravi

    It looks like you are missing buffer.flip() after your put as otherwise the buffer position will be at 25 (not 0 as you expect).

  • How to read inline feed using android api for odata

    Hi,
    Need help on reading inline feed using android api. BB and iOS supports inline but for android there is no api.
    Please suggest the workaround
    Regards,
    Satish

    This link is very useful:
    Knowledge Management and Collaboration (KMC)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/Knowledge%20Management%20and%20Collaboration%20Developers%20Guide.html
    Patricio.

  • Guide procedures (callable objects ) using ABAP API.

    Hi,
    Is it possible to develop callable objects using ABAP APIs?
    IF yes how ?
    Regards
    Nisha

    hello Nisha,
    Plz see the basic information link on GP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/92811997-0d01-0010-9584-f7d535177831

  • How to find a annotation object using plugin API?

    How to find a annotation object using plugin API?

    You would use PDPage methods to find out how many on a page, and to
    get them in turn.
    Aandi Inston

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • Failed to read parameter object using Dynamic Parameter

    Hi All
    In one of my report I am using dynamic parameter, I tried to publish the report in BOXI and got the following error:
    "Failed to read data from report file C:DOCUME1...LOCALS1Temp~crw{u2026u2026..-u2026.-u2026.-u2026.-u2026u2026u2026u2026}.rpt. Reason: Failed to read parameter object"
    but if I change that to static parameter I am able to publish it.
    I am using Crystal Report 2008 Version: 12.1.0.892
                                              Product Type: Full
    BO Version: Product: 12.1.0 © 2008 Business Objects
    I went thru many forums and came up with some settings while publishing but nothing worked out. And some mentioned about the service packs and fix pack issues. But I am not sure which should be installed in order to make this work for my versions.
    Can anyone please suggest, what can be done to publlish a report with dynamic parameter?
    Thanks
    Sree

    Hi Sharon,
    I am facing same kind of issue with crystal report 12.2.0.290 and BO server 12.1.0 © 2008 Business Objects.
    While i am trying publish the report with dynamic parameter, its throwing the error "Failed to read parameter object ".
    I am not sure what to do..can you please guide me ?
    Regards,
    Johnes

  • Callable objects using ABAP API

    hi,
    Is it possible to develop Callable objects for MDM using ABAP APIs?
    Regards
    Nisha

    Hi Nisha,
    As far as I know, itu2019s not possible. You can use just RFC/BAPI as external services CO or ABAP Web Dynpro (this CO is limited regarding output parameters).
    MDM offers two APIS for Java development:
    1) MDM4J API, which is an old API and will be discontinued from MDM 7.1
    2) MDM Java API that is recommended
    With this API you can create Java Libraries or/and Web Services to re use into your CO.
    Best Regards,
    Pedro Nunes

  • Help:NoSuchMethodError thrown when reading excel sheet  using jxl API

    I'm trying to read data from an Excel-2003 sheet using this code:
    15. File file = new File("EmpDetails.xls");
    16. jxl.Workbook workbook = jxl.Workbook.getWorkbook(file);                              
    17. jxl.Sheet sheet = workbook.getSheet(0);
    18. jxl.Cell cell1 = sheet.getCell(0,0);I'm getting this java.lang.NoSuchMethodError: common.Assert.verify(Z)V. The StackTrace is given below:
    Exception in thread "main" java.lang.NoSuchMethodError: common.Assert.verify(Z)V
         at jxl.read.biff.SSTRecord.getString(SSTRecord.java:417)
         at jxl.read.biff.LabelSSTRecord.<init>(LabelSSTRecord.java:56)
         at jxl.read.biff.SheetReader.read(SheetReader.java:306)
         at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:611)
         at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:204)
         at com.scjp.IO.ExcelJXL.main(ExcelJXL.java:17)Please help.

    Thanks a lot for the reply.
    I had both jxl.jar and xlrd.jar in the classpath and xlrd.jar was loaded before jxl.jar.
    There is a conflicting common.Assert.class file in xlrd.jar and there is no verify method in it.
    That was creating the problem. I loaded the jxl.jar file before the xlrd.jar and it is working fine.
    Thanks a lot for the help!!! :)

  • Reading Objects using NIO

    I having problems reading an object using NIO APIs. I am end creating an Object and pass it through a socket. When I retrieve the data from the input stream within the socket I initialize a ByteBuffer by allocating a length. The problem is that there is NO way of knowing what to allocate that ByteBuffer when reading in the object. Below is within a method that allows me to read information from the socket.
    //Allocate the length ByteBuffer.
    ByteBuffer buffer = ByteBuffer.allocate(1024);
    //Read the data from the SocketChannel....PROBLEM IS WHAT IF I NEED TO DO MULTIPLE READS
    socketChannel.read(buffer);
    ///We will create a byte array from the ByteBuffer.
    byte[] b = buffer.array();
    //ByteArrayInputStream that we will create and put the byte array in.
    ByteArrayInputStream bis = new ByteArrayInputStream(b);
    //ObjectInputStream where we will use the ByteArrayInputStream.
    ObjectInputStream input = new ObjectInputStream(bis);
    //Object that we will read in.
    Object obj = input.readObject();
    //Message that we will end up receiving.     
    Message receivingMsg = null;
    //Once we have our Message we will end up closing the connection.
    bis.close();
    input.close();
    //We will clear the buffer.
    buffer.clear();
    //We will cast the object to a message object so
    //that we can end up sending it through the right
    //routine which will allow us to send a response
    //back to the client. *********SPECIAL Class that will cast our generic object into a Message Object.
    Message receivedFromClient = (Message) obj;
    //we will end up taking that message and returning it.
    Message returningMsg = communicate(receivedFromClient);
    //Here we will end up taking the Message and putting it into the ByteBuffer.          
    ByteBuffer bb = objectToOutputStreamByteBuffer(returningMsg);
    socketChannel.write(bb);
    ----The problem is if I have more data within that Object. I need to re-allocate the ByteBuffer object and read everything on that socket. I tried the following code but I really don't feel it will be optimized the best for performance. I guess my question is that should I even be using NIO in this situation or Blocking IO?
    Again, here is the code that will read multiple data from the socket until it is -1.
    //Here we will read the information we received by first allocating
    //a ByteBuffer object.
    ByteBuffer buffer1 = ByteBuffer.allocate(5);
    ByteBuffer buffer2 = ByteBuffer.allocate(0);
    //We will read the data from this object.
    while ((socketChannel.read(buffer1)) != -1) {
    //We will check the Buffers and then try to recreate a new ByteBuffer that will put the remaining
    //stuff within the buffer. NOT SURE IF THIS IS THE MOST EFFICIENT WAY OF DOING THIS
    //AND ACTUALLY DON'T HAVE THE CODE WORKING CORRECTLY. THIS IS WHERE I
    //NEED HELP ON THE CORRECT WAY TO DO THIS.
         if (buffer1.remaining() < buffer2.remaining()) {
              buffer1.flip();
              buffer2 = ByteBuffer.allocate(buffer1.remaining() + buffer2.remaining());
              System.out.println("tmp 2 Remaining : " + buffer2.remaining());
              //tmp.put(buffer2);
              //buffer2 = tmp;
              System.out.println("Buffer 2 Remaining : " + buffer2.remaining());
         buffer2.put(buffer1);
         buffer1.clear();
    //We will create a byte array from the ByteBuffer.                    
    byte[] b = buffer.array();
    //ByteArrayInputStream that we will create and put the byte array in.
    ByteArrayInputStream bis = new ByteArrayInputStream(b);
    //ObjectInputStream where we will use the ByteArrayInputStream.
    ObjectInputStream input = new ObjectInputStream(bis);
    //Object that we will read in.
    Object obj = input.readObject();
    //Message that we will end up receiving.     
    Message receivingMsg = null;
    //Once we have our Message we will end up closing the connection.
    bis.close();
    input.close();
    //We will clear the buffer.
    buffer2.clear();
    buffer1.clear();
    //We will cast the object to a message object so
    //that we can end up sending it through the right
    //routine which will allow us to send a response
    //back to the client.
    Message receivedFromClient = (Message) obj;
    //we will end up taking that message and returning it.
    Message returningMsg = communicate(receivedFromClient);
    //Here we will end up taking the Message and putting it into the ByteBuffer.          
    ByteBuffer bb = objectToOutputStreamByteBuffer(returningMsg);
    socketChannel.write(bb);
    Any help would be greatly appreciated.

    I use my own InputStream class overriding the two standard read functions read( byte[], index, length ) and read(). When you construct it pass in the channel you are reading from and read from the channel on demand. ie when a call to read comes in you read say 100 bytes from the channel. The call required only 80 so these are consumed and the other 20 are buffered. Another read call is made, this time for 50 bytes but we only have 20 buffered so another read of the channel is needed. It is up to you whether you break the contract of read( byte[], index, length ) to keep reading the channel until the full "length" is available, or handle this in your application code.
    Then because this class is InputStream you can wrap it up inside any stream you like such as the ObjectInputStream and the data will be serialized correctly.

  • Creating a mapping using the API

    Hi Brian, I am curious about this use case - what's the reason you are looking to do it using the API? You can create several objects using the API and the most typical use case we have observed is where mapping developers create a pattern or what we call as a "template" - which is a mapping with various properties parameterized. For example you can create a mapping with the filter parameterized, or define a very generic mapping with source, target and the field map between those all parameterized. Once you do that, you can create a "task" for this mapping (known as Mapping Configuration Task) - that can be done using our UI or using our REST API. If you choose the latter, you can pass on parameter values as part of the API request. Suggest you to take a look at our new Developer Portal, and specifically at the sections Templates and REST API there. Feel free to post any further questions here. If you sign up to the developer program there, you will get much more direct help.https://community.informatica.com/community/technology_partner_network Amol

    I was wondering about creating a mapping using the API. It clearly states in the Dev guide that this is possible, but when I perform a get mapping request, I don't see all the information given for a certain object.  For example, I don't see an expression in the mapping object (although one exists when I view the object in Cloud).   Has anyone else done this? Is it easy to create objects via the API?  Thanks!

  • Failed to read parameter object when publish crystal report 11

    Hi,
    I created a dynamic parameter crystal report and while running in CR (XI) everything works fine.
    Once I am trying to publish to server (infoview & business objects) I am getting error message "Failed read data from report... Reason: Failed to read parameter object"
    (It works fine and was published sucesfully if I change to static parameter.)
    I already try to change 'Edit right' in Business View Manager as other people suggest in other place and I still can't publish it without error.
    Please help.

    Re: Failed to read parameter object using Dynamic Parameter  
    Posted: Sep 27, 2010 9:23 PM    in response to: sharonamt     Edit          Reply 
    Hi Sharon,
    I am facing same kind of issue with crystal report 12.2.0.290 and BO server 12.1.0 © 2008 Business Objects.
    While i am trying publish the report with dynamic parameter, its throwing the error "Failed to read parameter object ".
    I am not sure what to do..can you please guide me ?
    Where we need to install service pack at machine which having crystal report designer or at Bo server
    Regards,
    Johnes

  • How to add Documents object faster(DI-API)

    Hello,
    I investigated the time concerning adding to Order Document using DI-API.
    Result,339sec per 300 document(for each document has
    4 items ,program was not use Start/End transaction).
    This result is not so bad, but i wish faster time.
    Please suggest faster way to add Documents object using
    DI-API.
    My source code is below.
    vINV = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOders)
    For I = 1 To 300
    vINV.CardCode = "test"
    vINV.Docdate = "2005/12/31"
    vINV.DocDueDate = "2005/12/31"
    vINV.NumAtCard = "test"
       For J = 0 To 3
         vINV.Lines.ItemCode = "test"
         vINV.Lines.Quantity = 1
         vINV.Lines.Price = 400
         if J <> 3 Then
           vINV.Lines.add()
         End If 
        Next J
       RetVal = vINV.Add
    Next I

    Hi Jiro,
    I have never worked with this before, but maybe you can investigate using the DI Server. Search the forum for the DI Server. Herewith an extract from the DI Server help file:
    <i>SAP Business One - Data Interface Server (DI Server) is a Component Object Model (COM) service running on a server that enables multiple clients to access and manipulate SAP Business One company database, using SOAP version 1.1 messages.
    The DI Server uses the DI core to enable the same functionality provided by the DI API with the following advantages:
    - Server architecture.
    - <b>Improved performance.</b>
    - Connection pooling mechanism.
    - Generic interface.
    The DI Server operates with SAP Business One application version 2004.</i>
    Hope it helps,
    Adele

  • Read records from VALUES OBJECT using the INTERATOR

    Hi
    I'm trying to read records from my value object with interator these way:
    ValidaUsu usuVO = new ValidaUsu();
    for (Iterator it = usuVO it.hasNext(); ) {
    System.out.println(" User from VO: " + usuVO.getUsuario());
    But i don't know what i`m doing wrong ?
    Could help me?
    Thanks

    Hi Gajendra,
    You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
    1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
    2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
    3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
    4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
    You will find all these methods in the following interface
    Interface : IF_MDM_CORE_SERVICES
    Hope it helps.
    *Please reward points if found useful.
    Thanks and Regards
    Nitin Jain

  • Object description using server api

    Can someone provide me a sample or at least get me started on how to query an object's description using server api?
    I'm trying to create an adaptive tag to output object descriptions for pages and communities.

    I don't know if this would matter here, but I've noticed that you're reusing an identical UUID (clsID) in multiple possibly unrelated places. Maybe this is creating a conflict that corrects itself somehow when using the admin UI to re-save the web service. I'd look at that first.
    If that isn't the issue, I'd try viewing the source and take a look at what the control for saving a web service does (WebServiceRepost) and see if it is doing anything additional/different from what you are doing in your code.

Maybe you are looking for

  • Follow up to 'really messed up' tech question

    As mentioned in my previous post below, I accidentally deleted all my iweb pages somehow after attempting to add google adsense to my site. While trying this my first attempt to add them to my site 'published to a folder' was a success, while trying

  • International calls not going through

    Just I have paid for 800 min India subscribtion and calls are not going through Regards Subhash

  • Role no longer valid

    I just tried to send a connection key to a user who received this message: Your role in this website is no longer valid. Please obtain a new connection key file from this websites administrator. I've not sent her one before, so am not sure why this h

  • Equivalent of XP's "Automatic Private IP Address"?

    Does Leopard have the equivalent of XP's "Automatic Private IP Address", which generates a range of IP address if a DHCP server isn't available? If not what is the recommended download for allowing Leopard to generate IP addresses if no DHCP server i

  • Yoga disintegrates when case screws loosen: an analysis and how to get help?

    My Yoga 13 physically fell apart after just 18 months of quiet, academic use. I'm trying to have it repaired with the extended credit card company policy -- but I'm afraid Lenovo will block my attempt based on what appears to be a not uncommon respon