Fetch contents of infoobject in abap

Hi
Is it possible to fetch the contents of an infoobject from ABAP?
The infoobject 0COSTCENTER contains the cost center hierarchy and I want to somehow access that hierarchy from ABAP.
Is there a function module or a class to handle this?
Regards,
Jacob Vennervald

i am not sure whether it checks authorization. (test it and see)
you cannot test it from SE37. you need to write a simple program and call this FM within that to do the test.
select single * from rshiedir into hier_wa where
  objvers eq 'A' and
  hietype eq '1' and
  hienm eq hier_name and
  dateto ge sy-datum .
  if sy-subrc ne 0 .
    raise invalid_hierarchy .
  endif .
  clear hier_detail .
  move: hier_wa-hieid to hier_detail-hieid ,
        hier_wa-objvers to hier_detail-objvers .
  call function 'RSSH_HIERARCHY_READ'
   exporting
     i_rshiedirkey           = hier_detail
*  I_RSHIEDIRLOG           =
     i_date                  = sy-datum
   importing
     e_rshiedir              = e_rshiedir
     e_t_rsnodes             = e_t_rsnodes
     e_th_rsinterval         = e_th_rsinterval
     e_duplicate_leafs       = e_duplicate_leafs
     e_t_rsnodes_lnk         = e_t_rsnodes_lnk
   exceptions
     invalid_hierarchy       = 1
     name_error              = 2
     iobj_not_found          = 3
     others                  = 4 .
  case sy-subrc .

