‎2013 Oct 20 7:43 AM
Hello Experts,
I'm working with ALV report and trying to display data but for some weird reason last two columns have same values as third last column. Here is the table which I use to display ALV.
I use this table (LT_OUTPUT) in FM 'REUSE_ALV_GRID_DISPLAY' but I don't know why last three columns displays the same value. Here is the output of ALV.
Can anybody point out my mistake and suggest how to rectify this issue.
Many thanks in advance.
‎2013 Oct 20 7:46 AM
Please check the fieldcatalog, the field name of internal table provided in fieldcatalog might be incorrect. If possible, paste declaration of lt_output and code where you are building the fieldcatalog.
Regards
‎2013 Oct 20 7:46 AM
Please check the fieldcatalog, the field name of internal table provided in fieldcatalog might be incorrect. If possible, paste declaration of lt_output and code where you are building the fieldcatalog.
Regards
‎2013 Oct 20 7:52 AM
Many thanks for your reply netweaver. Not sure if this is the issue but here is how I've filled my fieldcatalog.
============================================================
fieldcatalog-fieldname = 'ZRERATE'.
fieldcatalog-seltext_m = 'Re-rating Number'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 15.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'KUNRG'.
fieldcatalog-seltext_m = 'Payer'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AUART'.
fieldcatalog-seltext_m = 'Document Type'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'INITIATOR'.
fieldcatalog-seltext_m = 'Initiator'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NEW_AMT'.
fieldcatalog-seltext_m = 'Invoice Amount'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'WAERK'.
fieldcatalog-seltext_m = 'Document Currency'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'ERDAT'.
fieldcatalog-seltext_m = 'Date re-rate invoice created'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'IDOC'.
fieldcatalog-seltext_m = 'IDOC Number'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'IDOC ERROR'.
fieldcatalog-seltext_m = 'IDOC Error Details'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
=======================================================
and here is the structure of the internal table lt_output
BEGIN OF t_output,
zrerate type zrerate,
kunrg type kunrg,
auart type auart,
initiator type zrerate_initiator,
new_amt type znew_amt,
waerk type waerk,
erdat type zrerate_date,
idocnum type edidc-docnum,
idocerror type edi_help-error_flag,
END OF t_output.
‎2013 Oct 20 7:57 AM
Please replace IDOC with IDOCNUM.
fieldcatalog-fieldname = 'IDOCNUM'.
fieldcatalog-seltext_m = 'IDOC Number'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
Regards
‎2013 Oct 20 7:59 AM
Also, remove space between 'IDOC ERROR'.
fieldcatalog-fieldname = 'IDOCERROR'.
Regards
‎2013 Oct 20 8:11 AM
Hi,
This happened because the name of the field in the output table and field catalog are not the same. Make it same. Your issue will be solved.
fieldcatalog-fieldname = 'IDOCNUM'.
fieldcatalog-seltext_m = 'IDOC Number'.
fieldcatalog-col_pos = 7.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'IDOCERROR'.
fieldcatalog-seltext_m = 'IDOC Error Details'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
‎2013 Oct 20 8:11 AM
Many thanks netweaver your suggestions resolved my issue and also learned something new today.
‎2013 Oct 20 8:11 AM
‎2013 Oct 20 9:18 AM
Hi ,
I try to replicate the problem but I got short dump .
Eventually I mange to do some damage...
Then I use "The Consistency Check"
http://help.sap.com/saphelp_nw73/helpdata/en/d6/23253963143e6ae10000000a11402f/content.htm
And we have :
Regards.