Menu

RFC function: table type problem !

2006-10-26
2013-04-11
  • Nobody/Anonymous

    hi,

    I have a function module like this

    ""
    FUNCTION Z_TEST_STOK.
      EXPORTING
         VALUE(URUNLER) TYPE  ZRT_T_PRODUCT_STOK
    ...
    ""

    "ZRT_T_PRODUCT_STOK" is table type. when i execute script like this

    ...
    "open conneciton
    func=conn.get_interface('Z_TEST_STOK')

    i get following error message

      File "C:\Python25\Lib\site-packages\pysap.py", line 1747, in get_interface
        gen_param=self.get_structure(p['tabname'])()
      File "C:\Python25\Lib\site-packages\pysap.py", line 1933, in get_structure
        return create_struct(self.get_fieldlist(s_name,*flds))
      File "C:\Python25\Lib\site-packages\pysap.py", line 509, in create_struct
        fld_c_type=SAP_MAP[fld_typ]
    KeyError: 'L'

    and I see if i use table type in function module, i get an error like above.
    is there a solution for this issue.

    gokhan

     
    • Nobody/Anonymous

      Hi,

      the error was fixed in CVS. But that alone won't fix the problem though. The main problem is the function module sends a table as export parameter and RFC AFAIK only supports single values (simple types and structures, but not tables) as export and import parameters. This limitation is implemented on the C level where import, export, and tables parameters are send to SAP as arrays of C structures - the structure for table parameters is different and both cannot be mixed in same array. There might be ways around this, but I'm not aware of any.
      The best solution (if applicable) would be to move unruler from the export to tables section of function parameters.

      Klavdij Voncina

       

Log in to post a comment.