on 09-15-2016 12:22 PM
Hello Experts,
I'm have message information using batch and I searched on community and follow some tutorials and the note 1869434, but the message appears again .
Can you please explain and give me some examples.
How can I working with batch. And in some answers they say the problem maybe is space 😕
I never use batch and I can't find information that works in my service.
Please can help me ?
Best Regards
Cristina Rodrigues
Hello Cristina,
I suspect its because of the spacing between the requests inside the payload.
Could you please copy paste your payload here ?
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashwin ,
Thanks for answer my question ,
ITEMS and Product are my entity set
--batch_01869434-0001
Content-Type: application/http
Content-Transfer-Encoding: binary
GET ITEMS HTTP/1.1
--batch_01869434-0001
Content-Type: application/http
Content-Transfer-Encoding: binary
<at least one "carriage return line feed">
GET Product HTTP/1.1
--batch_01869434-0001--
Thnaks again for your help
Best Regards
Hi,
One more question I try insert many records from one request like
Request A(key is generate when insert the items from bapi) : [ 0 : { more than 1 field }
1: { more than 1 field }
]
Can you tell if you know how can I read twice times the same data from sapui5 and what I need to do in method create please ?
Sorry if my english is wrong
Best Regards
Thanks for your time
Hello Ashwin Dutt R,
I'm trying to use the method POST but once again appears the message "Empty response body".
What I'm trying to do is inserting many items for the same request , like the example:
I used the following request:
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
POST ITEMS HTTP/1.1
Content-Type: application/atom+xml
Content-Length: 588
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<atom:content type="application/xml">
<m:properties>
<d:Textheader/>
<d:Banpr>03</d:Banpr>
<d:Knttp>P</d:Knttp>
<d:Lpein>1</d:Lpein>
<d:Bnfpo>00010</d:Bnfpo>
<d:Frgdt>2016-08-19T00:00:00</d:Frgdt>
<d:Bsart>ZG</d:Bsart>
<d:Storenetworkid>P/-003/10 </d:Storenetworkid>
<d:Bstyp>B</d:Bstyp>
<d:Ernam>TRPRO</d:Ernam>
<d:Txz01>ITEM 1</d:Txz01>
<d:Werks>1800</d:Werks>
<d:Matkl>30003</d:Matkl>
<d:Ekgrp>001</d:Ekgrp>
<d:Erdat>2016-08-19T00:00:00</d:Erdat>
<d:Meins>AU</d:Meins>
<d:Badat>2016-08-19T00:00:00</d:Badat>
<d:Lfdat>2016-08-19T00:00:00</d:Lfdat>
<d:Peinh>1</d:Peinh>
<d:Mengee>0.000</d:Mengee>
</m:properties>
<m:properties>
<d:Textheader/>
<d:Banpr>03</d:Banpr>
<d:Knttp>P</d:Knttp>
<d:Lpein>1</d:Lpein>
<d:Bnfpo>00010</d:Bnfpo>
<d:Frgdt>2016-08-19T00:00:00</d:Frgdt>
<d:Bsart>ZG</d:Bsart>
<d:Storenetworkid> P/-003/10</d:Storenetworkid>
<d:Bstyp>B</d:Bstyp>
<d:Ernam>TRPRO</d:Ernam>
<d:Txz01>Item 2</d:Txz01>
<d:Werks>1800</d:Werks>
<d:Matkl>30003</d:Matkl>
<d:Ekgrp>001</d:Ekgrp>
<d:Erdat>2016-08-19T00:00:00</d:Erdat>
<d:Meins>AU</d:Meins>
<d:Badat>2016-08-19T00:00:00</d:Badat>
<d:Lfdat>2016-08-19T00:00:00</d:Lfdat>
<d:Peinh>1</d:Peinh>
<d:Mengee>0.000</d:Mengee>
</m:properties>
</atom:content>
</atom:entry>
--changeset--
--batch—
Can you check please if I do write way ?
I have many difficults with this part it's confused for me
Thanks for your help
Best Regards
Cristina Rodrigues
Hi Cristina,
Ideallly the payload should have Changeset marker between each POST or PUT operation as below.
--batch_005056A5-09B1-1ED1-BF82-409B26A80300
Content-Type: multipart/mixed; boundary=changeset_005056A5-09B1-1ED1-BF82-409B26A80301
--changeset_005056A5-09B1-1ED1-BF82-409B26A80301
Content-Type: application/http
Content-Transfer-Encoding: binary
PUT TravelagencyCollection(agencynum='00001755') HTTP/1.1
Content-Type: application/atom+xml
Content-Length: 1021
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
<atom:content type="application/xml">
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:agencynum>00001755</d:agencynum>
<d:NAME>SUTIL - Unit Test Agency</d:NAME>
<d:STREET>Hasso-Plattner-Allee</d:STREET>
<d:POSTBOX>1234567890</d:POSTBOX>
<d:POSTCODE>69190</d:POSTCODE>
<d:CITY>Walldorf</d:CITY>
<d:COUNTRY>DE</d:COUNTRY>
<d:REGION>BW</d:REGION>
<d:TELEPHONE>+499999999999</d:TELEPHONE>
<d:URL>http://www.sap.com</d:URL>
<d:LANGU>E</d:LANGU>
<d:CURRENCY>USD</d:CURRENCY>
<d:mimeType>text/html</d:mimeType>
</m:properties>
</atom:content>
</atom:entry>
--changeset_005056A5-09B1-1ED1-BF82-409B26A80301
Content-Type: application/http
Content-Transfer-Encoding: binary
PUT TravelagencyCollection(agencynum='00001755') HTTP/1.1
Content-Type: application/atom+xml
Content-Length: 1021
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
<atom:content type="application/xml">
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:agencynum>00001755</d:agencynum>
<d:NAME>SUTIL - Unit Test Agency</d:NAME>
<d:STREET>Hasso-Plattner-Allee</d:STREET>
<d:POSTBOX>1234567890</d:POSTBOX>
<d:POSTCODE>69190</d:POSTCODE>
<d:CITY>Walldorf</d:CITY>
<d:COUNTRY>DE</d:COUNTRY>
<d:REGION>BW</d:REGION>
<d:TELEPHONE>+499999999999</d:TELEPHONE>
<d:URL>http://www.sap.com</d:URL>
<d:LANGU>E</d:LANGU>
<d:CURRENCY>USD</d:CURRENCY>
<d:mimeType>text/html</d:mimeType>
</m:properties>
</atom:content>
</atom:entry>
--changeset_005056A5-09B1-1ED1-BF82-409B26A80301--
--batch_005056A5-09B1-1ED1-BF82-409B26A80300--
You can check out the sample payload in transaction /IWFND/GW_CLIENT >> SELECT >>Give testgroup as CORE_SAMPLES..
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.