Application Development and Automation 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: 
Read only

DIALOG PROGRAMMING

Former Member
0 Likes
551

I CREATED A SCREEN IN MODULEPOOL PROGRAMMING .WHEN I CLICK ON SAVE

BUTTON DATA SAVE IN DATA BASE.IF I GIVE SAME DATA IT SHOULD GIVE ERROR

COULD U PLZ TELL ME THE CODE?

4 REPLIES 4
Read only

Former Member
0 Likes
525
Read only

Former Member
0 Likes
525

HI,

Consider Reg_No the Screen field ans User first gives the Input as 1000 and its stored in to data base table.

Again user enter the same Reg_no like 1000 means write the Following code,

DATA : TEMP LIKE ZTABLE-REGNO.

CASE SY-UCOMM.
WHEN 'SAVE'.

IF REG_NO IS NOT INITIAL.

SELECT SINGLE REGNO FROM "ZTABLE_NAME" INTO TEMP WHERE REGNO = REGNO.

IF SY-SUBRC EQ 0.
MESSAGE 'ENTER THE ANOTHER RECORD' TYPE 'E'.
ENDIF.

Thanks,

Reward If Helpful.

Read only

Clemenss
Active Contributor
0 Likes
525

Hi srinath ji,

please behave as an adult should:

1. Before pasting any question, do a forum search

2. press the key marked CAPSLOCK on your keyboard. Your uppercase letters are not easily readable and hurt the eyes.

Thank you.

Clemens Li