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: 

Error in module pool Program

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

christine_evans
Active Contributor
0 Kudos

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.

22 REPLIES 22

Former Member
0 Kudos

Hi,

Give a dic.reference field for MENGE.It should work.

regards,

madhu

0 Kudos

Hi madhumita,

Where i can give dic ref. for menge.

Former Member
0 Kudos

hi,

Can you please show the dump error

Cause -ve values won't create a dump

0 Kudos

Hi shashank,

It's giving Message as Conversion Error.

Plz giv ur mail id .i"ll mail u the Error.

thanks & regards,

Neelesh

Former Member
0 Kudos

Quantity can not be negative, so its giving dump.

0 Kudos

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.

Former Member
0 Kudos

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 .

Former Member
0 Kudos

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.

christine_evans
Active Contributor
0 Kudos

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.

0 Kudos

Hi Christine,

The sign chebox is already checked

do u have any other option.

0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

>

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

0 Kudos

Hi,

I Put V and tested but it is giving the same error.

0 Kudos

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.

0 Kudos

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&regards,

Neelesh.

0 Kudos

No idea why they use a V. It could stand for negatiVe I suppose.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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 .

0 Kudos

Also u have options to sign...check output style under display tab