How to change the text of a button in ALV dynamically?

Hi Gurus,
I have a ALV with a button in the toolbar.Basically i have to change the button text each time the button is pressed.
How can i do this?
PS:points will be awarded

On your alv model, first call if_salv_wd_function_settings~get_function( ID = <your ID> ). This will return you a reference of cl_salv_wd_function. If your function uses a button editor, do the following:
data:
lr_button type ref to CL_SALV_WD_FE_BUTTON,
lr_function type ref to cl_salv_wd_function.
lr_function = l_alv_model->if_salv_wd_function_settings~get_function( ID = <your ID> ).
lr_button ?= lr_function->get_editor( ).
lr_button->set_text( ).
I have not tried this, but it should work.
Regards
Nithya

Similar Messages

  • How to change the text of a button dynamically in module pool

    hi gurus,
    how to change the text of button dynamically

    Hi ,
    Declare a variable in TOP Include with your button name.
    Example : P_BUTTON(20) TYPE C.
    Place button with name P_BUTTON on you screen. Do not forget to mark it as "Output Field". [ Double click on button, Attributes --> Program tab --> tick "Output Field".
    In you PBO / PAI , whereever you want to change your text -
    Assign value to P_BUTTON.
    Example -
    iF COND1..
    P_BUTTON = 'EDIT'.
    ELSEIF COND2.
    P_BUTTON = 'DISPLAY'.
    ENDIF.
    Regards,
    Mohaiyuddin

  • How to change the text color of certain word in dynamic text field

    i know in html css can done by this <td style="red">You
    are now at <span style="yellow">home</span></td>
    .... the "home" word can change to another color .... any one who
    know this can done in flash , please give some advice or example

    look in the help file for 'setTextFormat', which can be
    applied on a whole
    text field or only part of it.
    "adreny" <[email protected]> wrote in
    message
    news:fb0hon$38q$[email protected]..
    >i know in html css can done by this <td
    style="red">You are now at <span
    > style="yellow">home</span></td> .... the
    "home" word can change to another
    > color .... any one who know this can done in flash ,
    please give some
    > advice or
    > example
    >
    >
    >

  • How to change the text of a RadioButton in JDeveloper 11.1.2.0.0

    How to change the text of a RadioButton in JDeveloper 11.1.2.0.0

    Select the radio button, open the property inspector (ctrl+shift+i) select the 'Visual' tab and search for the 'Text' property. There you can change the text.
    Timo

  • HoW to ChaNGE the text in the mobile application to be in MulTi-CoLoR text

    _*  Do anyone can tell me how to change the text in the mobile application to be in multi-color text, to make it more interesting and increase readability?
    Is it using the Graphic's paint() method? or any better suggestion?
    Please give the short example if can?
    Please help... "_"
    Hearing from u all soon...@_@
    thanks....

    Go into outline view. If you can see the outlines of the letterforms, you can't just change the text. If the letterforms are solid black, take the type tool, select the text and type yours.
    Anyway you can just select the letters, take the type tool and type new text.
    Working with the type tool is a basic. Please see the manual for details

  • How to change the text of a user defined field in dynamic selections?

    Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
    Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
    Found an OSS note - 86980 - that tells that this is not possible.
    But when we read the documentation on the user field (CJI3 - dynamic selections  - double click on user field - F1), it shows the following text:
    User-defined field in which you can enter general information with a length of up to 20 characters.
    Dependencies
    The names (key words) for  user-defined fields depend on the field key.
    Now the question is where to change the field key..
    Thanks,
    Ven

    Madhu - you did not get the question I think.
    Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
    Thanks,

  • How to change the text of label dynamically

    Hi all,
    I have done a dynpro program.It requires to implement the dynamically display the label text, for example: there is a label, sometimes, we want to display "Purchase Order" and sometimes we want to display "Sales Order". Can anyone tell me how to change the text of label according to my requirements? thanks in advance!

    Hi Wei,
    AS of now you will not be able to change the Text Field ( Label ) dynamically or at runtime. This is a limitation.Refer to this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
    But, there is a way around.
    You can make a text field Visible / Invisible based on your program logic. So, based on what you want, you can process a module which will take care of that.
    Have a look at these DEMO Code. You can have a good idea to implement the logic.
    DEMO_DYNPRO_MODIFY_SCREEN - Demonstration of Dynamic Screen Modifications
    Thanks,
    Samantak.

  • How to change the text of a field in organisational assignment.

    hi gurus,
    how to change the text of field MSTBR (super visor) to a differnt name in info type pa0001.
    i have changed the field name in cmod , changed name appears in table.but it is not appearing in the info type screen 0001.
    how to resolve this pls help me..

    hi,
    The Field showing in the infotype 1 is FORPR.
    Change the text of this Field in CMOD.
    CMOD ->Go to ->tect Enhancements->keywords-> Change ->FORPR
    Change the text and check again.
    Regards,
    Manoj.

  • How to change the text of customer tab in Me23n

    Hi
    I have added new customer tab in Me23n at item level.
    Its text is Customer Data.
    I would like to change to some other text.
    How to change the text of customer tab in Me23n
    Regards
    Amruta

    Amruta,
    I had the same query today and finally found the answer.
    In order to change the title text or description of the "Customer Data" tab in ME23N, etc. you need to define a new text symbol in program SAPLXM06. The text symbol must be number 111 for the PO data. Make sure you define this text symbol in the language you are using when viewing the PO. I had issues with this as the original language of object SAPXM06 is not my logon language.
    The standard code which picks up this text is in function module MEGUI_BUILD_PO_ITEM_PLUGIN. I could not find any documentation around this functionality.
    Hope this helps!
    Ben

  • How to change the text under RECORD WORKING TIME IN ESS.

    Hi,
    How to change the text under RECORD WORKING TIME in ESS.
    Is there any setting at page or iview level?
    Please help me.
    Regards,
    Thirun.

    Hi,
    If it is standard business package ,then check home page framework
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0e3a488-cdc2-2b10-209b-e01a0ed934b4
    Regards
    Koti Reddy

  • How to change the text Transport id code in sus

    Hi,
    How to change the text Transport id code in sus while creating ASN
    Please advise.
    Regards,
    manu

    SE80---> BSP APPLICATION with SRMSUS ---> views -->asn > detail_edit.inc.->
    On the right hand side in the details ---> search for
    BBP_SUS_UI/ASN_TRANSPORT_IDENTIFICATION
    replace the above with the following
    BBP_SUS_UI/INVOICE_DOCUMENT_NUMBER
    BBP_SUS_UI/INVOICE.
    there is no entry available for invoice number , only the above two are available.
    save the changes
    activate the changes
    REWARD POINTS IF USEFULL

  • How do change the text color in the variable screen ?

    Hi Experts ,
    I would like to know about , How do change the text color in the variable screen ?
    Using web templates (Analytical) can get the output. It has the variable screen contains 6 fields (Company code, Country , Region , COB, Plant and Purchasing Group). I want to make RED color text on Plant. Please help me .
    Thank you ,
    Prasad.

    Hi,
    I am looking for nearly the same. What I have found is that it seems to manipulate the SAP theme that is used in standard when template is executed in the portal. Just display the source code of the HTML and there you will see the included SAP theme (normally SAP_TRADESHOW). Then you have to go to the SAP portal and change this stuff. But for that you have to know where to find it and what impact this change has.
    I am not pretty sure if this is the right way. But as I want to change the standard layout of a whole template to a customer specific layout I think there is no other way in BI7.0.
    Regards,
    Peter

  • How to change the font of variables in smart forms dynamicly

    Dear all,
    Is there any suggestion of how to change the font of variables in smart forms dynamicly?
    Thanks in advance.

    Hi,
    You cant change the font dynamically but tell me the scenario I will try to give the solution.
    Regards,
    Nageswar

  • How to change the text of the standard ALV button?

    Hallo everybody,
    WebDynpro ALV has its own buttons e.g. Export,   Is it possible to change the text "Export" as own text 'SaveInExcel' ?
    Many thanks,
    Meer

    Answer  to this question:
    Wenn der Typ des Oberflächenelements in der Toolbar oder seine Beschriftung vom Standard abweichen sollen, lassen Sie zwar die ALV-Standardfunktion zu, blenden jedoch das zugehörige Oberflächenelement aus. Stattdessen erzeugen Sie eine selbstdefinierte Funktion und weisen ihr die gewünschte ALV-Standardfunktion zu.
    Folgende Oberflächenelemente für ALV-Standardfunktionen können Sie auf diese Weise ersetzen:
    ●      Dropdown-Listbox Senden sowie die einzelnen Einträge der Dropdown-Listbox
    ●      Dropdown-Listbox Anzeigen als sowie die einzelnen Einträge der Dropdown-Listbox
    ●      Drucktasten Zeile einfügen, Zeile anhängen und  Zeile löschen
    ●      Drucktaste Prüfen
    ●      Drucktaste Rückgängig
    ●      Drucktasten Excel und Druckversion
    ●      Drucktaste Filter sowie die Einzelfunktionen Filter definieren und Filter löschen
    ●      Drucktaste Einstellungen  sowie die Einzelfunktionen Dialogfenster Einstellungen öffnen und Dialogfenster Einstellungen schließen
    ●      Dropdown-Listbox Sichten
    Um einer selbstdefinierten Funktion eine ALV-Standardfunktion zuzuweisen, verwenden Sie Methoden der Klasse CL_SALV_WD_FUNCTION.
    sap help

  • Change the text of a button in a form on the fly

    Hi all,
    I have a form that it is called from another form or from a report. I would like to change the text of the Update and Save buttons on the fly depending on who called it. For instance, if this form is called from the form I would like the Update button to say: "Save & Next", however if it is called from the report the button should say: "Save & Back to Report".
    How could I accomplish this if it is possible.
    Thanks

    I've got the problem fixed. For any of you that would like to know the solution is this. I added the following javascript at the end of an unstructured UI template where I have the form:
    <script language="JavaScript1.1">
    var inURL = false;
    for (i = 0; i < document.all.length; i++) {
         if (document.all.name != null) {
         if (document.all[i].name.indexOf("BACK_URL") > 0) {
                   if (document.all[i].value != '') {
                        inURL = true;
              else {
                   if (inURL) {
                        if (document.all[i].name != null) {
                             if (document.all[i].name.indexOf(".UPDATE") > 0 || document.all[i].name.indexOf(".SAVE") > 0) {
                                  var doc = document.all[i];
                                  doc.value = "Save & Back to Report";
    </script>
    The script works in IE 6+, I don't know if it works in any other browser, I haven't test it and I don't think I will.
    I hope this could help somebody

Maybe you are looking for

  • Why does my iphone 4 keep saying it needs to be restored

    My iphone keeps saying that it needs to be restored sometimes it will work for a hour or a week but continuely needs to be plugged into itunes any solutions or helpful advice?

  • In house prod. time for continuous manufacturing

    Hello friends, I want to enter in house production time in matarial master for continuous manufacturing process.I am using Base Unit Of Measure "Quintal".It is not possible to calculate In house production time. So how can I define it? Thanks!!

  • Database Valut

    Hi, I have few questions regarding database vault. Please see if anyone can help me in these. 1-What are the logging dynamics? 2-Does it support IP based filtration with multiple IPs? 3-Does it support SINGLE ROW/COLUMN reporting on query against Rul

  • What external raid devices can I use on my Non-Thunderbolt Macbook pro (Mid 2009)?

    I'm looking for the best external Raid drive options for my non-thunderbolt port 2009 Macbook Pro.  I only require 2Tb total storage (prefer RAID 1 so it'll be 2x2tb drives, removeable).  Can I still use a thunderbolt drive or would I be wasting my $

  • Cannot install Arch

    Hello, after clearing out all the partitions on my harddrive today, I installed windows XP pro as usuall, and when I installed arch, everything went fine until I was going to configure the arch, Neither rc.conf or any other files existed on the file