Skip to Content
0
Jun 07, 2013 at 11:46 AM

Format field output in SAPScript

93 Views

Hello,

I want to mask all but the last 4 digits of a bank account that is output to SAPscript. The bank account number is populated through &REGUH-ZBNKN&. The bank account number length can vary, so it is not possible to set a constant offset like &REGUH-ZBNKN+4&. The SAPscripty itself is called by a standard SAP program therefore do not want to make any chnages in teh SAP program itself.

Can you advise if there is any way within the SAPscript itself to ensure only the last 4 digits contained in &REGUH-ZBNKN& are output? If this has to be done by the PERFORM statement, can I design a new own Z program (independent of the SAP calling program) and dynamically call that from within the SAPscript to output the last 4 digits?

Can you advise the general approcah please?

Thanks for any ideas

Mik