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

reports

Former Member
0 Likes
647

1) we use AT SELECTION-SCREEN ON HELP REQUEST event to gv F1 functionality? can anyone tell me hw to do this? plz gv me an sample examaple with code

2) we use AT SELECTION-SCREEN ON VALUE REQUEST event to gv F4 functionality? can anyone tell me hw to do this? plz gv me an sample examaple with code?

3)what is the use of AT SELECTION-SCREEN OUTPUT ON BLOCK? can anyone tell me hw to do this? plz gv me an sample examaple with code

6 REPLIES 6
Read only

former_member188829
Active Contributor
0 Likes
612

2)At Selection-screen on value-request.

example..

Just Check this program..

Parameters:p_matnr like mara-matnr.

Types:Begin of i_mara,

matnr like mara-matnr,

end of i_mara.

data:it_mara type standard table of i_mara.

At Selection-screen on value-request for p_matnr.

Select matnr from mara into table it_mara.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MATNR'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_MATNR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MARA

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

And also check this link...

http://www.sap-img.com/abap/different-types-of-selection-screens.htm

Message was edited by:

Vishnu Reddy

Read only

Former Member
0 Likes
612

Hi sathish,

1. for this , if suppose if u ahaving a check box in selection screen, if the client needs f1 help, then use this event.

2, fro this , in ur selection screen,, if u want f4 help for a field , use this event.

regads'karthik

Read only

Former Member
0 Likes
612

Hi,

Use this sample code for getting f1 help.Before that go to se61 create document with the prgm name starts with "Z" as I given here ZHR_HELP and enter the details that you want to display while clicking f1.Here p_data refers check_box which is user defined.

AT SELECTION-SCREEN ON HELP-REQUEST FOR p_data.

CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'

EXPORTING

application = 'SE61'

dokclass = 'TX'

dokname = 'ZHR_HELP'

viewname = 'STANDARD'

EXCEPTIONS

class_unknown = 0

object_not_found = 0

OTHERS = 0.

Then for F4 use this Function module...

Here p_path and P_FNAME are the name of the input file name.that you have declared.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_path.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

FIELD_NAME = ' '

IMPORTING

FILE_NAME = P_FNAME.

Hope it will be useful for you.

Thanks,

Sakthi

*Rewards if useful*

Read only

asik_shameem
Active Contributor
0 Likes
612

Hi,

go thru in this..

<b>AT SELECTION SCREEN ON HELP-REQUEST FOR <field></b>

The event is triggered when the user calls the F1 help for the field <field>.

If no corresponding event block has been defined,

Help from the ABAP Dictionary is displayed, or

None at all if the field has no Dictionary reference.

If a corresponding event block exists, it takes precedence over the default help mechanism.

<b>Example </b>

REPORT SELECTION_SCREEN_F1_DEMO.

PARAMETERS: P_CARR_1 TYPE S_CARR_ID,

P_CARR_2 TYPE S_CARR_ID.

AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARR_2.

CALL SCREEN 100 STARTING AT 10 5 ENDING AT 60 10.

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field></b>

The event is triggered when the user calls the F4 help for the field <field>.

If no corresponding event block has been defined,

The possible values help from the ABAP Dictionary is displayed, or

None at all if the field has no Dictionary reference.

If a corresponding event block exists, it takes precedence over the default possible values help mechanism.

<b>Example:</b>

data: itab type table of matnr.

parameters: A type matnr.

INITIALIZATION.

SELECT MATNR FROM MARA INTO TABLE ITAB.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MATNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = ITAB.

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

This event is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program.

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.

<b>example:</b>

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.

Read only

Former Member
0 Likes
612

Hi

Check Demo Programs in ur system..

demo_selection_screen_f1

demo_selection_screen_f4

Hope this Helps.

Praveen

Read only

Former Member
0 Likes
612

Hi,

see the example programs in the abap i.e

Demo_selection_screen_f4 .

Demo_selection_screen_f1.

plzzzzz reward points if it helps