简体   繁体   English

SAP 与 Azure 逻辑应用程序集成 - 缓存/元数据问题?

[英]SAP integration with Azure Logic Apps - Cache / Metadata problem?

I'm trying to automatize process using Logic Apps -> On-premises data gateway -> SAP system.我正在尝试使用逻辑应用程序 -> 本地数据网关 -> SAP 系统来自动化流程。 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 myself what kind of bug it was so i ran this logic app and suddenly it worked fine.场景:我在星期三大约 23 点停止开发解决方案(它没有工作),我没有改变内部的任何东西,并在星期四(今天)大约 12 点开始工作。我不得不提醒自己这是什么类型的错误,所以我运行这个逻辑应用程序,突然它工作正常。 I've been using element [RFC] Call function in SAP in Logic Apps with input RFC parameters:我一直在使用带有输入 RFC 参数的逻辑应用程序中 SAP 中的元素 [RFC] 调用函数:

<ZFM_MGR_RFC xmlns="http://Microsoft.LobServices.Sap/2007/03/Rfc/">
      <INVOICE_ID>@{outputs('Invoice')['InvoiceId']}</INVOICE_ID>
</ZFM_MGR_RFC> 

ABAP FM: ABAP调频:

  IMPORTING
    VALUE(INVOICE_DATE) TYPE STRING OPTIONAL

  DATA: ls_test TYPE zasd_test.
  ls_test-mandt = sy-mandt.
  ls_test-dates = sy-datum.
  ls_test-time  = sy-timlo.

  INSERT zasd_test FROM ls_test. 

So... I decided to enhance my FM in ABAP with another importing parameters.所以...我决定用另一个导入参数来增强我在 ABAP 中的 FM。 I added for example CUSTOMER_NAME parameter (string) and input parameter in Logic Apps.我在逻辑应用程序中添加了例如CUSTOMER_NAME参数(字符串)和输入参数。 Suddenly I have an error - there's my [RFC] Call function in SAP response:突然我有一个错误 - 在 SAP 响应中有我的 [RFC] 调用函数:

{
    "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.提前致谢。

I found a solution.我找到了解决方案。 Inside On-premises data gateway in settings overlap there is "Restart right now" button.在设置重叠的本地数据网关内部,有“立即重启”按钮。 Everytime you change something inside configuration/source code of program you have to click this button.每次更改程序的配置/源代码中的某些内容时,都必须单击此按钮。

Warning: restarting computer doesn't give the same result.警告:重新启动计算机不会产生相同的结果。 You have to restart gateway manually.您必须手动重新启动网关。

PS If you don't use On-Premise SAP Gateway you can temporarily test your solution with copying one FM to another and running the 2nd one. PS 如果您不使用本地 SAP 网关,您可以通过将一个 FM 复制到另一个并运行第二个来临时测试您的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM