SAP users can pick different formats for date and quantity fields display. This means that when you are writing...
a batch input program you have to convert the internal field representation into the one the user has picked.
Fortunately, this has already been solved by ABAP's WRITE statement. WRITE outputs the field to the screen using the user format, but you can also use WRITE to move the value to another variable using the 'TO g' addition.
If datum is a variable of type d and c_datum is a variable of type c with length 10, then after this single line of code c_datum contains the value of datum in the user's date format.
WRITE datum TO c_datum.