Enterprise Resource Planning PortalERPGenie.COM Enterprise Resource Planning Portal

   Advertise | Founder BLOG

Web ERPGenie.COM  Other Search Options

Home | Vote for us |

ERPGenie.COM -> SAP Technical -> ABAP -> Example code -> User exit documentation from SAP (Kabai)

REPORT YVENKATESH_PRINT_SMOD_DOC

          NO STANDARD PAGE HEADING

          LINE-SIZE  80

          LINE-COUNT 65

          MESSAGE-ID ZM.


 
*----------------------------------------------------------------------*


 
* Tables/Views                                                      *

*----------------------------------------------------------------------*

   TABLES: MODSAP,                        "SAP Extensions

           DOKTL.                         "Documentation - text lines


 
*----------------------------------------------------------------------*

* Data Statements for Internal Tables                               *

*----------------------------------------------------------------------*


 
* Ampliaciones SAP

   DATA: ITAB_MOD   LIKE MODSAP OCCURS 0 WITH HEADER LINE.

* Documentacion - Lineas de texto

   DATA: ITAB_DOKTL LIKE DOKTL  OCCURS 0 WITH HEADER LINE.


 
*----------------------------------------------------------------------*

* Selection-screen                                                  *

*----------------------------------------------------------------------*

   SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.

   SELECT-OPTIONS: S_NAME               FOR MODSAP-NAME.

   PARAMETERS: P_DOWNLD                 AS CHECKBOX.


 
   selection-screen end of block blk1.


 
*----------------------------------------------------------------------*

* Initialization                                                    *

*----------------------------------------------------------------------*

   INITIALIZATION.


 
     REFRESH: ITAB_MOD.


 
*----------------------------------------------------------------------*

* Start-of-selection                                                *

*----------------------------------------------------------------------*


 
   START-OF-SELECTION.


 
* Select the modifications into the internal table

     SELECT * INTO TABLE ITAB_MOD

       FROM MODSAP

      WHERE NAME IN S_NAME

        AND ( TYP = SPACE OR TYP = 'E' ).


 
* Sort the internal table

     SORT ITAB_MOD.


 
* For each of the modifications, get the documentation

     LOOP AT ITAB_MOD.

       AT NEW NAME.

         NEW-LINE.

         ULINE.

         WRITE: 'Enhancement:' COLOR 5 INVERSE,

                ITAB_MOD-NAME COLOR 5.

         WRITE AT 60 SY-PAGNO.

         ULINE.


 
         SKIP.

         DOKTL-OBJECT = ITAB_MOD-NAME.

         PERFORM 1000_GET_DOCUMENTATION USING DOKTL-OBJECT.

       ENDAT.                             "AT NEW name.

       CHECK ITAB_MOD-MEMBER > SPACE.

       SKIP.

       NEW-LINE.

       WRITE: 'Enhancement:' COLOR 5 INVERSE,

              ITAB_MOD-NAME COLOR 5.

       WRITE: 'Component:' COLOR 4 INVERSE,

              ITAB_MOD-MEMBER COLOR 4.

       SKIP.

       DOKTL-OBJECT = ITAB_MOD-MEMBER.

       PERFORM 1000_GET_DOCUMENTATION USING DOKTL-OBJECT.


 
       AT END OF NAME.

         SKIP 2.

       ENDAT.                             "AT END OF name.

     ENDLOOP.                             "LOOP AT itab_mod.


 
* Download the list

     IF NOT P_DOWNLD IS INITIAL.

       CALL FUNCTION 'LIST_DOWNLOAD'

            EXPORTING

                 LIST_INDEX = 0

                 METHOD     = ' '.

     ENDIF.                               "IF NOT p_downld IS INITIAL.


 
*&---------------------------------------------------------------------*

*&      Form  1000_GET_DOCUMENTATION


 
*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*      -->P_DOKTL_OBJECT  text

*----------------------------------------------------------------------*

   FORM 1000_GET_DOCUMENTATION USING    P_DOKTL_OBJECT.


 
* Refresh the documentation table

     CLEAR ITAB_DOKTL.

     REFRESH ITAB_DOKTL.


 
* Select the data

     SELECT * INTO TABLE ITAB_DOKTL

       FROM DOKTL

      WHERE ID = 'MO'


 
        AND OBJECT = P_DOKTL_OBJECT

        AND LANGU = SY-LANGU.

     IF SY-SUBRC = 0.

       LOOP AT ITAB_DOKTL.

         NEW-LINE.

         WRITE: ITAB_DOKTL-DOKTEXT.

       ENDLOOP.                           "LOOP AT itab_doktl.

     ELSE.                                "IF sy-subrc = 0.

       NEW-LINE.

       WRITE: 'No documentation exists' COLOR 6 INVERSE.

     ENDIF.                               "IF sy-subrc = 0.


 
   ENDFORM.                               " 1000_GET_DOCUMENTATION

 

Contact Us | Polls | Add URL | Contribute | About | Privacy | Terms | Feedback | Help!

Message Board | Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Genie Press | ERPTopSites | Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum