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

Help in Dialog Programming

Former Member
0 Likes
955

Let me know the definition, where used and purpose used for the following

1) FIELD syntax in flow logic.

2) CHAIN and ENDCHAIN in Flow logic.

Regards,

Vimal Kumar V.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
923

Hi

in PAI we write

FIELD <name> MODULE <name>.

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 below link:

http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F

http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://www.sap-img.com/

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

You can also check the transaction ABAPDOCU which gives you lot of sample programs.

Also you can see the below examples...

Go to se38 and give demodynpro and press F4.

YOu will get a list of demo module pool programs.

One more T-Code is ABAPDOCU.

YOu can find more examples there.

See the prgrams:

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

Reward points if useful

Regards

Anji

7 REPLIES 7
Read only

Former Member
Read only

Former Member
0 Likes
924

Hi

in PAI we write

FIELD <name> MODULE <name>.

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 below link:

http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F

http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://www.sap-img.com/

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

You can also check the transaction ABAPDOCU which gives you lot of sample programs.

Also you can see the below examples...

Go to se38 and give demodynpro and press F4.

YOu will get a list of demo module pool programs.

One more T-Code is ABAPDOCU.

YOu can find more examples there.

See the prgrams:

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
923

Field statement delays the values passing from screen to program variable.

FIELD <f>.

Data is not transported from the screen field <f> into the ABAP field <f> until the FIELD statement is processed. If a field occurs in more than one FIELD statement, its value is passed to the program when the first of the statements is reached.

Only screen fields that do not appear in a FIELDS statement are transferred at the beginning of the PAI event. Do not use fields in PAI modules until they have been passed to the program from the screen, otherwise the ABAP field will contain the same value as at the end of the previous dialog step.

The exception to this are fields that were initial in the PBO event and are not changed by the user. These are not transported by the FIELD statement. If a field of this type is filled with a value in a PAI module before its corresponding FIELD statement is executed, any value that you assign to it is not overwritten.

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

check the underlined program

<u>demo_dynpro_field_chain</u>

Read only

Former Member
0 Likes
923

Hi,

Field : FIELD in flow logic is used to validate a particualr field and if the sytem throws any error for that field , then only that field will be raedy for input after ERROR/WARNING message.

By using FIELD only 1 field can be used .

syntax:

PAI.

FIELD f1 Module VALIDATE.

CHAIN.. ENDCHAIN is used to validate more thyan 1 field in flow logic.

between chain .. endchain , u can use more than 1 field.

if sytem throws Error/Warnin ng mesaage , all the filed between CHAIN...ENDCAHIN will be raedy for input

Syntax:

PAI.

CHAIN.

FIELD: F1, F2, F3.

Module VALIDATe1.

Module VAlidat2.

ENDCAHIN.

Revertback if any issues.

Reward with points if helpful.

Regards,

Naveen

Message was edited by:

Naveen Deva

Read only

Former Member
0 Likes
923

Hi,

PROCESS AFTER INPUT.

FIELD EKORG MODULE VALIDATE_EKORG.

Chian & endchain are using when we validate a group of fields.........

PROCESS BEFORE OUTPUT.

CHAIN

matnr

makt

meins

endchain.

***do rewards if usefull

Regards,

vijay

Read only

Former Member
0 Likes
923

Chain and End chain loop will used in the screen validation concepts which we inserted in the Dialog programming customized screen.

To validate the fields we use the concept using Chain and Endchain.

For example if we want to make the fields one and two only hold values after third field means we can check using the chain and endchain concept.

Reward if useful

Read only

Former Member
0 Likes
923

Hi,

<b>FIELD</b> statement makes the field ready for input again.

&#61531; If you use the <b>ON INPUT</b> addition in a MODULE statement after FIELD, the module is only called if the field contents have changed from their initial value. Within a <b>CHAIN</b> block, you must use the <b>ON CHAIN-INPUT</b> addition. The module is then called if the contents of at least one screen field within the <b>CHAIN</b> block have changed from their initial value.

&#61531; If you use the ON REQUEST addition in a MODULE statement after <b>FIELD</b>, the module is only called if the user has entered a new value in that field. Within a <b>CHAIN</b> block, you must use the <b>ON CHAIN-REQUEST</b> addition. The module is then called if the user has changed the contents of at least one screen field within the <b>CHAIN</b> block.

Hope this helps.

Reward if helpful.

Regards,

Sipra