2008 Nov 21 6:23 AM
Hi Experts,
I am doing BDC on PO.
while uploading PO quantity MENGE value (ex. 17.90) to BDC , I am getting the value in BDC Screen as 17.90,00.
How can I get the exact value(17.90).
Help me in this issue..
Regards
Ganesh Reddy
2008 Nov 21 6:28 AM
Hi,
If u use Quantity or Rate values,u must take MENGE type Char in u r program.
Sreekanth, you can avoid all that code to remove the thousands separator by using the no-grouping option on the write statement.
Cheers
Allan
2008 Nov 21 6:27 AM
HI,
take a varibale type char with required length and then use the write statement.
For Ex : WRITE MENGE to <Var>.
it writes the data to user format. Try this.
2008 Nov 21 6:28 AM
Hi,
If u use Quantity or Rate values,u must take MENGE type Char in u r program.
2008 Nov 21 6:33 AM
Hi Ganesh,
Declare the variable as PACKED DECIMAL as below.
DATA: VAR1 type P DECIMALS 2.
Thanks
2008 Nov 21 6:59 AM
2008 Nov 21 7:04 AM
Hi Ganesh,
I think you are getting this because of the user settings.
ask your FC to change the DECIMAL point SETTINGS
HOPE this will work for you.
regards
Ramchander Rao.K
2008 Nov 21 7:07 AM
You need to ensure that you are using a character variable for the BDC input.
do something like
data: w_char(15) type c.
data: w_menge like ekpo-menge value '17.90'.
write: w_menge to w_char decimals 3 no-grouping.
and then use w_char for your bdc session.
Cheers
Allan
Edited by: Allan Willis on Nov 21, 2008 8:34 AM changed decimals to 3
2008 Nov 21 7:22 AM
perform format_quantity using l_menge
changing menge_string.
form format_quantity using p_gsmng
changing p_gsmng_string.
data: l_thousand_SEPERATOR(1) type c.
perform GET_THOUSAND_SEPERATOR changing l_thousand_SEPERATOR.
Remove thousand seperator
write p_gsmng to p_gsmng_string.
replace l_thousand_SEPERATOR with ' ' into p_gsmng_string.
condense p_gsmng_string no-gaps.
endform. " format_quantity
form get_thousand_seperator using p_sep.
data: l_amount like bseg-dmbtr,
l_amount_string(15) type c.
Find 1000 seperator. If decimal seperator = . then
1000 seperator = , else 1000 seperator = .
l_amount = '1.00'.
write l_amount to l_amount_string.
if l_amount_string cs ','.
p_sep = '.'.
else.
p_sep = ','.
endif.
endform. " GET_THOUSAND_SEPERATOR
2008 Nov 21 7:36 AM
Sreekanth, you can avoid all that code to remove the thousands separator by using the no-grouping option on the write statement.
Cheers
Allan
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |