2011 Jul 02 4:51 PM
Hello,
We have developed a bespoke program to extract data from SAP into Microsoft Excel. The program is extracting data as per our expectations, expect for the one field. In the program the net price field in converted to #,000 format and downloaded to excel. This is working fine for users from many countries except for Poland users. For the PL version users it is displayed either in numeric format or text format.
Can any one help me how to correct this in the program or excel for this users in Poland without affecting the other users.
Regards
Raj
Hello,
We have developed a bespoke program to extract data from SAP into Microsoft Excel. The program is extracting data as per our expectations, expect for the one field. In the program the net price field in converted to #,000 format and downloaded to excel. This is working fine for users from many countries except for Poland users. For the PL version users it is displayed either in numeric format or text format.
Can any one help me how to correct this in the program or excel for this users in Poland without affecting the other users.
Regards
Raj
2011 Jul 02 5:16 PM
hello,
you could create for example a configuration table which identifies attributes output format which depends on users country.For example:
1) get required master data about user (via user name).
2) select fields format from your custom table (if there is no pattern for this country in your table then use default one);
3) output data into excel using defined pattern;
br,
dez_
2011 Jul 02 5:34 PM
Thanks for the reply dez.
To add to my previous issue, the #,000 format in the program is resulting in a numeric value with . (dot) before the number.
Eg: 500,150 is coming as .500.150 and also
values like 600,00 is inconsistent like it is correct coming in few case and in some it is coming as just 600.
This is creating lot of problem for the user, can you please help me to correct this either in the program or excel.
Many Thanks
Raj
2011 Jul 04 5:49 AM
hi,
i did not understand the question. could you reformulate it? i just need to know what are you getting as input and what do you want to get as final result.
br,
dez_
2011 Jul 04 6:08 AM
On downloading the report to excel, values for example are coming as .500.50 instead of 500.50, there is a dot being introduced in some cells before the number. I need to eliminate this. in the program my technical consultant has considered #,000 format and this problem occurs only for Poland users for the rest of the world it is coming correctly.
Regards
Raj
2011 Jul 04 7:03 AM
hello,
you could insert check statement before the data've been outputted.
use FM SUSR_USER_ADDRESS_READ to get country code via username and if country code is equal to PL then:
data: lv_amount type string value '.500.50',
lt_result type type match_result_tab,
lv_regex type ref to cl_abap_regex.
create object lv_regex
exporting
pattern = '^\.'.
find all occurrences of regex lv_regex in lv_amount results lt_result.
check sy-subrc eq 0.
replace first occurrence of '.' in lv_amount with ''.
condense lv_amount no-gaps.this is just an example if you do not want to use regular expressions do not. use basic check statement:
check lv_amount(1) eq '.'.br,
dez_
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |