06-07-2013 12:46 PM
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 ®UH-ZBNKN&. The bank account number length can vary, so it is not possible to set a constant offset like ®UH-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 ®UH-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
06-07-2013 1:06 PM
hi Michael,
Try ®UH-ZBNKN(4)& hopefully it will work out your requirement.
06-07-2013 1:31 PM
Unfortunatley Sai this will only pick the 1st 4 digits of the field, not sure if there is anyway to pick teh last 4 digits of the field. Note the field can have contents which vary in length, so saying ®UH-ZBNKN+6& etc is not possible
06-07-2013 1:12 PM
You can always call an external perform from inside the SAPScript.
Neal
06-07-2013 1:24 PM
Perform statement needs to be used which will call subroutine of your custom program.
Here is SAP Help and wiki article with example.
06-07-2013 2:48 PM
Hi Michael,
Create a Sub Routine Pool Program with a form in SE38. Call the same in your SAPScript Window where you want to do play with values. The structure out_tab and in_tab have values.
Eg :-
and,
form F140_LOGO TABLES p_in_tab STRUCTURE itcsy
p_out_tab STRUCTURE itcsy.
*-- <logic>
Endform.
BR,
Ankit.