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: 

USER DEFINED F1 documentation for seelction screen fields.

Former Member
0 Kudos

I have one selection screen in my Program.

If I give F1 , It has to display user defined documentation.

like...I have customer field in selection screen.

Select-options:S_CUST for BSAD-KUNNR.

For this I need doc as "Enter customer number excluding from the Table"

Not the documentation of the KUNNR field.

How to do this.

Many Thanks!!!

9 REPLIES 9

Former Member
0 Kudos

hi,

i'm not sure but I remember that exist an event like

at selection-screen on help-request.

and here you can put your code.

ciao

enzo

Former Member
0 Kudos

AT SELECTION-SCREEN ON HELP-REQUEST FOR S_CUST-LOW.

Check out here

http://help.sap.com//saphelp_470/helpdata/EN/79/34a243d9b511d1950e0000e8353423/content.htm

You may have to use a different screen or maybe a POPUP* function module here.

Cheers

Former Member
0 Kudos

Hi

You should use the event AT SELECTION-SCREEN ON HELP-REQUEST, so you can run a your F1.

Select-options: S_CUST for BSAD-KUNNR.

AT SELECTION-SCREEN ON HELP-REQUEST FOR S_CUST-LOW.

PERFORM MY_F1_FOR_S_CUST.

AT SELECTION-SCREEN ON HELP-REQUEST FOR S_CUST-HIGH.

PERFORM MY_F1_FOR_S_CUST.

FORM MY_F1_FOR_S_CUST.

......

ENDFORM.

Max

Former Member

Former Member
0 Kudos

Max,

What sd be written with in that form...thats what my dt is....

0 Kudos

Hi

You can write what you want to dysplay your text. For example I created a document (type SIMG) by SO72 and this is the code to call it:

FORM MY_F1_FOR_S_CUST.

DATA: T_LINE LIKE TLINE OCCURS 0,

XHEAD LIKE THEAD,

HELP_INFO LIKE HELP_INFO,

TEXC LIKE SY-UCOMM OCCURS 0,

V_OBJECT LIKE DOKHL-OBJECT.

  • Costants

DATA: PREF_SIMG(4) VALUE 'SIMG',

DOCID_HY LIKE DOKHL-ID VALUE 'HY'.

  • Object name

CONCATENATE PREF_SIMG MY_OBJECT INTO V_OBJECT.

  • Get Text

CALL FUNCTION 'DOCU_GET_FOR_F1HELP'

EXPORTING

ID = DOCID_HY

LANGU = SY-LANGU

OBJECT = V_OBJECT

IMPORTING

HEAD = XHEAD

TABLES

LINE = T_LINE

EXCEPTIONS

RET_CODE = 1

OTHERS = 2.

CASE SY-SUBRC .

WHEN 0.

  • Dysplay text

GET CURSOR FIELD HELP_INFO-DYNPROFLD.

HELP_INFO-DOCUID = DOCID_HY.

HELP_INFO-DOCUOBJECT = V_OBJECT.

HELP_INFO-SPRAS = SY-LANGU.

HELP_INFO-PROGRAM = SY-REPID.

HELP_INFO-DYNPRO = SY-DYNNR.

HELP_INFO-DYNPPROG = SY-REPID.

HELP_INFO-PFKEY = SY-PFKEY.

HELP_INFO-FIELDNAME = HELP_INFO-DYNPROFLD.

CALL FUNCTION 'HELP_DOCULINES_SHOW'

EXPORTING

HELP_INFOS = HELP_INFO

OVERLAY_HEADER = XHEAD

TABLES

EXCLUDEFUN = TEXC

HELPLINES = T_LINE.

WHEN OTHERS. MESSAGE S720(SH).

ENDCASE.

ENDFORM.

Max

Message was edited by: max bianchi

Former Member
0 Kudos

Try this..

REPORT zanid_test message-id zz.

data: l_kunnr like BSAD-KUNNR.

select-options: S_CUST for l_kunnr.

at selection-screen ON HELP-REQUEST FOR s_cust.

Message i307 with 'Enter customer number excluding from the Table'.

Reward point if it helps you

Former Member
0 Kudos

Hi Sumi,

Try this -

tables bsad.

Select-options:S_CUST for BSAD-KUNNR.

at selection-screen on help-request for S_CUST-LOW.

perform display.

at selection-screen on help-request for S_CUST-HIGH.

perform display.

form display.

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

EXPORTING

  • TITEL = ' '

TEXTLINE1 = 'Enter customer number excluding from the Table'

  • TEXTLINE2 = ' '

  • START_COLUMN = 25

  • START_ROW = 6

.

endform.

Cheers

Former Member
0 Kudos

Hi Sanjay and Anid,

Both of ur codings are helpful and working.

Thanks.