Add documentation in Custom Program (.docs)
I am going to show, how we can add documentation in Custom program.
I have searched in SCN network too many times, to achieve this functionality but not get any clue, so i have decided once i will achieve this functionality in my program. I will write regarding this functionality, I know this is very small thing however i have spoiled one day for this.
1. Need Developer rights
2. Require a custom Program
To Add Document in SAP use Transaction Code SO72
Select the document class: ‘Chapter of a structure in WinWord format’.
Language : According to your requirement
Document Class ‘WORD’
Document Name : According to your requirement
Click on create and insert/ paste your document.
After inserting Save it and assign to transport request.
Now go to SE38
Enter your custom program name:
in change mode insert the below command:
AS <DS:WORD.ZFI043(Prgram Name)>Click here for Documentation(Free Text)</>
For any program with a selection screen the documentation icon will start coming up and will look confusing to the end user, if it has technical details in it .
the above functionality used by developer to understand the program it will not show in selection screen.
If you have any doubt please let me know.
Great job! What you don't say, is that "WORD" is the only format where we may save pictures, etc. So it may be very useful ! By the way, I use SE61 to edit the documentation, which is the same as SO72.
Thanks Sandra Rossi that was the right clue to get the solution on https://answers.sap.com/questions/13522604/ - looking for a way to somehow get graphics/images/pictures/grafics into F1 online help documentation.
And Thanks to Ashraf Mahfooz Usmani for that guide!
Additional note: When putting the Link using Menu Function "Include"->"Link" in my case the closing tag "</> wasn't added but it was possible to simply write it into the code line.
Thanks a ton for sharing.
It will be quite useful from a developer point of view espeically in understanding the flow of the Program.
Or, you could add GOS (Generic Object Services) to the selection-screen. The following code will do that. You can add: any file type attachment, a note (text only), or a URL. We commonly use this functionality to allow end users to create their own program documentation. I like giving users the ability to create and change documentation at will without have to change/test/document/transport any objects.
One caveat - if someone has the ability to add something using GOS, they also have the ability to delete something they, or someone else, have previously added.
DATA: manager TYPE REF TO cl_gos_manager,
obj TYPE borident.
PARAMETERS: matnr TYPE mara-matnr.
AT SELECTION-SCREEN OUTPUT.
* SET OBJECT TYPE
obj-objtype = sy-cprog.
* SET OBJECT KEY = REPORT NAME
SELECT SINGLE name
WHERE name = sy-cprog.
* CALL GOS MANAGER WITHOUT CONTAINER (WILL BE DISPLAYED IN THE TOOLBAR)
CREATE OBJECT MANAGER
IS_OBJECT = OBJ
ip_no_commit = 'R' " or 'X'
* W is display only
* E is display,change, and create
iP_MODE = 'E' " 'E' or 'W'.
* this parameter sets the mode of tool bar
* as display only or display and write only.
OTHERS = 1.