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: 

Quantity mask

former_member409998
Participant
0 Kudos

Hello...

In a editable field on ALV I can insert a quantity of PO item... The filed mas is X,XXX (in ALV).

I use the method ref_grid->check_changed_data to come back the informations of ALV report. But, when the quantity back the SAP change the number...

Follows a example:

In the ALV report: 1,000 (default mask)

In ABAP after method: 0,001

How Can I change this configuration?

1 ACCEPTED SOLUTION

thiago_losilla
Explorer
0 Kudos

Hi folks!,

The problem is in the construct the fieldcat table .

Try this way:

it_fieldcat-datatype = '!EKPO-MENGE'

it_fieldcat-fieldname = 'MGCONF'

There are conversion functions that are linked to the type of data element. For example, the calendar view in a date field.

When using the '!' before the name of the table, these functions are carried to the field of alv.

Regards,

Thiago Losilla.

Edited by: Losilla on Oct 17, 2011 7:38 PM

5 REPLIES 5

Former Member
0 Kudos

Hi Molina ,

i think your ALV doesnt have UoM (Unit of Measure ) field , you Need to have a UoM field and attach this field to Qty field field catalog.

FCAT-QFIELDNAME = 'MEINS' -->your itab should have this field and values

FCAT-QTABNAME = 'ITAB'.

regards

Prabhu

0 Kudos

Sorry,

I don't understand your point.

Follows the fieldcat catalog declaration (only the important fields)


[...]
mgconf    type ekpo-menge,
[...]

0 Kudos

Hi

ekpo-menge is quantity field, so it has to be controlled by a field with the unit of measure (in this case ekpo-meins), a routine for input/output convertion can be triggered.

Which is your Unit of Measure?

Max

0 Kudos

My Unit of Measure change according the Unit of Measure of PO.

Only for ilustration...

This program do a massive confirmation in PO. The field I want treat is the amount confirmed.

thiago_losilla
Explorer
0 Kudos

Hi folks!,

The problem is in the construct the fieldcat table .

Try this way:

it_fieldcat-datatype = '!EKPO-MENGE'

it_fieldcat-fieldname = 'MGCONF'

There are conversion functions that are linked to the type of data element. For example, the calendar view in a date field.

When using the '!' before the name of the table, these functions are carried to the field of alv.

Regards,

Thiago Losilla.

Edited by: Losilla on Oct 17, 2011 7:38 PM