on 01-18-2007 2:34 AM
Hello,
I've created a standard text where I've to print account number as 12--1234-1234567-123.
But REGUH-ZBNKL prints the bank number as 123456
Where 1st 2 digits (12) is bank number and 2nd 4 digits (3456) is branch number.
REGUH-ZBNKN displays the account number as 789012343
Where 1st 7 digits (7890123) is account no and last 2 digit (43) is suffix no.
How do I format these two numbers into one as 12-3456-7890123-043
That means if the suffix is 2 digit add a '0' in front of the suffix to make it 3 digit (i.e. 034)
Hi,
You can use a concatenate stmt to prefix '0'.
for eg:
if ws_int < '99'.
concatenate '0' ws_int into ws_int.
endif.
similarly you can use concatenate statement to build your string.
concatenate reguh-zbnkl0(2) reguh-zbnkl2(4)
reguh-zbnkn+0(7) reguh-zbnkn ws_int separated by '-'
into ws_account.
regards
Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nazmul
Try this way:
data: suf(3) type c.
suf = reguh-zbnkn+7.
unpack suf to suf.
concatenate reguh-zbnkl(2) reguh-zbnkl+2(4) reguh-zbnkn(7) sug
into text separated '-'.
Kind Regards
Eswar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.