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

on chain-request and input

Former Member
0 Likes
2,184

Hi Experts

Can you pls explain me whats the difference between

on chain-request and on chain-input.

I tried both in a situation, but not able to find the differenciation.

Pls advise me with suitable example.

Regards

Rajaram

Hi Experts

Can you pls explain me whats the difference between

on chain-request and on chain-input.

I tried both in a situation, but not able to find the differenciation.

Pls advise me with suitable example.

Regards

Rajaram

4 REPLIES 4
Read only

Former Member
0 Likes
1,310

hi raja,

refer this threads,

<u> - 32k</u>,

<u> - 35k</u>

Read only

Former Member
0 Likes
1,310

Hi,

<b>ON INPUT</b>

The ABAP module is called only if the field contains a value other than its initial value. This initial value is determined by the data type of the field: Space for character fields, zero for numeric fields. Even if the user enters the initial value of the screen as the initial value, the module is not called. (ON REQUEST, on the other hand, does trigger the call in this case.)

<b>

ON REQUEST</b>

The module <mod> is only called if the user has entered something in the field. This includes cases when the user overwrites an existing value with the same value, or explicitly enters the initial value.

In general, the ON REQUEST condition is triggered through any form of "manual input". As well as user input, the following additional methods of entering values also call the module.

CHAIN.

FIELD: <f1>, <f 2>,...

MODULE <mod1> ON CHAIN-INPUT|CHAIN-REQUEST.

FIELD: <g1>, <g 2>,...

MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.

...

ENDCHAIN.

The additions ON CHAIN-INPUT and ON CHAIN-REQUEST work like the additions ON INPUT and ON REQUEST that you use for individual fields. The exception is that the module is called whenever at least one of the fields listed in a preceding FIELD statement within the chain meets the condition. So <mod1> is called when one of the fields <fi> meets the condition. <mod2> is called when one of the fields <f i> or <g i> meets the condition.

rgds,

bharat.

Read only

Former Member
0 Likes
1,310

Hi.

on -chain request vil work , ven u fill-up all d fields in the screen. & den u press d " Enter" . in that Enter " on-chain requset vil work".

in short terms , v can say " after pressing Enter" it vil work.

Read only

Former Member
0 Likes
1,310

HI Raja ,

Hope you are doing good .

First of all Chain ....end chain is used for validating multiple fields within a particular processing chain,just have a look at the below code:

ex1:

Chain

field v_lifnr module test_lifnr on chain input.

end chain.


Module test_lifnr will be triggered only if v_lifnr is not initial

and validation will be done.



ex2:

Chain

field v_lifnr module test_lifnr on chain request.

end chain.


here module test_lifnr  will be triggered in case the value of v_lifnr is changed.

by change i mean from initial to "aaa" or "aaa" to any other value.



ex3:

Chain

field v_accgrp .

field v_lifnr module test_lifnr on chain input.

field v_nam module test_name on chain request.

end chain.

in this case module test_lifnr  will be triggered in case

v_accgrp or v_lifnr is not initial.

and module test_name  will be triggered for all the fields mentioned before it i mean in

case any chnge occurs in fields v_accgrp,v_lifnr or v_nam.

in case you dont make any change in field v_name and still the module

test_name can be triggered in case any change occurs in field v_lifnr or v_accgrp.

Thanks.