Similar Messages

  • Error While fetching content nodes from Weblogic Portal

    Hi,
    I am trying to deploy an application on Weblogic server which will connect to Weblogic portal repository and fetch content nodes from the specified repository. While accessing the repositroy nodes from my jsp code I get following error:
    I am not very clear what is going wrong
    Error 500--Internal Server Error
    com.bea.content.RepositoryRuntimeException: Repository configuration error.
         at com.bea.content.manager.internal.RepositoryManagerImpl.getRepositoryOps(RepositoryManagerImpl.java:194)
         at com.bea.content.manager.internal.RepositoryManagerImpl.connect(RepositoryManagerImpl.java:141)
         at com.bea.content.manager.RepositoryManagerFactory.connect(RepositoryManagerFactory.java:46)
         at com.bea.content.federated.internal.VirtualRepositoryManagerImpl.getRepositoryManager(VirtualRepositoryManagerImpl.java:306)
         at com.bea.content.federated.internal.VirtualRepositoryManagerImpl.getSearchOps(VirtualRepositoryManagerImpl.java:332)
         at com.bea.content.federated.internal.itemloader.NodeSearchItemLoader.fetchItemIdentifiers(NodeSearchItemLoader.java:68)
         at com.bea.content.federated.internal.itemloader.DirectAccessItemLoaderBase.minimalResolve(DirectAccessItemLoaderBase.java:17)
         at com.bea.content.paging.internal.PagedListImpl.(PagedListImpl.java:89)
         at com.bea.content.federated.internal.SearchManagerImpl.search(SearchManagerImpl.java:55)
         at jsp_servlet.__test._jspService(__test.java:133)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'examplesWebApp.BEA_content.RepositoryOpsHome' didn't find subcontext 'examplesWebApp'. Resolved ''; remaining name 'examplesWebApp/BEA_content/RepositoryOpsHome'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1138)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:246)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:205)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.bea.content.ContentEJBHomeCache.lookup(ContentEJBHomeCache.java:56)
         at com.bea.content.manager.internal.RepositoryManagerImpl.getRepositoryOps(RepositoryManagerImpl.java:187)
         at com.bea.content.manager.internal.RepositoryManagerImpl.connect(RepositoryManagerImpl.java:141)
         at com.bea.content.manager.RepositoryManagerFactory.connect(RepositoryManagerFactory.java:46)
         at com.bea.content.federated.internal.VirtualRepositoryManagerImpl.getRepositoryManager(VirtualRepositoryManagerImpl.java:306)
         at com.bea.content.federated.internal.VirtualRepositoryManagerImpl.getSearchOps(VirtualRepositoryManagerImpl.java:332)
         at com.bea.content.federated.internal.itemloader.NodeSearchItemLoader.fetchItemIdentifiers(NodeSearchItemLoader.java:68)
         at com.bea.content.federated.internal.itemloader.DirectAccessItemLoaderBase.minimalResolve(DirectAccessItemLoaderBase.java:17)
         at com.bea.content.paging.internal.PagedListImpl.(PagedListImpl.java:89)
         at com.bea.content.federated.internal.SearchManagerImpl.search(SearchManagerImpl.java:55)
         at jsp_servlet.__test._jspService(__test.java:133)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Unknown Source)

    Repositories are essentially external to applications.
    Applications are associated with repositories via repository configs. Repository configs allow applications to access repositories.
    1. There is no special 'centralized repository'.
    2. This can be done, but has caveats, especially around caching. If multiple applications have repo configs which refer to the same repository, there can be caching issues. For example, suppose apps A and B both have repo configs for accessing repo R. If you use app A to change some data in repo R, then try to read the change via app B, you can end up with cached data instead of the most recent data in repo R. This is something to be aware of with this type of configuration.
    3. There is typically one WLP admin url per application. For example, if you have an application named 'FooApp', then the admin url can typically be found at 'http://localhost:7001/FooAppAdmin'. Application 'BarApp' may have an admin url at http://localhost:7001/BarAppAdmin.
    You can use the weblogic server console at http://localhost:7001/console to see these -- click on Deployments, then click Monitoriing. In the Context Root column, you can see the various top-level context roots registered for this application.
    4. Repositories are top-level possibly-shared entities, similar to databases.
    Applications 'use' Repositories via Repository Configs.
    Applications 'own' RepositoryConfigs, which allow them to 'use' a specific Repository.
    It's possible to have multiple applications 'use' the same repository (each application would have to have its own RepoConfig referring to the same repository), but there can be caching issues with this configuration -- see (2).
    Each application 'owns' its own set of repo configs, and therefore its own VCR namespace. The VCR namespace is compsed of the RepoConfigs that application 'owns'. For example, if an application has repository configs with names 'Repo1' and 'Repo2', then the VCR namespace includes /Repo1/... and /Repo2/...
    Note that each RepoConfig entry has a name, which becomes its VCR namespace path. The path to a node in a repository begins with / followed by the name of the RepoConfig followed by /. Application A and application B may each be accessing Repo R, but via different names. For example, if A has the path to Repo R registered via name 'RepoR', then its VCR path to Repo R is /RepoR/... If B has the path to Repo R registered via the name 'R', then its VCR path to Repo R is /R/...

  • Setting the content type inside the ABAP mapping.

    Hello All,
    Can any one help me by telling me how to set the content-type inside ABAP mapping. I have searched a large no of blogs and help.sap.com for the same.
    My requirement is I want to change the MIME type of the Main Document in side SXMB_MONI so that can change the content type of Main document which is application\xml by default.
    I would appreciate an early response regarding the same.
    Abinash

    Hello Raj,
    The output of my ABAP mapping is a flat file. So when I try to open the file with content type application/xml in the message monitor it shows the file has some error which is natural. The way to get around this problem is change the content type to application\txt from application\xml.
    I am not finding an option to set the content type inside the ABAP mapping for the same.
    Abinash

  • I want to delete the data content for InfoObject in processchain

    Hi Guys,
    We have requirement to delete  the data content for one InfoObject in processchain(daily) .Could you please tell me is there any function module or abap program or any other alternative to do this and which can be added to processchain.
    Thanks
    Prasanna

    fm RSDMD_DEL_MASTER_DATA
    REPORT Z_DEL_MASTER.
    tables : RSDIOBJ.
    select-options:
    s_iobj for RSDIOBJ-IOBJNM.
    start-of-selection.
    loop at s_iobj.
    call function 'RSDMD_DEL_MASTER_DATA'
    exporting
    I_IOBJNM = s_iobj-low
    I_FLG_DELETE_ALL = 'X'
    I_FLG_DELETE_SIDS = 'X'
    I_FLG_DELETE_SIDS_ASK
    I_FLG_DELETE_TEXTS = 'X'
    I_T_CHAVL =
    I_FLG_DIALOG = ''
    I_FLG_FORCE_DELETE = 'X'.
    I_FLG_SIMULATION = ''
    I_WITHOUT_PROTOCOL = ''
    endloop.
    Re: Deleting Master data
    Cleanup of Master Data
    Re: Functionmodule RSDMD_DEL_MASTER_DATA

  • Problem while fetching more records in SAP ABAP report program

    Hello Frinds,
    I have SAP ABAP report program which fetches data from usr02 table
    Now, program is working fine with less number of records, bot in production there are more than 200000 records and either report gets timed out or there is run time error like buffer area not available.
    Below is the fetch statement
    SELECT bname FROM usr02 INTO TABLE lt_user
    So, do I need to take records in small chunks, I do not think it is needed as I have worked on number of othere databases where there are number of records in single fetch statement and database itself take care of this.
    Please provide me some approach to resolve this problem.

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • Get content document in WD abap

    Hi all,
    I need to get the content of a document (BINARY or XSTRING) in a WD abap.
    I know the following values:
    - doknr
    - dokar
    - dokvr
    - doktl
    Can anybody helps me?

    hallo, Kata!
    the files are stored in the system with the help of Knowledge Provider. Every document has unique PHIO and LOIO attributes.
    if you know storage name of documents you can get PHIO of the folder where data is kept. futhermore you can get the list of all documents stored in that folder and select the required one. after that use function module:
    SKWF_PHIO_LOAD_CONTENT
    exporting to this module PHIO attributes of your object in import you'll get a table of type sdokcntbin
    this table contains data in binary format
    Note: with the help of SCMS_BINARY_TO_XSTRING you'll convert data to XSTRING

  • How to fetch content from UCM in WLP using VCR

    Hi,
    I configured the connection between weblogic portal v10.3.2 and UCM 11g using VCR adapter guide. But i am struck in how to fetch the content from UCM/VCR and display it in Weblogic portal.
    Please guide me on how to fetch the content from UCM/VCR and display it in Weblogic Portlet ( JSF Portlet). is there any api is available to get the content from ucm and display it in portlet.
    Appreciate your support here.
    Thanks a lot,
    Suresh

    Suresh,
    Please check the name of the VCR configured in the UCm.
    You can use a batch file to load the VCR on to your Weblogic server. Using the name you can retrieve the contents from UCM.
    Please let us know other configuration details to help you further

  • Display file content in Web Dynpro ABAP

    Hello,
    we would like to be able to display any file after having uploaded files using FileUpload ui  element in a web dynpro abap application.
    for microsoft word excel files, the OfficeControl ui element can be used and for  pdf documents the InteractiveForm ui element can be used.
    for other formats  such as '.tif', '.jpg', '.txt'..... we did not find out how to be able to display the file contents
    Does anybody know if and how this could be achieved?
    Cheers
    Ana

    Chris,
    You may be right. Also it requires some configuration in SAP KPro ( document class etc).
    Please see SAP [Help |http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf]on Business Document Services.
    At page 64 of this document under topic 'Display Documents' 'Feature it says. "If it is not possible to display the document in place, an appropriate viewer that is available on the
    PC is started and the document is displayed u201Cout placeu201C

  • Reading HTML Content using Web Dynpro ABAP

    Hello,
    I was wondering if it is possible to read the content (HTML) behind a given URL using Web Dynpro ABAP.  If so, are there any functions available to parse the HTML ?   I have been asked to develop an application that requires going to a URL, reading the content, and formatting a table from that content for presentaion within Web Dynpro ABAP.  The HTML of the URL is nothing more than a "Table of Contents" to existing documentation ( Word Documents )
    Thank you for any help / advice you can provide
    Larry

    You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
    Once you have that, you can convert it to a string using any number of methods. CL_RSR_WWW_RENDERER=>TABLE_TO_STRING should work fine.
    One option for parsing it would be to get it converted into an iXML object, but you might have to do quite a bit of manipulation first depending on what the html looks like. You can see more info here on iXML classes: [http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm]
    Otherwise I would just make use of find statements with regex patterns to sort through the html.

  • Contents of InfoObjects

    Dear Experts,
    I would like to know what an info object contains. for ex infoobject 0TAX_Amount, what is it made up of? (Also I need to find the contents of other infoobjects and to do so what link, document I need to refer?)
    Does it make up of all taxes paid for a division, sales org or anything else?
    Does it make of any specific taxes paid or collected?
    How it is different from info object ZED, ZECS, ZJMOD, ZSURC, ZTOTAX.
    I need to create a query which should capture the total revenue paid to the Govt like Excise, LST, CST, Octroi, Edcess and all other taxes not mentioned here.
    All helps will be highly appreciated.
    Regards
    Sengupto

    Sengupto,
    An infoobject is more like a master data table / measure that you use to identify transaction data.
    An infoobject gains relevance by the transaction data it is associated with and hence the IOBJ should always be looked upon with this perspective.
    Arun

  • Error: Fetching content folder children in Modeler

    Hi,
    I am often facing an internal error in HANA studio sandbox. when i am trying to open content folder in modeler perspective it often throws error: "An internal error occurred during: "Fetching Children...".
    java.lang.NullPointerException"
    what is the possible cause of this error, is it something related to limited user administrative privilege or its a bug in HANA studio beta version?
    Regards,
    Avinash

    Hello,
    same as I suggested in other threads - please check SAP HANA Studio log - it can be found in one of following locations:
    C:\Documents and Settings\<user>\hdbstudio\.metadata\.log
    C:\Users\<user>\hdbstudio\.metadata\.log
    Try to locate the error and check if some useful information is before or after the error.
    Tomas

  • Business Content BW InfoObjects (PAYR-CHECT & PAYR-ZBNKL)

    Hi,
    I tried to find the following BW InfoObjects in Business Content but failed.
    Can anyone advise me what are the corresponding BW InfoObjects for:
    1. Check number <b>PAYR-CHECT</b>
    2. Bank number of the payee's bank <b>PAYR-ZBNKL</b>
    Thanks in advance!

    Dear Fulham ,
    Check Number  -- 0SMSPCNO --- Check Order Number .
      Bank Number of Payees Bank --   0RPA_BCD .
    Hope it helps.
    Thanks,
    Krish
    *Assigning points is a way of sayin Thanks in SDN

  • Memory issues while fetching content

    HI all,
    I am using SAP KM Apis. however i am facing some memory issues while using them.
    I am using getContent() api on a resource. and then getInputStream on the Icontent object. I am using a ByteArrayOutputStream for writing the data. here is the code snippet:
    byte[] buf= new byte[4096];
    InputStream inputStream = content.getInputStream();
    ByteArrayOutputStream os = new ByteArrayOutputStream(1024)
    while ((count = inputStream.read(buf)) != -1)
        os.write(buf, 0, count);
    byte[] arr=os.toByteArray();
    THis code consuimes a lot of memory . we need to optimize this. we also tried removing BYteArrayOutputSteam and directly read the bytes in chunk :
    int n; 
    do 
         n = inputStream.read(buf, 0,(int)content.getContentLength()); 
    while (n != -1); 
    however this approach has not helped us.
    please suggest an approach where memory consumption is less and the entire content is fed.
    thanks

    Hi
    This code worked for me for reading from a KM res...
    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
    StringBuilder sb = new StringBuilder();
    String line = null;
            try {
                while ((line = reader.readLine()) != null) {
                    sb.append(line + "\n");
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    is.close();
                } catch (IOException e) {
                    e.printStackTrace();
    return sb.toString();
    Regards
    BP

  • How to fetch screen field in HR abap

    hi friend,
      I need to fetch a screen field q0128-tdline. And the field should be included in payslip. Is there any user exit to proceed with this.Please reply ASAP.
    Thanks and Regards
    K.karthikeyan.

    hi,
    Use the user exit PBAS0001.
    you need to write the code in include ZXPADU02 to get that field.

  • Fetch Image from Portal in ABAP

    Hello,
    I have an image in a HTML published in the portal (with broadcaster). Now I want to use this image in an ABAP program. I can't call the web address directly because my program can't handle the Portal authentication. So I have two questions:
    - is there any way to call Portal-websites which require authentication from ABAP?
    or
    - how can I directly get access to the image file without detour over the Portal.
    Thank you very much!
    Martin

    where the image is stored? on the portal KM or is it from SAP back end system?
    - is there any way to call Portal-websites which require authentication from ABAP?
    yes you can call it using cl_http_client with the option to either pass userid/pwd or certificate
    - how can I directly get access to the image file without detour over the Portal.
    it depends on where the image is stored
    Raja

Maybe you are looking for

  • Text jumping around in InDesign CS5 attributed to Magic Mouse!

    I am a long time user of Adobe software (beginning with PageMaker) and have been using InDesign CS5 since shortly after it came out. Most of my work involves display ads and catalogues for sporting goods stores, so there is a 'ton' of image and text

  • Need a dial up modem for G3 Beige Tower

    I have an ethernet card for my G3 Beige Tower but I need a dial up modem so I can hook it up for my mom. Anyone know where I can get one? Milwaukee

  • 802.11n For 24" iMac.

    I have read that my Intel Core 2 Duo 24" iMac has 802.11n wi-fi support built in but that it will cost me $1.99 (£1.01) to download the software which will enable me to step up from 802.11g. Where can I find this software in order to download it?

  • URL redirect - how to switch from https to http

    Hi, all. We have some requirement that the portal session be switched to https on some iviews while the rest of the contents are in http. I am thinking of using url redirect on the web dispatcher. What I found is that the url redirect from http to ht

  • Will surround sound run on core audio+ Digi 002 rack ?

    I have used logic express on my set up but want to buy Logic studio for the surround sound capabilities. I heard from a friend that Logic 8 needs a pro-tools HD TDM to run the surround stuff. The 002 rack (firewire) i use in logic goes through core a