Tuesday, June 25, 2013

String Templates!

Greetings,

String templates are awesome, learn about them, use them !

Help: http://help.sap.com/abapdocu_702/en/abenstring_templates.htm

A simple example would be a header string in a report that indicates who ran the report at what time, with what variant.

l_message |Recipe upload program report run by { sy-uname } on { sy-datum DATE USER } at { sy-uzeit TIME USER }|.

This will properly insert the variables sy-uname, sy-datum and sy-uzeit. And with properly I mean that the date and the time will be written out with the user preferences.

This has saved me so much time on my current project.

No comments:

Post a Comment