‎2008 Jul 02 10:42 AM
Hi Guys,
You must have seen a SAP Std. shortcut icon on the application toolbaar with "i" ( blue in color), when it is being clicked it brings up the abap documentation.
For exmaple open the SE37 and then open UPLOAD FM in display mode. All the way right side we have a button "FM Documentation" when clicked it displays abap documentation for this FM. I want to create this doc and wish to invoke it from a application toolbar icon.
can anyone tell me how to invoke that documentation, what FM is used, etc...
Thanks
~Sid
‎2008 Jul 02 10:48 AM
Go to SE61 and create a general text TX.
u2022 Select General Text from Document Class
u2022 Select Language
u2022 Type Name and press create
Type in what you want to see in output
U1 is for the Bold Text you see in the heading of the F1 Help. If you donu2019t want to specify a bold text you can just type it in
the DOKTITLE in the function module called.
Save the Text.
Now Displaying the F1 Help.
&----
*& Report ZGB_TEST_SEARCH_HELP *
*& *
&----
*& *
*& *
&----
REPORT ZGB_TEST_SEARCH_HELP .
INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
data: begin of t_itab occurs 0,
name(10) type c,
end of t_itab.
*FIELDNAME AND TAB NAME FOR THE SELECTION
DATA :field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
*THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
*START THE SELECTION SCREEN BLOCK
selection-screen begin of block ss1 with frame.
parameters: p_name1(10) type c.
selection-screen end of block ss1.
&----
*& *
*& F4 Help for p_name1 *
&----
at selection-screen on value-request for p_name1.
*CLEAR ALL EXISTING DATA
*TO BE DONE EVERYTIME F4 HELP IS REQUESTED
REFRESH t_itab.
REFRESH field_tab.
field_tab-fieldname = 'ERNAM'.
field_tab-tabname = 'VBAK'.
APPEND field_tab.
t_itab-name = 'Andrews'.
append t_itab.
t_itab-name = 'Jennie'.
append t_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = field_tab-fieldname
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE = 'Select name'
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = t_itab
FIELD_TAB = field_tab
RETURN_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.
else.
p_name1 = return_tab-fieldval.
ENDIF.
&----
*& *
*& F1 Help for p_name1 *
&----
at selection-screen on help-request for p_name1.
CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
EXPORTING
APPLICATION = 'SO70'
dokclass = 'TX'
DOKLANGU = SY-LANGU
dokname = 'Z_GAURAB_DEMO'
DOKTITLE = 'This appears as bold title'
HOMETEXT = ' '
OUTLINE = ' '
VIEWNAME = 'STANDARD'
Z_ORIGINAL_OUTLINE = ' '
CALLED_FROM_SO70 = ' '
SHORT_TEXT = ' '
APPENDIX = ' '
IMPORTING
APPL =
PF03 =
PF15 =
PF12 =
EXCEPTIONS
CLASS_UNKNOWN = 1
OBJECT_NOT_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.
Apart from the FM DSYS_SHOW_FOR_F1HELP,following FMu2019s can also be used:
1. HELP_OBJECT_SHOW_FOR_FIELD
2. HELP_OBJECT_SHOW
Regards,
Joy.
‎2008 Jul 02 10:48 AM
Go to SE61 and create a general text TX.
u2022 Select General Text from Document Class
u2022 Select Language
u2022 Type Name and press create
Type in what you want to see in output
U1 is for the Bold Text you see in the heading of the F1 Help. If you donu2019t want to specify a bold text you can just type it in
the DOKTITLE in the function module called.
Save the Text.
Now Displaying the F1 Help.
&----
*& Report ZGB_TEST_SEARCH_HELP *
*& *
&----
*& *
*& *
&----
REPORT ZGB_TEST_SEARCH_HELP .
INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
data: begin of t_itab occurs 0,
name(10) type c,
end of t_itab.
*FIELDNAME AND TAB NAME FOR THE SELECTION
DATA :field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
*THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
*START THE SELECTION SCREEN BLOCK
selection-screen begin of block ss1 with frame.
parameters: p_name1(10) type c.
selection-screen end of block ss1.
&----
*& *
*& F4 Help for p_name1 *
&----
at selection-screen on value-request for p_name1.
*CLEAR ALL EXISTING DATA
*TO BE DONE EVERYTIME F4 HELP IS REQUESTED
REFRESH t_itab.
REFRESH field_tab.
field_tab-fieldname = 'ERNAM'.
field_tab-tabname = 'VBAK'.
APPEND field_tab.
t_itab-name = 'Andrews'.
append t_itab.
t_itab-name = 'Jennie'.
append t_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = field_tab-fieldname
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE = 'Select name'
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = t_itab
FIELD_TAB = field_tab
RETURN_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.
else.
p_name1 = return_tab-fieldval.
ENDIF.
&----
*& *
*& F1 Help for p_name1 *
&----
at selection-screen on help-request for p_name1.
CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
EXPORTING
APPLICATION = 'SO70'
dokclass = 'TX'
DOKLANGU = SY-LANGU
dokname = 'Z_GAURAB_DEMO'
DOKTITLE = 'This appears as bold title'
HOMETEXT = ' '
OUTLINE = ' '
VIEWNAME = 'STANDARD'
Z_ORIGINAL_OUTLINE = ' '
CALLED_FROM_SO70 = ' '
SHORT_TEXT = ' '
APPENDIX = ' '
IMPORTING
APPL =
PF03 =
PF15 =
PF12 =
EXCEPTIONS
CLASS_UNKNOWN = 1
OBJECT_NOT_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.
Apart from the FM DSYS_SHOW_FOR_F1HELP,following FMu2019s can also be used:
1. HELP_OBJECT_SHOW_FOR_FIELD
2. HELP_OBJECT_SHOW
Regards,
Joy.
‎2008 Jul 02 10:55 AM
Hello
Open the SE37 and then open UPLOAD FM in EDIT mode.
Then Goto -> Documentation
‎2008 Jul 02 11:06 AM
hi Dzed,
Well I want to create documentation for my custom program..
Anyways thanks for the try
~Sid