<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: $Batch Request error with Transaction Notification in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217379#M1983339</link>
    <description>&lt;P&gt;Did you have solution for this error?&lt;/P&gt;</description>
    <pubDate>Sat, 08 Oct 2022 17:55:30 GMT</pubDate>
    <dc:creator>cognnav</dc:creator>
    <dc:date>2022-10-08T17:55:30Z</dc:date>
    <item>
      <title>$Batch Request error with Transaction Notification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217377#M1983337</link>
      <description>&lt;P&gt;Hi, I want to create a new delivery note by $batch request. My request body is: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;--Batch_Header
Content-Type: multipart/mixed;boundary=Batch_Body


--Batch_Body
Content-Type: application/http 
Content-Transfer-Encoding:binary
Content-ID: 1


POST /b1s/v1/DeliveryNotes
Content-Type: application/json


&amp;lt;Json format Content&amp;gt;


--Batch_Body--
--Batch_Header--
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;It works perfect until I create a notification for DeliveryNotes (edit store prodecure SBO_SP_TransactionNotification) like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;AlTER PROCEDURE SBO_SP_TransactionNotification
(
in object_type nvarchar(30), -- SBO Object Type
in transaction_type nchar(1),-- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
in num_of_cols_in_key int,
in list_of_key_cols_tab_del nvarchar(255),
in list_of_cols_val_tab_del nvarchar(255)
)
LANGUAGE SQLSCRIPT
AS
-- Return values
error  int;-- Result (0 for no error)
error_message nvarchar (200); -- Error string to be displayed
begin
error := 0;
error_message := N'OK';
if :object_type = '15' then -- 15 is object type of Delivery Note
    error := 1;
    error_message := N'Error';
end if;
-- Select the return values
select :error, :error_message FROM dummy;
end;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Now when i send request, the response does not return something like {"error": 1, "error_message": "Error"} but:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
 &amp;lt;title&amp;gt;502 Proxy Error&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
 &amp;lt;h1&amp;gt;Proxy Error&amp;lt;/h1&amp;gt;
 &amp;lt;p&amp;gt;The proxy server received an invalid
 response from an upstream server.&amp;lt;br /&amp;gt;
The proxy server could not handle the request &amp;lt;em&amp;gt;&amp;lt;a href="/b1s/v1/$batch"&amp;gt;POST /b1s/v1/$batch&amp;lt;/a&amp;gt;&amp;lt;/em&amp;gt;.&amp;lt;p&amp;gt;
 Reason: &amp;lt;strong&amp;gt;Error reading from remote server&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt; &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Please tell me What 's wrong. &lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 04:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217377#M1983337</guid>
      <dc:creator>cognnav</dc:creator>
      <dc:date>2020-09-18T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: $Batch Request error with Transaction Notification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217378#M1983338</link>
      <description>&lt;P&gt;I have a similiar error, too.&lt;/P&gt;&lt;P&gt;when I try to perform a transaction by scriptengine or batch, and this operation triggers a validation by sp transaction notification, it returns proxy error 502.&lt;/P&gt;&lt;P&gt;What happen?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:58:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217378#M1983338</guid>
      <dc:creator>hnavarro</dc:creator>
      <dc:date>2022-01-31T18:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: $Batch Request error with Transaction Notification</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217379#M1983339</link>
      <description>&lt;P&gt;Did you have solution for this error?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 17:55:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-request-error-with-transaction-notification/m-p/12217379#M1983339</guid>
      <dc:creator>cognnav</dc:creator>
      <dc:date>2022-10-08T17:55:30Z</dc:date>
    </item>
  </channel>
</rss>

