Tuesday, May 31, 2011

Enhancements in SAP table

The details about projects, enhancements and components are contained in two SAP tables:

MODSAP: containing enhancement name, type of exit and component

MODACT: containing project name and enhancements

REPORT ZDEMO_EXAMPLE.

TABLES: MODSAP, MODACT.

PARAMETERS: INPUT1 LIKE MODSAP-NAME DEFAULT ' ',
INPUT2 LIKE MODSAP-TYP DEFAULT ' ',
INPUT3 LIKE MODSAP-MEMBER DEFAULT ' '.

DATA: SEARCH1 LIKE MODSAP-NAME,
SEARCH2(3), " like modsap-typ,
SEARCH3 LIKE MODSAP-MEMBER.

CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
'%' INPUT2 INTO SEARCH2,
'%' INPUT3 '%' INTO SEARCH3.

SELECT * FROM MODSAP WHERE NAME LIKE SEARCH1
AND TYP LIKE SEARCH2
AND MEMBER LIKE SEARCH3.
SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
WRITE: /10 MODSAP-NAME, 30 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
CLEAR : MODSAP, MODACT.
ENDSELECT.

IF SY-SUBRC NE 0.
WRITE : /'Not found'.
ENDIF.

END-OF-SELECTION.
CLEAR: SEARCH1, SEARCH2, SEARCH3.


NOTE: SAP’s naming convention for user exits-

· Program/Function exits : EXIT_AAAAAAAA_nnn where

AAAAAAAA stands for the program name which contains the exit and

nnn is a SAP assigned number starting from 001

-----------------------------------------------------------------

· Menu exits : AAAAAAAA+XXX where

AAAAAAAA stands for the program name which contains the exit and

+XXX is the name of the function code contained in the menu item

-----------------------------------------------------------------

· Screen Exits : AAAAAAAA_nnnn_BBBBBBBB_CCCCCCCC_mmmm where

AAAAAAAA : calling program name

nnnn : calling screen number

BBBBBBBB : area

CCCCCCCC : called program name

mmmm : called screen number

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.