Left Padding MCU - BSSV

jdesuren

Member
Hi All,


I am new to BSSV.


In BSSV, i am passing Business unit as input...but the problem is
the actual Business unit value is " 2501000"...
but when the input value is being passed from 3rd party it is considering as "2501000" which is incorrect.

The spaces in the beginning of MCU value is missing.


How to append with the spaces in BSSV.


Thank you in advance for your help.
 
Can't you do it inside your BSFN?
Use N1000032 Format Business Unit
 
You can do this in Java (in BSSV code) like this:

string padded = String.format("%1$12s", rawMcu);


Not sure why this is so complicated in Java. In .NET, would simply be:

string padded = mcu.PadLeft(12);
 
I prefer using getBSSVDataFormatter
Here is an example from
X:\E920\DV920\java\source\oracle\e1\bssv\util\JT87U001\UtilityTester.java

String formattedMCU = null;
if (intVO.getSzDatabaseBusinessUnit() != null) {
try {
formattedMCU =
context.getBSSVDataFormatter().format(intVO.getSzDatabaseBusinessUnit(),
"MCU");
intVO.setSzDatabaseBusinessUnit(formattedMCU);
} catch (BSSVDataFormatterException e) {
context.getBSSVLogger().app(context,
"Error when formatting szBusinessUnit.",
null, null, e);
}
}
 
Last edited:
Back
Top