cancel
Showing results for 
Search instead for 
Did you mean: 

Explain pls. FILED & MODULE in Module Pool

Former Member
0 Kudos

HI Experts,

Pls. clarify one simple doubt in <i><b>Module Pool</b></i>,

Wht is the functionality of,

1) CHAIN & ENDCHAIN

2) FILED & MODULE

thanq.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To ensure that one or more PAI modules are only called when several screen fields meet a particular condition, you must combine the calls in the flow logic to form a processing chain. You define processing chains as follows:

CHAIN.

...

ENDCHAIN.

All flow logic statements between CHAIN and ENDCHAIN belong to a processing chain. The fields in the various FIELD statements are combined, and can be used in shared conditions.

CHAIN.

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

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

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

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

...

ENDCHAIN.

When this command is used, all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.

CHAIN.

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

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

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

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

...

ENDCHAIN.

Check this out

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801ca2454211d189710000e8322d00/frameset.htm

check the demo example

DEMO_DYNPRO_FIELD_CHAIN

Answers (4)

Answers (4)

ferry_lianto
Active Contributor
0 Kudos

Hi Srikhar,

Thank you for the update.

It was long weekend in Canada this week therefore I was not able to reply your previous question in time.

Please let me know if you need further assistant.

Regards,

Ferry Lianto

Former Member
0 Kudos

yes, here(us) too! right!

anyways, thanq for ur offer.

Message was edited by:

Srikhar

former_member200338
Active Contributor
0 Kudos

Hi,

1) CHAIN & ENDCHAIN

this is used to validate many fields. For example, say you have 5 input parameter in a module program. you want to validate these fields.

All the validations are written in a single module. so you can use

Chain.

field <fieldname1>

field <fieldname2>

field <fieldname3>

field <fieldname4>

field <fieldname5>

module check_input

endchain.

The above syntax, will call module check_input for each fieldname.

2) FIELD & MODULE

This will be mostly used where u want to perform different validation.

for example, you have 5 fields. you need to validate these fields indivually in a separte module. Then u can go for this syntax

for example.

field <fieldname1> module check_input1

field <fieldname2> module check_input2

field <fieldname3> module check_input3

field <fieldname4> module check_input4

field <fieldname5> module check_input5

Reward points if usefull

Regards,

Niyaz

ferry_lianto
Active Contributor
0 Kudos

Hi,

Chain and end chain are used for multipe validation on module pool programing and for single validation you can use field <field name> module <module name>.

By the way, have you solved your issue on MB1C?

Regards,

Ferry Lianto

Former Member
0 Kudos

thanq ferry,

yes, my pm suggested to go thru OBJK; SER01 tables to get the Delivary#, bcoz apparently, user enters the Equipment# in material slip field of initial screen of mb1c.

looks like, this works out! but, as I need to put it in Usre exit, am looking CHECK for doc type, sy-subrc etc.

thanq.

Former Member
0 Kudos

If you have many input fields on the screen and you have done validation on each field. Once there is an error in any one of the filed then the screen is displayed back and only the field which is in error is open for input. All other field is disabled for input.

If you use CHAIN AND ENDCHAIN then once the screen is displayed back all the fields which are between CHAIN and ENDCHAIN will be open for input. This way the users can make changes to the other field as well.

FIELD & MODULE is you can condition based trigger the module. That means the MODULE will be triggered only if there is any change in the FIELD mentioned in the FIELD statement.

Cheers

VJ