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


Please Help Members By Posting Answers For Below Questions

if u take one worst program,in this program user write the logic is session method.in that program user can get some errors ,that errors we will see in call transaction method,how it is possible.?

1665


How does the interection between the dynpro and the abap/4 modules takes place?

641


Can i know some of the Realtime tickets that anyone has been faced ?

1653


What is the use of program rsbdcsub? : abap bdc

640


Which table stores the programs created?

605






What are conversion routines? : abap data dictionary

580


Can we use write statements in screen fields?if not how is data transferred from field data to screen fields?

541


what are the critical issues u face in ur project?

1965


What are the dynapro keywords?

656


the problem is that , while i am undergoing with my practice session, i am creating too many new programs.they are occupying much space in my hard-disk. how to delete un-necessary programs completely from my data- base........... plz help me with this .....

1558


What are the differences between interactive and drill down reports?

532


How to transfer the objects? Have to transferred any objects?

569


What are the restrictions on subscreens?

636


What is the differences between abap and ooabap. In which situation we useooabap?

702


What is a view in sap? : abap data dictionary

615