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 is the function of a data element? : abap data dictionary
what is the exact code that shoud be implimented in sap note
What are the modes in which any update tasks work?
What is the logo in sap script?
What are null values?
What is sql trace? : abap data dictionary
What are the different window types in sapscript?
Which transaction code can I use to analyze the performance of abap program?
Explain the differences between se01, se09 and se10?
What are the two ways for restricting the value range for a domain? : sap abap data dictionary
dear friends, do you know how to configure web dynpro and adobe into ECC6.0 IDES?
Explain what are the problems in processing batch input sessions? How is batch input process different from processing on line?
What is the difference between leave transaction and call transaction?
How do you Export a session ?
What is the maximum number of match code id's that can be defined for one match code object ?