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

Similar Messages

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

  • Want to change the text of a coloumn dynamically in module pool program

    Hi to all experts,
    I need to change the text in a table control( of a column)of a module pool program dynamically ....depending on the company cod e.

    Hi,
    In program depends on the condition you can access the table_control-cols-name and modify it accordingly.
    Eg:
    CONTROLS TABLE_CONTROL TYPE TABLEVIEW USING SCREEN 100.
    you can access the control like:
    TABLE_CONTROL-COLS[1]-SCREEN-NAME
    and modify the same dynamicaly
    cheers
    shibu

  • 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

  • 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 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

  • Migrating and Backing up Schemas (complex database structures)

    Hey guys, I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around. We have bunch of config tables that drive how systems on our platform run, and when setting up

  • How can I look at old labview Vis and tell what version they were written with?

    Someone gave me some code from about 1998/99...need to determine what version it was writtern in and if I can run the same vi with labview 8.0?

  • How to sync iPhone's Facebook integrated contacts to Address Book (Mac)?

    Hello Apple Support Communities! I have a question regarding the Facebook integrated contact entries in iOS6. Is there any way of syncing them onto the Mac's "Address Book" or iCloud? Seeing as how they contained a lot of information, I copied all th

  • ASAP doccuments for SAP BW Implimentation

    Hi,All!            I am new to the job.pls send the SAP BW I mplementation doccuments to the mail ID give3n below.     Mail ID : [email protected]   Thanks & Regards       Sneha.

  • Working with keyCode

    Hi Folks, I am trying to limit the user to enter special characters in an input field. I created a clientListener as below but the problem is that from 1 to 9 when the shift is pressed in being accept. Does anybody know how to solve it? The isShiftPr