Skip to Content
Author's profile photo Ashraf Mahfooz Usmani

Add documentation in Custom Program (.docs)

Introduction;

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.

Prerequisites:

1. Need Developer rights
2. Require a custom Program

Step:1

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.
Step: 2

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)</>

Save it

Output:

Regards
Ashraf Usmani

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      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 .

      Author's profile photo Ashraf Usmani
      Ashraf Usmani
      Blog Post Author

      Hello Liz,

      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.

      Regards
      Ashraf Usmani

      Author's profile photo Sandra Rossi
      Sandra Rossi

      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. 

      Author's profile photo Christian Winheller
      Christian Winheller

      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.

      Author's profile photo Kiran K
      Kiran K

      Thanks a ton for sharing.
      It will be quite useful from a developer point of view espeically in understanding the flow of the Program.

      K.Kiran.

      Author's profile photo Former Member
      Former Member

       

      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.

       

      Bruce

       

       

      DATA: manager TYPE REF TO cl_gos_manager,
      obj TYPE borident.

      PARAMETERS: matnr TYPE mara-matnr.

      AT SELECTION-SCREEN OUTPUT.

      CLEAR obj.

      * SET OBJECT TYPE
      obj-objtype = sy-cprog.

      * SET OBJECT KEY = REPORT NAME
      SELECT SINGLE name
      FROM trdir
      INTO obj-objkey
      WHERE name = sy-cprog.
      *
      * CALL GOS MANAGER WITHOUT CONTAINER (WILL BE DISPLAYED IN THE TOOLBAR)
      CREATE OBJECT MANAGER
      EXPORTING
      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.
      EXCEPTIONS
      OTHERS = 1.