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'.