lunes, octubre 05, 2009

MF - Trabajar con importes

Tenemos un fichero con importes y queremos grabarlo en SAP (separador decimales = ',')
Definir variables de tipo char de tamaño = longitud+decimales+1 del punto
SAP guardar los importes con el separador de importe '.'
Utilizar el MF:

data: l_importe_c(28).
data: l_importe type BAPIWRBTR.
CALL FUNCTION 'MOVE_CHAR_TO_NUM'
EXPORTING
chr = l_importe_c
IMPORTING
NUM = l_importe
EXCEPTIONS
CONVT_NO_NUMBER = 1
CONVT_OVERFLOW = 2
OTHERS = 3.