In Dialog Programming Table Control,how to make only one row
editable?
Answer Posted / rinzy deena mathews
DATA : ok_code TYPE sy-ucomm,
lines TYPE i.
DATA : t_sflight TYPE STANDARD TABLE OF sflight.
DATA : x_sflight TYPE sflight.
CONTROLS : tbl_sflight TYPE TABLEVIEW USING SCREEN 9000.
START-OF-SELECTION.
CALL SCREEN 9000.
*&--------------------------------------------------------*
*& Module STATUS_9000 OUTPUT
*&--------------------------------------------------------*
* text
*---------------------------------------------------------*
MODULE status_9000 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
IF t_sflight IS INITIAL.
APPEND INITIAL LINE TO t_sflight.
MODIFY t_sflight FROM x_sflight INDEX 1.
DESCRIBE TABLE t_sflight LINES lines.
tbl_sflight-lines = lines.
ENDIF.
ENDMODULE. " STATUS_9000 OUTPUT
*&------------------------------------------------------*
*& Module USER_COMMAND_9000 INPUT
*&------------------------------------------------------*
* text
*-------------------------------------------------------*
MODULE user_command_9000 INPUT.
IF ok_code EQ 'INSERT' AND ok_code NE ' '.
v_code = 'INSERT'.
INSERT INITIAL LINE INTO t_sflight INDEX lines.
tbl_sflight-lines = tbl_sflight-lines + 1.
ENDIF.
CLEAR ok_code.
ENDMODULE. " USER_COMMAND_9000 INPUT
*&-----------------------------------------------------*
*& Module MODIFY INPUT
*&-----------------------------------------------------*
* text
*------------------------------------------------------*
MODULE modify INPUT.
MODIFY t_sflight FROM x_sflight INDEX tbl_sflight-
current_line.
DESCRIBE TABLE t_sflight LINES lines.
ENDMODULE. " MODIFY INPUT.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What are control tables?
What are the different types of the variable in the sap abap?
Can there be more than 1 main window in sap script?
What are number ranges?
Explain Singleton class
What is the BAPI_CUSTMATINFO_GETDETAILM used for? what is the input and output of this bapi.
What is dynamic action? : sap abap hr
What are matchcodes?
What is the role of ‘refresh’ in internal table?
What are the differences between macro and subroutine?
How do you process errors in session method ? : abap bdc
State the system field for the current date?
What is the difference between refresh and free statements?
What are the different window types in sapscript?
What is an on”*-input filed” statement?