Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Dailog Programing

Former Member
0 Kudos

ABAP GURU'S

Hi

There are only two functions (SAVE and DIS) work properly under below mentioned coding and remain delete , Modify are not working. PLz check the coding and give the right solution.

Thanks.

REPORT YSCREEN4 .

CALL SCREEN 1000.

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


module USER_COMMAND_1000 input.

TABLES: YSACH1.

DATA: OK_CODE(8).

TYPES: BEGIN OF ITAB,

ID(4) TYPE C,

NAME(35) TYPE C,

ORT01 TYPE ORT01,

STRAS TYPE STRAS,

LAND1 TYPE LAND1,

END OF ITAB.

DATA: IT_ST TYPE TABLE OF ITAB ,

WA_ST TYPE ITAB,

IT_YSACH1 TYPE YSACH1,

WA_YSACH1 TYPE YSACH1.

CASE OK_CODE.

WHEN 'DISP'.

CLEAR OK_CODE.

SELECT SINGLE * FROM YSACH1

WHERE ID = YSACH1-ID.

WHEN 'SAVE'.

WA_ST-ID = YSACH1-ID.

WA_ST-NAME = YSACH1-NAME.

WA_ST-ORT01 = YSACH1-ORT01.

WA_ST-STRAS = YSACH1-STRAS.

WA_ST-LAND1 = YSACH1-LAND1.

MOVE-CORRESPONDING WA_ST TO WA_YSACH1.

INSERT INTO YSACH1 VALUES WA_YSACH1.

WHEN 'DELETE'.

WA_ST-ID = YSACH1-ID.

WA_ST-NAME = YSACH1-NAME.

WA_ST-ORT01 = YSACH1-ORT01.

WA_ST-STRAS = YSACH1-STRAS.

WA_ST-LAND1 = YSACH1-LAND1.

MOVE-CORRESPONDING WA_YSACH1 TO WA_ST.

DELETE YSACH1 FROM WA_YSACH1.

WHEN 'MODIFY'.

WA_ST-ID = YSACH1-ID.

WA_ST-NAME = YSACH1-NAME.

WA_ST-ORT01 = YSACH1-ORT01.

WA_ST-STRAS = YSACH1-STRAS.

WA_ST-LAND1 = YSACH1-LAND1.

MOVE-CORRESPONDING WA_YSACH1 TO WA_ST .

MODIFY YSACH1 FROM WA_YSACH1.

WHEN 'EXIT'.

CLEAR OK_CODE.

SET SCREEN 0.

LEAVE SCREEN.

ENDCASE.

endmodule. " USER_COMMAND_1000 INPUTHI

2 REPLIES 2

Former Member
0 Kudos

Hi,

The changes are in small letters.....

WHEN 'DELETE'.

WA_ST-ID = YSACH1-ID.

WA_ST-NAME = YSACH1-NAME.

WA_ST-ORT01 = YSACH1-ORT01.

WA_ST-STRAS = YSACH1-STRAS.

WA_ST-LAND1 = YSACH1-LAND1.

MOVE-CORRESPONDING WA_ST to wa_ysach1.

DELETE YSACH1 FROM WA_YSACH1.

WHEN 'MODIFY'.

WA_ST-ID = YSACH1-ID.

WA_ST-NAME = YSACH1-NAME.

WA_ST-ORT01 = YSACH1-ORT01.

WA_ST-STRAS = YSACH1-STRAS.

WA_ST-LAND1 = YSACH1-LAND1.

MOVE-CORRESPONDING WA_ST to wa_ysach1.

MODIFY YSACH1 FROM WA_YSACH1.

Thanks,

Arunprasad.P

Reward if useful.

Former Member
0 Kudos

hi,

check the fct code for the partcular coding in your screen element and coding it is not the same thing i think so.