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

Sample code cl_alv

Former Member
0 Likes
1,221

Can anyone please provide a simple sample code for OO ALV.

Additional requirements editable fields and save them back.

Points assured.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,122

Hello ,

You can look at the sample programs in your SAP system. they all start with BCALV*.

You can find <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">here</a> an excellent article contributed by one of our members sometime back.

Regards,

Kinshuk Saxena

9 REPLIES 9
Read only

Former Member
0 Likes
1,123

Hello ,

You can look at the sample programs in your SAP system. they all start with BCALV*.

You can find <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">here</a> an excellent article contributed by one of our members sometime back.

Regards,

Kinshuk Saxena

Read only

Former Member
0 Likes
1,122

go to transaction DWDM there are lot of example of oabap...

Read only

Former Member
0 Likes
1,122

go to se80

enter package name as slis ..there u can find many examples on alv..

Read only

0 Likes
1,122

Hi,

Thanks for the quick replies.

I have seen all these programs. But I have need a minimal version of these program.

Hi Saxena I couldn't open your link.

Thanks.

Read only

0 Likes
1,122

Hi,

My email ID is paul.miller_sap@yahoo.com

Read only

0 Likes
1,122

Hello,

You should be able to open it now. there was a small typo in the URL.

Please reward the points if you find it helpful

Regards,

Kinshuk Saxena.

Read only

0 Likes
1,122

Hi Prasad,

Thanks for the code.

Do you have any samples for editable ALV.

Thanks in advance.

Read only

Former Member
0 Likes
1,122

Hi ,

ALV using OOP can be done using the class CL_GUI_ALV_GRID.I have some documents pertaining to OO ALV. It gives a step-by-step methodology in implementing ALV using OOP.

Tell me the e-mail id so that I can send it to you.

Regards,

Sylendra.

Read only

Former Member
0 Likes
1,122

Hi ,

In the program that I have sent you , one of the fields is editable. To make a field in the ALV editable, goto the function where u are populating the field catalog, and make the "edit" element of the field catalog as "X".

In the program, suppose I want to make the CARRID field as editable.Then in the function do the steps.

form prep_catalog changing p_fc type lvc_t_fcat.

data: struct type lvc_s_fcat.

clear struct.

struct-fieldname = 'CARRID'.

struct-reftable = 'SFLIGHT'.

struct-edit = 'X'." this is for making the field editable

append struct to p_fc.

endform.

Hope your doubt is cleared.