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 using OOPS

SujeetMishra
Active Contributor
0 Likes
682

Hi all,

I have developed one ALV report using ABAP OOPS. i have used Custom Container to display my all values.

below are the methods i am calling to dispaly and all values is coming in T_DATASET[] ans fcat, But after Executing my report it is not displaying any value.

my container is blank in output only fcat-coltext is coming and fieldname value is not coming.

wa_fcat-fieldname = 'T_DATASET-KAVS'.

wa_fcat-coltext = ' xyz'.

CALL METHOD grid1->set_table_for_first_display

CHANGING

it_outtab = T_DATASET[]

it_fieldcatalog = fcat.

please guide me.

Thanks in Advance.

6 REPLIES 6
Read only

Former Member
0 Likes
642

HI,

The fieldname should contain only the fieldname and not the tablename-fieldname.

Check the example report

BCALV_TEST_GRID

Regards,

Ankur Parab

Read only

0 Likes
642

Thanks Ankur.

Read only

Former Member
0 Likes
642

hi,

have you uncomment the MODULE given in the PBO and PAI of the

SCREEN.

hope this helps

Regards

RItesh J

Read only

Sm1tje
Active Contributor
0 Likes
642

Posting only this part of the code, which seems to be just fine, won't be of any hepl. You might want to consider to post the whole code (if possible due to restrictions in number of characters). Reading your post lets us believe that just about everything is ok, but it obviously is not.

BTW: Set your coding in between two .

Read only

Former Member
0 Likes
642

Hi,

Check this



  w_fc-tabname = 'T_MATERIALDETAILS'.
  w_fc-fieldname = 'ERNAM'.
  w_fc-seltext_l = 'Created By'.

The fieldname contains only the name of the field (in CAPS) not tablename-fieldname.

Read only

Former Member
0 Likes
642

Hi,

just go through code...

wa_fcat-tabname = 'XYZ.

wa_fcat-fieldname = 'DDTEXT'.

wa_fcat-inttype = 'C'.

wa_fcat-coltext = 'Short Text'.

wa_fcat-outputlen = 10.

wa_fcat-col_pos = 8.

append wa_fcat to fcat.

clear wa_fcat.

form alv_display.

call method ref_grid->set_table_for_first_display

exporting

is_variant = st_var

i_save = save

is_layout = loyo

changing

it_outtab = XYZ[]

it_fieldcatalog = fcat.

call screen 100.

endform. "alv_display

Thanks

Ashu