3

I have a big string containing 400 MByte JSON data in rfc function module.

See debugger:

sap-debugger

Unfortunately my pyRFC client only receives roughly 34 MByte.

Where and why does my data get cut?

Is this a well known limitation of sap-rfc?

Strange but true, I already transferred json strings with 77 MByte successfully.

Related issue at github: https://github.com/SAP/PyRFC/issues/97

guettli
  • 25,042
  • 81
  • 346
  • 663
  • Try to call this function module via RFC from another SAP system if you can to see whether this is somehow connected with your environment settings. – Jagger Apr 25 '19 at 15:13

1 Answers1

1

It cannot be a limitation of SAP RFC. I have made a simple test. I created an RFC function module in one of the systems (let us name the RFC destination for it DEV000). It looks like this.

FUNCTION Z_TEST .
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  EXPORTING
*"     VALUE(E_STRING) TYPE  STRING
*"----------------------------------------------------------------------

e_string = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`.

DO 23 TIMES.
  e_string = e_string && e_string.
ENDDO.

ENDFUNCTION.

Then I wrote a simple program in another system that calls this function module.

REPORT ZZZ.

DATA: g_string TYPE string.

CALL FUNCTION `Z_TEST`
  DESTINATION `DEV000`
  IMPORTING
    e_string = g_string.

BREAK-POINT.

The string gets transferred in full, so it cannot be a limitation of SAP RFC. I guess you have to search for the cause rather in your pyRFC library or in your Python's client code.

Jagger
  • 10,350
  • 9
  • 51
  • 93
  • I use the official pyRFC library from SAP: https://github.com/SAP/PyRFC – guettli Apr 26 '19 at 07:29
  • 3
    Well, that does not necessarily mean that it does not have any bugs, does it? – Jagger Apr 26 '19 at 07:31
  • 1
    Your sample with 52*23 chars string proves nothing, as OP speaks about 400Mb of text. It is incomparable... – Suncatcher Jun 02 '19 at 12:26
  • @Suncatcher Welllllll, it is definitely not, 52*23 because it raises exponentially in the example. Did you even run this example, before posting the comment? – Jagger Jun 03 '19 at 07:41
  • `it raises exponentially` and what does it show? Just out of curiosity. The example should be at least problem-representable (tending to 2Gb RFC limitation) not just exponentially raising – Suncatcher Jun 03 '19 at 08:01
  • O-M-G, this example is about 400mb if not more. What don't you understand? – Jagger Jun 03 '19 at 08:07
  • @Suncatcher: 52*2^23 = 416MB, so this should be more than sufficient for reproducing the problem, if guettli says it fails around 400MB?! – Lanzelot Sep 17 '19 at 13:35