Read data from SharePoint using ABAP sql command

We need to read data from a SharePoint site and update the sap object services with the information. There is a lot of information on how to put data into Sharepoint from SAP, but we need to get data from SharePoint and put it into SAP. Is it possible to retrieve data from SharePoint using sql command in ABAP program? If it is possible, what do we need to do to have SAP recognize where to get the SharePoint data?
Richard Newman

Hi Newman,
You can use native sql in your abap code to read data from SharePoint's database. But I would suggest you to generate a SharePoint webservice which can provide you the neccessary data so that you can consume this webservice in ABAP
(Will be quite faster than native sql).
Regards,
Ozcan.

Similar Messages

  • Read Data From DSO - In ABAP Program

    HI Friends,
    Can any one tell how to read Data from a DSO in a Abap Program on BI System itself......
    Which is the better way to read data from DSO in Abap Program... Is it
    1. Reading Data Directly From the Active Table Of the DSO ... or
    2. Reading Data From DSO....
    In case of reading data from DSO.... Which function module is used to do this work....When i searched the forum i came across 2 function Modules.... BAPI_ODSO_READ_DATA_UC and RSDRI_INFOPROV_READ..... Please let me know which one should be used....
    Regards,
    Shyam.

    Hi Shyam,
    The active content of any ods will be stored in the database tables( SE11) with the naming convention /BIC/A<odsname>00 for Custom-defined DSO and /BI0/A<odsname>00 for Business content delivered DSO.
    For example if the technical name of the ods is TEST , then the active content table name in SE11 will be /BIC/ATEST00.
    You can write your own program to read the contents of this database table.
    Regards,
    Krishna.

  • Error when reading data from XML using JAXB?

    Hi all,
    I get the error message when reading data from XML using JAXB.
    [org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException
    (AbstractUnmarshallerImpl.java:315)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
         at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:142)
    I don't find the reason, please help!
    Thanks in advance!

    The problem is sovled.

  • Error reading data from Infocube using shell script.

    Dear all ,
    I am facing a problem while reading data from an infocube using a shell script.
    The details are as follows.
    One of the shell script reads the data from the infocube to extract files with the values.
    The tables used for extraction by the shell script are :
    from   SAPR3."/BIC/F&PAR_CUBE.COPA"     FCOPA,
           SAPR3."/BIC/D&PAR_CUBE.COPAU"    COPAU,
           SAPR3."/BIC/D&PAR_CUBE.COPAP"    COPAP,
           SAPR3."/BIC/D&PAR_CUBE.COPA1"    CCPROD,
           SAPR3."/BIC/D&PAR_CUBE.COPA2"    CCCUST,
           SAPR3."/BIC/D&PAR_CUBE.COPA3"    COPA3,
           SAPR3."/BIC/D&PAR_CUBE.COPA4"    COPA4,
           SAPR3."/BIC/D&PAR_CUBE.COPA5"    COPA5,
           SAPR3."/BIC/MCCPROD"      MCCPROD,
           SAPR3."/BIC/SCCPROD"      SCCPROD,
           SAPR3."/BIC/MCCCUSTOM"    MCCCUSTOM,
           SAPR3."/BIC/SCCCUSTOM"    SCCCUSTOM,
           SAPR3."/BIC/SORGUNIT"     SORGUNIT,
           SAPR3."/BIC/SUNIMOYEAR"   SUNIMOYEAR,
    /*     SAPR3."/BI0/SFISCPER"     SFISCPER, */
           SAPR3."/BI0/SREQUID"      SREQUID,
           SAPR3."/BI0/SCURRENCY"    SCURRENCY,
           SAPR3."/BIC/SSCENARIO"    SSCENARIO,
           SAPR3."/BIC/SSOURCE"      SSOURCE
    The problem is that the file generation by this script (after reading the data from teh infocube) is taking an unexpected time of 2 hours which needs to be maximum 10 mins only.
    I used RSRV to get the info about these tables for the infocube:
    Entry '00046174', SID = 37 in SID table is missing in master data table /BIC/MCUSLEVEL2
    Entry '00081450', SID = 38 in SID table is missing in master data table /BIC/MCUSLEVEL2
    and so on for SID = 39  and SID = 35 .
    Checking of SID table /BIC/SCUSLEVEL2 produced errors
    Checking of SID table /BIC/SCUSLEVEL3 produced errors
    Can you please let me know if this can be a reason of delay in file generation (or reading of data from the infocube).
    Also , Please let me know how to proceed with this issue.
    Kindly let me know for more information, if required.
    Thanks in advance for your help.
    -Shalabh

    Hi ,
    In continuation with searching the solution to the problem , I could manage to note a difference in the partition of the Fact table of the infocube.
    Using SE14 -> Storage Parameters, I could find the partition done for the fact table as :
    PARTITION BY: RANGE
    COLUMN_LIST: KEY_ABACOPA
    and subsequently there are partitions with data in it.
    I need to understand the details of these partitions .
    Do they correspond to each requests in the infocube(which may not be possible as there are 13 requests in infocube and much more partitions).
    Most importantly, since this partition is observed for this onfocube only and not for other infocubes, it is possible that it can be a reason for SLOW RETRIEVAL of data from this ionfocube( not sure since the partition is used to help in fast retreival of data from the infocubes).
    Kindly help.
    Thanks for your co-operation in advance.
    -Shalabh

  • Error while reading data from MapMessage using MDB

    Hi,
    I have written a small client program to send a message to a queue and an MDB receives the message in the onMessage() method. The message is of type MapMessage. I set key value pairs and send the message in a queue. When I try to read data from MapMessage inside onMessage() method of MDB, I get an exception:-
    javax.jms.MessageNotReadableException: In write mode
    When I send the message, by default the readonlymode is false. How do I set the mode to readonly exclusively in case of MapMessage ?
    Sirisha

    Hi,
    I do not have any problem with TextMessages...I works fine..It is only with MapMessage that I am not able to read the values..Before sending the message, the message has the flag "readMode" set to false by default by the server...R there any configurations to be made to any files like web.xml or server.xml or jms.xml ?
    I am running my JMS application on JDeveloper IDE that has an in-built OC4J server which supports JMS.

  • Error reading data from infocube using RSDRI_INFOPROV_READ

    hi,
    I am trying to write a Function module to read data from an Infocube.
    This is a remote enabled Function module and is working fine if I make a few minor changes and customize it to read data from a  case of a DSO.
    However, for cube, code is showing no syntax errors, but on execution is not returning any data also.
    I have tried defining E_T_data as E/F/V tables of the cube, but still not getting any output.
    Probably this is related to structure of E_T_data only. . . .
    Can anyone please guide me on this.
    regards
    Parikshit.

    Hello,
    E_T_DATA needs to defined as an internal table with all the fields you need as an O/P from the infocube you are trying to fetch data from. Just make sure, you keep the name of the fields same as Name of the infoobjects in the Cube. So just define e_t_data Standard internal table with all fields you want to fetch from Infocube (name of fields same as infoobject name).
    Also fill in the g_th_sfc, g_th_sfk internal tables with the list of characteristics and Keyfigues you wanna o/p with chanm/kyfnm field populated with exact name of infoobject and chaalias/kyfalias same as defined in g_t_data (good to keep both same).
    Thanks
    Edited by: Sandesh Shetty on Jul 29, 2008 2:26 PM

  • How to get data from Oracle using Native SQL in SAP.. Problem with date

    Hi Masters.
    I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine
    I wrote this code and it works fine without the statement of where date > '01-09-2010'
    But i need that statement on the select. I read a lot about this issue, but no answer.
    My code is (this code is in SAP ECC 6.0)
    DATA: BEGIN OF datos OCCURS 0,
          id_numeric(10),
          component_name(40),
          comuna(10),
          record_id(10),
          status,
          sampled_date(10),
          END OF datos.
    DATA: c TYPE cursor.
    EXEC SQL.
      connect to 'LIM' as 'MYDB'
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION 'MYDB'
    ENDEXEC.
    EXEC SQL PERFORMING loop_output.
      SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
      into :datos from lims.SAMP_TEST_RESULT
      where     date > '01-09-2010'
    ENDEXEC.
    EXEC SQL.
      disconnect 'MYDB'
    ENDEXEC.
    How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.
    Any help
    Regards

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • How to fetch published data from portal using ABAP

    Hello,
    I have a file published in the portal (with broadcaster). Now I want to use this file 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 file without detour over the Portal (where is the place in file system).
    Thank you very much!
    Martin

    Hello Adrian,
    Thank you very much for your reply.
    > You can publish the report in MHTML format using the
    > BEx Broadcaster to a mapped drive  (completely
    > independent of the portal)  then you could pick this
    > up from your ABAP program if you have access to that
    > share.
    What do you mean with "mapped drive" - <a href="http://http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/e915d951f23ee0e10000000a1553f6/frameset.htm">this</a>? I guess I could choose this drive in broadcaster at "export document in any folder" (don't know exactly English label because my system is in German language...)?
    > I dont really see the value of publishing the report
    > to KM if all you are wanting to do is read this back
    > into your ABAP program.  Why are you wanting to
    > publish the report to the portal in the first place?
    I need to get the image of a BW-chart in ABAP because I want to use it in SAP Interactive Forms by Adobe (I have an ABAP program to fetch my data and create the form). I could create my own chart of the data with the Internet Graphics Service but this would be a lot of work. You can create this charts very easily using the Chart Designer which i.e. is included in the Web Application Designer. If you create a Web Site containing a chart you can access this via browser and you have the chart as an image (created from current data). I tried simply to call this website with ABAP but I can not "log in" and so I have no access to this page. Because of this I had the idea to use the broadcaster to automatically publish this Web Application when my data were updated. If I use MHTML my chart-image is saved separately. This just would work for me. And now I want to get this image as a binary with ABAP.
    I hope you understand my problem.
    Martin

  • Extraction of Data from ECC using ABAP Stage in Datastage

    Hi
    We are required to extract the customer master data from GFIMS SAP ECC5.0 system. This extraction involves fetching of data from 5 different tables. To attain this we are using ABAP stage in DATASTAGE.
    For every run the ABAP stage of DataStage generates the ABAP program in DataStage, will place it in the SAP system and extract the data by executing the ABAP program.
    To be able to use this ABAP stage we need to integrate the DataStage with SAP system. We have to send the cofiles and data files to SAP, these files will install a RFC enabled function module and user profile components in SAP.
    They say, there is a security flaw in the function module component and this will lead to exposing of complete SAP system to outside members.
    Please advise me to do alternative Ways.
    Thanks in Advance.

    Hi
    You dont see the data source in R3? When you created the data source using Tcode RSO2 you would have put the data source under some application like SD, MM etc.
    Please check in the respective application for your data source. If still the data source is still not seen, then check whether the data source is active or not.
    Hope it helps.
    Regards
    Sadeesh

  • Reading data from DLL in ABAP ?

    Hi PPl,
    Is it possible to read data in ABAP from DLL , if yes how??
    thanks ,
    sachin

    see whether this can help u
    Re: How to call a FrontEnd DLL in ABAP Program

  • Reading data from controller using MODBUS

    HI,
    I have a Honeywell UDA2182 controller and am trying to read 2 data channels from it using Labview 2010 SP1 (running on XP with the VISA and MODBUS libraries installed). The PC is connected to the controller via a RS485 - USB converter.
    I have used the 2 attached VI's which I downloaded off the web and get a reading. However the reading is 16385 for the PH probe (should be 2.02) and 17316 for the ORP probe (should be 328 mv). If the conditions of the probes are changed then the values increase or decrease respectively in what appears to be a reasonable manner.
    I am using the modbus RTU format to read the registers and believe that the controller is set correctly and labview parameters are set correctly.
    Is the register some how encrypted? And if so how do I decrypt it?
    I have done some research and it seems that the value might be encrypted, however it is not in hex or binary format.
    Any other MODBUS examples which read the values from the controller would also be appreciated.
    Please bear in mind that I have no experience with MODBUS and am no wizard with labview so clear and simple responses would be greatly appreciated.
    Attachments:
    Modbus Example.vi ‏16 KB
    ModBUS.vi ‏16 KB

    Here is a quick attempt at combining the two U16's into a float per the manual.  Might be able to optimize further but I wanted you to see all the steps.
    Attachments:
    U16x2 to Float.png ‏35 KB

  • Download data from sharepoint using script

    Hi,
    Can someone please help me and let me know how can i download data automatically from sharepoint server.
    URL - MyDomain.sharepoint.com/_layouts/15/WopiFrame.aspx?sourcedoc=%1-2-3-4%7D&file=MPS.xlsx&action=default
    I want to create a script which would run periodically and download this file to linux server.
    Any help would be appreciated.

    Hi,
    As you said, you want to download files from SharePoint server to your Linux server.
    This can be achieved with the REST service of SharePoint 2013, “developers can interact remotely with SharePoint data by using any technology that supports REST web requests”:
    http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    For about how to call REST service in Linux, it would be more appropriate to open a thread in the corresponding forum to get more help and confirmed answers.
    Feel free to reply if there are still any questions.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Error while reading data from SharePoint List - using object model

    Any idea what could be reason for this error:-
    Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback,
    ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView)
       at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback,
    ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView)
       at Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData()
       at Microsoft.SharePoint.SPListItemCollection.GetDataTableCore(Boolean isJsGrid)
       at HRCompetencyGuide.SPHelper.<>c__DisplayClass2.<getDataTableFromList>b__0()
       at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
       at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
       at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
       at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

    It is a simple code:- below is the part of the code taken from the method
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(siteURL))
    if (site != null)
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList(listName);
    if (whereQuery == null)
    collection = list.GetItems().GetDataTable();
    else
    collection = list.GetItems(whereQuery).GetDataTable();
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • How to read data from SharePoint list and append to html table?

    Hi All,
    I would like to create custom view of SharePoint list, so want to append those sharepoint list  items in a custom html table design using content editor webpart.
    How to achieve this? thanks in advance!

    Content edit web part is not the right control. You can either Content Query Web Part
    or Data view web part, where you need to modify xslt template using
    SharePoint Designer and can render list data as per choice.
    For Content Query Web Part:
    Using the Content Query Web Part
    Customizing the Content Query Web Part and Item Style
    How to Customize SharePoint List Content Display using Content Query Web Part
    For Data View Web Parts
    Working with Data view Web Parts
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • Reading Data From XML File to SQL Tables.

    I Have XML of this type
    <empdept>
    <employees_marks>
    <emp_id>1</emp_id>
    <DIVISION_ID>BUS</DIVISION_ID>
    <JOB_ID>PRE</JOB_ID>
    <FIRST_NAME>SMITH</FIRST_NAME>
    <LAST_NAME>JAMES</LAST_NAME>
    <salary>10000</salary>
    </employees_marks>
    <dept>
    <dept_details>
    <deptid>10</deptid>
    <deptname>Mechanical</deptname>
    </dept_details>
    <dept_details>
    <deptid>20</deptid>
    <deptname>Civil</deptname>
    </dept_details>
    <dept_details>
    <deptid>30</deptid>
    <deptname>ICE</deptname>
    </dept_details>
    </dept>
    </empdept>'));
    With the above format am able to retrieve data successfully into relational tables,
    <employees_marks emp_id=1 DIVISION_ID=BUS JOB_ID=PRE salary=10000 />
    <dept_details deptid=10 deptname='Mechanical'/>
    <dept_details deptid=20 deptname='ECE'/>
    <dept_details deptid=30 deptname='EEE'/>
    i.e., I have data as attributes rather than elements, so can I know the way how I can acheive the requirement,
    How to retrieve data when it is present as attributes rather than elements.
    Thanks,
    Sunil. N

    Sunil N wrote:
    I Have XML of this type
    <dept_details deptid=10 deptname='Mechanical'/>
    <dept_details deptid=20 deptname='ECE'/>
    <dept_details deptid=30 deptname='EEE'/>
    i.e., I have data as attributes rather than elements, so can I know the way how I can acheive the requirement,
    How to retrieve data when it is present as attributes rather than elements.I just posted an example of how to deal with tags instead of elements in XML in {message:id=3935746} yesterday.
    The short of it is that you need to use the "+@"+ character as the attribute name - and that tells the XML parser that the attribute is a tag in an element and not an element itself. E.g.
    extract(  xmlData, '/dept_details/@deptid' ) as DEPT_ID
    extract(  xmlData, '/dept_details/@deptname' ) as DEPT_NAME

Maybe you are looking for