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

Differences between on chain-input & on chain-request

Former Member
10,203

Hi All,

Cany any one explain the difference between on chain-input & on chain-request ( or on input & on request).

I have already gone through the SAP document help, it was mentioned...

On Input:-

If you use the ON INPUT addition in a MODULE statement after FIELD, the module is called only if the field contents have changed from their initial value.

With in a CHAIN block, you must use the ON CHAIN-INPUT addition. The module is then called if the contents of at least one screen field within the CHAIN block have changed from their initial value.

On Request:-

If you use the ON REQUEST addition in a MODULE statement after FIELD, the module is called only if the user enters a new value in that field.

Within a CHAIN block, you must use the ON CHAIN-REQUEST addition. The module is then called if the user changes the contents of at least one screen field within the CHAIN block.

I was not clear what is initial value (of On Input) & new value (of On Request).

Thanks,

Kal Chand

1 ACCEPTED SOLUTION
Read only

Former Member
4,497

Hi Kal,

Let me try and put it into perspective.

On Input (When value changes from initial value):

Here e.g. you have a screen field which has a character field. Initial value of a character field is space. When you enter the screen for the first time, suppose the field is blank (initial value), then user enters some value ('XYZ') in the field, in such an event, the MODULE ON CHAIN-INPUT would get triggered, since the value has changed from initial value to 'XYZ'.

However, now say the user changes the value from 'XYZ' to 'AAA'. In this case, the MODULE ON CHAIN-INPUT will NOT get triggered because the original value was not initial i.e. space.

However, as most applications demand, you would want to trigger the MODULE when there is any changes in the field value. In such instances, you do a MODULE ON CHAIN-REQUEST which is triggered when there is any change in value of screen field.

Hence, ON REQUEST is a superset of ON INPUT, so to say that ON REQUEST is also triggered when value is changed from initial (as in ON INPUT) however ON INPUT is not triggrered when value is changed from non-initial, whereas ON REQUEST modules are triggered.

I hope this makes it clearer.

Regards,

Aditya

4 REPLIES 4
Read only

Former Member
4,498

Hi Kal,

Let me try and put it into perspective.

On Input (When value changes from initial value):

Here e.g. you have a screen field which has a character field. Initial value of a character field is space. When you enter the screen for the first time, suppose the field is blank (initial value), then user enters some value ('XYZ') in the field, in such an event, the MODULE ON CHAIN-INPUT would get triggered, since the value has changed from initial value to 'XYZ'.

However, now say the user changes the value from 'XYZ' to 'AAA'. In this case, the MODULE ON CHAIN-INPUT will NOT get triggered because the original value was not initial i.e. space.

However, as most applications demand, you would want to trigger the MODULE when there is any changes in the field value. In such instances, you do a MODULE ON CHAIN-REQUEST which is triggered when there is any change in value of screen field.

Hence, ON REQUEST is a superset of ON INPUT, so to say that ON REQUEST is also triggered when value is changed from initial (as in ON INPUT) however ON INPUT is not triggrered when value is changed from non-initial, whereas ON REQUEST modules are triggered.

I hope this makes it clearer.

Regards,

Aditya

Read only

0 Likes
4,497

Thanks Aditya. Well explained.

Read only

Former Member
0 Likes
4,497

Question answered...Thanks for reply

Read only

0 Likes
4,497

thank you.....