kphipps
28th September 2002, 13:50
How to create multiple date formats & currency formats by user.
The following files are required:
1. ntbshell.exe ($BSE\bin)
2. datecurr ($BSE\lib)
3. ipc_info ($BSE\lib)
Steps:
1. edit ntbshell.exe code and change the datecurr file name to datecuxx.
2. after making changes to ntbshell.exe save to a new filename (i.e. xxntbshell.exe)
3. add the line xxbshell s ${BSE}\bin\xxntbshell.exe to the ipc_info file.
4. modify the fomats to your liking in datecurr file and save to datecuxx.
5. save all code to the orignal location you found it.
6. Change the bshell name in the BW configuration and login.
Below is a explination of the formats of the datecurr file.
There are the following indexes:
========================
Index Applies to: Line in datecurr starts with:
1 Default Currency of a Company A
3 Format of a Currency C
5 Format of a Date D
7 Format of a Time T
9 Format of a UTC Time U
Actions to take to solve the problem:
Index 1. When searching for the default currency code for a company.
=======================================================
The Default Currency for a company is specified in tools session ttaad1100m000 Companies.
The information is converted to runtime, and dumped in the file $BSE/lib/datecurr, and you will see a line like:
A|589|USD|001|001|
Example
When the format of the Default Currency for company 589 has to be retreived, the bshell looks for a line in datecurr, starting with:
A|589|
The line, read from datecurr, in that case is for example:
A|589|USD|001|001|
A: Means this line specifies the Default Currency of the Company
589: Company
USD: Default Currency
In case there is not a line in datecurr for the Default Currency of a company the following error is logged.
get_format_entry pattern '818' index 1 entry 0 not found
Here:
pattern '818' = indicating company 818
index 1 = indicating it is a line from datecurr, starting with the "A"
entry 0 = always 0 in this case.
so, the line:
A|589|USD|001|001|
is not in datecurr.
To solve this problem add this currency (Generic Unit).
(session ttaad1100m000 Companies)
Index 3. When searching for the format of a currency.
==========================================
The currencies are defined via session ttaad1106m000 Generic Units, as Generic Units.
For example:
Gen.Unit: USD
The format of the currencies (Generic Units) are defined via session ttaad1107m000 Formats by Generic Unit.
For example:
Generic Unit: USD
Format: ZZZZ9
The currencies (Generic Units) are grouped in Format Codes.
A Format Code has a number, for example, Format Code 001.
Each Format Code applies to certain functional areas.
For example:
Format Code 001: Rates Manufacturing
Format Code 002: Rates Trans
Format Code 003: Prices.
The information is converted to runtime, and dumped in the file $BSE/lib/datecurr, and you will see a line like:
C|001USD|USD|ZZZZ9|
Here:
C: Means this line specifies a currency format
001USD: Format Code 001, and currency (Generic Unit) USD
ZZZZ9: The format itself.
In case you get for example the following error message:
get_format_entry pattern '003' index 3 entry 0 not found
here:
pattern = indicating the Format Code, so in this case Format Code 003
index 3 = indicating it is a line starting with "C", so it's about a format of a currency
entry 0 = always 0
So, for Format Code 003 and a certain currency (not know which from the error), the format cannot be found.
This means there is no line for this combination (Format Code 003 and the currency) in the datecurr.
To solve this problem, you have to find out which currency is used at the moment the error is logged, and add the format for this currency as Generic Unit. (Session ttaad1107m000 Formats by Generic Unit).
Index 5. When searching for the format of a date.
=======================================
The line in datecurr, for example:
D|0011|DMY|%02d-%02m-%02y|
An error can be:
get_format_entry pattern '001' index 5 entry 0 not found
where:
pattern '001' = Date format 001
index 5 = indicating it is a line starting with "D", so it's about a format of a date.
entry 0 = always 0
Index 7. When searching for the format of a time.
=======================================
Index 9. When searching for the format of a utc time.
==========================================
For example, line from datecurr:
U|0011||%02H%x%02m%x%02s|
:p
The following files are required:
1. ntbshell.exe ($BSE\bin)
2. datecurr ($BSE\lib)
3. ipc_info ($BSE\lib)
Steps:
1. edit ntbshell.exe code and change the datecurr file name to datecuxx.
2. after making changes to ntbshell.exe save to a new filename (i.e. xxntbshell.exe)
3. add the line xxbshell s ${BSE}\bin\xxntbshell.exe to the ipc_info file.
4. modify the fomats to your liking in datecurr file and save to datecuxx.
5. save all code to the orignal location you found it.
6. Change the bshell name in the BW configuration and login.
Below is a explination of the formats of the datecurr file.
There are the following indexes:
========================
Index Applies to: Line in datecurr starts with:
1 Default Currency of a Company A
3 Format of a Currency C
5 Format of a Date D
7 Format of a Time T
9 Format of a UTC Time U
Actions to take to solve the problem:
Index 1. When searching for the default currency code for a company.
=======================================================
The Default Currency for a company is specified in tools session ttaad1100m000 Companies.
The information is converted to runtime, and dumped in the file $BSE/lib/datecurr, and you will see a line like:
A|589|USD|001|001|
Example
When the format of the Default Currency for company 589 has to be retreived, the bshell looks for a line in datecurr, starting with:
A|589|
The line, read from datecurr, in that case is for example:
A|589|USD|001|001|
A: Means this line specifies the Default Currency of the Company
589: Company
USD: Default Currency
In case there is not a line in datecurr for the Default Currency of a company the following error is logged.
get_format_entry pattern '818' index 1 entry 0 not found
Here:
pattern '818' = indicating company 818
index 1 = indicating it is a line from datecurr, starting with the "A"
entry 0 = always 0 in this case.
so, the line:
A|589|USD|001|001|
is not in datecurr.
To solve this problem add this currency (Generic Unit).
(session ttaad1100m000 Companies)
Index 3. When searching for the format of a currency.
==========================================
The currencies are defined via session ttaad1106m000 Generic Units, as Generic Units.
For example:
Gen.Unit: USD
The format of the currencies (Generic Units) are defined via session ttaad1107m000 Formats by Generic Unit.
For example:
Generic Unit: USD
Format: ZZZZ9
The currencies (Generic Units) are grouped in Format Codes.
A Format Code has a number, for example, Format Code 001.
Each Format Code applies to certain functional areas.
For example:
Format Code 001: Rates Manufacturing
Format Code 002: Rates Trans
Format Code 003: Prices.
The information is converted to runtime, and dumped in the file $BSE/lib/datecurr, and you will see a line like:
C|001USD|USD|ZZZZ9|
Here:
C: Means this line specifies a currency format
001USD: Format Code 001, and currency (Generic Unit) USD
ZZZZ9: The format itself.
In case you get for example the following error message:
get_format_entry pattern '003' index 3 entry 0 not found
here:
pattern = indicating the Format Code, so in this case Format Code 003
index 3 = indicating it is a line starting with "C", so it's about a format of a currency
entry 0 = always 0
So, for Format Code 003 and a certain currency (not know which from the error), the format cannot be found.
This means there is no line for this combination (Format Code 003 and the currency) in the datecurr.
To solve this problem, you have to find out which currency is used at the moment the error is logged, and add the format for this currency as Generic Unit. (Session ttaad1107m000 Formats by Generic Unit).
Index 5. When searching for the format of a date.
=======================================
The line in datecurr, for example:
D|0011|DMY|%02d-%02m-%02y|
An error can be:
get_format_entry pattern '001' index 5 entry 0 not found
where:
pattern '001' = Date format 001
index 5 = indicating it is a line starting with "D", so it's about a format of a date.
entry 0 = always 0
Index 7. When searching for the format of a time.
=======================================
Index 9. When searching for the format of a utc time.
==========================================
For example, line from datecurr:
U|0011||%02H%x%02m%x%02s|
:p