How to disable user defined buttons
hi,
how to disable userdefined buttons in alv in webdynpro abap.
thanks and regards,
Sridevi.D
Hi,
Create attribute in context to control enabling/disabling action of a button. Bind this attribute to button. In some action method populate this attibute with boolean values.
Reward point if useful.
Regards,
Karthick S
Similar Messages
-
How to create user defined button in alv report
how to create user defined button in alv report
thnks in advance.Hi,
U can define it the the PF-STATUS ( Menu for ALV ).
For that u have to define it in the EVENTCAT.
form z_eventcat using p_i_eventcat type slis_t_event.
data: i_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_i_eventcat
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
clear i_event.
read table p_i_eventcat with key name = slis_ev_top_of_page into
i_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE' to i_event-form.
append i_event to p_i_eventcat.
endif.
read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
if sy-subrc = 0.
move 'SET_PF_STATUS' to i_event-form.
append i_event to p_i_eventcat.
endif.
clear i_event.
read table p_i_eventcat into i_event with key name = slis_ev_user_command .
if sy-subrc = 0.
move 'USER_COMMAND' to i_event-form.
append i_event to p_i_eventcat.
endif.
And in the DISPLAY
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_progname
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_grid_title = v_gridtitle
i_save = 'A'
is_layout = i_layout
it_fieldcat = i_fieldcat[]
it_sort = i_sortinfo
it_events = i_eventcat
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = it_final
exceptions
program_error = 1
others = 2
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*MENU SETTINGS.
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ALV_MENU'.
endform. "SET_PF_STATUS
endform. " Z_EVENTCAT
Now double click on ALV MENU nad u can create a button in the application bar.
Regards,
Pritha. -
How to disable self defined button from ALV Toolbar when ok_code ='BACK'
here is the code
CLASS Z_CL_6_U_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS:
HANDLE_TOOLBAR
FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
IMPORTING E_OBJECT E_INTERACTIVE,
HANDLE_USER_COMMAND
FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
IMPORTING E_UCOMM.
ENDCLASS.
CLASS Z_CL_6_U_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_TOOLBAR.
DATA: LS_TOOLBAR TYPE STB_BUTTON.
IF G_FLAG = 'X' and ok_code = space.
CLEAR LS_TOOLBAR.
MOVE 0 TO LS_TOOLBAR-BUTN_TYPE.
MOVE 'UPDATE' TO LS_TOOLBAR-FUNCTION.
MOVE ICON_MODIFY TO LS_TOOLBAR-ICON.
MOVE 'Update Records'(111) TO LS_TOOLBAR-QUICKINFO.
MOVE ''(112) TO LS_TOOLBAR-TEXT.
MOVE ' ' TO LS_TOOLBAR-DISABLED.
APPEND LS_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
elseif ok_code = 'BACK'.
CLEAR LS_TOOLBAR.
LS_TOOLBAR-function = 'UPDATE'.
LS_TOOLBAR-butn_type = 0.
LS_TOOLBAR-icon = ICON_MODIFY.
LS_TOOLBAR-quickinfo = 'Update Records'.
LS_TOOLBAR-disabled = 'X'.
append LS_TOOLBAR TO <i><b>E_OBJECT</b></i>->MT_TOOLBAR.
ENDIF.
ENDMETHOD.
<i><b>ERROR COMES when ok_code is 'BACK'.
at this point E_OBJECT has null reference instead of ref to Class cl_ALV_EVENT_TOOLBAR_SET.</b></i>
tell me why this error coming.
pls helpHello Neetu
To give you an example I have copied sample report BCALV_GRID_DEMO, added some code (search for <b>$Comment</b>) and modified the GUI-status <b>MAIN100</b> (replace function code EXIT with <b>BACK</b> for the F3 function).
Run the program and push several times the BACK button: one toolbar function after the other will be inactivated.
PROGRAM test.
DATA: ok_code LIKE sy-ucomm,
gt_sflight TYPE TABLE OF sflight,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
<b>----
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_cnt TYPE i.
CLASS-METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object
e_interactive
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_toolbar.
DATA:
ls_button TYPE stb_button.
ADD 1 TO md_cnt. " a simple counter
LOOP AT e_object->mt_toolbar INTO ls_button FROM 1 TO md_cnt.
ls_button-disabled = 'X'.
MODIFY e_object->mt_toolbar FROM ls_button.
ENDLOOP.
ENDMETHOD. "handle_toolbar
ENDCLASS. "lcl_eventhandler IMPLEMENTATION</b>
START-OF-SELECTION.
* MAIN *
SELECT * FROM sflight INTO TABLE gt_sflight.
CALL SCREEN 100.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
* Instantiate ALV grid control
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_outtab = gt_sflight.
<b>*$Comment: Set event handler for event TOOLBAR
SET HANDLER:
lcl_eventhandler=>handle_toolbar FOR grid1.
ENDIF.</b>
ENDMODULE. "PBO OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
* to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
<b> WHEN 'BACK'.
$Comment: Toolbar can be modified on-the-fly
grid1->set_toolbar_interactive( ).</b>
WHEN OTHERS.
* do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "PAI INPUT
* FORM EXIT_PROGRAM *
FORM exit_program.
* CALL METHOD G_CUSTOM_CONTAINER->FREE.
* CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM. "EXIT_PROGRAM
Regards
Uwe -
Disable User Menu button is LSMW
Hi everyone,
can any one please tell me how to disable "User Menu" button in lsmw transaction.I took a look at the program, and it does not use any kind of customizing to build the gui-status. So, in other words, you can not turn it off using config. You may be able to do it useing a screen variant. Check out transaction SHD0.
Regards,
Rich Heilman -
hi all,
please tell me how i can make user defined button in standard menu.........
regards
vikas sainihi Vikas ,'
u can do this by using PF status and setting titile .
follow thw link for help.
Re: To Change SAP Tiltle into some other title
Regards,
Amit -
How to disable "View Report" button in reporting services
Is anyone know how to disable "View Report" button in reporting services, I know can do custom code in report properties, what is the code? I have tried something like this ***button1.enable=false, but it can not success.
Appreciate if anyone can reply me, thanks.Hi,
The message box don't work on the web because it is of windowform box. Based on your further description, you might want to do the date parameter validation. If so, there is common way to do this:(assume the date parameter value inputed can't be less than 2007)
1) Intert a textbox and input the message used to show the end users if they input a invalidated date value for the parameter, and then set the textbox's hidden property to =iif(Year(Parameters!myPrameter.value) < 2007,false, true)
2) Insert a Rectangle control below the textbox created in step 1, and put all report items in it and set the Rectangle's hidden property to =IIF(Year(Parameters!myParameter.value)<2007,true,false)
After these, if the end users input the date value can meet the project requirement, the report will show the data the end users want, otherwise, the end users will see the error textbox to tell them the parameter value is incorrect.
Hope this help,
thanks,
Jerry -
How to Developed user defined functions to call function modules in SAP R/3
how to Develope user defined functions to call function modules in SAP R/3 system
Hello Raja,
Go through this V.imp Link...
http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
Steps to crate FM..
Follow these steps..
Go to the T: code SE37
First You Create Function Group
On That u specify
Function Group Name..............
Short Text..............................
save...
Go to SE 37
Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
Short Text.......
Save...
Next Go to Attributes..
Select Radio button : Remote enabled model
Go to Parameters..
Click Import...
Give Parameter Type Associate type S.t
next Click Export...
Give Parameter Type Associate type S.t
Next Click Tables Button..
Specify tables..
Next click source code button..
Write Source code here..
Eg : Select statements Etc..
Finally we should be select the Radio button Enable remorely
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
Re: User Defined Functions Tutorials
Hope this information is useful to you..
Thanks ,
Satya Kumar.. -
How to disable the AET button on Web UI?
Hi all,
Does anyone know how to disable the AET button in the Web UI? Our customer doesnu2019t want the end users to change any configuration and the only thing left for this is hide/disable the AET functionality.
Thank you very much in advance.
Kind regards,
AlvaroAlvaro,
The AET should not be visible to end users, especially not in the production system.
This should be done by authorisation.
If you are referring to the personalization, you can disable this in the businessrole by selecting a value for the parameter PERSONALIZATION.
If there are no values available, you can maintain them in sm30 --> PERSCV_PROFILE.
Hope this helps.
Regards,
Pieter Rijlaarsdam -
How xpsdrv support user defined paper size
hi,I am developing a xpsdrv,the xpsdrv has inculde some system paper like A4.But I need paper defined by users themself.
so I add
*Option: CUSTOMSIZE
*rcNameID: =USER_DEFINED_SIZE_DISPLAY
*Name: "Custom size"
*MinSize: PAIR(1200, 4800)
*MaxSize: PAIR(32400, 19200)
*MaxPrintableWidth: 32400
*MinLeftMargin: 0
to the gpd file,but after install,no "user defined" button and no "user defined" dialog appear. the "user defined" button or "user defined" dialog should program by myself? how program user defined
paper size in xpsdrv?This printer does not support custom size papers. We need to use only those papers which are available in the drop down for paper size in the software. Open below link to see the list of paper sizes supported by this printer:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02231304&cc=us&lc=en&dlc=en&product=4066377&tmp...
Say "Thanks" by clicking the Kudos Star in the post that helped you.
Please mark the post that solves your problem as "Accepted Solution" -
How to use user-defined packages in JAX-RPC web service
I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
package supercomputer;
import Hello.*;
public class SuperImpl implements SuperIF
public String sendParam(String data)
Temp ob=new Temp();
int i=ob.get1(10000);
return data+"returned by supercomputer";
Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
[echo] Running the supercomputer.SuperClient program....
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
[java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
[java] at supercomputer.SuperClient.main(Unknown Source)
I dont know if it deploys why it gives error on client side.
Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
Please guide me in doing that.
Thanks,
FarrukhFarrukh,
I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
As I already said, I have doubts that your error should be originated from a missing class from your package, but:
-try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
-try to see if you can access your endpoint through your browser to see if there is a online status
-display your config/WSDL file, and the steps you did to build your web service.
regards,
Pedro Salazar. -
How to import user defined class in UIX page?
Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
Thks & Rgds,
Bennywhat you are referring to is not javascript.
it is JSP scriptlets. These are very different.
In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
However, you can run java code from within a UIX event handler; see:
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
event handler code is run before the page is rendered. -
How to disable the cancel button in InputDialogBox?
Can someone please tell me how to disable the cancel button in an input dialog box?
thanks,Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]
-
How to map user-defined fields in XML communication on SRM site
Hi All!
We use the External sourcing scenario and we transfer requirements from ERP in SRM through XI (PurchaseRequestERPSourcingRequest_In)
We should transfer the user-defined fields, but we can not map it in SRM site.
We have enhanced enterprise service in XI, have realized BADI PUR_SE_PRERPSOURCINGRQCO_ASYN on ERP site.
I see the XML message with ours z-fields in tr. SXI_MONITOR (into SRM), but I can not find it in BBP_PDISC.
We try to use BADI BBP_SAPXML1_IN_BADI (there is no method for SC), and BADI /SAPSRM/BD_SOA_MAPPING (z-fields is empty)
Someone can tell how to map user-defined field for SC?
Thanks in advance
Evgeny IlchenkoHello, Julia
We have found solution our problem
We have enhanced standard service in a new enhancement name space and defined own enhancement elements in our namespaces. Then these enhancement elements refered to the SAP standard Enterprise Service.
But In our new interfaces were different XML namespaces
When we have correct an error we could use the next BADI
on ERP site: PUR_SE_PRERPSOURCINGRQCO_ASYN
on SRM site: /SAPSRM/BD_SOA_MAPPING
BR,
Evgeny -
How to create User Defined Variables in Procurement Contract 12.1.3
Hi,
We are using Procurement Contract 12.1.3. As per our business requirement while creating contract template we need to use many variables which are not available in 'System Defined' variable list. Please guide us with some samples (step by step) how to create the 'User defined' variables.
Regards,
PrabhuHi Prabhu,
Did you get the setps how to create user defined variables in Procurement contracts? if so please share me the setp by step flow.
Prakash -
How to alter user defined objects in oracle
Hi all,
Can any one tell me how to alter user defined objects in oracle .
Thanks,
P Prakashprakash wrote:
Hi all,
Can any one tell me how to alter user defined objects in oracle .
DROP
then
CREATE
Handle: prakash
Email: [email protected]
Status Level: Newbie (80)
Registered: Feb 3, 2011
Total Posts: 185
Total Questions: 67 (65 unresolved)
so many questions & so few answers.
How SAD!
Edited by: sb92075 on Sep 22, 2011 9:22 AM
Maybe you are looking for
-
AD Replication issues, SYSVOL / NETLOGON not replicating
Hello Experts! We have a client that recently called us for some assistance. The IT department had a new virtual environment stood up. They Created 3 new VMs and promoted them all to domain controllers. The current domain and forest functional levels
-
I was wondering if there is a way to shut off the install mode on my G3 every time I plug in the USB to my Mac. I have an android manager software Mobile Go that this seems to be preventing it from connecting
-
RTMT alerts for UCM and UCCX:
We have had issues with UCCX agents that were unable to login because the CTI service or Tomcat service is hung. We usually have to restart either CTI or Tomcat on the publisher to correct. Does anyone know of any RTMT alerts that can be setup to
-
Have tried everything to download flashplayer i cannot get it to work with fire fox please help
Can not download flash player fire fox will not let me how do I download it?
-
I'm in a real crunch here. I've cut a music video using clips from movies and other media. All the files in the timeline are 1280x720 as that is how I imported them. I'm ready to export but everytime I export, it's not in HD. It's in 720x480. I'