‎2008 Jun 24 11:06 AM
hi,
i am getting data in my final itab (it_final). but in the display , the 4th field 'PS_PSP_PNR' data is not coming instead of that posid value is coming ?
i written like this...........can any one help me.......?
field catalog build
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '1'.
wa_fcat-fieldname = 'VBELN'.
wa_fcat-ref_fieldname = 'VBELN'.
wa_fcat-ref_tabname = 'VBAP'.
wa_fcat-outputlen = '15'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '2'.
wa_fcat-fieldname = 'POSNR'.
wa_fcat-ref_fieldname = 'POSNR'.
wa_fcat-ref_tabname = 'VBAP'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '3'.
wa_fcat-fieldname = 'MATNR'.
wa_fcat-ref_fieldname = 'MATNR'.
wa_fcat-ref_tabname = 'VBAP'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '4'.
wa_fcat-fieldname = 'PS_PSP_PNR'.
wa_fcat-ref_fieldname = 'PS_PSP_PNR'.
wa_fcat-ref_tabname = 'VBAP'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '5'.
wa_fcat-fieldname = 'KOSRT'.
wa_fcat-ref_fieldname = 'KOSRT'.
wa_fcat-ref_tabname = 'KONH'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '6'.
wa_fcat-fieldname = 'ZZLAND1'.
wa_fcat-ref_fieldname = 'ZZLAND1'.
wa_fcat-ref_tabname = 'PRPS'.
wa_fcat-outputlen = '10'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '7'.
wa_fcat-fieldname = 'KHINR'.
wa_fcat-ref_fieldname = 'KHINR'.
wa_fcat-ref_tabname = 'CEPC'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '8'.
wa_fcat-fieldname = 'KUNNR'.
wa_fcat-ref_fieldname = 'KUNNR'.
wa_fcat-ref_tabname = 'KNA1'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '9'.
wa_fcat-fieldname = 'LAND1'.
wa_fcat-ref_fieldname = 'LAND1'.
wa_fcat-ref_tabname = 'KNA1'.
wa_fcat-outputlen = '7'.
append wa_fcat to iT_fcat.
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '10'.
wa_fcat-fieldname = 'POSID'.
wa_fcat-ref_fieldname = 'POSID'.
wa_fcat-ref_tabname = 'PRPS'.
append wa_fcat to iT_fcat.
for ALV display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
IT_FIELDCAT = it_fcat[]
TABLES
t_outtab = it_final
‎2008 Jun 24 11:09 AM
change this...
clear wa_fcat.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-col_pos = '4'.
wa_fcat-fieldname = 'PS_PSP_PNR'.
wa_fcat-seltext_l = 'sometext'.
append wa_fcat to iT_fcat.remove the ref table and ref field. populate your own text.
‎2008 Jun 24 11:09 AM
Hi ,
There check the sequence of filling the Fieldcatalog.
If its not the case then the reason is that there is a onversion rutine attached to the field PS_PSP_PNR.
So you have to use the conversion routine CONVERSION_EXIT_ABPSP_OUTPUT on that field on that field and modify the internal table and do not provide the standard table name to fieldcatalog.
I hope this will help you.
Help children of U.N World Food Program by rewarding points and encourage others to answer your queries.
Edited by: Sandipan Das on Jun 24, 2008 12:13 PM
‎2008 Jun 24 11:13 AM
hi
ur missing 1 field....wa_fcat-outputlen
every time...after the first one..
‎2008 Jun 24 11:15 AM
Pl. check for ur report any layout variant is created or not...
Regards,
Joy.
‎2008 Jun 24 11:19 AM
Hi,
please check the field name.
If it is 'PS_PSP_PNR' in the declaration and selection into the table vbap.
‎2008 Jun 24 11:26 AM
Hi santoshini,
Please check the output length parameter which u r passing...if so give it for all fields....
wa_fcat-outputlen = 'X'. X= some number....
or else
wa_fcat-seltext_l = 'Description'. for all the o/p fields.
I think this will solve the problem..
Regards.