cancel
Showing results for 
Search instead for 
Did you mean: 

Account number in Standard text in SapScripts

Former Member
0 Kudos

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)

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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