‎2007 Feb 26 4:48 AM
Hi,
when iam displaying report after uploading data using BDC , amount field iam not getting properly.
iam expecting 1,234 ( what iam getting 12.34), any one can help.
‎2007 Feb 26 4:59 AM
‎2007 Feb 26 5:04 AM
‎2007 Feb 26 9:36 AM
hi ,
for all the currency fields in BDc it is better to use the stmt
WRITE <fval> TO <gs_bdc_tab-fval> LEFT-JUSTIFIED.
as currenecy field is right justified field and we want to fill in as left justified so we might get some error.
and one more thing is user settings will also effect the output plz also verify the same
‎2007 Feb 26 12:23 PM
Amount Field have 1,234.this value move to Char field than that Variable(V_CAHR) use for BDC ok
Data: v_Char(18),
V_AMOUNT = 1,234.
V_CHAR = V_AMOUNT.
‎2007 Feb 26 3:50 PM
u need to the decimal correction.
pls see the extract of the code below :
***********
SELECT currkey currdec FROM tcurx INTO TABLE tbl_tcurx
FOR ALL ENTRIES IN tbl_bsik1
WHERE currkey = tbl_bsik1-waers.
IF sy-subrc = 0.
SORT tbl_tcurx BY currkey.
ENDIF.
READ TABLE tbl_tcurx WITH KEY currkey = tbl_bsik-waers
BINARY SEARCH.
IF sy-subrc = 0.
currency corrections
IF tbl_tcurx-currdec = 0.
tbl_final-wrbtr = tbl_bsik-wrbtr * 100.
ELSEIF tbl_tcurx-currdec = 1.
tbl_final-wrbtr = tbl_bsik-wrbtr * 10.
ELSEIF tbl_tcurx-currdec = 3.
tbl_final-wrbtr = tbl_bsik-wrbtr / 10.
ELSEIF tbl_tcurx-currdec = 5.
tbl_final-wrbtr = tbl_bsik-wrbtr / 1000.
ENDIF.
start
ELSE.
tbl_final-wrbtr = tbl_bsik-wrbtr.
end
ENDIF.
if found useful reward with points
‎2007 Feb 26 7:34 PM
1)the ID which created BDC session & the ID which processed session must have the same settings for decimal point in user settings, otherwise you may see data inconsistencies.
2) when you create your BDC session and populate amounts, use write amt_field into char_field currency 'your currency', char_field should have proper length, then use this char_field in your BDC program.