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

how to Create reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details. The data will be extracted from VBAP, VBPA, VBAK, VBUP, VBFA, KNA1, LIPS, VBRP, MARA, VBEP and KONV tables. plz mention the detail coding Tahnks, Rahul

2871


Which transaction code is used executing a report (type 1 program)? : abap data dictionary

636


What is meant by slab? How is indian slab and us slab? : sap abap hr

558


Explain the advantages of abap query tool?

526


Can a transparent table exist in data dictionary but not in the database physically? : abap data dictionary

701






What are indexes? : sap abap data dictionary

557


What are system variable in abap?

608


What are the kinds of foreign key fields?

535


How can we use / display table in a screen?

641


How is collect statement different from append?

589


where do we store all custom programs in SD module?

4885


I created a field and entered the field type, when I double clicked the field type to define the domain; it is asking for an ACCESS KEY, I am not changing any SAP defined tables, working on a user defined table.

1349


Explain about workbench request and customization requests?

613


What is an update task? : abap modularization

592


MY DOMAIN IS SAP-ABAP COMPARE TO WEBDYNPRO AND CRM-TECHNICAL WHICH IS BEST?

2445