Skip to Content

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

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Liz Masella

    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 .

    (1) 
    1. Ashraf Usmani 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

      (0) 
  2. 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. 

    (0) 
  3. 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.

    (0) 
  4. Bruce Tjosvold

     

    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.

     

    (0) 

Leave a Reply