question

PK-5112 avatar image
0 Votes"
PK-5112 asked

Azure Logic App integration with SAP over RFC Function module

I'm trying to automatize process using Logic Apps -> On-premises data gateway -> SAP system.
I think I have a problem with metadata or cache.

Scenario:
I stopped developing solution on wednesday about 23 (it didn't work), I didn't change anything inside and started to work on thursday(today) about 12. I had to remind myslef what kind of bug it was so i ran this logic app and suddenly it worked fine. I've been using element [RFC] Call function in SAP in logic app with input RFC parameters:

 <?xml version="1.0" encoding="utf-8"?>
 <ZFM_MGR_RFC xmlns="http://Microsoft.LobServices.Sap/2007/03/Rfc/">
       <INVOICE_ID>@{outputs('Invoice')['InvoiceId']}</INVOICE_ID>
 </ZFM_MGR_RFC> 

ABAP FM:

 FUNCTION ZFM_MGR_RFC
   IMPORTING
     VALUE(INVOICE_DATE) TYPE STRING OPTIONAL
    
   DATA: ls_test TYPE zasd_test.
   ls_test-mandt = sy-mandt.
   ls_test-dates = sy-datum.
    
   INSERT zasd_test FROM ls_test. 

So... I decided to enhance my FM in ABAP with another importing parameters. I added f.e. CUSTOMER_NAME parameter (string) and input parameter in logic app. Suddenly I have an error - there's my [RFC] Call function in SAP response:

 {
     "statusCode": 400,
     "headers": {
         "x-ms-request-id": "7c4b6579-956d-4816-b988-73ad72d2962e",
         "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
         "X-Content-Type-Options": "nosniff",
         "X-Frame-Options": "DENY",
         "Cache-Control": "no-store",
         "Set-Cookie": "ARRAffinity=db497ba0020393419ac466ef860f11922d2080b57a6df974e13c227f651e3274;Path=/;HttpOnly;Secure;Domain=sap-gwc.azconn-gwc.p.azurewebsites.net,ARRAffinitySameSite=db497ba0020393419ac466ef860f11922d2080b57a6df974e13c227f651e3274;Path=/;HttpOnly;SameSite=None;Secure;Domain=sap-gwc.azconn-gwc.p.azurewebsites.net",
         "x-ms-connection-gateway-object-id": "7ebb3fec-1964-41ff-b45b-b97e71c65616",
         "Timing-Allow-Origin": "*",
         "x-ms-apihub-cached-response": "true",
         "Date": "Thu, 15 Jul 2021 21:37:41 GMT",
         "Content-Length": "202",
         "Content-Type": "application/json"
     },
     "body": {
         "error": {
             "code": "GeneralBadRequest",
             "message": "Failed to process request. Error details: 'Parameter: 'CUSTOMER_NAME' not found in the function metadata.'.",
             "target": ""
         }
     }
 }

It looks like Logic Apps/On-premise gateway has metadata of function module saved somewhere and refresh it not very often. How can I change it?

Thanks in advance.

azure-logic-appsazure-sap
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers