03-16-2010 7:18 AM
what is the use of fm. "view_maintenance_call" and how will i use it?
03-16-2010 7:21 AM
(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
03-16-2010 8:06 AM
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?
03-16-2010 8:27 AM
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.
03-16-2010 8:28 AM
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,
ass TYPE sscr_ass.
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 ass.
MOVE: 'A' TO ass-kind,
'I' TO ass-sg_main,
'LIM' TO ass-op_main.
APPEND ass TO restrict-ass_tab.
* Call FM to restrict SO
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
OTHERS = 1.
ENDFORM. " restrict_select
Regards,
Raymond
03-16-2010 8:52 PM
can you please explain the utility of " view_maintenance_call" and where shud i use it. i can use tmg from se11 or using a maintenance view on a table, then why shud i go for this func module? pls explain elaborately
03-16-2010 9:04 PM
Moderator message - This FM is documented. Please ask a specific question - post locked Rob