Call mutiple tables data in single OData service call

Hi,
We have created a ZBAPI same as standard BAPI "ALM_PM_NOTIFICATION_GETDETAIL" for creating an ODATA service. But we are facing problem while calling the data from multiple tables in a single query/entity while creating that ODATA service using SEGW.
Please guide me how can we do that or is this possible to do that.
Thanks,
Shrikant N.

Hello Shrikant,
You mean to say BAPI is returning multiple tables and you have to get all those table data in one call ??
If this is the case you cannot get all the table data from that BAPI in one shot as you can map only 1 table as response table in GW.
Assuming you are passing inputs A & B to your BAPI and it is returning 2 tables in the response,
maintain a Parent entity ( dummy one ) and create association to those tables ( each table as different entity ).
This way you get all the tables data in one go as GW calls your RFC 2 times.
I mean to say you have 2 tables in the BAPI response , GW calls 2 times the same logic to get those 2 tables. i.e., Table 1 in 1st call and Table 2 in 2nd call.
Your URL would be looking like this its just an example :
http://<GW_Host>/sap/opu/odata/sap/<Service_Name>/<Parent>?$filter=A eq 'x' and B eq 'x'&$expand=Table1_Set,Table2_set
where Table1_Set and Table2_Set are your navigation properties which you would have defined.
Also note that here there is a performance trade-off here as GW calls 2 times the same logic and that is how GW calls BE on $expand.
Suggestion is to have separate FM's to get those tables separately so that data retrieval is fasted and there is no overhead.
Regards,
Ashwin

