piersharding / RSAP

SAP NW RFC connector for R
21 stars 16 forks source link

No floats returned by function #8

Closed wesnm closed 6 years ago

wesnm commented 6 years ago

Trying to execute the function "BAPI_COSTESTIMATE_ITEMIZATION", does not return any floating-point numbers for the RESULT dataframe. Calling the exact same method and parameters with PyRFC returns Decimal objects with the correct values as returned by a CK13 itemization with equivalent parameters.

piersharding commented 6 years ago

Hi - I do not have any access to SAP systems anymore, but am willing to help anyone else create patches for this.

wesnm commented 6 years ago

Found the problem - in get_bcd_value and get_num_value, the call to atof needs to be converted to - atof(CHAR(u16to8((SAP_UC *)buffer)))))

piersharding commented 6 years ago

hi @morganw3 - thanks for this, I have pushed up the fix. Please check it and let me know.

wesnm commented 6 years ago

@piersharding this fix works (for me).