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: 

ALV Output

Former Member
0 Kudos

Hi Experts,

In an ALV Report's Output Iam getting a field values in a strange manner. For some records it showing the values with decimals and for some it is not showing.

Can you please let me know what is the reason? Thanks for your help.

(The reference field is: EKBE-MENGE)

For eg:

0.000

1200

154,560

0

0.000

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Looks like, your field doesn't have reference in the fieldcatalog.


        fcat-ref_fieldname = 'MENGE'.
        fcat-ref_tabname = 'EKBE'.

Regards

Naimesh Patel

6 REPLIES 6

naimesh_patel
Active Contributor
0 Kudos

Looks like, your field doesn't have reference in the fieldcatalog.


        fcat-ref_fieldname = 'MENGE'.
        fcat-ref_tabname = 'EKBE'.

Regards

Naimesh Patel

0 Kudos

I gave the reference. But it still is not working. Thanks for the reply though.

0 Kudos

Hi Sam,

Can you paste your code of fieldcatlog creation.

Regards,

Atish

0 Kudos

Hi,

Here's the fieldcatalog:

*----


form init_field_catalog.

data: l_colpos type i.

refresh i_fieldcat.

clear i_fieldcat.

*--- Data fields.

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = w_repid

i_internal_tabname = 'I_OUTPUT'

i_inclname = w_repid

changing

ct_fieldcat = i_fieldcat[]

exceptions

inconsistent_interface = 1

program_error = 2

others = 3.

*--- Modify field catalog.

loop at i_fieldcat.

case i_fieldcat-fieldname.

when 'MATNR'.

i_fieldcat-col_pos = 1.

i_fieldcat-key = 'X'.

when 'MAKTX'.

i_fieldcat-col_pos = 2.

i_fieldcat-ddic_outputlen = 40.

when 'LIFNR'.

i_fieldcat-col_pos = 3.

when 'MEINS'.

i_fieldcat-col_pos = 4.

i_fieldcat-reptext_ddic = 'UoM'.

when 'WAERS'.

i_fieldcat-col_pos = 5.

when 'SPAMT'.

i_fieldcat-col_pos = 6.

i_fieldcat-ddic_outputlen = 20.

i_fieldcat-seltext_l = 'Spend to Crnt Dt'.

i_fieldcat-reptext_ddic = 'Spend to Crnt Dt'.

when 'SPQTY'.

i_fieldcat-col_pos = 7.

i_fieldcat-ref_tabname = 'EKBE'.

i_fieldcat-ref_fieldname = 'MENGE'.

i_fieldcat-reptext_ddic = 'QTY to Current Dt'.

i_fieldcat-seltext_l = 'QTY to Current Dt'.

when others.

i_fieldcat-no_out = 'X'.

i_fieldcat-col_pos = 0.

endcase.

modify i_fieldcat.

endloop.

0 Kudos

Hi Sam,

Change code as below and try

when 'SPQTY'.

i_fieldcat-col_pos = 7.

i_fieldcat-ref_tabname = 'EKBE'.

i_fieldcat-ref_fieldname = 'MENGE'.

<b>i_fieldcat-ref_qfieldname = 'MEINS'.

i_fieldcat-ref_qtabname = 'EKPO'.</b>

i_fieldcat-reptext_ddic = 'QTY to Current Dt'.

i_fieldcat-seltext_l = 'QTY to Current Dt'.

Regards,

Atish

0 Kudos

Hi Atish,

I worked. But it worked with this logic:

when 'SPQTY'.

i_fieldcat-col_pos = 7.

i_fieldcat-qfieldname = 'MENGE'.

i_fieldcat-qtabname = 'EKBE'.

i_fieldcat-reptext_ddic = 'QTY to Current Dt'.

i_fieldcat-seltext_l = 'QTY to Current Dt'.

Thanks for your help though.