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.
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorThis was first published in February 2002
Join the conversationComment
Share
Comments
Results
Contribute to the conversation