Table Maintenance - field based authorization.

Hi,
I have created a ztable and generated a table maintenance for the same.
There are a few fields that have to be input enabled or disabled, based on authorization objects; some users should be able to enter values and some, not.
Need some direction, kindly advise.
Thanks,
Sheldon

Hi Sheldon,
You can achieve the above mentioned functionality by checking the AUTHORIZATION assigned to the user. You have to check the AUTH OBJECT in the PBO Module and then you have to make the Screen Fields Input enable or disabled.
But, in the generated screens, you have to do your own module pool programming and you have to do the same in your own set of INCLUDE Programs. The INCLUDE Programs generated by the TMG as READ ONLY and hence you cannot modify them. Also, make sure that you take a complete backup of your code as any change and modification will lead to regeneration of the screens and hence will delete all the user code.
Hope this helps.
Thanks,
Samantak.

Similar Messages

  • Table Maintenance - Field Names not appearing

    Hi,
       I given table maintenace for 'Z' table.
       When i went to SM30 transcation, the fields which are taken as Built-in type instead of Data elements are not having caption( Field names ) . It is showing '+' in the place of Fieldname .
       What may be the reason. In table i given short description of the field . Even though it is not displaying.
    Please suggest me.
    Thanks in advance
    Pavan.

    Hi Pavan,
    If you used the built-in types, then that is how it appears in SM30. It will <b>not</b> take the field short descriptions you entered in the table.
    Only way to get around it is to go to the screen of the table maintenance and change the field lables there. Caution though, is that whenever you change the table maintenance, you need to do this screen change again.
    Let me know if you need more info on how to do it.
    Srinivas

  • Field based authorization in Query SQ01

    Hi SAP Gurus
    I have made a query via SQ01 . Now i have assigned two users to execute the query but both these users are from different companies and able to execute the query for another company also which is not correct .
    What i want to do is to restrict company code in accordance to user id of the respective person .
    We do not have an abapper currently ? Can anyone help me with this ?
    Regards
    Hitesh

    Hi,
    You can  restrict the users from accessing the query from infoset with standard/custom authorization authorization for company code.
    if company code selection field is defined inside the infoset,then authorization check can be implemented in at selection screen event inside the infoset.
    if the company code selection field is defined in query level,then we can implement authorization check at start-of-selection event in infoset.
    Regards
    Shibino

  • How to hide fields in table maintenance generator dynamically.

    Hello Experts,
                         I have one requirement and that needs to do dynamically display the fields in table maintenance generator based on the selected radio button.I have written the code in pbo but it is not working properly,can anyone figure me out in this.
    Thanks,
    Vinod Bhaskar.

    Hi vinod
         when you are creating tmg , you will specific a function group name  and sap generate a func group which contains that tmg . you can view in se80 , specifying function group name. In that , screen contains single screen 100 or two screen 100,200 .
         screen you can create module in pbo .u can find all field name in that screen.
        loop at screen.
       if screen-name = ''.
       screen-visible = 0.
       endif.
       modify screen.
       endloop.
    regards,
    vijay.

  • How to pre-populate fields for new entry in table maintenance

    Hey everyone,
    I have a table maintenance set up that I would like to pre-populate two date fields when the user creates a new entry or copies an existing entry.
    I can do this by adding a PBO module for the maintenance screen but then if the screens are regenerated my changes are lost so this is not ideal.
    I've also found that I can use the events (05 and 21 I believe) to set the dates but using these events I can not fill in the values in the screen so this is also not ideal.
    Is there an event that can be used to pre-populate fields in a table maintenance screen? If not, what is your suggested method for accomplishing this?
    Thanks in advance! I appreciate any help!

    Hi,
    Please use the below links...
    [Table maintenance Field Validations;
    [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=93454609]
    Thanks,
    Manish

  • How to create table maintenance generator?

    Dear Sir/Madam,
        when i am creating table maintenance generator , it asks for function group
      i give 0MB8 , it says u r going to change function group which does not belongs to u,
    then i created a function group yfg9 and given , it then says yfg9 cannot be processed.
    please telll me how to create the table maintenance generator for maintenance view yv_mmim_rep_cust.
    Thanks in advance,
    Dastagiri

    Hi ,
    Table Maintenance generator is used to maintain data in table , instead of giving access to se11 , we create a tcode for this table maintenance generator and we will give this tcode to end-user to maintain data
    To generate table Maintenance generator :
    click on UTILITIES   in menu bar
    -> table maintenance generator
    -> enter Authorization Group as : &NC&
    -> Enter Function Group : name of your table ( so it will create a function group , to check this function group go to tcode se80 : then select function and enter your Table name )
    -> Then click on find screen numbers in Application tool bar.
    -> Then click on create button in Application tool bar
    if it is created successfully , then you will get a status message like table maintained generator is created successfully.

  • Restrict table maintenance for a Z Table in SM30 in Test systems

    Hello,
    I have 2 Z tables ZTAB1 & ZTAB2 which has table maintenance created. Both tables should be non modifiable in Test systems  but should be able to make entries in DEV system.
    This means any entry that needs to be present in PROD or TEST systems for these tables should be moved through transports from DEV only.
    The Tables are defined as follows:
    The Delivery Class in Both Tables is 'C' and both table. In the table maintenance screen, the authorization group for ZTAB1 is ZT1 & for ZTAB2 is ZT2. The Authorization object is  S_TABU_DIS for Both tables.
    ZTAB1 has 2 screens for maintenance and ZTAB2 has 1 screen for maintenance.
    The recording routine is "Standard recording routine" for both tables.
    The Problem is as follows:
    In TEST system, In SM30 for table ZTAB2, when I click Maintain I get an error message "Client XXX status is 'not modifiable' " which is correct. That means we cannot modify the entries for this table in TEST system.
    However for table ZTAB1, I am able to change the table entries through SM30.
    Could anyone suggest how to restrict for making entries in table ZTAB1 in SM30.
    I debugged SM30 for both tables & found that the SM30 program checks for an entry in OBJH table with the table name as OBJECTNAME and if the OBJCATEGORY in OBJH is equals 'CUST', it throws error message "Client XXX status is 'not modifiable' ".
    For the problematic table ZTAB1, the OBJH entry has 'APPL' and that is why we dont get the error message and the table entries are editable in SM30.
    (The transaction SOBJ can be used to changes OBJH entries. I haven't used this before. Not sure if I can use it to correct the problem.)
    Can anybody tell me how this OBJH gets populated when we create a Z table? 
    Could anyone suggest how to restrict for making entries in table ZTAB1 in SM30.
    Thanks,

    APPL stands for the Delivery Class A (Application Table)
    CUST stands for the Delivery Class C (Customizing Table) in table OBJH.
    It seems, the delivery class for the ZTAB1 has been changed from A (Application) to C(Customization). Try to delete the Table maintenance and regenerate it again.
    Regards,
    Naimesh Patel

  • Table maintenance - auto-populate description field based on other field

    Hello,
    I have a custom table with 2 fields in it. Customer and Name. For customer field, I am using a standard customer search help. My requirement is when I search for a customer and select a customer, how can the name field be auto populated with customer name? I am looking for a best way to do this.
    Thanks,
    AV

    hi adrian,
    One method to achieve this functionality would be  :
    1. Find out the maintenance screen and function group of the table maintenance generator say 0001 and Z03_PRO_FN. ( u can find out by going into tables - > utilities -> tmg - to find Function group. for screen number- from TMG ->utilites->modifications->maintanence screen -> note the screen number).
    2. Go to SE80 and open Z03_PRO_FN screen number 0001.
    3. For field 1 - create a module in Process on Value Request Event in PAI of the maintenance screen ( Similar to any module pool program)
    call the FM F4IF_INT_TABLE_VALUE_REQUEST( In Process on Value request event of field 1 in PAI)
    4. Use FM DYNP_VALUES_Update to read the value of field 1 on the screen ( Because this is before enter is pressed and field 1 on the module pool porogram would not be populated with value ) and update the field 2.
    Regards,
    Sivaganesh

  • Open T-code on double click of field in table maintenance

    Hi Gurus,
    I have one scenario, I have to show a transaction on double click event on a field of Table Maintence.
    Please guide me in this .
    Is there is any event in Table Maintenance Events to capture double_click of a field.
    Regards,
    Sowmen

    1. In the field attributes of the particular field there is a chechbox  in display tab which says respond to double click, check that.
    2. Assign the fuction code "PICK" for function code F2 in GUI status.
    3.Now whenver you double click the field function code "PICK" gettes triggeed.
    Now you can wrie yyou code based on this function code.
    CASE sy-comm.
    WHEN 'PICK'.
    *If you want the name of the field and the value in that field use the below code.
    GET CURSOR FIELD gv_field VALUE gv_cursor_value.
    *DO your operation based on the field and the value.
    ENDCASE.
    Regards,
    Smithesh

  • Problem in creating table maintenance generator for 61 fields in table

    Hi Experts,
    I am facing problem in creating a table maintenance genarator for a ZTABLE which has 61 fields
    i am using below details whicle creating the TMG
    in Maintenance screen
    i am giving maintenance type as two step
    Maint screen no overview screen 2
                              single screen        3
    Dialog Data Transport details
    Recording routine    standard recording routine
    but it is giving following error
    screen SAPL<ZTABLE NAME>    0003 could not be generated
    In DYNPFIELD_ATTR mandatory field LINE has no value
    please let me know how to sort out these errors.
    Is there any limit on the number of fields for which we can create table maintenance generetor.
    Thanks a lot in advance
    Sudipto

    Hi Sudipto,
    There is not limit to the number of fields of the Table which can be used in TMG for generation. But, from the usability point of view this will horrible.
    I created a Z table and added 64 fields and was able to generate the TMG with the screens perfectly. So, I guess there should not be any problem.
    Well, have a look at the Function Group. I guess the screen numbers are already used by some other screens. You can set the system to propose freely available screen numbers from the pool.
    Also, check whether proper authorization is assigned or not.
    And if nothing is working, you can degenerate all the generated screens and then can have a new regeneration of it.
    Hope these tips will work.
    Thanks,
    Samantak

  • Validate field in the pop up for a Table Maintenance View

    Hi,
    I have created a maintenance view for a Z table. Among the many fields the table, I needed to display the records based on a selection criterion. So, I have enabled a popup for sales org and customer no'.
    Now the sales org and cust no' are being validated individually at the pop up screen itself.
    The requirement is that I need to validate for presence of records for their combination.
    ( FYI: KNVV is the table with the combination of both)
    Kindly let me know how this requirement can be fulfilled.
    Thanks in Advance.

    Hi,
    Try like this..
    in the Table Maintenance Generator>Environment>Modification-->Events.
    in the event on_save(didn't remember exact name)
    select * from ztable into itab where kunnr in kunnr
                                              and    vkorg in vkorg..
    Regards,
    Nagaraj

  • Table Maintenance - Add field not in table for display

    I have a Z table which has five fields of which one of them is the GL account field. I need to display the description of the account from SKAT-TXT20 also in SM30 so that In SM30 when the user looks at the table, they should be able to see six fields. I can code the PBO / PAI to pull data from the table, but am not sure how to enhance the table control that SAP generates automatically when you generate table maintenance from SE11's Table Maintenance generator so that the sixth field can be displayed.
    Thanks

    Hi,
    I hope below solution will work for your problem:
    to update field based on other fields of the same table follow below path and create a routine.
    go to se11 open the Z-table in change mode > utilities> table maintenece generator- and then
    environment> modification> events....
    then creat routine based on your requirement.
    regards,
    munvar.

  • Disabling fields in table Maintenance generator

    Hi Experts,
    I would like to restrict some fields in table maintenance generator dynamically/ statically.
    Here is the situation.
    I have generated table maintenance for the table ZMARA and I have created three transactions for the above single table maintenance generator.
    i.e .. Transaction      ---        Table
              ZT1                  ---         ZMARA
              ZT2                  ---          ZMARA
              ZT3                  ---          ZMARA
    I am using above three transactions in my module pool program. Based on the certain conditions I am calling different transactions i.e ZT1, ZT2, etc
    Here is my requirement:
    Suppose if I call ZT1 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZPRODH.
    or remaining fields should disable. User should not allow to change the content, even if it is new entries/existing entries. only ZMATNR, ZMTART, ZPRODH.
    Suppose if I call ZT2 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZHTSCODE
    How can we restrict dynamically when you call table maintenance generator table through transaction
    or
    How can we generate table maintenance for few fields?
    Edited by: r badveli on Mar 16, 2009 4:27 PM
    Edited by: r badveli on Mar 16, 2009 4:27 PM
    Edited by: r badveli on Mar 16, 2009 4:28 PM

    Hi ,
    go to Se11->Table maintenace generation. Double click on screen to edit and assign the field you want to display/hide to groups. In PBO , after the following lines..
    LOOP AT EXTRACT WITH CONTROL
    TCTRL_ZMARA                         CURSOR NEXTLINE.
       MODULE LISTE_SHOW_LISTE.
    ENDLOOP.
    Write a new module in PBO and edit the SCREEN as per the Tcode, you are calling,,'
    Hope this helps you
    Rj

  • Adding F4 help to a field in a table maintenance dialog

    I have used SE54 to create a maintenance dialog for my table. I need to be able to use F4 in a field in the maintenance dialog that will read several values that have been entered into the table (in the same row) but not yet saved and then execute an SAP delivered function module that will present the user with valid selections based on the data input.
    I am somewhat familiar with events and modifications in SE54 but I am struggling with how to implement this.
    Thanks for your help
    Corwin Slack

    Hi Corwin,
    You can have Process on Value-Request on your screen where the field exist. You can use SE80 to edit the screen of the function group that table maintenance generator created.
    1. Edit the screen using SE80.
    2. Place a 'process on value-request' at the bottom of the flow logic.
    3. Below that, put this line
    field fieldname module get_help.
    4. Double click on GET_HELP and create an input module pool program.
    5. In this module pool, pass the values of the other fields in your screen to the function module that can provide you the list of values
    6. Use function module F4IF_INT_TABLE_VALUE_REQUEST within this module pool to popup the values.
    However, please keep in mind that the values from other fields on the screen are not populated in its field unless you hit enter.

  • Add authorization checks to the table maintenance

    i have created a table maintenance and I have authorization object and the field for it which will take some values this i got from basis people . Then how to add authorization checks to the table maintenance.

    U can try to use the event, after generating table maintenance program:
    Enviroment->Modification->Events: the events 05/18 could be good for you
    Max

Maybe you are looking for