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: 

Regarding Search Help

Former Member
0 Kudos

Hi ABAPers,

I am having one doubt in Module Pool. POV is for creating F4 functionality for the fields which we want.

Instead of this POV why can't we use Search Help for creating F4 functionality.

What is the use of Chain And End chain.

I think it is for screen validations in Module Pool.

Thanks in Advance.

Regards,

Ramana Prasad.T

4 REPLIES 4

Former Member
0 Kudos

Hi,

For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.

CHAIN.

FIELD chk_connobj.

FIELD chk_inst.

FIELD chk_devloc.

FIELD ehaud-haus.

FIELD eanl-anlage.

MODULE modify_screenfields.

ENDCHAIN.

&----


*& Module modify_screenfields INPUT

&----


  • text

----


MODULE modify_screenfields INPUT.

CLEAR okcode.

okcode = sy-ucomm.

CASE okcode.

WHEN 'ENTER' OR 'EXECUTE'.

IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND

chk_devloc EQ c_x.

IF ehaud-haus IS INITIAL.

SET CURSOR FIELD 'EHAUD-HAUS'.

MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj

ELSE.

PERFORM conn_obj_check.

ENDIF.

ENDIF.

ENDMODULE. " modify_screenfields INPUT

<b>Reward points</b>

Regards

Former Member
0 Kudos

Hi

If search help is available for a field then no need of using POV you can very well attach the search help in the field Attributes, so that you get all the help values

we use POV only for the fields where there is no search help available.

We use CHAIn..ENDCHAIN for validation the screen fields

see the doc

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

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

hi,

Instead of POV u can use elementary or collective search help.

Elementary search helps defines a search path where

we will define the table from which the data has to be read and the selection criteria.

Through import and export parameters. Used when we gets the data rom a single table.

Collective search helps:- Combination of elementary search helps.

When we need to fetch data based on multiple selection criteria’s.

More than one tables or Selection from multiple tables

For more help on Search helps , Check this http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

<u><b>

Chain END Chain.</b></u>

For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.

CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
 
*&---------------------------------------------------------------------*
*& Module modify_screenfields INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
 
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
 
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
 
ENDMODULE. " modify_screenfields INPUT

Regards

Reshma

Former Member
0 Kudos

Hi,

You can create the Search help from Se11 and we can attach the same for the screen field, we need to assign the Search help from the Screen attributes,

Here we have a Sequence for the F4 help, First it will look at the Domain level (Fixed values or the Value table) then it will check for the Check table, then it will look for the match code, then it will look for the Search help, then it will goto the POV, we also need to follow this sequence,

Here in the Screen, we can pass the values from the program using the POV ...

<b>Chain and Endchain:</b>

chain and end chain are used for multipe validation on module pool programing and for saingl we use the below syntax feild feild feild name module module name

Regards

Sudheer