‎2008 Oct 10 1:55 PM
Hi All,
I have one table with columns (BUKRS, ABKRS, etc).
We need to provide the maintenance screen (SM30) for it. But the problem is that there should be one pop up to ask for the Company Code (BUKRS) and later the user should be allowed to maintain entries for that Company Code only.
Please suggest how to achieve this.
regards,
Shaurabh Pandey
‎2008 Oct 10 1:59 PM
You need to change the table property of Data Broswer./ Table View Maint.in the Tab "Delivery and Maintenance" in SE11 to the "Dispaly Maintenance Allowed with Restriction".
After this Create your Table maintenance generator.
When you will try to access it via SM30, it will ask you to enter the Company Code.
Regards,
Naimesh Patel
‎2008 Oct 11 6:53 AM
Hi Naimesh,
When I tried to do as you suggested, It gave following error message:
View/table ZAPPROVERS can only be displayed and maintained with restrictions
‎2008 Oct 11 7:15 AM
In the table Go to the Tab Delivery and maintenance , there you have to choose the
Data Browser/Table View Maint. Display/Maintenance Allowed
‎2008 Oct 12 10:36 AM
Hi Saurabh,
I had a similar requirement in which I had to provide the view maintenance for media products.Popup was required for a particular media family, and only maintenance allowed for that media Family.
Hope this helps you to solve your problem
step 1 : Report Program to call the view maintenence.
See extract of code.
Internal Tables
DATA: lt_dba_sellist TYPE TABLE OF vimsellist.
DATA: lt_ztable TYPE TABLE OF ztable,
ls_ztable TYPE ztable.
Work Area
DATA : wa_dba_sellist LIKE LINE OF lt_dba_sellist.
Variables
DATA : v_viewname(30) TYPE c.
Constants
CONSTANTS : c_eq(2) TYPE c VALUE 'EQ',
c_fieldname(6) TYPE c VALUE 'FAMILY',
c_tablename(6) TYPE c VALUE 'ZTABLE',
c_action(1) TYPE c VALUE 'U'.
Selection Screen
PARAMETERS : p_family LIKE ztable-family.
INITIALIZATION.
v_viewname = c_tablename.
START-OF-SELECTION.
wa_dba_sellist-viewfield = c_fieldname.
wa_dba_sellist-operator = c_eq.
wa_dba_sellist-value = p_family.
APPEND wa_dba_sellist TO lt_dba_sellist.
*Call maintenance view
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = c_action
view_name = v_viewname
TABLES
dba_sellist = lt_dba_sellist
EXCEPTIONS
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
maintenance_prohibited = 14
OTHERS = 15.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
‎2008 Oct 12 12:35 PM
Hi Saurabh,
If we create a table maintainance generator with 2-steps(2 screen option)....We will get a screen with all the fields for a single record enrty only( plus if the company code is the only key field means validation will be done automatically)
There will be no pop-ups , but the main screen will restrict the user to entering a single record at a time
Hope it helps
Pls check and revert
Regards
Byju
‎2008 Oct 13 6:59 AM
Step 1: Create a Maintenance View for the table.
Step 2: In the View Flds tab, Put 'S' in the Column P against the fields which are needed to filter the data.
Step 3: Maintenance View should allow Read, Change, Insert and Delete operations.
Step 3: Create a Table Maintenance Generator for the view with two step maintenance.
thats it...
Now assign a T-Code to it.
‎2008 Oct 13 7:00 AM