‎2008 Jun 09 12:31 PM
Hi Abapers,
I have developed a module pool program . In this quantity field 'MENGE' contains -ve values . when i execute the program it gives a short dump with the message 'CONVERSION ERROR'.
I have declared MENGE AS decimals in SCREEN WITH length of 18.
waiting for your valuable suggestions.
thanks and regards
neelesh
‎2008 Jun 09 1:14 PM
On the domain there is a checkbox called SIGN and if this is not checked any field based on the domain will not accept negative values. Find another domain where this box is checked - or create one yourself - and base your data element and field on that.
‎2008 Jun 09 12:34 PM
Hi,
Give a dic.reference field for MENGE.It should work.
regards,
madhu
‎2008 Jun 09 12:40 PM
‎2008 Jun 09 12:35 PM
hi,
Can you please show the dump error
Cause -ve values won't create a dump
‎2008 Jun 09 12:44 PM
Hi shashank,
It's giving Message as Conversion Error.
Plz giv ur mail id .i"ll mail u the Error.
thanks & regards,
Neelesh
‎2008 Jun 09 12:36 PM
‎2008 Jun 09 12:43 PM
hi Bharati,
Actually our BOM Contain negative scrap i.e MENGE field
BUT my end user wants negative values if there any.
I must have to display negative values also.
‎2008 Jun 09 12:46 PM
Hi nilesh ,
u just give reference to that quantity field .
u go to se51 then go to ->element list-> reference tab .
here u just assign the dictionary field as a reference .
‎2008 Jun 09 1:03 PM
Hi,
Previously i too got error, but i placed the char10 variable on to the screen and used the write that quantity to that char10 variable.
May this help you.
Reward the points if it is helpful.
‎2008 Jun 09 1:14 PM
On the domain there is a checkbox called SIGN and if this is not checked any field based on the domain will not accept negative values. Find another domain where this box is checked - or create one yourself - and base your data element and field on that.
‎2008 Jun 09 1:18 PM
Hi Christine,
The sign chebox is already checked
do u have any other option.
‎2008 Jun 09 1:52 PM
Have you checked the With Sign box on the screen field definition itself? If you have, you will see a V in the field in SE80. Doing this will definitely make it work - in fact doing this will probably make it work even if you haven't based your field on a signed domain.
‎2008 Jun 09 2:04 PM
Hi Evans,
I Havn't get Sign box on the screen field definition itself.
Can u tell me where exactly it will be avialable on screen.
plz suggest me ,It's very urgent.
thanks & regrds,
Neelesh
‎2008 Jun 09 2:10 PM
This checkbox is there in our 4.7 version; you must be on an earlier version if you can't see it. Ok, final option; do what the checkbox does manually by setting the Text field on the screen field definition to
_______________V
‎2008 Jun 09 2:17 PM
HI,
we are using ECC 6.0 version.
i think u mean In screen painter field attributes,
Name ex wa_itab-menge , ,,,,,,,,,,18 chars
Text : _______________ is there ,
So U mean
It should be in text as _________________V.
But if i give like that ,
In my out put I'll get all the values under this field is value+ v
‎2008 Jun 09 2:23 PM
>
> HI,
> we are using ECC 6.0 version.
>
> i think u mean In screen painter field attributes,
> Name ex wa_itab-menge , ,,,,,,,,,,18 chars
>
> Text : _______________ is there ,
> So U mean
> It should be in text as _________________V.
> But if i give like that ,
> In my out put I'll get all the values under this field is value+ v
Yes that's what I mean. No you won't get a V in the output. Just try it. And in ECC 6.0 you should be able to see the With Sign checkbox at the bottom of the same screen under the Dict tab.
‎2008 Jun 09 2:58 PM
‎2008 Jun 09 3:41 PM
Works fine for me, even in an older version of SAP. Did you fill the field in exactly the way I demonstrated ie left padding the field with underscores and putting the V right at the end? If you just put a V at the start of the field, you will get an error. And how have you defined your field? Mine is typed on data element ANZHL.
‎2008 Jun 10 8:12 AM
Hi ,
Thanks , My problem is solved. But Why " V ". I hav also seen in some standard tcodes,
There also V is included in quantity fields.
Can I know why V.
waiting for ur reply,
thanks®ards,
Neelesh.
‎2008 Jun 10 11:17 AM
No idea why they use a V. It could stand for negatiVe I suppose.
‎2008 Jun 09 2:22 PM
Hi,
I tested with using CHAR value it is working fine.
Please find the below code.
REPORT ztest_negative.
DATA: v_char10 TYPE char10.
data v_val TYPE i value -2.
WRITE v_val TO v_char10.
CALL SCREEN 100.
--> Place this V_CHAR10 on to the screen.
the screen filed V_CHAR10 should not go for dump else it should show -2.
Thanks,
Ravi.
‎2008 Jun 09 3:56 PM
In module pool programing is that press go to screen layout.. press F6 . write * press get from program. now put the field you want .Now automatically the fields and refences will be taken care of.
Now if the variable u have kept in screen is -ve value autaically a-ve will be shown..
But it is too hard to beilive u want to show -ve quantity ,as the elemnt itself is lowed to store -ve values .
‎2008 Jun 09 4:01 PM
Also u have options to sign...check output style under display tab