Application Development and Automation 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: 
Read only

alv display

Former Member
0 Likes
1,143

Hi all,

I have an internal table with all the fields from s703 table.Now i display the internal table using alv field catalog merge.Actually in the table for some vaues decimals are present like 5.0000,32.5000 but in the alv output i did not get the decimal points means for 5.0000 it is displaying only 5 and for 32.5000 it is displaying 32.5.

Please tell me how to get the original values in the display.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,114

Hi,

In the internal table define that field as type p with decimals n.

Hope this helps.

reward if helpful.

Regards,

Sipra

Hi all,

I have an internal table with all the fields from s703 table.Now i display the internal table using alv field catalog merge.Actually in the table for some vaues decimals are present like 5.0000,32.5000 but in the alv output i did not get the decimal points means for 5.0000 it is displaying only 5 and for 32.5000 it is displaying 32.5.

Please tell me how to get the original values in the display.

Thanks in advance

8 REPLIES 8
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,114

Hi

Use corresponding Conversion_Exits before displaying the data in ALV.

Regards,

kumar

Read only

Former Member
0 Likes
1,115

Hi,

In the internal table define that field as type p with decimals n.

Hope this helps.

reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,114

While building field catalog please refer to teh same filed from the table.

Read only

Former Member
0 Likes
1,114

hi,

when u r displaying the fields make sure that the length u specify should be equal to the length of the field in the table.

Refer this example.plz do reward points if it is of some use.

FORM fieldcat .

PERFORM addf USING:

'MBLNR' 'material document' 'X' '10',

'ERDAT' 'date' space '10',

'MBLPO' 'item no' space '04',

'MATNR' 'material' space '18',

'MAKTX' 'description' space '40',

'MEINS' 'uom' space '04',

'MENGE' 'qty' space '13',

'WAERS' 'curr' space '05',

'DMBTR' 'amt' space '13'.

ENDFORM. " fieldcat

&----


*& Form addf

&----


  • text

----


FORM addf USING value(p_fd) TYPE c value(p_txt) TYPE c

value(p_key) TYPE c value(p_len) TYPE c.

DATA: p_fieldcat TYPE slis_fieldcat_alv.

p_fieldcat-col_pos = t_pos.

p_fieldcat-fieldname = p_fd.

p_fieldcat-seltext_m = p_txt.

p_fieldcat-key = p_key.

p_fieldcat-outputlen = p_len.

  • p_fieldcat-do_sum = p_tab.

  • IF p_fieldcat-col_pos = 9.

  • p_fieldcat-do_sum = 'X'.

  • ENDIF.

APPEND p_fieldcat TO t_fieldcat.

t_pos = t_pos + 1.

ENDFORM. " addf

Read only

Former Member
0 Likes
1,114

Hi

Conversion exits or giving field names not solved this problem.

is there any solution to display but must and should field catalog merge will be there

Read only

0 Likes
1,114

Hi,

In fieldcatalog or in the final output table structure refer the field BRGEW from MARA u will get three decimals.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,114

Hi

call the FMs:

CONVERT_FIELD_TO_INTERN_FORMAT

in your programming before display those fields in the ALV.

Regards,

kumar

Read only

Former Member
0 Likes
1,114

u have to check Field catalog.

fcat-decimals_out(6) = '3'.

otherwise send complete data to fcat.

<b> fcat1-fieldname = 'LMNGA'.

fcat1-key = ''.

fcat1-outputlen = '15'.

fcat1-just = 'R'.

fcat1-seltext_m = 'Producation, 8 Oz'.

fcat1-ddictxt = 'M'.

fcat1-inttype = 'Q'.

fcat1-datatype = 'QUAN'.

fcat1-do_sum = 'X'.

fcat1-no_zero = 'X'.

append fcat1.

clear fcat1.</b>

in this case u wont miss any thing

Regards

Prabhu