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

data type doubt

Former Member
0 Likes
614

Hi Friends,

I have a small doubt, Actually I have created a 'Z' table and in that I took a field as integer. And send to the production it is working fine. Now the user wants to change the data type (he wants to enter negatives values for that field) If I change the table and do it does it effect the data which is already keyed ?

If so how to do it.

Regards,

Line

6 REPLIES 6
Read only

Former Member
0 Likes
593

sap not allowed negative value.

so maintain same table separtly.

example +200

-200

positive 1

negative 0

200 1 positive

200 0 negitive

sap logic also used sap funcational

Read only

former_member194669
Active Contributor
0 Likes
593

Hi,

Yes it will get affected.

Download the data into a local file as XLS or space tab limited file.

and write a small utility program after the data element change upload the data into the table.

or create the new field in the table and transport upto production, and write utility program to move value from old to new field. then delete the old field and make a transport

aRs

Message was edited by:

a®

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
593

If you database field is using the type INT4, then this will allow negatives by default. So no need to do anything.

But to answer your question, the system will take appropriate actions to try to convert the data within the field. But you should really test this, to be safe.

Regards,

RIch Heilman

Read only

0 Likes
593

Hi,

My data type is curr can any one tell me how can i accept the amount in negative values.

Regards,

Line

Read only

0 Likes
593

CURR fields can also have negative values by default in the database. There is nothing special that you need to do to handle this when writing to the database. If your issue is allowing the user to enter this value in a screen, then there is some formatting that you do require.

Go to your screen using screen painter

Click on the element list tab

click on the texts/i/o templates

Find your field in the list

Now in the Text or I/O field, you will see an underscore ie _______________

Just add a "V" to this, so it looks like this ______________V

Doing so, is a placeholder for the sign. Now the user can enter negative values in your screen.

Regards,

Rich Heilman

Read only

0 Likes
593

I create one custom table to proceess Finanace data,here i used

Data element WRBTR

Domain is WERT7

I am able to get negative values and i am able to save into Database.

Thanks

Seshu