created on 25.05.2016 at 19:04

A blog post by

Gerrit Böselager

ABAP: Pad with zeros


16140 views


The following ABAP snippet shows how a variable can be padded with leading zeros. This procedure is often necessary if a BAPI/function module is to be called, which requires data with leading zeros as a parameter.

"Step 1: Move text to the right
shift lv_number right deleting trailing space.

"Step 2: Pad to 10 characters, use zeros
overlay lv_number with '0000000000'.

  tags for this post

no tags found

  ranking

How relevant is this post for you?