‎2007 Mar 02 3:57 AM
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.
‎2007 Mar 02 4:09 AM
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 cellsTo 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
‎2007 Mar 02 4:00 AM
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
‎2007 Mar 02 4:05 AM
Hi,
However what I am looking for is OO ALV and not the tradisional way for ALV.
Do you know any?
‎2007 Mar 02 4:05 AM
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
‎2007 Mar 02 4:06 AM
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
‎2007 Mar 02 4:07 AM
chk this program BCALV_EDIT_05 , here checkbox is input enabled
‎2007 Mar 02 4:09 AM
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 cellsTo 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
‎2010 Mar 19 4:25 PM