08-25-2008 12:31 PM
Hi
My requirement is when user clicks on Pushbutton.
it should directly navigate to inside SM30 in Maintain mode.
what i know is to use the Set parameter id and use
call transaction 'SM30' . -> which will take to SM30
but how can i make directly to inside of SM30 with maintain mode.
It that possible or not??
08-25-2008 12:41 PM
instead you can do this also..
when ever a Button pressed you can call this function VIEW_MAINTENANCE_CALL in the handling part.
when 'BUTTON'.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = p_view "maint.View
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.
endif.
08-25-2008 12:33 PM
08-25-2008 12:34 PM
Hi,
Yes it is possible
use below synatx
CALL TRANSACTION ta USING bdc_tab bdc_options.
Example:
DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSEOD'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
bdcdata_wa-fval = class_name.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CIDI'.
APPEND bdcdata_wa TO bdcdata_tab.
opt-dismode = 'E'.
opt-defsize = 'X'.
CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.
Regards
Jana
08-25-2008 12:35 PM
Hi
I think you need to BDC Call transaction record it and then pass all the mandatory fields using the option SKIP INITIAL SCREEN if you don't pass the mandatory fields then again it will not work.
Regards
Pavan
08-25-2008 12:36 PM
create a parameter transaction (via SE93) for transaction SM30 and these parameters
VIEWNAME: <table or view name>
UPDATE: X
then call this new transaction from your push button logic.
Thomas
08-25-2008 12:37 PM
HI ,
Set paramter <paramter-id> field <fieldname>.
call transaction sm30 .
08-25-2008 12:38 PM
HI,
I think your logic is for mainataining a particular table, IF so
First you have to create a custom transation code for the table you want to maintain using "Transaction with Parameters (Parameter transaction) in se93.
Pass parameters SCREEN name SM30, SKIP first screen and table name in se93
and use this custom TCODE for push button functionality
With Regards,
Dwarakanath.S
08-25-2008 12:41 PM
instead you can do this also..
when ever a Button pressed you can call this function VIEW_MAINTENANCE_CALL in the handling part.
when 'BUTTON'.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = p_view "maint.View
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.
endif.
08-25-2008 1:01 PM
Thanks all.
Solution by Vijay is working for my requiremement..Thanks vijay.
06-30-2014 6:48 AM
04-20-2010 7:20 AM
Yes. instead of BDC we should use the FM which is suggested by Vijay :).
you can find code for BDC below. In this code you need to just replace VIEWNAME to your viewname.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
*
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPMSVMA'.
bdcdata_wa-dynpro = '0100'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
perform bdc_field using 'BDC_CURSOR'
'VIEWNAME'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'VIEWNAME'
'ZVXX_CM_TP'.
opt-dismode = 'E'.
opt-defsize = 'X'.
opt-UPDMODE = 'S'.
CALL TRANSACTION 'SM30' USING bdcdata_tab OPTIONS FROM opt.
----
Insert field *
----
FORM BDC_FIELD USING FNAM FVAL.
CLEAR bdcdata_wa.
bdcdata_wa-FNAM = FNAM.
bdcdata_wa-FVAL = FVAL.
APPEND bdcdata_wa TO bdcdata_tab.
ENDFORM.