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 through objects in report

Former Member
0 Kudos

hello friends,

i am making an alv report through se38,i want to call alv display through objects.

but the example im following for reference is for screen programming and it contains creation of container and im gettin an error for it,how to display in alv in normal se38 report through objects?????

1 ACCEPTED SOLUTION
4 REPLIES 4

Former Member
0 Kudos

go thru this prog for reference..

BCALV_GRID_02

Put a BCALV* in SE38 and u get a host of prog names..

see their description for help as per suited to u

Regards

Former Member
0 Kudos

Hi Amit,

You can use cl_salv_table for display data. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed...

&----


*& Report SALV_DEMO_TABLE_REAL_SIMPLE

&----


*& Thisisthemostsimple form of callingthenewALV objectmodel

*& Isn'titREALLY simple?

&----


REPORT SALV_DEMO_TABLE_REAL_SIMPLE.

data: gt_outtabtypetableof SFLIGHT.

data: gr_tabletyperefto cl_salv_table.

*... Selectdata

select* fromSFLIGHT intocorrespondingfieldsof tablegt_outtab.

*... CreateInstance

callmethodcl_salv_table=>factory

IMPORTING

R_SALV_TABLE = gr_table

changing

t_table= gt_outtab.

*... Display table

gr_table->display( ).

-


but, If you need set editable alv use CL_GUI_ALV_GRID: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4544e790-0201-0010-c29c-e46c389f...

In the fieldcat use edit = 'X' to set it editable.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'DATE'.

wa_fieldcat-col_pos = 1.

wa_fieldcat-decimals_o = 0.

wa_fieldcat-datatype = 'DATS'.

wa_fieldcat-no_zero = 'X'.

wa_fieldcat-edit = 'X'.

wa_fieldcat-outputlen = 8.

APPEND wa_fieldcat TO gt_fieldcat.

Thanks,

Reward If Helpful.

0 Kudos

hi viji,

dont v need to pass the field catalog also,i mean where do v use field catalog here