This discussion is locked
6 Replies Latest reply: Mar 16, 2010 9:52 PM by pritam roy RSS

view maintenance call

pritam roy
Currently Being Moderated

what is the use of fm. "view_maintenance_call" and how will i use it?

  • Re: view maintenance call
    Raymond Giuseppi
    Currently Being Moderated

    (Use in a program of a generated table maintenance dialog created via SE54/SE11 as in SM30/SM34)

    First read FM documentation and online information like [Lowest level entry|http://help.sap.com/saphelp_sm32/helpdata/en/2a/fa0091493111d182b70000e829fbfe/content.htm] in [Extended table maintenance|http://help.sap.com/saphelp_sm32/helpdata/en/2a/fa0029493111d182b70000e829fbfe/frameset.htm].

     

    Regards,

    Raymond

    • Re: view maintenance call
      pritam roy
      Currently Being Moderated

      actually i havent used this fm at all.  i have maintained the table by using sm30.  so kindly explain it by a code.  why will i use this fm  if we can maintain the table by sm30?

      • Re: view maintenance call
        Raymond Giuseppi
        Currently Being Moderated

        You may "include" the dialog maintenance in one custom program, eg. you can build a selection-screen and there call the dialog maintenance with the selected records.

        REPORT zsample.
        
        TYPE-POOLS: sscr,
                    icon.
        TABLES: zfsf_airport,
                zfsf_airportt,
                vimsellist,
                sscrfields.
        DATA: dba_sellist TYPE TABLE OF vimsellist,
              t_ddes TYPE TABLE OF zfsf_airport,
              smp_dyntxt TYPE smp_dyntxt.
        * Parameters
        SELECT-OPTIONS: s-zicao FOR zfsf_airport-zicao NO-EXTENSION,
                        s-ziata FOR zfsf_airport-ziata NO-EXTENSION,
                        s-zland FOR zfsf_airport-zland NO-EXTENSION,
                        s-zaurpt FOR zfsf_airportt-zaurpt NO-EXTENSION.
        SELECTION-SCREEN FUNCTION KEY 1.
        INITIALIZATION.
          PERFORM restrict_select.
          CLEAR smp_dyntxt.
          smp_dyntxt-text = 'F1T'(f1t).
          smp_dyntxt-icon_id = icon_create.
          smp_dyntxt-icon_text = 'F1I'(f1i).
          smp_dyntxt-quickinfo = 'F1Q'(f1q).
          sscrfields-functxt_01 = smp_dyntxt.
        AT SELECTION-SCREEN.
          CASE sy-ucomm.
            WHEN 'FC01'.
              CLEAR zfsf_airport-zicao.
              CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
                   EXPORTING
                        action               = 'INS'
                        view_name            = 'ZFSF_V_AIRPORT'
                        insert_key_not_fixed = 'X'
                        no_transport         = 'X'
                   CHANGING
                        entry                = zfsf_airport-zicao
                   EXCEPTIONS
                        OTHERS               = 1.
          ENDCASE.
        END-OF-SELECTION.
        * Build selection
          REFRESH dba_sellist.
          CLEAR vimsellist.
          DEFINE buildkey.
            vimsellist-viewfield = &2.
            vimsellist-and_or = 'AND'.
        *    read table &1 index 1.
            case &1-sign.
              when 'I'.
                case &1-option.
                  when 'BT'.
                    vimsellist-operator = 'GE'.
                    write &1-low to vimsellist-value.
                    append vimsellist to dba_sellist.
                    vimsellist-operator = 'LE'.
                    write &1-high to vimsellist-value.
                    append vimsellist to dba_sellist.
                  when others.
                    vimsellist-operator =  &1-option.
                    write &1-low to vimsellist-value.
                    append vimsellist to dba_sellist.
                endcase.
            endcase.
          END-OF-DEFINITION.

         

      • Re: view maintenance call
        Raymond Giuseppi
        Currently Being Moderated
          buildkey s-zicao 'ZICAO'.
          buildkey s-ziata 'ZIATA'.
          buildkey s-zland 'ZLAND'.
          buildkey s-zaurpt 'ZAURPT'.
        * Call dialog
          CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
               EXPORTING
                    action      = 'U'
                    view_name   = 'ZFSF_V_AIRPORT'
               TABLES
                    dba_sellist = dba_sellist.
        * Restrict select-option 
        FORM restrict_select.
          DATA: restrict TYPE sscr_restrict,
                opt_list TYPE sscr_opt_list,
                *** TYPE sscr_***.
          CLEAR opt_list.
          MOVE 'LIM' TO opt_list-name.
          MOVE 'X' TO: opt_list-options-bt,
                       opt_list-options-cp,
                       opt_list-options-eq,
                       opt_list-options-ge,
                       opt_list-options-gt,
                       opt_list-options-le,
                       opt_list-options-lt,
        *               opt_list-options-nb,
                       opt_list-options-ne,
                       opt_list-options-np.
          APPEND opt_list TO restrict-opt_list_tab.
          CLEAR ***.
          MOVE: 'A'          TO ***-kind,
                'I'          TO ***-sg_main,
                'LIM'        TO ***-op_main.
          APPEND *** TO restrict-***_tab.
        * Call FM to restrict SO
          CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
               EXPORTING
                    restriction = restrict
               EXCEPTIONS
                    OTHERS      = 1.
        ENDFORM.                    " restrict_select

        Regards,

        Raymond

  • Re: view maintenance call
    Rob Burbank
    Currently Being Moderated

    Moderator message - This FM is documented. Please ask a specific question - post locked Rob

Actions