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: 

Unit of measure problem in ALV grid

Former Member
0 Kudos
2,814

Hi!

My problem is that I have an ALV report with materials, quantities and units and when I try to download the list to excel with the standard function, i get a warning message "Internal unit PC, language EN is not maintained", and all the units in the excel sheet where the unit was PC will contain '*****'. But all other units are fine.

I think the problem is related to the fact, that unit PC is stored as ST in T006, but i don't know how to solve it.

Thanks,

Zoltan

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
663

Hi,

Please pass the Reference Table & Reference field in the Field Catalog of UNIT field in ALV.

Best regards,

Prashant

10 REPLIES 10

former_member223537
Active Contributor
664

Hi,

Please pass the Reference Table & Reference field in the Field Catalog of UNIT field in ALV.

Best regards,

Prashant

0 Kudos
663

If I do that, than i will get '*****' in the grid too. Unfortunately i have to use the function REUSE_ALV_GRID_DISPLAY and i can't pass the field CONVEXIT in the field catalogue, which i think would solve my problem.

JozsefSzikszai
Active Contributor
0 Kudos
663

hi Zoltán,

you can create a field in your internal table, character type, length 3 (or whatever you need) and fill this with 'PC' (or any other UoM). Not a nice solution, but I think it works when you download to Excel.

ec

Former Member
0 Kudos
663

Hi,

Try using the below code while building the fieldcatalog.:

if ls_fieldcat-fieldname = 'MEINS'.

ls_fieldcat-datatype = 'UNIT'.

endif.

Thanks,

Sriram Ponna.

0 Kudos
663

Hi Sriram,

I tried that already, but it did nor work. A passed UNIT to fieldcat-datatype and i passed MEINS to fieldcat-REF_FIELDNAME but it did not solve the problem.

Regards,

Zoltan

former_member223537
Active Contributor
0 Kudos
663

Hi,

Please maintain the table entry in T006 for EN language & unit PC.

Ask the Functional consultant to maintain it for you.

Best regards,

Prashant

0 Kudos
663

Hi,

I don't think it is a maintenance problem, because if i use the alv grid with the object oriented concept i get the units just right. So i think i just have to figure out how to fill the field catalogue of the REUSE_ALV... function to link the field exit to the unit field, but i haven't succeeded yet.

Regards,

Zoltan

0 Kudos
663

Hello Zoltan,

Have you been able to figure out this problem? We are faced with exactly the same problem. Please let me know if you've been able to solve it. Will let you know if we find something.

Thank you.

Johnson

0 Kudos
663

Hello Johnson,

I figured out the problem in the end. The programmer who wrote the program did manually the conversion between internal and external units which he shouldn't have done. And the ALV grid tries to convert internal to external units aswell at export time and since it was already in external format it lead to an error. For example pieces is 'ST' in internal format and may be 'PC' in external. And you should pass the internal value to the grid.

Hope this helps,

Zoltan

Former Member
0 Kudos
663

Add 'ref_table' 'ref_field' . SAP will convert the format automaticly not only 'display' but also 'EXCEL down'.

Don't use the convert function by yourself before 'display'. It cant influence the 'EXCEL DOWN' .

If you use them together , the unit will be converted twice . Then you will find '*******' on the 'display'.

Good luck.