Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table maintenace - restrict changes to the existing entries

Former Member
0 Kudos

Hi All,

I have a created a table maintenance generator for a table. I have a requirement like this, I need to restrict changes to the existing entries based on perticular scenario. Is it possible to include this logic in the standard program generated by SAP for table maintenance. If so, how to achieve this.

Thanks in advance

Regards,

Rajavardhana Reddy

6 REPLIES 6

Former Member
0 Kudos

Hi Rajavardhana,

Yes it's possible to do it. you need to look into the code of the generated function pool attached to the function group. in that you can select the relevant screen and their associated includes namely the PBO and PAI where in you can include your scenario.

But it would be quite time consuming in the sense you will have to look for the table field from the screen and also the processing them will be complex.

Regards,

Jagath

0 Kudos

Hi,

Right now i have written extra code in the standard SAP program for some other requirement. Current requirement is based on particular field value, say for example i have 3 fields in the table f1, f2 f3. Based on the value for f3, i need to make the particular record(line) locked(i.e. should not allow to change the data).

what i am thinking is, i need to get the position of the entry in the table and based on that i need do something to make the entry to display mode.

any ideas

Thanks

Rajavardhana Reddy

Former Member
0 Kudos

Hi

If you have a maintenance dialog defined for that table then you can define a Event. To do this from Se11 select the table got to the Table maintenance screen and from the menu Environment --> Modifications --> Events and create your own event and select a proper triggering option.

This was you can define your own logic to have ur check in place.

Regards

VJ

vinod_gunaware2
Active Contributor
0 Kudos

Hi

table maintance.

In standard program of table maintance, there are provided lot of include.

                                                                                                                      • User-defined Include-files (if necessary)**********************************************************

  • INCLUDE LSVIMF... " Subprograms

INCLUDE LSVIMF01. " Subprograms for date subscreen D0001

INCLUDE LSVIMF02. " Subprograms textmaintenance screen D0100

INCLUDE LSVIMF03. " Subprograms for VIEW_MAINTENANCE_CALL

INCLUDE LSVIMF26. " Subprograms for VIEW_IMPORT_TEXTTAB_LOW_LEVEL

INCLUDE LSVIMF58. " Subprograms for VIEW_BCSet_IMPORT

  • INCLUDE LSVIMO... " PBO-Modules

INCLUDE LSVIMO01. " PBO-Modules for date subscreen D0001

INCLUDE LSVIMO02. " PBO-Modules for textmaintenance screen D0100

  • INCLUDE LSVIMI... " PAI-Modules

INCLUDE LSVIMI01. " PAI-Modules for date subscreen D0001

INCLUDE LSVIMI02. " PAI-Modules for textmaintenance screen D0100

which can be used for before PAI,PBO etc.

U can create ur own screen as well as u can

add validatin or processing logic in between.

U just add peform in between standard code of maintaince.

(chose any include which provided by SAP (LS...01,02)

regards

vinod

Former Member
0 Kudos

Hi,

Its possible to restrict the changes to existing entries without disturbing the standard transaction SM30 functionality.

Below is the code which may help you and you can have try by creating the Parameter transaction with the tcode se93.

PROCESS BEFORE OUTPUT.

MODULE liste_initialisieren.

*-- Start of changes by chintsk D01K947457 on 03/28/2006

*-- Module to validate extract table at plant level

*-- in the Table Maintenance Generator for Z0MM_TBL_FREIGHT

*-- And logic to exclude Display/Change toggle push button

MODULE validate_plant_pbo.

*-- End of changes by chintsk D01K947457 on 03/28/2006

LOOP AT extract WITH CONTROL

tctrl_z0mm_tbl_freight CURSOR nextline.

MODULE liste_show_liste.

ENDLOOP.

*

PROCESS AFTER INPUT.

MODULE liste_exit_command AT EXIT-COMMAND.

MODULE liste_before_loop.

LOOP AT extract.

MODULE liste_init_workarea.

CHAIN.

FIELD z0mm_tbl_freight-werks .

FIELD z0mm_tbl_freight-z0mm_inco1 .

FIELD z0mm_tbl_freight-inco1 .

FIELD z0mm_tbl_freight-txz01 .

MODULE set_update_flag ON CHAIN-REQUEST.

*-- Start of changes by chintsk D01K947457 on 03/28/2006

*-- Module to Validate the Plant for the New entries

MODULE validate_plant_pai ON CHAIN-INPUT.

*-- End of changes by chintsk D01K947457 on 03/28/2006

ENDCHAIN.

FIELD vim_marked MODULE liste_mark_checkbox.

CHAIN.

FIELD z0mm_tbl_freight-werks .

FIELD z0mm_tbl_freight-z0mm_inco1 .

MODULE liste_update_liste.

ENDCHAIN.

ENDLOOP.

MODULE liste_after_loop.

Cheers,

Sampath.

Former Member
0 Kudos

This was done by changing the module pool program to write some condition based on which the data needs to changed