What is difference between sy-ucomm and ok_code ?

Showing Answers 1 - 1 of 1 Answers

Sameer Ahmed

  • Jul 10th, 2007
 

SY-UCOMM IS A system variable. It contains the latest user action triggered. Whereas ok_code is generally a variable that we declare as a type of sy-ucomm. Usually in ABAP programing it is a good practice not to refer to sy-ucomm directly, or sometimes we need to store a user interaction for later validation, these are the scenarios where an ok_code value comes handy.

eg.

data: ok_code type sy-ucomm.

clear ok_code.
ok_code = sy-ucomm.
case ok_code.
when 'XYZ'.
..........
..........
WHEN OTHERS.
ENDCASE.

Hope  that clears the matter.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions