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

OO ALV

Former Member
0 Likes
857

Anyone know how to make the field in ALV as input field for OO ALV?

Basically I wish to make the field for ALV to become an input text field so that user can key in something in ALV report.

Thanks.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
807

Hello Justin

You can define input fields at three levels:

- entire ALV list is editable (i.e. all columns and all rows)
- entire column
- individual cells

To define the entires ALV grid editable set LVC_S_LAYO-EDIT = 'X' (ALV <b>layout</b>). Alternatively you can use method go_grid->IS_READY_FOR_INPUT.

To define columns as editable set LVC_S_FCAT-EDIT = 'X' for the columns in the <b>fieldcatalog</b>.

For sample reports have a look at BCALV_EDIT_01 (entire grid) and BCALV_EDIT_02 (editable cells).

For an excellent introduction into ALV grid control programming refer to

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">An Easy Reference For ALV Grid Control</a>

Regards

Uwe

7 REPLIES 7
Read only

Former Member
0 Likes
807

Hi Justin ,

Check this link below which talks abt making a field editable. If the field is declared as a text then , using the illustrated example below , u should be able to do it.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm

Read only

0 Likes
807

Hi,

However what I am looking for is OO ALV and not the tradisional way for ALV.

Do you know any?

Read only

Former Member
0 Likes
807

Hi

While preparing the fieldcatelog set the EDIT to 'X'; for the field which you want to key in.

i_fieldcat TYPE <b>lvc_t_fcat</b>.

wa_fieldcat LIKE LINE OF <b>i_fieldcat</b>.

wa_fieldcat-fieldname = field name

wa_fieldcat-tabname = table/structure name

wa_fieldcat-coltext = column heading

wa_fieldcat-<b>edit = 'X'</b>. --> this allows user to key in the data

APPEND wa_fieldcat TO i_fieldcat.

..

MB

Read only

Former Member
0 Likes
807

Hi Justin,

Take a look at the standard examples available BCEDIT programs.

'BCALV_EDIT_02'.

While building the field catalog, make the edit as 'X'.

X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).

X_FIELDCAT-FIELDNAME = 'VBELN'.

X_FIELDCAT-TABNAME = 'ITAB'.

X_FIELDCAT-COL_POS = L_POS.

X_FIELDCAT-NO_ZERO = 'X'.

<b> X_FIELDCAT-EDIT = 'X'.</b>

X_FIELDCAT-OUTPUTLEN = '10'.

APPEND X_FIELDCAT TO IT_FIELDCAT.

CLEAR X_FIELDCAT.

Hope this helps you

Regards,

Saumya

Read only

Former Member
0 Likes
807

chk this program BCALV_EDIT_05 , here checkbox is input enabled

Read only

uwe_schieferstein
Active Contributor
0 Likes
808

Hello Justin

You can define input fields at three levels:

- entire ALV list is editable (i.e. all columns and all rows)
- entire column
- individual cells

To define the entires ALV grid editable set LVC_S_LAYO-EDIT = 'X' (ALV <b>layout</b>). Alternatively you can use method go_grid->IS_READY_FOR_INPUT.

To define columns as editable set LVC_S_FCAT-EDIT = 'X' for the columns in the <b>fieldcatalog</b>.

For sample reports have a look at BCALV_EDIT_01 (entire grid) and BCALV_EDIT_02 (editable cells).

For an excellent introduction into ALV grid control programming refer to

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">An Easy Reference For ALV Grid Control</a>

Regards

Uwe

Read only

soldner
Participant
0 Likes
807

Thanks guys! This is just what I need to do my project.