Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

SAP Where Filter with Power Apps variable

(0) ShareShare
ReportReport
Posted on by 58

Dear all,

my Usecase and Problem is the following:

I have a collection in Power Apps with values. I chain these values with the concat command to get a string that I can use as a Where Filter in Power Automate. Variable out of Power Apps:

Pokke_3-1689752257023.png

 

Problem: 

The variable is displayed correctly in the overview in Power Automate, but the unformatted display contains exit characters that SAP does not accept.

Formatted output:

Pokke_1-1689752200609.png

 

unformatted output (with Exitcharacters):

Pokke_2-1689752224167.png

 

Pokke_0-1689752144601.png

Pokke_4-1689752284618.png

 

Error Massage: The calculated length of the value for the field exceeds the allowed value length.

Important hint:

If I copy the string directly out of the Power App, copy the Where Filter directly into it, and enclose with [], the flow will run through and return the correct data to me. But the copied string does not contain escape characters either.

 

What am I doing wrong? I've tried attaching the string to an array before, but it also doesn't work because the exit characters remain.

  • Pokke Profile Picture
    58 on at
    Re: SAP Where Filter with Power Apps variable

    I am not very familiar with SAP, but I will try to get a answer for you in the next days!!

    I know that it was not possible to consume CDS Views out of the box, and we had to configure the ABAP that the Power Platform uses. This ABAP is called `RFC_BBP_READ_TABLE`. However, this function cannot consume CDS Views directly. To address this, we created a custom ABAP program. Now, when `RFC_BBP_READ_TABLE` tries to consume a CDS View, SAP redirects the request to our custom program, `Z_RFC_BBP_READ_TABLE`.

  • abhishja Profile Picture
    35 on at
    Re: SAP Where Filter with Power Apps variable

    Thank you for your explanations. I know how to create the flow with Power app. However this is not what i am saying Read SAP Table as "Structure". Let me give an example - SAP Table has different type - Transparent Table, Structure, Database View, Project View..  We are ABLE to get SAP Table Transparent Table or Database View. However we CANNOT get SAP Table Structure.. That is what i am asking.. how to get SAP Structure in the flow? its possible or NOT? i think your AUFK Table is Transparent Table... 

  • Pokke Profile Picture
    58 on at
    Re: SAP Where Filter with Power Apps variable

    Sorry for the late reply. I hope i understand right and give you the answer:

    You can create a Flow with the step with SAP and Function Read SAP table with parsing. 

    For example the AUFK Table:

    Pokke_0-1718631904361.png

    You can edit what columns you want to get from SAP. When you execute this flow you will get the Table as JSON Array and it is structured. 
    All Columns will displayed in the sections Rows of this step:

    Pokke_1-1718632035841.png


    If you want to use this Date in a Power App for example you have to give it back to the app:
    Add a Step HTTP Response 

    Pokke_2-1718632096861.png


    And after you execute the flow ones just copy the Rows Json from the SAP step into the "Generate from sample" of the HTTP Response Step. 


    When you bring this flow in your app you are able to put the data in a Collection for example on Onstart or on a button control:

    Pokke_3-1718632243874.png

     

    It will stored in a Collection and will remove after you close the App.

    Pokke_4-1718632318207.png

     

    It is a Table but only with string columns.


    When you only want to use the Data in Power Automate then you will find any Column / Row in the Rows Section of the Read SAP table with parsing output.



  • abhishja Profile Picture
    35 on at
    Re: SAP Where Filter with Power Apps variable
    Hi, Another question. Is it possible to Read SAP Table as "Structure" in Power Automate?
  • Pokke Profile Picture
    58 on at
    Re: SAP Where Filter with Power Apps variable

    i would look in ST22 in SAP to look what SAP says whats wrong. After that speak with someone in our company who can help you with SAP Knowledge.

  • abhishja Profile Picture
    35 on at
    Re: SAP Where Filter with Power Apps variable

    any Update to resolve the issue?

  • abhishja Profile Picture
    35 on at
    Re: SAP Where Filter with Power Apps variable

    yes this is correct, however its stuck like Several retries occurred if we added this like your compose else would get failed. Without this, its working i mean filters two material only.

     

    abhishja_0-1716356959510.png

     

     

      

  • Pokke Profile Picture
    58 on at
    Re: SAP Where Filter with Power Apps variable

    sorry, please go back to the start. You want to search for several materials (probably material number) in one column and then filter. Is that correct?

    If this is the case, you can actually enter the individual materials in the WHERE filter as follows:

    Pokke_0-1716319784835.png


    As already mentioned, this works in the procurement template.

  • abhishja Profile Picture
    35 on at
    Re: SAP Where Filter with Power Apps variable

    ok thanks for sharing the screen. Are you talking about Language in SAP System. for Example {"AppServerHost": "XXXX","Client":"XX","SystemNumber":"XX","LogonType":"ApplicationServer", "Language" :"DE"} correct?

  • Pokke Profile Picture
    58 on at
    Re: SAP Where Filter with Power Apps variable

    I don't know whether errors can occur due to the language setting. Just to be on the safe side, I work in Germany and have all settings set to German.

    The following IN statement works for me and looks like this:

    [
    "LIFNR IN (",
    "'00000XXXXX',",
    "'00000YYYYY',",

    ")"
    ]

    Here are pictures:

    Pokke_0-1716296401072.pngPokke_1-1716296462818.png

    The limitation of 72 characters can be avoided by the correct use of , and “.





Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics