View_maintenance_call

Hello,
I want to use fm view_maintenance_call to update a table. But I want to pass one of the key fields from the parameters of the selection screen of my program. Is it possible to display this field with the value from program's selection screen and to lock it against changes. ie. the table has 3 fields to be updated, value of one of the fields will be read from the selection screen and it will be display only in SM31/SM30.
Is it possible?
Thx in advance,
Ali

<b>I want one field to be display only. for the rest of the fields in the record the user must have the chance to make entries.</b>
This is not possible :
Check the below code :
tables: tvdir.
Selection screento table View
  selection-screen skip 2.
  parameter p_tabnm(30) as listbox visible length 30 obligatory.
  selection-screen skip 1.
  selection-screen begin of block s1 with frame title text-001.
  parameter: p_radio1 radiobutton group g1,
             p_radio radiobutton group g1.
  selection-screen end of block s1.
Add values to list box
at selection-screen output.
  type-pools: vrm.
  data: name  type vrm_id,
        list  type vrm_values,
        value like line of list.
  name = 'P_TABNM'.
  refresh list.
  value-key = 'V_024'.
  value-text = text-002. "'V_024-Purchasing Groups'.
  append value to list.
  value-key = 'V_T024D'.
  value-text = text-003. "'V_T024D-MRP Controllers'.
  append value to list.
  value-key = 'ZT604'.
  value-text = text-004. "'T604-Commodity Codes'.
  append value to list.
  value-key = 'T179'.
  value-text = text-005. "'T179-Product Hierarchies'.
  append value to list.
  value-key = 'TVM1T'.
  value-text = text-006. "'TVM1T-Business Manager'.
  append value to list.
  value-key = 'TVM2T'.
  value-text = text-007. "'TVM2T-Division manager'.
  append value to list.
  value-key = 'TVM3T'.
  value-text = text-008. "'TVM3T-Director'.
  append value to list.
  value-key = 'V_TVV2'.
  value-text = text-009. "'V_TVV2-Customer Group 2'.
  append value to list.
  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = list.
start-of-selection.
Get flag of corresponding table view
  select single tabname flag from tvdir into tvdir
                where tabname = p_tabnm.
Set flag of corresponding table view
  if p_radio1 eq 'X'.
    if tvdir-flag ne 'X'.
      update tvdir set: flag  = 'X'
                 where tabname = p_tabnm.
    endif.
  endif.
  if p_radio eq 'X'.
    if tvdir-flag eq 'X'.
      update tvdir set: flag  = ''
                   where tabname = p_tabnm.
    endif.
  endif.
Execute View/Table
  call function 'VIEW_MAINTENANCE_CALL'
    exporting
      action                               = 'U'
      view_name                            = p_tabnm
   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
     others                               = 14.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
Reset flag of corresponding table view
  update tvdir set: flag  = tvdir-flag
                where tabname = p_tabnm.
Depend upon Radio button ,you get pop up window for transport request.
Thanks
Seshu

Similar Messages

  • Lock only a few records in a VIEW_MAINTENANCE_CALL.

    Hello,
    I want to update one View using the FM: VIEW_MAINTENANCE_CALL, restricting the value of one field.
    Using the the FM with the restricting field it’s easy, no problem. The problem is controlling the lock of those records, I just want to lock those records, not lock all records table view to the other users.
    Any help to this issue...
    Regards,
    Duarte
    Duarte

    Hi,
    You can not lock single record.
    Regards,
    Satish

  • Skip first screen of the VIEW (V_T052) with FM VIEW_MAINTENANCE_CALL-

    Hi at all,
    i use the Functionmodul "VIEW_MAINTENANCE_CALL" and call the View "V_T052".
    But i need the second screen of this View, to add new Payment Terms.
    How can I skip the first screen of the View "V_T052" ?
      DATA: view_name TYPE dd02v-tabname VALUE 'V_T052'.
      DATA: dba_sellist TYPE STANDARD TABLE OF vimsellist WITH HEADER LINE.
      DATA: action TYPE c.
        action = 'U'.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
        EXPORTING
          action                       = action
          view_name                    = view_name
        TABLES
          excl_cua_funct               = t_exl_func
        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.
    Thank you forward for your helps.
    Erwin
    Edited by: Matt on Jul 20, 2010 12:33 PM - fixed subject corruption, added  tags

    try using view "V_T052_V" instead of "V_T052".

  • VIEW_MAINTENANCE_CALL usage

    Hi all,
         I have a requirement to maintain view V_024 from custom program. I have written following code for that
        CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
               EXPORTING
                   action                               = 'U'
                   view_name                     = 'V_024'   
                    Exceptions**
    My requirement is when the user clicks the create new entries button i need to show a pop up and based on user selection from pop up the entries in the table has to be altered can we handle this using this function module.
    Please Help.
    Thanks & Regards,
    Anjana Rao

    Hi,
    I dont think you can achieve this functionality with this FM. Instead, you can think of editable ALV. Display the table data in editable ALV (Ofcourse key fields are not editable). You can add custom buttons to the tool bar and perform your functionality. On clicking SAVE update the backend table accordingly.
    Thanks,
    Vinod.

  • VIEW_MAINTENANCE_CALL - parallel user maintenance?

    Hi there
    To maintain the data within a view, I know, that the function "VIEW_MAINTENANCE_CALL'" can be used.
    But the problem is, the maintenance of the data is only <b>seriell</b> and not parallel. (only one user at the time can work within this view in the modus change).
    Is there any function or method, that alows <b>parallel</b> maintenance of a view?
    Thanks.
    Petra

    I don't think so that solution is there for your question, but U can avoid using VIEW_MAINTENANCE_CALL FM when It is assigned to a transaction code. in SE93 just maintain in Default values tab:
    Name of Screen field          Values
    VIEWNAME                    Z_MYVIEW
    UPDATE                      X
    just save the transaction code and execute it. It works like how U managed writing a program and calling above function module.
    Enjoy SAP
    K.R.Reddy

  • VIEW_MAINTENANCE_CALL filter dates

    Hello,
    I'm using FM VIEW_MAINTENANCE_CALL, I have some filters that work ok, but I have a problem when I try to filter from a date field. Because even some records should be returned, the final search is empty.
    I fill the structure (for the table vimsellist) in this way:
    ls_filtro-viewfield  = 'FEC_ULT_ACT'.
    ls_filtro-and_or    = 'AND'.
    ls_filtro-operator  = 'EQ'.
    ls_filtro-value      = s_fecha-low.
    When I filter with another type of field different of date, I get the expected result.
    Thanks in advance.

    Hi,
    try this one:
    date field in FM 'VIEW_RANGETAB_TO_SELLIST'
    Bestb regards.

  • Using VIEW_MAINTENANCE_CALL

    Hi all,
    I am using functionmodule VIEW_MAINTENANCE_CALL through ZProgram and every thing is ok.
    But my requirement is to change two particular fields and rest should be in display mode(Grayed out).
    So

    Hi phani chowdary.
    It is very simeple.Before calling FM VIEW_MAINTENANCE_CALL in your program you need to set property of fields in table maintanance screen.
    Go to function group of table maintanance screen and navigate layout of table maintanace screen. Enable 'OUTPUT ONLY' check box for field you want to gray out and activate function group.
    Cheers.....
    Regards,
    Peranandam

  • VIEW_MAINTENANCE_CALL and SORT

    Hey everyone.
    I'm using VIEW_MAINTENANCE_CALL to display/change entries from a client table.
    Is there any way i can sort the entries before displaying it?
    Thanks,
    Mário

    Hi Mario,
    View maintenance does not largely support SORT functionality, as it often deals with hexadecimal data. When you call the module VIEW_MAINTENANCE_CALL, there are no options to specify a sort sequence here. The data displayed subsequently in the view screens is by default sorted based on the Key Fields of the table/view.
    But what you could try doing is this - goto the generated coding of the view/table, and you programmatically modify the sorting order on the display screen, but without affecting the key-fields. Or, you could use the Events to change the logic as well.
    Cheers,
    Rekha

  • Equivalent Class for Function Module for VIEW_MAINTENANCE_CALL

    Hi Gurus,
    Can any one let me know
    Equivalent Class for Function Module for VIEW_MAINTENANCE_CALL
    Thanks in a

    Try Class:
    CL_TABLECONTROL
    Or do check if this class is of any use:
    CL_SALV_FULLSCREEN_ADAPTER

  • SAPSQL_WHERE_PARENTHESES on VIEW_MAINTENANCE_CALL

    Hi ,
    I am using the standard function module VIEW_MAINTENANCE_CALL to maintain the entries in the table. I need to pass 2 fields ( EMAIL , FLAG) along with values to maintain the entries. I could able to do it for 1 field at a time. When I am trying to pass values for 2 fields at a same time, it goes for the short dump.Is there any options to pass the values for 2 fields at a same time.
    if EMAIL is NOT INITIAL.
       LT_SELLIST-VIEWFIELD = 'EMAIL'.
       lt_sellist-operator  = 'EQ'.
       lt_sellist-value     = EMAIL.
       append lt_sellist.
    ENDIF.
    if FLAG is NOT INITIAL.
       LT_SELLIST-VIEWFIELD = 'FLAG'.
       lt_sellist-operator  = 'EQ'.
       lt_sellist-value     = FLAG.
       append lt_sellist.
    ENDIF.
    CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
                 EXPORTING
                   action               = ACTION
                   view_name            = p_view
                   show_selection_popup = ''
                 TABLES
                   dba_sellist          = lt_sellist
                   excl_cua_funct       = excl_cua_funct.

    Hi,
    you forget to set a value in this column : I_SELLIST-AND_OR
    regards
    Fred

  • Passing range to view_maintenance_call

    hello everybody,
    i am not able to pass a range (with low and high values) to view_maintenance_caLL.
    kindly tell me how to do this.
    thanks

    VIEW_MAINTENANCE_CALL : For range we can also this :
    field = <fieldname>,  leftpar= 1  , rightpar = blank ,  value  = range-low,   operator = GE ,  AND_OR  = AND
    append the work area to itab
    field = <fieldname>,  leftpar= blank  , rightpar = 1 ,  value   = range-high,   operator = GE ,  AND_OR  = OR
    append
    Now the clause will look like  ::
    WHERE ( comp_code GE range-low And
                 ( com_code LE range-high )
    And if there is a new field put OR instead of AND in field AND_OR
    Thanks

  • Issue while calling VIEW_MAINTENANCE_CALL

    Hi experts,
    I have requirement to create a program with FM VIEW_MAINTENANCE_CALL using selection screen.
    I am getting the data as per the selection screen.
    But my requirement is -> my View is having 8 fields where 4 are the fields like sales org, profit center1, profit center2 and country and other 4 are the description of these fields. Whenever I will run my program, the text field(description field) column should not be editable ,i.e. User should not do any changes in those columns.  Right now, I am getting all the data in editable mode.
    I am not getting how to deal with this requirement.
    Your help will be appreciable.
    Thanks in advance.
    Regards,
    A.T.

    Use a view of type maintenance view, there declare the text fields as "R" read-only, SE54/SM30 will do the job.
    Regards,
    Raymond

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           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
                others                       = 14.
    Regards,
    RIch Heilman

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • Update a maintenance view.

    Hi ,
    I want to update a maintenance view.
    Data is coming from a text file which i am uplaoding.
    Which function module should I use to update the maintenence view.
    Thanks,
    Ram.

    hi,
    use this FM VIEW_MAINTENANCE_CALL
    hope it will work.
    use this code .
    &----& Report  Z_TEST_PROGRAM&--*& Demo program for blog http://abap-explorer.blogspot.com/&--
    REPORT  z_test_program.DATA:i_sellist TYPE STANDARD TABLE OF vimsellist INITIAL SIZE 0,i_header  TYPE STANDARD TABLE OF vimdesc INITIAL SIZE 0,i_namtab  TYPE STANDARD TABLE OF vimnamtab INITIAL SIZE 0.PARAMETERS: p_view TYPE viewname MATCHCODE OBJECT viewmaint OBLIGATORY.AT SELECTION-SCREEN.CALL FUNCTION 'VIEW_GET_DDIC_INFO' EXPORTING   viewname                    = p_view     VARIANT_FOR_SELECTION       = ' ' TABLES   sellist                     = i_sellist   x_header                    = i_header   x_namtab                    = i_namtabEXCEPTIONS  no_tvdir_entry              = 1  table_not_found             = 2  OTHERS                      = 3         .IF sy-subrc <> 0. data: l_message type NATXT. CONCATENATE 'Table/View' p_view INTO l_message SEPARATED BY space. MESSAGE e001(00) WITH l_message ' not in the Dictonary'.ENDIF.START-OF-SELECTION.CALL FUNCTION 'VIEW_MAINTENANCE_CALL' EXPORTING action                               = 'S' view_name                            = p_viewEXCEPTIONS  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 i001(00) WITH 'Error while calling the view'. LEAVE LIST-PROCESSING.ENDIF.
    Edited by: katigiri linganna on Apr 20, 2009 4:31 PM

Maybe you are looking for