Skip to Content
author's profile photo Former Member
Former Member

System variable to know whether some change is done or not

Hi,

i have a requirement where in a transaction i have 15 fields. if someone changes one field and tries to exit the program without saving it i need to populate a message.

is there any system variable which can give information that some change has happneed in the screen

awaiting reply and thanks in advance

regards

Sai easwar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Oct 26, 2006 at 12:31 PM

    Try sy-datar.

    Otherwise you have to check old and new vvalues individually

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 12:32 PM

    hi SAi,

    SY-DATAR <> 0 implies, some changes have been done to the screen fields.

    Sajan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 12:34 PM

    HI,

    I tried to use SY-DATAR. but it is giving SPACE always. is there anything i need to do to be set automatically?

    regards

    Sai easwar

    Add a comment
    10|10000 characters needed characters exceeded

    • hi,

      there is no sy-field.

      try this:

      organize your input-fields that they are in one structure.

      e.g. in-bukrs,

      in-gsber,...

      define structure old like in (as copy).

      at PBO save structure "IN" in OLD

      after PAI compare "IN and "OLD"

      if IN = OLD...

      A.

      Message was edited by: Andreas Mann

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 12:39 PM

    Hi Sai,

    The sy-datar field will be initial, if no changes occur in the screen fields. It is character field (and hence please dont check for sy-datar <> 0 as i mentioned in my previous reply).

    Sajan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 01:33 PM

    Hi,

    follow below logic

    itab_old-matnr = '10'.

    itab-new-matnr = '20'.

    case ok-code

    when 'EXIT'

    if itab_old-matnr <> itab_new-matnr.

    message i000(zz) with 'Save entries'

    endif.

    Regards

    amole

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.