‎2013 Jul 25 8:24 AM
Hi All,
How can I achieve a view table with restrictions with something like below that would only allow user to select field/s to be maintained or display?
Thanks,
Trixa
‎2013 Jul 25 6:21 PM
Hi Trixa, when you create a view table, each field has a attribute called "Maintenance Attribute", you have to choose the value S for the fields that you wanna appear as condition, see the image below
I hope this help you
Regards
David Carballido
‎2013 Jul 26 4:42 AM
Hi David,
I can't find the part you highlighted above. My table looks like below:
‎2013 Jul 26 5:56 AM
Hi,
David Carballido talking about maintenance View.
There you find the Options.
Regrads,
Ravi Pratap Singh
‎2013 Jul 26 6:00 AM
Hi Trixa, you have to create a view based on your table, go to SE11 and choose View, then put a name of your view to create, follow the next steps
1. My table is ZTABLE
2. You have to create a view based on your table ZTABLE
3. Then select Maintenance View
4. Then select your table like that and press ENTER to refresh and select all your fields
5. Then save and activate, then go to "table maintenance generator" to create a function group
6. Then go to SM30 and put your view and you'll see your fields marked as condition
I hope this help you
DCC
‎2013 Jul 26 6:18 AM
‎2013 Jul 26 6:01 AM
Hi Trixa,
Do you want to restrict the fields visibility while maintaing the table through SM30. Is this is your requirement.
Thanks and Regards,
Vinay Mutt
‎2013 Jul 26 6:31 AM
‎2013 Jul 26 10:54 AM
Hi Trixa,
I have posted the code below to make the fields not visible in SM30. If you want to do some validations on the fields you have to create events or write the code in PAI .
Regards,
Vinay Mutt
‎2013 Jul 26 6:19 AM
Hi Trixa,
Actually we had impleneted PBO module and had written the code as shown below in oder to hide the fields when trying to maintain/display through SM30. David s approach is easy and it is good.
Approcah we followed.
Below code is written in the PBO MOdule.
MODULE hide_fields OUTPUT.
*-- To Hide CHANGEDDATE CHANGEDTIME and CHANGEDBY Fields On the Screen
PERFORM sub_hide_fields USING c_changeddate.
PERFORM sub_hide_fields USING c_changedtime.
PERFORM sub_hide_fields USING c_changedby.
FORM sub_hide_fields USING p_field.
DATA: x_cols LIKE LINE OF tctrl_ztest-cols,
l_index TYPE i.
READ TABLE tctrl_ztest-cols INTO x_cols
WITH KEY screen-name = p_field.
IF sy-subrc EQ 0.
*-- To Modify the Correct Entry in the Internal Table
l_index = sy-tabix.
*-- To Make the field invisible on the screen
x_cols-invisible = c_x.
MODIFY tctrl_ztest-cols FROM x_cols INDEX l_index
TRANSPORTING invisible.
ENDIF.
ENDFORM. " SUB_HIDE_FIELDS
‎2013 Jul 26 6:23 AM
do u mean u want to control the fields in the maintain view?
e.g total 10 fields, u only want to display 5?
‎2013 Jul 26 6:32 AM
‎2013 Jul 26 10:57 AM
Trixa,
You want to modify the modification view i.e., SM30 dynamically?
If you select two fields only those two should be visible like that?
Regards,
Vinay Mutt
‎2013 Jul 26 12:43 PM
The new table would be assigned to a new transaction code. Once transaction code is executed, the below window should display wherein a user will only select either of the four fields.
‎2013 Jul 27 8:12 AM
‎2013 Jul 26 6:36 AM
Based on our requirement:
In order to restrict the number of records display the table should be created to be maintained with restrictions, forcing users to select at least one of the fields to restrict entries.Users will select Plant, Material, Resource, Recipe Group, Recipe Number and they will get the list of records matching values provided.
Thanks,
Trixa
‎2013 Jul 29 5:19 AM
Hi All,
I was able to display the required window by creating a custom program calling the FM below:
DATA gt_sellist TYPE STANDARD TABLE OF vimsellist.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'U'
show_selection_popup = 'X' " this enables the pop-up window
view_name = 'ZTABLE'
TABLES
DBA_SELLIST = gt_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.
* Implement suitable error handling here
ENDIF.
However, all fields are showing when all I really need are the first five fields only. Does anyone knows how to eliminate the last two fields?
Thanks,
Trixa