cancel
Showing results for 
Search instead for 
Did you mean: 

TableColumn Quantity Field Formatting

AlexGiguere
Contributor
0 Kudos

I'm just displaying PO Items in a table UI element. I would like to display the quantity field (EKPO-MENGE) without the decimals point.

My context is bind to a structure where the quantity field point to the unit field MEINS. We used EA (each) as the UOM, so I don't the decimals part with the zeros.

Example, 99 instead 99,000

thanks

Alexandre Giguere

Accepted Solutions (1)

Accepted Solutions (1)

former_member40425
Contributor
0 Kudos

Hi,

If you want only integer part then you can use following code.

Data: var1 type EKPO-MENGE.

Data: var2 type i.

var2 = var1.

Now suppose value of var1 is 99.000 then var2 will contain 99 only.

I hope it helps.

Regards,

Rohit

AlexGiguere
Contributor
0 Kudos

Thanks, I know I can do that... I will need to change the typping of the field MENGE to an integer and maybe create a new data element in cases I don't want to lose the original description. The thing is that with the standard ALV functionality, QUAN fields adapt their format to their corresponding UNIT, it does not seems the case with WD4A,

Alex

0 Kudos

You can import the MEINS field in the node as an attribute and fill it with "EA". The meins attribute is used to format the quantity, like a dynpro

Tested with sap nw abap 701

bye

sam

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Check in the context attribute propetires,

FORMATTING->

DISPALY_LEADING ZEROS as zeros as blanks.

Hope it works.

AlexGiguere
Contributor
0 Kudos

Yeah, I tested that and it does not work, this is only for leading zeros, not decimal zeros,

thanks!