How to set button which is not in my application?
hi all,
i m new to web dynpro.i have to set the radiobutton like this my button ll be not visible if one other application through i m calling.if directly i am calling it should be visible.
can u help me how to proceed?
thanks,
tania
Hi...
If I am getting your problem right then your requirement is ...
1) It should be visible if it call from your application
2) It should not visible if it call from different application.
There is two different way to do this.
a) you can have a flag.
b) Change the flag true or false ( or value 01 or 02)id its call from different application
c) Attached that context attributes with the visible property of the radio button.
2nd way
i) You can have a flag to identify, where from it is calling
ii) Now depending upon the flag dynamically you set the visible property of the radio button.
iii) Write the code at WDDOMODIFYVIEW method
iv) Here is some code for example
data: rb1 TYPE REF TO CL_WD_RADIOBUTTON,
rb2 TYPE REF TO CL_WD_RADIOBUTTON.
rb1 ?= view->get_element( 'RADIOBUTTON' ).
rb2 ?= view->get_element( 'RADIOBUTTON_1' ).
get single attribute
lo_el_fg->get_attribute(
EXPORTING
name = `FLAG`
IMPORTING
value = lv_flag ).
IF lv_flag eq 'TRUE'.
rb1->set_visible( 02 ).
rb2->set_visible( 02 ).
ELSEIF lv_flag eq 'FALSE'.
rb1->set_visible( 01 ).
rb2->set_visible( 01 ).
ENDIF.
Please let me know if you need any help on this..
Regards
Satrajit
Similar Messages
-
Hi,
I created a form and when I submit, it goes through but there is no "success" or "failure" message on Apex. I tried debugging it and got this message:
"Page contains page items/buttons which are not assigned to a region!"
I looked at the page definition and it seems like everything is assigned to a region. Much appreciate your help.
Thanks!For your message, the relevant branch needs "include process success message" to be checked - and a value in success/failure in your process.
Check the submitting & landing page for items not in a region. Under the items section there may be items listed separate to those under specific regions.
It's possible these are related, but not guaranteed. -
In Yosemite this no longer works, has anyone figured this out? How to set a custom default umask for all applications?
I've tried everything to get a custom umask set for all apps. It just seems impossible...
Is there a replacement for launchd-user.conf?Please file a bug report: https://bugreport.apple.com
I am sure this is something that got lost, like environment variables, in the Yosemite/iOS merger. -
How to add button in reuse_alv not in gui status
hi guys,
my question how can i add button to reuse_alv not in gui_status or pf_status ? and also i have an internal table which contains a checkbox field when user select one or more check box and push button , new table will be sended to batch input program.how can i do add button part, the rest of it is done.?Hi,The following sample report ZUS_SDN_ALV_BUTTON_CLICK_LTXT shows a possible way how to handle the BUTTON_CLICK event in order to retrieve a longtext for a ALV entry. Please note that for the sake of simplicity I have choosen an obsolete function module for text editing (only enter numerical values otherwise the function module crashes).
*& Report ZUS_SDN_ALV_BUTTON_CLICK_LTXT
*& Screen '0100' contains no elements.
*& ok_code -> assigned to GD_OKCODE
*& Flow logic:
* PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
* PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
*& PURPOSE: Demonstrate event BUTTON_CLICK for entering long text
REPORT zus_sdn_alv_button_click_ltxt.
TYPE-POOLS: icon.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1.
TYPES: button TYPE iconname.
TYPES: line TYPE bapi_line.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fcat TYPE lvc_t_fcat,
gt_variant TYPE disvariant,
gs_layout TYPE lvc_s_layo.
DATA:
gs_outtab TYPE ty_s_outtab,
gt_outtab TYPE ty_t_outtab.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
IMPORTING
es_col_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_button_click.
* define local data
DATA:
ld_answer(1) TYPE c,
ls_outtab TYPE ty_s_outtab.
CHECK ( sender = go_grid ).
READ TABLE gt_outtab INTO ls_outtab INDEX es_row_no-row_id.
" Note: This function module is obsolete and crashes if
" non-numerical values are entered. Choose a more
" appropriate way of entering the longtext.
CALL FUNCTION 'POPUP_TO_GET_VALUE'
EXPORTING
fieldname = 'LINE'
tabname = 'BAPITGB'
titel = 'Enter Longtext'
valuein = ls_outtab-line
IMPORTING
answer = ld_answer
valueout = ls_outtab-line
EXCEPTIONS
fieldname_not_found = 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.
IF ( ld_answer NE 'C' ). " 'C' = cancel
MODIFY gt_outtab FROM ls_outtab INDEX es_row_no-row_id
TRANSPORTING line.
ENDIF.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'REFRESH' ).
ENDMETHOD. "handle_button_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1
INTO CORRESPONDING FIELDS OF TABLE gt_outtab
WHERE bukrs = '1000'.
CLEAR: gs_outtab.
gs_outtab-button = icon_change_text.
MODIFY gt_outtab FROM gs_outtab
TRANSPORTING button LINE
where ( bukrs NE space ). " modify all lines
PERFORM build_fieldcatalog.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grids
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER: lcl_eventhandler=>handle_button_click FOR go_grid.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
CALL METHOD go_grid->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
* EXCEPTIONS
* FINISHED = 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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* Refresh -> pass PAI and PBO where flushing occurs
WHEN 'REFRESH'.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat,
lt_fcat TYPE lvc_t_fcat.
REFRESH: gt_fcat.
CLEAR: lt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'KNB1'
CHANGING
ct_fieldcat = lt_fcat
EXCEPTIONS
OTHERS = 99.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF lt_fcat TO gt_fcat.
CLEAR: lt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'BAPITGB'
CHANGING
ct_fieldcat = lt_fcat
EXCEPTIONS
OTHERS = 99.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_fcat INTO ls_fcat
WITH KEY fieldname = 'LINE'.
IF ( syst-subrc = 0 ).
INSERT ls_fcat INTO gt_fcat INDEX 4.
ENDIF.
CLEAR: lt_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ICON'
CHANGING
ct_fieldcat = lt_fcat
EXCEPTIONS
OTHERS = 99.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_fcat INTO ls_fcat
WITH KEY fieldname = 'NAME'.
IF ( syst-subrc = 0 ).
ls_fcat-fieldname = 'BUTTON'.
ls_fcat-style = cl_gui_alv_grid=>mc_style_button.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG[/code]
Reward If Found Useful. -
How to set button validation false
Hi,
Actually I am working on a seeded page.In that page there is one button next,and whenever i click that button some validation is happening i.e some warning
message is coming through VORow impl.I just want to remove that validationt through extended controller.Can u please give me some solution.PLs its urgent.Atanu,
I have observed that you are closing your threads once they are answered. But not mentioning which reply is helpful or correct.
As per Forums Etiquette / Reward Points - "- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).".
Refer http://forums.oracle.com/forums/ann.jspa?annID=914 for Forums Etiquette / Reward Points.
Forum participants are spending time on your question and trying to help you as much as they can. Kindly take some time of yours and mention which reply is helpful or correct.
Mentioning helpful or correct is not only for reward points but when other users refer the thread they can directly use the "Correct" or "Helpful" reply. Which in turn save time of the participants who are posting questions and replying threads.
Following are your threads which have no correct or helpful answers mentioned.
How to align items in default single column
How to enable row level exception in VO
How to handle browser close event and session timeout
How to set particular segment value of key flex field in Controller
Problem In Displaying records in table
View Object attributes are not setting
Lets make forums helpful to all.
regards,
Anand
Edited by: T.A.Anand on 17 Sep, 2010 2:56 PM -
How to create Button which size is calculated from its text ?
I think JButton works like this: either in constructor or by setText() method the text is set and according the lenght, font and fontRendererContext preffered size is calculated before the layout manager ask for the prefferedSize for first time.
I want to override paint() method because i want to draw my own text(and the only way i discovered how to force button not to paint text is to set text to
null or empty String). I want the button to be as long as length of text plus insets.
But layout manager ask for preffered size before paint method is invoked but i find out what size should be in paint method because i need graphics
parameter to get FontRendererContext from it. So layout manager shrink button to minimum because first time the preffered size calculated from null or
empty String is returned.
public class MyButton extends JButton {
public MyButton() {
this.setText(null); //or setText("");
this.setContentAreaFilled(false);
this.setFocusPainted(false);
this.setBorderPainted(false);
////already here i need to know what the size should be
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
TextLayout textLayout = new TextLayout("MyButton", this.getFont(), g2.getFontRenderContext());
Rectangle2D boundsOfText = textLayout.getBounds(); /////////here i find out what size should be
this.prefferedSize = new Dimension((int)boundsOfText.getWidth()+10,(int) boundsOfText.getHeight()+10);
g2.setColor(Color.WHITE);
g2.fillRoundRect(1, 1,(int)getPreferredSize().getWidth(),(int) getPreferredSize().getHeight(), 10, 10);
g2.setColor(Color.BLACK);
g2.drawRoundRect(1, 1,(int)getPreferredSize().getWidth(),(int)getPreferredSize().getHeight(), 10, 10);
g2.drawString("MyButton", 7, (int)boundsOfText.getHeight() + 6);
g2.dispose();
}So how can i do that? How can JButton know prefferedSize before its paint method is invoked?The previous example was simplified.
public class MyButton0 extends JButton {
private String myText;
public MyButton0(String text) {
this.myText = "Button";
//this.myText = text.toUpperCase();
this.setFont(new Font("SansSerif", Font.PLAIN, 13));
setContentAreaFilled(false);
setBorderPainted(false);
setFocusPainted(false);
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
//backround painting
GradientPaint background = new GradientPaint(0, 0, new Color(255, 255, 255), 0, getPreferredSize().height / 2, new Color(0, 0, 0), true);
if(getModel().isRollover()){
background = new GradientPaint(0, 0, new Color(255, 255, 255), getPreferredSize().width , getPreferredSize().height , new Color(0, 0, 0), true);
if(getModel().isPressed()){
background = new GradientPaint(0, 0, new Color(255, 255, 255), 0, getPreferredSize().height / 2, new Color(210, 210, 210), true);
g2.setPaint(background);
g2.fillRoundRect(1, 1, getPreferredSize().width - 3 , getPreferredSize().height - 3, 10, 10);
//Border painting
g2.setColor(new Color(255, 255, 255));
g2.setStroke(new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 10.0f));
g2.draw(new RoundRectangle2D.Double(1, 1, getPreferredSize().width - 3, getPreferredSize().height - 3, 10, 10));
//text paiting
g2.setFont(getFont());
TextLayout tl = new TextLayout(this.myText, getFont(), g2.getFontRenderContext());
int startPositionOfText = getPreferredSize().width - (int) tl.getBounds().getWidth();
startPositionOfText = startPositionOfText / 2;
g2.setColor(new Color(255, 255, 255));
g2.drawString(this.myText, startPositionOfText -2, getHeight() / 2 + 5);
g2.dispose();
@Override
public Dimension getPreferredSize() {
return new Dimension(133, 31);
}Assume text is so long as doesn't fit inside button. I have hard-set preffered size but i would like to calculate preffered size from text lenght.
Or i need calculate startPosition of text to center it. But i don't want have preffered size hard-set. -
I am using windows authentication in my web application.
My requirement is to implement a sign out button which will sign out the user without having him to close the browser and application should not ask him to login again.
I tried following two options:
1. Redirecting the user to default signout.aspx page " /_layouts/15/SignOut.aspx "
2. Using "Sign In as a different user" URL " /_layouts/15/closeConnection.aspx?loginasanotheruser=true "
In first case, user is redirected to default sign out page but he can press "Go Back to Site" link to revisit the site. Another major issue is that the user has to close the browser to sign out from the application completely, which is not desirable
in my project requirement.
In second case, the the current user is signed out of the application but if the user has saved the password in browser, he gets signed in automatically to the application.
I also came across the solution where we replace the default sign out page with a custom sign out page, but I am not sure whether it can be implemented using JavaScript Client Object Model of SharePoint.Hi
I'm basically looking for the exact answer for the query.
Meanwhile you need to go through the link mentioned below in order to understand how to do it.
Debugging and Logging Capabilities in SharePoint 2010
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
How to set role which can issue only one command
I am thinking about setting role, which will be allowed to issue olny one command. I have created role test. Which has the following entries in the following files:
/etc/user_attr
test::::profiles=OneCommand;type=role
/etc/security/exec_attr
OneCommand:solaris:cmd:::/tmp/data.sh:euid=0
After this I sill could issue all comands, not only test command /tmp/data.sh.
When I issued comand profiles on test role I received the following:
bash-3.00$ profiles test
OneCommand
Basic Solaris User
All
So I commented line in the /etc/policy.conf to read:
#PROFS_GRANTED=Basic Solaris User
After that, when I try to issue /tmp/data.sh command as a test role I receive the following error:
$ /tmp/data.sh
pfexec: Exec format error
Does anybody know how to set up the role which can issue only one command ? Maybe there is a way to do this in the way which wil not affect another roles (ie, not to touch /etc/policy.conf).
Best regardsRadekW wrote:
I am thinking about setting role, which will be allowed to issue olny one command. I have created role test. Which has the following entries in the following files:They will need the ability to run at least a profile shell otherwise all bets are off. So now you're down to two commands. :-)
bash-3.00$ profiles test
OneCommand
Basic Solaris User
AllFirst you need to define what already exists by default. (policy.conf)
Then you get to change those defaults or create a new default list just for test.
Then you get to add a role or profile for test that allows the execution of a profile shell and one command.
Then you should test all of the user accounts to ensure that something didn't break. This step might be a little overkill.
alan -
How to find documents which are not linked to a project?
Hi all,
i'm just looking for a variant to search for documents which are not linked to a project within ta SOLAR_EVAL.
I need a way to report how much documents are not linked to a project; just stored in KW.
Can anyone give a hint?
Thanks a lot!
JanHi Jan,
This report SOLMAN_UNUSED_DOCUMENTS will help you identify the documents which are not linked to the project.
(OR) Use Tcode: SI80 to find any document in SAP Solution Manager KW.
Regards,
Sanjai -
How to find aggregates which are not used.
Hi ,
There are lot of aggregates in my system , so i should deactivate the aggregates which are not used from long back. so how to find out all those , can u plz guide me ,You can also check the usage column of the aggregates. If usage value is high then the aggregate is used very frequently.
If there is no value at the last used then the aggreagete is not used at all.
Hope it helps
Regards
Sadeesh -
How to find photos which have not been updated to the current Process Version?
How can I search and/or filter to find photos which have not been updated to the current Process Version? I would like to get a list of the photos rather than going through them one by one and looking for the lightening bolt.
Thank you! As my memory fades, it is good to know that my memory is backed up with you and others on this forum!
-
How to set button INVISIBLE in standard component FITV_POWL_ASSISTANT
Hi Team,
My requirement is to set buttons INVISIBLE of standard component. I have enhanced component and view. But i am not able to set the button to invisible. properties of the UI elements are in read only mode.
Can some one suggest me.
Thanks & Regards,
Sankar GeliviHi Sankar,
You can do it as below
Approach1:
Enhance the view , use, post exit of WDDOMODIFYVIEW( ) and set the visible property of button as below
lo_btn->set_visible( cl_wd_button=>e_visible-none ).
Aproach2:
Enhance the view
Go to the button ( ui element tree ) and right click and chose the "Remove Element" as below
Note: you can undo the element deletion if required
Approach3:
use the personalization/customization either by using admin mode or application configuration.
Hope this helps you.
Regards,
Rama -
How to set my MacPro to not go to sleep
I am running Euphonix MC control. They recommend:
It is recommended that you do not set your EuCon workstation(s) to Sleep.
We recommend setting your Mac to not go to sleep and never put hard drives to sleep."Energy Saver" system preference.
-
How to find topics which are not assigned to a map ID
Perhaps I am missing something very obvious in the Edit Map IDs window, but I can't find a way to easily identify topics which have not been given a Map ID.
Initially, I selected all topics and used the auto map option for the project map file, but I am constantly adding topics and don't always remember to go straight in and assign an ID at the time of creation.
Can somebody point me in the right direction?
Thanks!
ChloeHi Chloe. You can't get that from the mapids dialog but you can by running the Topic Properties report with the mapid option turned on.
Read the RoboColum(n). -
How to push apps which are not available in the App Store?
Hi :-)
I've got one question: I would like to push apps via profile manager to different devices, which are not available in the App Store, so I can not buy them via VPP.
Example: TeamViewer for OS X.You can't. Use something like Apple Remote Desktop.
Maybe you are looking for
-
Field catalog in alv with classes(OOPS)
please refer the code below of field catalog prepared. this code is for preparing field catalog using ALV and OOPS.In the below field catalog, do_sum is not working.it is going to dump. FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
-
Can't import Quick time into FCE
I converted some images from I photo into a QT movie but I'm unable to import into FCE. I'm using a G5 with OS 10.4.8, FCE 3.5.1, QT 7.1.3, and IPhoto 6.0.5. Everytime I attempt to import I get this message.... file error: 1file(s) recognized, 0 acce
-
How to edit or remove IE favorites?
Perhaps this is a silly on, but I really do not know how to edit or remove favorites of the browser?
-
SQLLDR - Filler column has length 4000
Hi All, This is a continuation of below threa, which is already marked as answered. Re: sqlldr - filler columns exceeds maximum length DB version : 10.2.0.1.0 We are getting a CSV file with 127 fields. We require to load first 9 fields and the 127th
-
Upgradation of Lenovo S868t smartphone
Hello, I'd like to upgrade my Lenovo S868t smartphone which is in Ice cream sandwitch (4.0.3). I'd like to upgrade into Jelly bean (4.1). Would you please tell what I should do? Thanks Solved! Go to Solution.