Application Development 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: 

Module pool prog Fields

Former Member
0 Kudos

Hi,

Req

A selection screen is build as below in se51 screen . Each field is a paramter. i have 15 line fields as below example . when i fill the data in the

all fields if an error message occurs for example then it clears off the whole

screen and its need to be filled again , can you please let me know how to avoid it .

For example :

f1:-- , f2:-- ,f3:--, f4:,f5:, f6:--

f11:-- , f12:-- ,f13:--, f14:,f15:, f16:--

f21:-- , f22:-- ,f23:--, f24:,f25:, f26:--

f31:-- , f32:-- ,f33:--, f34:,f35:, f36:--

The above fields should be in a single line .

Thanks,

Vind.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Create a structure with all the screen fields. when you are creating a screen refer these structure fields to the screen elements.

Just write <b>clear <structure name></b> before it is triggering error message.

<b><REMOVED BY MODERATOR></b>

Satish

Message was edited by:

Satish Panakala

Message was edited by:

Alvaro Tejada Galindo

Former Member
0 Kudos

Hi

We use the CHAIN..ENDCHAIN command to validate the screen fields in Module pool program.You can use this for a single field or group of fields

see the doc and do accordingly

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

ON INPUT 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.)

ON REQUEST

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".

Regards

Anji

0 Kudos

Hi,

Req

A selection screen is build as below in se51 screen . Each field is a paramter. i have 15 line fields as below example . when i fill the data in the

all fields if an error message occurs for example then it clears off the whole

screen and its need to be filled again , The error message usually comes from '<b>BAPI'</b> .can you please let me know how to avoid it .

For example :

f1:-- , f2:-- ,f3:--, f4:,f5:, f6:--

f11:-- , f12:-- ,f13:--, f14:,f15:, f16:--

f21:-- , f22:-- ,f23:--, f24:,f25:, f26:--

f31:-- , f32:-- ,f33:--, f34:,f35:, f36:--

Thanks,

Vind.