BAPI problem

  • Nobody/Anonymous


    I try the witch come with pysap and I have the following error message :
    Traceback (most recent call last):
      File "", line 67, in ?
        print p
      File "C:\usr\Python24\lib\site-packages\", line 559, in __str__
        s+='%s = %r\n' % (f[0],self[f[0]])
      File "C:\usr\Python24\lib\site-packages\", line 381, in __repr__
        else: return repr(self.ext_value)
      File "C:\usr\Python24\lib\site-packages\", line 374, in __get_value
        return _do_conversion_out(self,RfcGetBcd(self,self._length_,self._decs_))
      File "C:\usr\Python24\lib\site-packages\", line 82, in RfcGetBcd
        else: return eval(vs)
      File "<string>", line 1
    SyntaxError: invalid syntax

    the call is :
    client = '%010d' % 101084
    date_cde = '20050106'

    what can I test to detect where come from the problem ?


    • Klavdij Voncina

      Klavdij Voncina - 2006-04-12


      it took me some time to figure out what is going wrong. It seems that at least one of the decimal (packed) values in the result contains ':.000' which confuses the eval function - the collon at the start of the string raises SyntaxError. I have no idea where that strange value came from. Module uses the RfcConvertBcdToChar from the librfc32.dll to convert packed decimal values (aka BCD - format used by SAP to store decimal values internally) into strings. The ':.000' comes from this function.


    • Nobody/Anonymous

      Thanks for your answer !
      This problem is very strange, because some lines are ok,
      but a few not. If I see the lines with problem in sap, I don't see an anomalie or or a common thing.
      Strange, very strange...

      For information we have an old version of sap (4.0B).


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks