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

difference

Former Member
0 Likes
819

what is the difference between the event At selection-screen on field and at selection-screen on block.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
798

Hi

At selection-screen on Field will be used to validate that particular field only

where as BLOCK is used to validate all the fields in that Block

we some times doesn't want that complete block not to be displayed on certain condition, in that case we use this

Regards

anji

6 REPLIES 6
Read only

Former Member
0 Likes
799

Hi

At selection-screen on Field will be used to validate that particular field only

where as BLOCK is used to validate all the fields in that Block

we some times doesn't want that complete block not to be displayed on certain condition, in that case we use this

Regards

anji

Read only

Former Member
0 Likes
798

At Selection-screen On Field is triggered in PAI of selection-screens.

- The input fields can b checked,in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.

At Selection-screen On Block is trigerred in PAI event.

- You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK block - END OF BLOCK block. You can use this event block to check the consistency of the input fields in the block.

reward if useful

Read only

Former Member
0 Likes
798

At SELCTION-SCREEN on field..

Validates that particular field

This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel.

If the report starts an error dialog at this point, precisely these fields become ready for input.

AT SELCTION-SCREEN ON BLOCK block

This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block.

If the report starts an error dialog at this point, precisely these fields of the block block become ready for input again.

Validations common to the entire block are written here..

Hope this clears ur doubt..

Reward points if it does

Read only

Former Member
0 Likes
798

In the PAI event of the selection screen, the event

<b>AT SELECTION-SCREEN ON field</b>

event is triggered. The input field field can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.

for detailed sescripton click below

http://help.sap.com/saphelp_nw04s/helpdata/en/79/34a237d9b511d1950e0000e8353423/frameset.htm

In the PAI event of the selection screen, the event

<b>AT SELECTION-SCREEN ON BLOCK block</b>

event is triggered. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK block - END OF BLOCK block. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen

for detailed sescripton click below

http://help.sap.com/saphelp_nw04s/helpdata/en/79/34a237d9b511d1950e0000e8353423/frameset.htm

Read only

Former Member
0 Likes
798

Hi Sandeep,

At selection-screen of field works for the particular field you metioned and At selection-screen on block works for the particular block you mentioned and this block may include any filed like radiobutton, parameter, select-options etc.

Reward if useful.

Regards,

Shilpi

Read only

Former Member
0 Likes
798

Hi,

<b>Processing Single Fields</b>

In the PAI event of the selection screen, the event

AT SELECTION-SCREEN ON <field>

is triggered when the contents of each individual input field are passed from the selection screen to the ABAP program. The input field <field> can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.

Ex.

The program below is connected to the logical database F1S:

REPORT EVENT_DEMO.

NODES SPFLI.

AT SELECTION-SCREEN ON CITY_FR.

IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'.

MESSAGE E010(HB).

ENDIF.

If the user enters “AA” in the first input field, but not NEW YORK for the departure

city, an error message is displayed in the status line until the user enters the correct city.

<b>Processing Blocks</b>

In the PAI event of the selection screen, the event

AT SELECTION-SCREEN ON BLOCK <block>

is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK <block> and SELECTION-SCREEN END OF BLOCK <block>. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block,

the fields in the block are made ready for input again on the selection screen.

Ex.

REPORT EVENT_DEMO.

SELECTION-SCREEN BEGIN OF BLOCK PART1 WITH FRAME.

PARAMETERS: NUMBER1 TYPE I,

NUMBER2 TYPE I,

NUMBER3 TYPE I.

SELECTION-SCREEN END OF BLOCK PART1.

SELECTION-SCREEN BEGIN OF BLOCK PART2 WITH FRAME.

PARAMETERS: NUMBER4 TYPE I,

NUMBER5 TYPE I,

NUMBER6 TYPE I.

SELECTION-SCREEN END OF BLOCK PART2.

AT SELECTION-SCREEN ON BLOCK PART1.

IF NUMBER3 LT NUMBER2 OR

NUMBER3 LT NUMBER1 OR

NUMBER2 LT NUMBER1.

MESSAGE E020(HB).

ENDIF.

AT SELECTION-SCREEN ON BLOCK PART2.

IF NUMBER6 LT NUMBER5 OR

NUMBER6 LT NUMBER4 OR

NUMBER5 LT NUMBER4.

MESSAGE E030(HB).

ENDIF.

If the user does not enter numbers in ascending order in one of the blocks, the whole of the corresponding block is made ready for input again.

Regards,

Bhaskar