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
Explain what are the problems in processing batch input sessions?
What are the user groups?
Control Break statements- At new...endat.
When the top-of-page event does get triggered?
there are 2 selection screens. material num in screen 200 and plant in screen 300. so how can you write in INITIALISATION event?
How to know if the value entered contains records or not?
What is retro active accounting
What are the mandatory fields to be filled for BAPI_CUSTOMER_CREATEFROMDATA1
How can one distinguish between different kinds of parameters? : abap modularization
What does the ‘suppress dialog’ do?
Will 50,000 records be uploaded directly into APP's Server?
What are the attributes of the data? : abap data dictionary
Explain the difference between domain and data element? What are aggregate object?
Is main window mandatory in smartforms?
Explain the difference between float and packed data type?