Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

read_table

2007-04-16
2013-04-11
  • Hello Everbody,

    I've tried the following command:
    func=conn.read_table('KNB1', max_rows = 10)

    Unfortunately I get something like this
    Traceback (most recent call last):
      File "C:\Python25\test_rfc2.py", line 7, in <module>
        func=conn.read_table('KNB1', max_rows = 10)
      File "C:\Python25\pysap.py", line 1977, in read_table
        rc=f_table()
      File "C:\Python25\pysap.py", line 1380, in __call__
        raise SapRfcError(excep.value)
    SapRfcError: 'DATA_BUFFER_EXCEEDED'

    I get this error for all huge tables, such as MARA, KNA1, etc.

    Is there a way to circumvent this problem?

    Regs.

     
    • This is due to the fact the row size in FM rfc_read_table is limited to 512 chars. Thus it can't read larger tables like mara, kna1, lfa1 etc. One solution, if aplicable, is to retrieve a subset of fields by filling the additonal "fields" argument with list of fields to retrieve. The other solution is to implement SAP note 758278, which among other changes like unicode compatibility, increases the row-size to 4000 chars. I don't know if this solution is aplicable to SAP releases pre 4.7 though.
      HTH,
      Klavdij