Similar Messages

  • Exporting Multiple Internal table data to Single Excel file.

    Hello Expert,
      I want to export more than one internal table data from Web Dynpro Application to single Excel file but in such a way that
    each table's data to be get exported to different tabs in (Multiple sheets)  that single excel file.
    So help me in this matter.
    Thank You.
    Varun
    Moderator message: wrong forum, please post again in "Web Dynpro ABAP".
    Edited by: Thomas Zloch on Oct 29, 2010 1:39 PM

    Each table having different sheet in same CSV file .
    A CSV file is a flat file and don't have "Sheets"; you would have to Export to an Excel file, which supports several Sheets in one file.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Pl/sql block reading reading table data from single point in time

    I am trying to figure out whether several cursors within a PL/SQL block are executed from within a Single Point In Time, and thus do not see any updates to tables made by other processes or procedures running at the same time.
    The reason I am asking is since I have a block of code making some data extraction, with some initial Sanity Checks before the code executes. However, if some other procedure would be modifying the data in between, then the Sanity Check is invalid. So I am basically trying to figure out if there is some read consistency within a PL/SQL, preventing updates from other processes to be seen.
    Anyone having an idea?.
    BR,
    Cenk

    "Transaction-Level Read Consistency
    Oracle also offers the option of enforcing transaction-level read consistency. When a transaction runs in serializable mode, all data accesses reflect the state of the database as of the time the transaction began. *This means that the data seen by all queries within the same transaction is consistent with respect to a single point in time, except that queries made by a serializable transaction do see changes made by the transaction itself*. Transaction-level read consistency produces repeatable reads and does not expose a query to phantoms."
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=read+consistency&tab_id=&format=ranked

  • How to process a group of records in a single Web Service Call through SDK

    Hi Experts,
    The Business Scenario is as follows:
    Entire data of the customer accounts and Sales information of my client's is coming from an external system called DellBoomi into the ByD. We had a solution for this where we had used a custom inbound web service for some reasons and we cannot consume standard SAP provided web service to do this for customer account creation/updation in ByD. In the solution when we are trying with a custom web service we found that the associations of SalesArrangment and Payment Data are not PSM write enabled for partners. So we had taken a route of consuming SAP standard web service as a external web service and we consumed it and we used this for creation of the customer and for the updation we used the custom web service which we built.
    Here now the problem is it is taking long time to process a batch of 100 customers (almost 3hours it took). It is due to because we are trying to call SAP standard web service for each and every record of 100 records which are coming from DellBoomi and creating them and again updating some of the information with the use of custom web service.
    I know this is a long process and step which we had taken but there is no other way we had left with us.
    Now I am looking for a way to get all the 100 records of the DellBoomi together should invoke the SAP standard web service at a time instead of going and looking for it for each and every record.
    Can any one reply back with their valuable suggestions and solutions.
    Regards..
    Hanu K

    Hello,
    Thank you, guys, for advice. I should have explained calling context before, but what I basically need to do is to see if procedure(arg1, list(record(arg2, arg3))) returns true.
    I see array binding wouldn't fit there nicely. Internal procedure calls would be proc(next(arg1), next(arg2), next(arg3)) - if all these return true, external call should also return true. I would need to make a list of repeating values of arg1 and separate list(record(arg2, arg3)) into separate lists. I would also need to record whether the internal call returns true to deduce whether external call returns true.
    As I see no better way yet, I'll make Oracle procedure proc(arg1, arg2, arg3) and implement a loop in .NET side. If I optimize for performance, I'll probably pack the array of records into string and pass it for Oracle side to parse.
    Regards,
    Aurimas Pranskevicius

  • Is there a way to get a dump of the raw request data of a web service call?

    Hello experts,
    on our SAP machine we provide a web service based on a normal SAP function module. The service is working fine, but one of the external systems (web service clients) does have a problem when using non-ASCII characters within the request XML data.
    Ok, so I thought I check whats going on in soapUI, but there the same request works fine, even with the non-ASCII characters. So it seems soapUI can correctly use the encoding as it should be, whereas the faulty client can't.
    Hence I wanted to check the payload trace in SOAMANGER, but unfortunately there is no trace if this error occured. It seems the error occurs in SAP even before any trace can be made (at least via SOAMANGER).
    So my question is: Do I have any other option to get a 1:1 copy of the whole request the client is sending to the web service on the SAP machine? Or is the only option we have to use a tcpdump on the OS level of the SAP machine?
    Thanks in advance for any ideas and help!
    Kind regards, Matthias

    Hi Matthias,
    You can try using the ICF Recorder in TCode SICF, steps below:
    [http://help.sap.com/saphelp_nw70/helpdata/en/12/adc54044ed7b2de10000000a155106/frameset.htm]
    That should at least catch the entire client request (1:1) before the error occurs. Remember to de-activate the recorder after you're done. There's also an option to activate a ICF trace using the similar menu path, this also should be de-activated once you're completed.
    Regarding the SOAMANAGER traces, it needs to be activated before anything is logged there. That might be why you're not seeing anything there.
    Regards, Trevor

  • Adf table data based on web service -  LOV based on entity / View

    My tools version:
    Jdev: 11.1.2.3.0
    ADF essential 11.1.2.3
    My case:
    I have a data table based on webservice (client and proxy). In this table I have status ID field, I would like to show the status ID description, I have also a LOV View (based on entity).
    I try a lot things, but nothing work, could you please give an idea to show my status description in my data table for each line?
    Thanks a lot

    Frank,
    I would like to get the status description from the ADF BC LOV, because in my table (based on the webservice) I have only the ID status.
    It is possible?
    Regards
    KM

  • Data from an odata service not displaying data in all columns.

    Hi
    This is my Odataservice
    the code in view. I have placed only the first 2 columns code. The rest are similar
    the last few lines
    oTable.setModel(omodel); 
      oTable.bindRows("/MixmatpoXS"); 
      return oTable; 
    The result I am getting
    Only Two columns are populated which I believe is the keys. This is a calculation view created in the Hana modeler.
    What could be the reason.
    Thanks and regards
    Arun

    template: new sap.ui.commons.TextView().bindProperty("text","PROPERTYNAME")
                 see this PROPERTYNAME properly. i think you missed this one. bec in you mensioned 1 is Plant and another one is PLANTNAME so..

  • Service Call - Date Received

    Hi,
    In what database table can I find the Service Call History updates? I want to access the dates that the Status was changed so that we can see when items were received through queries that are emailed to our repair technicians.
    Thanks

    Rahul,
    Thank you, the OSCL table has a lot of dates for the Service Call - including an updateDate field - but what I am looking for is the whole history of updates that can be found by clicking the History tab of the Service Call.  The status of a Service Call can be changed multiple times, and this information would seem to be stored in a different table.  However, the table name does not appear when you hover over the field with the View System Information.
    Thanks,
    Theresa

  • New Activity date in Service Call Activities folder

    Hi,
    Does anyone know how to get the new activity date that appears in Service Call Activities folder?
    Best Regards,
    Ana Silva

    Hi,
    Check this if it helps you start off :
    SELECT distinct T0.[ClgCode] as ' Activity Number', T0.[CardCode] as ' Business Partner',
    T0.[CntctDate] as 'System Date', T0.[Recontact] as 'Activity Date'
    FROM OCLG T0 left outer join OSCL T1 on t1.customer = t0.cardcode
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Create a record using SAPUI5 and ODATA Service

    Hi there,
    since SPS6, SAP HANA should allow CRUD operations using an ODATA Service.
    That sounds nice and so I wanted to give it a try.
    I've started by creating a simple table and set up a tiny application that displays the data in a grid (using a JSON Model) and allows to insert new records by entering data into two textfields and save them as a new record to the databse. That works well, the grid shows the records which I have created using the SAP HANA Studio.
    So I wanted to create new records, and the documentation says very clearly how to create a new record.
    I've tried it this way, but when the request is send I get an 501 Not Implemented error.
    Thats the code I'm using in my SAVE-Button:
    btnSave.attachPress(function() {
       var entry = {};
       entry.id = tfUserId.getValue();
       entry.username = tfUserName.getValue();
       oData.create('/tbl_user', entry, null,
       function() {
          alert("Create successful");
       function() {
          alert("Create failed");
    After that I've tried to create a record using the POSTMAN extension for Chrome browser as mentioned in this cool video by Thomas Jung.
    Unfortunately, this also doesn't work for me. After sending the request I get as respone a sap hana xs login window with Status Code 200 instead of a status code "201 created".
    Here's a screenshot:
    I'm using SAP HANA Cloud Trial.
    Anybody got an idea what I'm doing wrong? Or does ODATA CRUD not work an SAP HANA Cloud Trial?
    Many thanks,
    ben

    Hi Jason,
    exactly, it's the logon page returned that is opened when I open the service URL in the browser. After logging on I can see the results of the ODATA service call.
    The URL must be correctly defined, the grid shows up the data from the ODATA Service.
    And yes, the URL looks OK when expecting in Chrome developer tools...
    Thanks,
    ben

  • OData service

    Hi Sir,
    I am a new SAP Developer and i am able to access record form one table success using OData services but i don't know how access record form more than one table by Parameter using OData service.
    I a tried last couple of for solved this problem but till date i didn't get any proper solution some where i found with SQL script and using Calculation view but still getting some problem.
    Thanking you

    Hi Tobias,
    After adding the destination, to reflect it in Web IDE you have to refresh Web IDE.
    Given below is one of my gateway configuration (trial available through SCN). It might help you.
    Regards,Midhun
    SAP Technology RIG

  • Service Call Activity

    Hi all,
    Does anyone know how to create a service call activity? I've created a service call but now I need to create an activity for that service call. The DI help file states that you need to specify the ActivityCode, and then I assume you call the Add method. 
    But where or how do you obtain an ActivityCode? I've tried setting it to the newly created service call and also to a value of 1 but both of these attempts  did not work.
    Also the Add method does not return a value, so you can't determine whether or not the activity has been created unless you look at the service activiy table or the activity screen.
    Does anyone else have any experience in this area?
    Regards, Lita

    If you create the activity first, this will give you an activity code which you can then use for the service call activity object.
    Here is a sample adding a new activity to an existing service call.
    Private Sub ServiceCallActivities()
        Dim sboServiceCall      As SAPbobsCOM.ServiceCalls
        Dim sboContact          As SAPbobsCOM.Contacts
        Dim lngDocEntry         As Long
        'Create a new Activity
        Set sboContact = sboCompany.GetBusinessObject(oContacts)
        sboContact.CardCode = "SLU003"
        sboContact.Closed = tNO
        sboContact.ContactDate = Date
        sboContact.Details = "Details...."
        sboContact.Notes = "Sample notes..."
        sboContact.DocType = oServiceCalls
        sboContact.DocEntry = 31
        sboContact.Add
        'Get Activity Code
        lngDocEntry = sboCompany.GetNewObjectKey
        'Assign Activity to Service Call
        Set sboServiceCall = sboCompany.GetBusinessObject(oServiceCalls)
        sboServiceCall.GetByKey 31
        sboServiceCall.Activities.Add
        sboServiceCall.Activities.ActivityCode = lngDocEntry
        sboServiceCall.Update
    End Sub
    John.

  • Error during connecting to the odata service of Employee

    Hi Everyone,
    When I am calling the employee odata service the following message is coming,
    and below error messages are coming in the console,
    2014-04-01 17:19:53 Device API logging initialized - DEVICE 2014-04-01 17:19:53 registerResourcePath ('', 'resources/') -  sap.ui.ModuleSystem 2014-04-01 17:19:53 URL prefixes set to: -  sap.ui.ModuleSystem 2014-04-01 17:19:53  (default) : resources/ -  sap.ui.ModuleSystem 2014-04-01 17:19:54 registerResourcePath ('employee_test', './employee_test/') -  sap.ui.ModuleSystem 2014-04-01 17:19:56 The following problem occurred: HTTP request failed400,Bad Request,
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF1039D3100155D116802 -  2014-04-01 17:19:56 message: HTTP request failed Response Text:
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF1039D3100155D116802 Status Code: 400 Status Text: Bad Request -  2014-04-01 17:19:56 The following problem occurred: HTTP request failed400,Bad Request,
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF10E9D3100155D116802 -  2014-04-01 17:19:56 message: HTTP request failed Response Text:
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF10E9D3100155D116802 Status Code: 400 Status Text: Bad Request -  2014-04-01 17:19:57 The following problem occurred: HTTP request failed400,Bad Request,
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF1199D3100155D116802 -  2014-04-01 17:19:57 message: HTTP request failed Response Text:
    SY/530Atleast one filter parameter is mandatoryBA93B9E3C3CCF1199D3100155D116802 Status Code: 400 Status Text: Bad Request -
    And also when I am calling the entity set 'EmployeeCollection' of the odata service it is giving the below error,
    Kindly tell me, which will help me to cal the data of the EmployeeCollection entity set of the odata service. How I can connect to that odata with the help of the NetWeaver Gateway? And why this errors are coming? Do I need any authorization from our HR team of our company to connect to this odata service to retrieve data or the data should come automatically?
    Regards,
    Soumya

    To understand the error,
    1.go to developer console in chrome by pressing F12.
    2. Next go to network tab and refresh the application by pressing F5.
    3.In the network tab you will see an OData service call being fired to fetch  Employee collection data. 4.Right click on the call and open it in a new tab. There you can see the actual error message.
    From the error you have posted it looks like, the Entity collection expects atleast one filter condition to be passed while calling the collection. Calling the Entity collection without any filter is equivalent to 'SELECT *' without any WHERE clause. However in this case the particular service enforces a where clause by specifying a $filter option. If no $filter is supplier it raises an exception which you get here.

  • Inserting data into database using service callout

    Hi,
    Im using 3 service callout for calling 3 database projects in osb. Im getting output from first two service call outs. In last service callout i have to insert data into data base which is output from service callout. im getting fault while inserting data. Can any body help me with any samples for inserting data into data base which is output from another service callout
    BEA-382513: OSB Replace action failed updating variable "body": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}XP0006: "element {http://www.w3.org/2003/05/soap-envelope}Body { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type element {http://xmlns.oracle.com/pcbpel/adapter/db/POC/NRICHMENT/}OutputParameters { {http://www.w3.org/2001/XMLSchema}anyType }

    Hi prabu,
    I tried with several inputs but im getting same error. How to map to data base input of third service call out with output values of second service call out?
    Any sample blogs

  • History in Service Call

    Hi To All
    There is a History Tab in Service Call...In which table the values from History Tab got stored....

    Hi,
    EDIT:
    this info is a combination of a select from different tables.
    the best is you analyze it with SQL profiler and you see that!
    also look in the DB Reference from SDK and search for "Service" and you will see
    some tables that are used for Service Calls.
    lg David
    Edited by: David Nussböck on Oct 22, 2008 12:25 PM

Maybe you are looking for