Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to truncate currency part from total field in SAP B1?

Hi All,

Is there any way to truncate the currency part (for exp USD 23.45 should give 23.45) from total columns while fetching its value thru DI API (without left-trailing the varchar part)?

many thanks in advance..



Former Member

i can only give you some hints for your function

make some globals like (to now the sap separator)

oRecordSet.DoQuery("SELECT DecSep, ThousSep, MainCurncy FROM OADM");

if (oRecordSet.RecordCount > 0)


globals.SBODecSep = Convert.ToString(oRecordSet.Fields.Item("DecSep").Value);

globals.SBOThousSep = Convert.ToString(oRecordSet.Fields.Item("ThousSep").Value);

globals.SBOMainCurncy = Convert.ToString(oRecordSet.Fields.Item("MainCurncy").Value);


and define a system global (to set the windows separator)

public static string SysDecSep = ",";

the problem is that the windows country settings are also important.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question