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..problem

Former Member
0 Likes
670

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

6 REPLIES 6
Read only

Former Member
0 Likes
639

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.

Read only

Former Member
0 Likes
639

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

Read only

Former Member
0 Likes
639

hi

ur missing 1 field....wa_fcat-outputlen

every time...after the first one..

Read only

Former Member
0 Likes
639

Pl. check for ur report any layout variant is created or not...

Regards,

Joy.

Read only

Former Member
0 Likes
639

Hi,

please check the field name.

If it is 'PS_PSP_PNR' in the declaration and selection into the table vbap.

Read only

Former Member
0 Likes
639

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.