Program On Chain-Request


DATA : N1 TYPE i.
DATA : N2 TYPE i.
DATA : N3 TYPE i.
DATA : res TYPE i.
DATA : ok_code TYPE sy-ucomm.

MODULE status_9000 OUTPUT.
*  SET PF-STATUS ‘xxxxxxxx’.
*  SET TITLEBAR ‘xxx’.

ENDMODULE.                 ” STATUS_9000  OUTPUT

MODULE user_command_9000 INPUT.
CASE ok_code.
WHEN ‘ADD’.
CALL  SCREEN 9001.
ENDCASE.
ENDMODULE.                 ” USER_COMMAND_9000  INPUT

MODULE status_9001 OUTPUT.
*  SET PF-STATUS ‘xxxxxxxx’.
*  SET TITLEBAR ‘xxx’.
res = N1 + N2 + N3.
ENDMODULE.                 ” STATUS_9001  OUTPUT

MODULE user_command_9001 INPUT.
CASE ok_code.
WHEN ‘BACK’.
CALL SCREEN 9000.
ENDCASE.
ENDMODULE.                 ” USER_COMMAND_9001  INPUT

module CHECK_TWO_NUMBER input.
N1 = N1 + 10.
N2 = N2 + 10.
endmodule.                 ” CKECK_TWO_NUMBER  INPUT

FLOW LOGIC OF SCREEN 9000

PROCESS BEFORE OUTPUT.
MODULE status_9000.

PROCESS AFTER INPUT.
CHAIN.
FIELD : N1,N2.
MODULE CHECK_TWO_NUMBER ON CHAIN-REQUEST.
ENDCHAIN.
MODULE user_command_9000.

FLOW LOGIC OF SCREEN 9001

PROCESS BEFORE OUTPUT.
MODULE STATUS_9001.

PROCESS AFTER INPUT.
MODULE USER_COMMAND_9001.

  Run the program and if you provide any value to either n1 or n2  or both  then only  CHECK_TWO_NUMBER  module will execute . press ADD & BACK button many times to see the change.


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s