You write a batch input program and want to be sure that this program correctly formats the decimal point format ( comma or period ) for the batch input. What has to be done, to get the comma or the period between the decimals ?
Solution
You have to install a logic into your batch input program which automatically recognizes whether the batch input should run with a decimal point or a decimal comma for the user.
My proposal:
Look up table USR01 (user table) and find out what is valid.
Coding example:
Metadata: TABLES: USR01.
.....
FORM KOMMA_ODER_PUNKT USING BI_USER.
SELECT SINGLE * FROM USR01
WHERE BNAME = BI_USER . " Batch-Input Benutzer
IF USR01-DCPFM EQ SPACE.
* ',' Benutzer hat Dezimalkomma als Einstellung
ENDIF.
IF USR01-DCPFM EQ 'X'.
* '.' Benutzer hat Dezimalpunkt als Einstellung
ENDIF.
ENDFORM.
With what you determined in this FORM routine, you can now format the fields correctly for batch input
.
Again as a reminder:
Batch input always only gets fields of the type CHARACTER.
See structure BDCDATA, field FVAL.
No comments:
Post a Comment