‎2007 Feb 12 4:55 AM
Hi All,
I have written a BDC program to upload data into a transaction after reading several tables, but after reading the table, the internal table contains amount field with . (dot as decimal indicator) ,where as the user profile setting has comma (,) as decimal seperator.Hence it throws a format error.Please let me know if there is anyway to overcome this.This is urgent...useful answers will be rewarded.
Regards,
Sandeep Shenoy
‎2007 Feb 12 5:24 AM
Hi Sandeep,
The problem can be corrected by getting the user setting DCPFM from the table USR01 ,now based on the user setting replace the decimal indicator.
Check the following code
SELECT SINGLE DCPFM INTO USR01-DCPFM FROM USR01 WHERE BNAME = SY-UNAME.
IF USR01-DCPFM EQ 'X' .
REPLACE ',' WITH '.' INTO <amount field>
ELSE.
REPLACE '.' WITH ',' INTO <amount field>
ENDIF.
This code would work irrespective of the User Setting.
Regards,
Sowmya.
‎2007 Feb 12 4:59 AM
Hi Sandeep,
Even I feel trhis should be the problem wid the User-Profile.However if that is not solving ur problem,u can do one thing.In the Internal table where ur populating all ur fields before passing it to the BDC, Replace all dots with commas or vice-versa according to ur requirement using the REPLACE statement...
This shud atleast solve the problem...
Mark useful answers...
‎2007 Feb 12 5:15 AM
Hi,
goto <b>sytem > user profile > own data > default tab</b> and change the settings.
Unless uchaneg teh settings u wwill be facing this problem, I too had faced the same.
Hi reward points if this helps.
Message was edited by:
Judith Jessie Selvi
‎2007 Feb 12 5:22 AM
Hello sandeep,
goto system->userprofile->owndata.
select defaults tab, select the required format from the dropdown list in decimal notation
hope this solves your problem.
keerthi
‎2007 Feb 12 5:24 AM
Hi Sandeep,
The problem can be corrected by getting the user setting DCPFM from the table USR01 ,now based on the user setting replace the decimal indicator.
Check the following code
SELECT SINGLE DCPFM INTO USR01-DCPFM FROM USR01 WHERE BNAME = SY-UNAME.
IF USR01-DCPFM EQ 'X' .
REPLACE ',' WITH '.' INTO <amount field>
ELSE.
REPLACE '.' WITH ',' INTO <amount field>
ENDIF.
This code would work irrespective of the User Setting.
Regards,
Sowmya.
‎2007 Feb 12 6:29 AM
Thanks to each one of u...for valuable info...and i will reward points accordingly...but sowmya's input really solved the problem.
Regards,
Sandeep Shenoy