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: 

field stmt

Former Member
0 Kudos

what is field statement(or command) in dialog programming?Purpose and steps.

5 REPLIES 5

Former Member
0 Kudos

Hi khanna,

The FIELD statement in the screen flow logic allows you to control the moment at which data is passed from screen fields to their corresponding ABAP fields.

To specify this point, use the following statement in the PAI flow logic:

FIELD f.

Data is not transported from the screen field finto 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 FIELDstatement is executed, any value that you assign to it is not overwritten.

http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/content.htm

Former Member
0 Kudos

Hi,

In addition, you can use it with chain..end chain statements..like..

The statements CHAIN and ENDCHAIN of the dynpro flow logic define processing chains. Between CHAIN and ENDCHAIN, the statements FIELD and MODULE can be executed. The statements between CHAIN and ENDCHAIN form a processing chain. Processing chains cannot be nested. The CHAIN statement can be specified in the event blocks at PAI and PBO , however, in the event block at PBO it has no effect.

A processing chain allows the joint processing of all the screen fields stated between CHAIN and ENDCHAIN after FIELD statements:

The contents of all screen fields combined to a processing chain by the FIELD statements can be checked in the shared conditions ON CHAIN-INPUT and ON CHAIN-REQUEST of the MODULE statement.

A warning or error message in a module called within a processing chain resets all input fields whose screen fields are combined in this processing chain using FIELD statements to ready-for-input. After a user input, the PAI processing resumes at the CHAIN statement at the latest.

Example

Call dialog modules to check input values. The screen fields input1 and input2 are checked in individual dialog modules check_1 and check_2. The screen fields input3 to input5 are checked in a processing chain in a shared dialog module check_chain. Warning or error messages in the dialog modules either make only one input field input1 or input2 ready for input again or all three input fields input3 to input5.

PROCESS AFTER INPUT.

MODULE leave_dynpro AT EXIT-COMMAND.

FIELD input1 MODULE check_1 ON REQUEST.

FIELD input2 MODULE check_2 ON REQUEST.

CHAIN.

FIELD input3.

FIELD input4.

FIELD input5.

MODULE check_chain ON CHAIN-REQUEST.

ENDCHAIN.

MODULE handle_user_command.

Regards,

Renjith Michael.

Former Member
0 Kudos

hi

good

If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:

FIELD <f> MODULE <mod>.

the corresponding input field on the current screen (and only this field) is made ready for input again, allowing the user to enter a new value. If the field is only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.

Checking a Set of Fields

If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:

CHAIN.

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

MODULE <mod1>.

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

MODULE <mod2>.

...

ENDCHAIN.

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.

thanks

mrutyun^

Former Member
0 Kudos

Hii,,

After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.

Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_.

this is about field

plzz reward if it is usefulll....

Former Member
0 Kudos

Hi Khanna,

Field statement is used when you display error in the screen all fields that are in screen are disable if you use Field Statement only that field is enable.

See this example code This is in module pool i.e SE51

Field name module name.

In your program i.e in SE38

Module name.

if name ne 'something'.

message e015 with 'wrong name'.

endif.

endmodule.

Note : In your screen say there is 2 fields that are name and id if the error is occured only name field is anable id is disable now.

Plzz reward if it is useful,

Mahi.