Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

User Profile issue

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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...

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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