Search This Blog

Monday, February 22, 2010

Maintenance View


Maintenance views: It can be created for One or More tables, if more, only related tables. This view is created will all key fields of table automatically and joins are auto generated by SAP. We cannot change it. This Object can't be used as Dictionary Object for SE38 programs, with help table maintenance generator we should convert maintenance view as repository object. Unlike Database views, we can modify data from multiple tables also.

Navigations to create maintenance view.
1. SE11 -> SELECT OBJEC TYPE AS "VIEW" -> NAME THE VIEW ( ZMAINVIEW1 ) -> CLICK ON CREATE -> SELECT VIEW TYPE AS "MAINTENANCE VIEW" -> CLICK ON COPY -> ENTER SHORT DESCRIPTION FOR THE VIEW ( ANY ) -> SPECIFY PRIMARY TABLE ( MARA ) -> PRESS ENTER -> CLICK ON RELATIONSHIPS TO ADD OTHER TABLES FOR THE VIEW -> SELECT ONLY DEPENDENT TABLES ( MAKT ) -> CLICK ON COPY , BY DEFAULT SAP GENERATES A JOIN FOR THE TABLES , AND ADDS ALL KEY FIELDS FROM THE TABLES -> CLICK ON VIEW FIELDS TAB BUTTON TO SELECT REQUIRED OPTIONAL FIELDS -> CLICK ON TABLE FIELDS , TO SELECT REQUIRED FIELDS FROM BOTH TABLES -> CLICK ON MAINTENANCE STATUS -> SET THE ACCESS AS "READ/CHANGE/DELETE AND INSERT" ( DEFAULT SELECTED ) -> SAVE THE VIEW UNDER A PACKAGE -> ACTIVATE THE VIEW.
2. To generate Repository Object, Generate Table maintenance using
utilities menu -> table maintenance generator -> opens an interface -> Specify Authorization Group as "ATES" -> Name the Function Group to be created ( ZFGMAINVIEW1 ) -> select maintenance type as "one step" screen -> set the screen number as "123" -> click on create from application toolbar -> save the objects under a package -> SAP Generates Function Group with Code for maintenance view.
3. Test maintenance view code execution.
SE54 (TCODE ) -> Name the VIEW (ZMAINVIEW1 ) -> click on "TEST" PUSHBUTTON -> Opens another interface -> Click on Maintain Pushbutton -> Opens another screen with the contents of the view -> For creating new entries, click on "New Entries" from ATB. For changing existing contents, modify the values -> SAVE -> Changes will be updated in the DB tables.

1 comment: