Hi All,

I am using HTML5 front-end UI and trying to get multiple records to work with in service, but methods i am find only returning single row. Any way I can get multiple row from request and work on it in my ECC box..

Please advice..

Thanks

Rajesh

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Andre Fischer

    Hi Rajesh,

    if you want to perform multiple update requests you can use the option $batch.

    Please check out the following document Batch Request in Netweaver Gateway(Multiple Operations into a Single Request) of Arun Chembra .

    Samples of $batch requests can also be found in my following posting Demo test cases that describes the test cases for the SAP NetWeaver Gateway client that we are delivering as part of the standard.

    $batch requests can comfortably be handled in SAPUI5 as described  by John Patterson  in his following post Gateway Batch Calls from SAPUI5

    Best Regards,

    Andre

    (0) 
    1. Rajesh Dadwal Post author

      Thanks Andre,

      I do not want to do multiple updates.. We are working on time sheet and front end we are getting multiple records and we have BAPI thru which can update all records at once.. I am looking for way to capture all rows so I can pass to BAPI in single call…

      Please assist how we can achieve it.

      Regards,

      Rajesh

      (0) 
        1. Rajesh Dadwal Post author

          Hi,

          I am also working on to implement deep entity but this method is not getting triggered..

          I am checking for examples but nothing is in our system.. any pointer how I can get these example in my development box.. it can be useful.. Or any pointers how we can implement deep entity..

          Thanks

          (0) 
          1. Rajesh Dadwal Post author

            Hi,

            I am implementing deep entity create.. I am following simple scenario of sales order Header & Items.. I have defined navigation and everything. Any how it is not triggering – DEEP Entity method.

            I have implemented GET_ENTITYSET method for header and item.

            And put coding in inherited Class – /IWBEP/IF_MGW_APPL_SRV_RUNTIME, method – CREATE_DEEP_ENTITY. It is not triggering the break-point and getting error.

            Step I followed:

            1. Get Request to get data with inline tag

                 URL – /sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders?$expand=SOItems

            2. Use GET output as request by clicking on button

            3. Select POST method and using service URL – /sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders

            After that I am getting following error:

            <?xml version=”1.0″ encoding=”utf-8″ ?>

            <error xmlns=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata>

            <code>005056A509B11ED199D882461C8C60FE</code>

            <message xml:lang=”en>The server is refusing to process the request because the entity has a unsupported format</message>

            </error>


            Please advice….


            Regards,

            Rajesh




            (0) 
            1. Andre Fischer

              With SAP NetWeaver Gateway SAP delivers a set of sample requests called CORE_SAMPLES

              There is also a test request for deep insert that you can test

              1. run in the Gateway Client

              /sap/opu/odata/IWbep/tea_test_application/Employees(‘1’)?$expand=My_Team

              2. Use the “use as request button”

              3. Change URL to

              /sap/opu/odata/IWbep/tea_test_application/Employees

              4. Switch http method to POST

              The CORE_SAMPLES are described in my following document

              Demo test cases

              Hope this helps.

              Best Regards,

              Andre

              (0) 
              1. Rajesh Dadwal Post author

                Thanks Andre, Now I am able to trigger deep entity create method.. But the demo test cases you share.. I can find test case in my system but no development object exists.. Any way I can get these developments. .That will be more helpful…

                Regards,

                Rajesh

                (0) 
                1. Rajesh Dadwal Post author

                  Hi All,

                  I am able to invoke create deep entity for Sales order header & Item.. Means header with one internal table.. I am going one level deep.. and need to read the data for 3 Level Hierarchy..

                  Header—————–>Item———————>sub item.

                               1:N                    1:N

                  I am calling GET method with following URI:

                  /sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders(‘0000000001’)?$expand=SOItems/SODel

                  But not able to use in post method, getting following error:

                  <?xml version=”1.0″ encoding=”utf-8″ ?>

                  <error xmlns=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata>

                  <code>005056A509B11ED199D8826D151FC0FE</code>

                  <message xml:lang=”en>The specified HTTP method is not allowed for the resource identified by the Data Service Request URI</message>

                  </error>


                      Thanks

                        Rajesh

                  (0) 
  2. Rajesh Dadwal Post author

    Hi All,

    I am able to invoke create deep entity for Sales order header & Item.. Means header with one internal table.. I am going one level deep.. and need to read the data for 3 Level Hierarchy..

    Header—————–>Item———————>sub item.

                 1:N                    1:N

    I am calling GET method with following URI:

    /sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders(‘0000000001’)?$expand=SOItems/SODel

    But not able to use in post method, getting following error:

      <?xml version=”1.0″ encoding=”utf-8″ ?>

    – <error xmlns=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata“>

      <code>005056A509B11ED199D8826D151FC0FE</code>

      <message xml:lang=”en”>The specified HTTP method is not allowed for the resource identified by the Data Service Request URI</message>

      </error>

      The data I got on after GET request is:

      <?xml version=”1.0″ encoding=”utf-8″ ?>

    – <entry xml:base=”http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/” xmlns=”http://www.w3.org/2005/Atom” xmlns:m=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata” xmlns:d=”http://schemas.microsoft.com/ado/2007/08/dataservices“>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders('0000000001‘)</id>

      <title type=”text”>SOHeaders(‘0000000001’)</title>

      <updated>2013-12-23T21:45:37Z</updated>

      <category term=”ZECC_SALES_ORDER_SRV.SOHeader” scheme=”http://schemas.microsoft.com/ado/2007/08/dataservices/scheme” />

      <link href=”SOHeaders(‘0000000001’)” rel=”edit” title=”SOHeader” />

    – <link href=”SOHeaders(‘0000000001’)/SOItems” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOItems” type=”application/atom+xml;type=feed” title=”SOItems”>

    – <m:inline>

    – <feed xml:base=”http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/“>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOHeaders('0000000001‘)/SOItems</id>

      <title type=”text”>SOItems</title>

      <updated>2013-12-23T21:45:37Z</updated>

    – <author>

      <name />

      </author>

      <link href=”SOHeaders(‘0000000001’)/SOItems” rel=”self” title=”SOItems” />

    – <entry>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOItems(VBELN='0000000001‘,POSNR=’00010‘)</id>

      <title type=”text”>SOItems(VBELN=’0000000001′,POSNR=’00010′)</title>

      <updated>2013-12-23T21:45:37Z</updated>

      <category term=”ZECC_SALES_ORDER_SRV.SOItem” scheme=”http://schemas.microsoft.com/ado/2007/08/dataservices/scheme” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)” rel=”edit” title=”SOItem” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)/SOHeaders” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOHeaders” type=”application/atom+xml;type=entry” title=”SOHeaders” />

    – <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SODel” type=”application/atom+xml;type=feed” title=”SODel”>

    – <m:inline>

    – <feed xml:base=”http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/“>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOItems(VBELN='0000000001‘,POSNR=’00010’)/SODel</id>

      <title type=”text”>SODels</title>

      <updated>2013-12-23T21:45:37Z</updated>

    – <author>

      <name />

      </author>

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)/SODel” rel=”self” title=”SODels” />

    – <entry>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SODels(VBELN='0000000001‘,POSNR=’00010‘)</id>

      <title type=”text”>SODels(VBELN=’0000000001′,POSNR=’00010′)</title>

      <updated>2013-12-23T21:45:37Z</updated>

      <category term=”ZECC_SALES_ORDER_SRV.SODel” scheme=”http://schemas.microsoft.com/ado/2007/08/dataservices/scheme” />

      <link href=”SODels(VBELN=’0000000001′,POSNR=’00010′)” rel=”edit” title=”SODel” />

      <link href=”SODels(VBELN=’0000000001′,POSNR=’00010′)/SOHeader” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOHeader” type=”application/atom+xml;type=entry” title=”SOHeader” />

      <link href=”SODels(VBELN=’0000000001′,POSNR=’00010′)/SOItem” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOItem” type=”application/atom+xml;type=entry” title=”SOItem” />

      <link href=”SODels(VBELN=’0000000001′,POSNR=’00010′)/$links/SOHeader” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SOHeader” type=”application/xml” title=”SOHeader” />

      <link href=”SODels(VBELN=’0000000001′,POSNR=’00010′)/$links/SOItem” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SOItem” type=”application/xml” title=”SOItem” />

    – <content type=”application/xml”>

    – <m:properties>

      <d:Del_no>000000000011</d:Del_no>

      <d:VBELN>0000000001</d:VBELN>

      <d:POSNR>00010</d:POSNR>

      </m:properties>

      </content>

      </entry>

      </feed>

      </m:inline>

      </link>

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)/$links/SOHeaders” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SOHeaders” type=”application/xml” title=”SOHeaders” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00010′)/$links/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SODel” type=”application/xml” title=”SODel” />

    – <content type=”application/xml”>

    – <m:properties>

      <d:VBELN>0000000001</d:VBELN>

      <d:POSNR>00010</d:POSNR>

      <d:MATNR>1000</d:MATNR>

      </m:properties>

      </content>

      </entry>

    – <entry>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOItems(VBELN='0000000001‘,POSNR=’00020‘)</id>

      <title type=”text”>SOItems(VBELN=’0000000001′,POSNR=’00020′)</title>

      <updated>2013-12-23T21:45:37Z</updated>

      <category term=”ZECC_SALES_ORDER_SRV.SOItem” scheme=”http://schemas.microsoft.com/ado/2007/08/dataservices/scheme” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)” rel=”edit” title=”SOItem” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)/SOHeaders” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOHeaders” type=”application/atom+xml;type=entry” title=”SOHeaders” />

    – <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SODel” type=”application/atom+xml;type=feed” title=”SODel”>

    – <m:inline>

    – <feed xml:base=”http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/“>

      <id>http://cscgsapndc126.amer.csc.com:8000/sap/opu/odata/sap/ZECC_SALES_ORDER_SRV/SOItems(VBELN='0000000001‘,POSNR=’00020’)/SODel</id>

      <title type=”text”>SODels</title>

      <updated>2013-12-23T21:45:37Z</updated>

    – <author>

      <name />

      </author>

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)/SODel” rel=”self” title=”SODels” />

      </feed>

      </m:inline>

      </link>

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)/$links/SOHeaders” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SOHeaders” type=”application/xml” title=”SOHeaders” />

      <link href=”SOItems(VBELN=’0000000001′,POSNR=’00020′)/$links/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SODel” type=”application/xml” title=”SODel” />

    – <content type=”application/xml”>

    – <m:properties>

      <d:VBELN>0000000001</d:VBELN>

      <d:POSNR>00020</d:POSNR>

      <d:MATNR>1100</d:MATNR>

      </m:properties>

      </content>

      </entry>

      </feed>

      </m:inline>

      </link>

      <link href=”SOHeaders(‘0000000001’)/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/related/SODel” type=”application/atom+xml;type=feed” title=”SODel” />

      <link href=”SOHeaders(‘0000000001’)/$links/SOItems” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SOItems” type=”application/xml” title=”SOItems” />

      <link href=”SOHeaders(‘0000000001’)/$links/SODel” rel=”http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/SODel” type=”application/xml” title=”SODel” />

    – <content type=”application/xml”>

    – <m:properties>

      <d:VBELN>0000000001</d:VBELN>

      <d:ERNAM>One</d:ERNAM>

      </m:properties>

      </content>

      </entry>

    Regards,

    Rajesh

    (0) 

Leave a Reply