on 2024 Feb 09 5:06 PM
Hi Folks,
this is an ancient and much discussed issue, and yes, I've been all over the site like a rash looking for solutions/explanations. So far, no joy.
This concerns the numeric output format on a custom Purchase Order output in ECC6. Here are the things I know, and the measures I have taken.
Driver program is ours; heavily customised from the original. SAP script ditto. For output values, the SAPscript is using numeric fields directly from EKKO and EKPO, rather than a character based 'carrier' structure. The POs are all for our India Purchase Org., and they are all in rupees. The vendors in the POs are based in India, and their currency is rupees also. Our plant/company are in India. The SAPscript is always invoked using the 'EN' language version.
The driver program contains these two lines of ABAP, executed before the form is opened:
SET COUNTRY 'GB'.
ITCPO-TELELAND = 'GB'.
These are here because we always want the numeric output in UK format; i.e. 999,999.00. And lots of posts advise using both of these, although the second one seems pretty unlikely to me: it's supposed to influence the phone number, not quantities/values.
In the SAP script, the SET COUNTRY 'GB' is repeated as a control command. there are no other SET COUNTRY commands in either the driver program or the SAPscript.
The actual output lines in the SAPscript look like this:
,,&EKPO-MENGE(.2ZC)& ,,&EKPO-MEINS& ,,&EKPO-MFZHI(.2ZC)& ,,&EKPO-NETPR(.2ZC)&
&EKKO-WAERS& &'Per 'EKPO-PEINH(ZC)& ,,,,&EKPO-NETWR&
Normal, in other words.
Now here's the thing. I have 2 almost identical POs, one of which outputs all decimal numbers in UK format: 999,999.99 - and the other of which outputs all decimal numbers in the wrong format: 999.999,00
I am executing both of them, and my default numeric format is UK. The only difference in the POs is that one has more items than the other. Otherwise remarkably similar. Same IN10 Org., same currency (INR), same vendor country (IN), same ordering plant country (IN). The NAST entries are identical (same printer, albeit I'm previewing both documents). There are some legacy WRITE commands in the driver program: they work perfectly in both cases (UK format result).
So the question is, why are my two outputs behaving differently? What other attributes influence the format of numeric outputs in SAPscripts?
I expect I've missed something really obvious. Thanks for reading.
Cheers
John M.
Hi Sandra,
that's exactly what I ended up doing (should have done it 3 hours earlier), and as you correctly surmised, there's a SET COUNTRY command buried in a function call within a chunk of conditional code. What was unexpected was why one of two almost identical POs would call that routine and the other wouldn't; as ever, no time to dig that far.
Thank you for taking the trouble to post when you should really have been mellowing on down for the weekend!
Cheers,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.