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

Table Control Error - Dialog Prog.

Former Member
0 Likes
322

Hi All,

I m doing dialog program with table control for editing some data.

When user enters something in the field and he want to exit then it should give the message that data will be lost and do u want to save. I m using a function which working everytime and not if the user doesn;t change anything then also it is asking because i m not able to get where to check whether the user has changed something or not.

Also i want to do some inactive field according to condition.

Any clue then let me know.

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
298

Hi

Use a internal table like the table for table control, where you store the initial data, and so when the user exit:

IF ITAB_OLD[] <> ITAB[].

-


> Message

ENDIF.

Max

Read only

Former Member
0 Likes
298

Hi,

Try checking the variable SY-DATAR for any changes in the screen..IF SY-DATAR 'X' then the data has been changed..

Otherwise..Before getting into the screen store the values in another internal table (T_ORIG)...

Before exiting check the current table control internal table (T_CURR) with the internal table (T_ORIG)..if there are not equal raise a popup..

For inactivating a field..Assign the field to a group..

  • CHECK CONDITIONS..

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G1'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks,

Naren

Message was edited by: Narendran Muthukumaran