08-04-2007 10:56 AM
I have a module pool screen consisting of a table. i have 4 fields in that table which are not editable. i want to make one of those fields editable based on a certain input. please tell me how do i go about this. provide a pseudo code if possible.
08-04-2007 11:04 AM
Hi Frank,
Check these reports, You will find code to edit/non-edit of fields.
<b>BCALV_EDIT_01 </b>This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
<b>BCALV_EDIT_02 </b>This report illustrates how to set chosen cells of an ALV Grid Control editable.
Thanks,
Vinay
08-04-2007 11:05 AM
Hi..
You have to call a module from PBO for this .. and put this code in the module.
**Declare this in TOP include
DATA : WA_COLS TYPE CXTAB_COLUMN.
**Logic in PBO module which has to be called inside LOOP .. ENDLOOP of Table **control.
CASE OK_CODE.
WHEN 'SOME'.
LOOP AT T_CON-COLS INTO WA_COLS.
IF WA_COLS-SCREEN-NAME = 'MARA-MATNR'.
WA_COLS-SCREEN-INPUT = 1.
MODIFY T_CON-COLS FROM WA_COLS.
ENDIF.
ENDLOOP.
ENDCASE.
<b>Reward if Helpful.</b>
08-04-2007 11:26 AM
Hello ,
Ans : How to go on with your problem?
*********************************************
One of the best solution is using control table- COLS and doing relevant operation on it...
provide a pseudo code if possible
***************************************
Please do the following in the SAP system...
0.abapdocu -> ABAP USER DIALOGS ->SCREENS -> COMPLEX SCREEN ELEMENTS ->Table control with modifications
report : REPORT demo_dynpro_tabcont_loop_at.
inside it you can see in PAI
MODULE user_command_0100 INPUT.
CASE save_ok.
WHEN 'TOGGLE'.
LOOP AT flights-cols INTO cols WHERE index GT 2.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
Hope this clarifies you
Reward all useful aswers
Regards
Byju