Application Development and Automation 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: 
Read only

converting char data element to curr data element?

Former Member
0 Likes
1,152

Hi,

In one of the transaction we have a custom field (Amount field) - but they used char data element for this currency field. And now in this field if we don’t supply amount value in Currency format then the program is dumping.

I need to solve this situation.

1. This data element is using in lot of various tables, views and structures. So If I change this data element then how to handle rest of the object?

Do we have any other solution to solve this issue?

Please share your opinions.

Thanks a lot.

Venkat.

Hi,

In one of the transaction we have a custom field (Amount field) - but they used char data element for this currency field. And now in this field if we don’t supply amount value in Currency format then the program is dumping.

I need to solve this situation.

1. This data element is using in lot of various tables, views and structures. So If I change this data element then how to handle rest of the object?

Do we have any other solution to solve this issue?

Please share your opinions.

Thanks a lot.

Venkat.

8 REPLIES 8
Read only

Former Member
0 Likes
1,030

Venkat,

In which format you are passing the currency into that field?

Regards,

Satish

Read only

0 Likes
1,030

For example if some one enteres by mistake 14..50 or 15.space 9

like any thing other than currency format (14.50) program is dumping.

Dump message - The program attempted to interpret tghe value "14..50' as a numner, but since the value contravenes the rules for correct number formats, this was not possible.

Thanks.

Venkat.

Read only

0 Likes
1,030

Hello Venkat,

Why you dont change only the data element for the specific field on that transaction, using insted a char for a numer element?

In case is not possible...I would create a field exit to validate that the field has a numeric value.....that will be enough....

Bye

Gabriel ¨P.

Read only

0 Likes
1,030

So, you have to change at domain level. If you change at domain level there will not be any impact on other objects.

Regards,

Satish

Read only

0 Likes
1,030

Hi thanks for your information.

What ever the field I am talking about in the transaction, the same field has been created in several SAP tables,structures and views. So If I change the data element for this field its going to impact all other objects?

But I am in the process of finding why this data element(currency field) has been created in char fomat.

So if I change in the data element all other tables,views do I need to activate again? or when I activate this data element is it take cares?

If I want to use field exit, as this is a custom field we can create field exit for this?

Thanks a lot for ur information.

Venkat.

Read only

0 Likes
1,030

Hello Venkat,

Ups I dont think is a good idea to change the data element at this time for that field, It will impact on the rest of the tables, structures and so on.

Please dont change it, I think is a better idea on doing it on a field exit....fo sure it will work. Dont forget to validate the transaction and the dynpro name and number.

Cheers

Gabriel

Read only

0 Likes
1,030

If that is the case I have to create a field exit and then validate there?

As this is a custom field I can create field exit using the program RSMODPRF and I can validate the field value in the function module?

and also as this is a char field - when we want to compare or validate this value with currency is there any logic we can follow, cose I tried in some temp program and seems to be its bit complicated to validate the values in the field (like it should not contain .. or space or 55. 99 like all these things.

please suggest me any kind of information.

I appreciate your time and help.

Thanks.

Venkat

Read only

0 Likes
1,030

Hello Venkat,

Yes, create the FM running the report RSMODPRF,

what you should do is to assing the input value to a numeric variable....that is all

Bye

Gabriel P.