How to clear the text in the Text Editor

Hi all,
I created a Text editor and also i am having language field in the screen.
whenever i change the language auomatically the text has to change when the text exists for that
language.
this is working fine, but when the Text exist , the text editor should be blank.
But it is carrying the Previous editor text itself into it .
How to clear the text in the Editor.
Regards,
Madhavi

Hello Madhavi
The simple report ZUS_SDN_TEXTEDIT_CONTROL shows how to switch the texteditor contents when changing the language.
*& Report  ZUS_SDN_TEXTEDIT_CONTROL
*& Thread: how to clear the text in the Text Editor
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145272"></a>
*& By default the itab GT_OUTTAB contains texts in DE and EN.
*& To switch the language directly enter into the command window:
*& LANGU=DE, LANGU=EN or LANGU=FR
REPORT  zus_sdn_textedit_control.
TYPE-POOLS: abap.
TYPES: ty_t_text     TYPE TABLE OF as4text
                     WITH DEFAULT KEY.
TYPES: BEGIN OF ty_s_outtab.
TYPES: language TYPE spras.
TYPES: text     TYPE ty_t_text.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                      WITH DEFAULT KEY.
DATA: gt_outtab       TYPE ty_t_outtab,
      gs_outtab       TYPE ty_s_outtab.
DATA: gd_language     TYPE spras.
DATA: go_docking      TYPE REF TO cl_gui_docking_container,
      go_textedit     TYPE REF TO cl_gui_textedit.
DATA: gd_okcode       TYPE ui_func,
      gd_repid        TYPE syst-repid.
START-OF-SELECTION.
  PERFORM fill_texts.
  gd_language = syst-langu.
  PERFORM init_controls.
* 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 NE 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  PERFORM set_text_editor.
* NOTE: dynpro does not contain any elements
  "       ok-code => GD_OKCODE
  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'.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
*       text
MODULE user_command_0100 INPUT.
  TRANSLATE gd_okcode TO UPPER CASE.
  CASE gd_okcode.
    WHEN 'BACK'  OR
         'EXIT'  OR
         'CANC'.
      SET SCREEN 0. LEAVE SCREEN.
    WHEN 'LANGU=DE' OR
         'LANGU=EN' OR
         'LANGU=FR'.
      PERFORM get_text_editor.
      SPLIT gd_okcode AT '=' INTO gd_okcode gd_language.
      PERFORM set_text_editor.
    WHEN OTHERS.
  ENDCASE.
  CLEAR: gd_okcode.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Form  FILL_TEXTS
*       text
*  -->  p1        text
*  <--  p2        text
FORM fill_texts .
* define local data
  DATA: ld_string   TYPE string.
  gs_outtab-language = 'EN'. REFRESH: gs_outtab-text.
  ld_string = 'Good morning'.
  APPEND ld_string TO gs_outtab-text.
  APPEND gs_outtab TO gt_outtab.
  gs_outtab-language = 'DE'. REFRESH: gs_outtab-text.
  ld_string = 'Guten Morgen'.
  APPEND ld_string TO gs_outtab-text.
  APPEND gs_outtab TO gt_outtab.
  gs_outtab-language = 'FR'. REFRESH: gs_outtab-text.
  ld_string = space.
  APPEND ld_string TO gs_outtab-text.
  APPEND gs_outtab TO gt_outtab.
ENDFORM.                    " FILL_TEXTS
*&      Form  INIT_CONTROLS
*       text
*  -->  p1        text
*  <--  p2        text
FORM init_controls .
  CREATE OBJECT go_docking
    EXPORTING
      parent                      = cl_gui_container=>screen0
*      repid                       =
*      dynnr                       =
*      side                        = dock_at_left
*      extension                   = 50
*      style                       =
*      lifetime                    = lifetime_default
*      caption                     =
*      metric                      = 0
      ratio                       = 90
*      no_autodef_progid_dynnr     =
*      name                        =
    EXCEPTIONS
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      lifetime_dynpro_dynpro_link = 5
      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 OBJECT go_textedit
    EXPORTING
*      max_number_chars       =
*      style                  = 0
*      wordwrap_mode          = wordwrap_at_windowborder
*      wordwrap_position      = -1
*      wordwrap_to_linebreak_mode = false
*      filedrop_mode          = dropfile_event_off
      parent                 = go_docking
*      lifetime               =
*      name                   =
    EXCEPTIONS
      error_cntl_create      = 1
      error_cntl_init        = 2
      error_cntl_link        = 3
      error_dp_create        = 4
      gui_type_not_supported = 5
      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.
ENDFORM.                    " INIT_CONTROLS
*&      Form  SET_TEXT_EDITOR
*       text
*  -->  p1        text
*  <--  p2        text
FORM set_text_editor .
  BREAK-POINT.
  CLEAR: gs_outtab.
  READ TABLE gt_outtab INTO gs_outtab
       WITH KEY language = gd_language.
  CALL METHOD go_textedit->set_text_as_stream
    EXPORTING
      text            = gs_outtab-text
    EXCEPTIONS
      error_dp        = 1
      error_dp_create = 2
      OTHERS          = 3.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " SET_TEXT_EDITOR
*&      Form  GET_TEXT_EDITOR
*       text
*  -->  p1        text
*  <--  p2        text
FORM get_text_editor .
  CLEAR: gs_outtab.
  CALL METHOD go_textedit->get_text_as_stream
    EXPORTING
      only_when_modified     = cl_gui_textedit=>true
    IMPORTING
      text                   = gs_outtab-text
*      is_modified            =
    EXCEPTIONS
      error_dp               = 1
      error_cntl_call_method = 2
      OTHERS                 = 3.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  MODIFY gt_outtab FROM gs_outtab
    TRANSPORTING text
    WHERE ( language = gd_language ).
ENDFORM.                    " GET_TEXT_EDITOR
Regards
  Uwe

Similar Messages

  • I want to know how to clear the text area by the push off my next question button and ask a new ques

    I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
    heres my code so far
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">
        <fx:Script>
            <![CDATA[
                protected function button1_clickHandler(event:MouseEvent):void
                    //convert text area into labelid to be identified by actionscript
                    richTextLabel.text = myArea.text;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <!--container 1-->
        <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
            <!--data Entry control-->
            <s:TextArea id="myArea" width="153" height="68"/>
            <!--end of data entry control-->
            <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        <!--container2-->
        <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
    <!--data entry control-->
            <!--convert tne data entry control into a label id in actionscript-->
            <s:Label id="richTextLabel" width="153" height="68"/>
            <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        </s:Application>

    This is a user to user support forum.  We are all iphone users just like you.
    You are not addressing Apple here at all.
    This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
    "it's too fragile"
    No it is not.  i have never damaged one, nor has anyone I know.
    " U loose data when Ur phone is locked"
    No you don't.  Why do you think this?
    "and there is no customer support!!!  "
    Wrong yet again.  Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
    "but I will go back with Blackberry "
    Please do.
    Good ridance

  • How to clear Autocomplete text in Jquery.

    Hi All,
    I have implemented a Autocomplete text item using jquery.Every thing looks fine, but when we clear the country the corresponding state should be cleared.
    Here is the code, can any body hep me out where and how to clear the values.
    <script type="text/javascript">
    $( function() {
        $("#P16_ENG_CTRY").autocomplete({
            source : function( request , response) {
                            data = getCountry(request.term);
                            response( data );
            focus  : function(event , ui){
                        event.preventDefault();
    function getCountry(key)
       document.getElementById('P16_ENG_CTRY')=='';
       var ajaxRequest = new htmldb_Get( null , '&APP_ID.' , 'APPLICATION_PROCESS=GET_COUNTRY' , 0);
       ajaxRequest.add( 'G_MX01' , key);
       ajaxResult = ajaxRequest.get();
       return ((ajaxResult.length>0)? ajaxResult.split( '~' ):null);
    $( function() {
        $("#P16_ENG_STATE").autocomplete({
            source : function( request , response) {
                            data = getStateJ(request.term);
                            response( data );
            focus  : function(event , ui){
                        event.preventDefault();
    function getStateJ(key)
    document.getElementById('P16_ENG_STATE')=='';
          var ajaxRequest = new htmldb_Get( null , '&APP_ID.' , 'APPLICATION_PROCESS=GET_JSTATE' , 0);
              ajaxRequest.add('G_MX01',document.getElementById('P16_ENG_CTRY').value);       
              ajaxRequest.add( 'G_MX03' , key);
              ajaxResult = ajaxRequest.get();
       return ((ajaxResult.length>0)? ajaxResult.split( '~' ):null);
    $( function() {
        $("#P16_ENG_CITY").autocomplete({
            source : function( request , response) {
                            data = getCityJ(request.term);
                            response( data );
            focus  : function(event , ui){
                        event.preventDefault();
    });Thanks,
    Anoo..

    Thanks VC for a quick turn around, i have made changes like this which wroks fine but when i click the event outside then it is clearing the list fo state.
    Is it possible to clear when i had tried to remove the country manually the sate should clear at at time insted of click the event.
    <script type="text/javascript">
    $( function() {
        $("#P16_ENG_CTRY").autocomplete({     
            source : function( request , response) {
                            data = getCountry(request.term);
                            response( data );
            focus  : function(event , ui){
                        event.preventDefault();
            change : function(event,ui) {
                     if ($('P16_ENG_CTRY').val()==null || $('P16_ENG_CTRY').val()==""){
                  $("#P16_ENG_STATE").val('');}}  
    Thanks,
    Anoo..

  • How to clear the location history in reminder?

    heyy guys. serious talk here. please please and please help me to figure this out. how to clear the location that had i been used in reminder? i've search from day to day. but there aren't answer yet. grr

    delete single message or delete entire thread?
    Single message: open messages, then open the thread, then press and hold on the message that you want to delete.
    Entire thread: Open messages, then press and hold on the thread you want to delete.
    When you go through text message and you click on button to bring up Roller Top Chain contacts, there is couple choices (groups, contacts, favorites & logs) you can choose. Under logs, how to you delete the information in logs section????? It appears to only go back a few days, but can't find option to erase logs. If you check box it just adds that person to your send to Sushi Chains. I also tried deleting history for phone calls, but its still there. Any help would be great!!!

  • How to clear the alertlog and trace file?

    since the database was created,the log and trace file have't been cleared.how to clear the alertlog and trace file?3tx!!

    Hi Friend.
    You can eliminate all the files ".TRC" (trace files) to purify the directory BDUMP. These are not necessary files in order that the Oracle Server works.
    The file Alert.log is a file that the Oracle Server can recreate if you eliminate it. When Oracle Server's process realizes certain action (for example ARCH), Oracle creates again the file (if it does not exist), or it adds text (if it exists) with the new income.
    It can happen, that appears some Bug if the file Alert.log does not exist. Though this is slightly possible.
    Anyhow I recommend to you in UNIX to use from the prompt: $> filename in order to take the size of the file to 0 bytes, without need to eliminate it. Is the same thing when you want to purify the listener.log, the sqlnet.log or the sbtio.log.
    I wait for my commentaries you be of great help.
    Bye Friend...

  • How to clear the open documents in case if document currency and local curr

    Hi,
        Can anyboday advise how to clear the open document of a particular vendor for a particular company code. Here the issue is that balace is netted to Zero in the document currency but not in the local currency. The document was posted in Currency CAD and the local currency is GBP.
    When i check the FBL1N, there is it showing net balance is ZERO, but document is still in open
    status. I tried using Transaction code F-44, but it is not allowing me.
    Can anyboday advise how to perform this. Points will be awarded.
    Regards,
    Sree.

    Hi,
    In the Company code global parameters(OBY6),select the check box "NO FOREX RATE DIFF.WHEN CLEARING IN LC"
    and try clearing again.(You can have a F1 help on the check box to see what exactly it is).
    Hope this will resolve
    Assign points if useful
    Thanks
    Aravind
    Edited by: Aravind Aitipamula on May 22, 2008 1:36 AM

  • How to clear the rows in a jTable

    Can anyone tell me how to clear the contents of all the rows in a jTable?

    This is how I did. Posting the same.
    jTable1.selectAll();
    int[] array = jTable1.getSelectedRows();
    for(int i=array.length-1;i>=0;i--)
    DefaultTableModel model = (DefaultTableModel)jTable1.getModel();
    model.removeRow(i);
    Regards.

  • How to clear the data in my page after user enter submit button

    hi......
    how to clear the data's in my page after user enter submit button. Actually while pressing first time itself the data is uploaded in database.

    Hi Nazeer,
    Instead of doing it on the same button better create a separate button for this functionality, As per my understanding you want to clear these fields to create new record so that you can enter a new record so for this you just need to insert a new row in VO.
    Still if you want to do it on the same button then you need to put the check that particular record is not dirty if it is not then create new record else create new record.
    One more thing if you will clear on the second click of a button how will you update your record??
    Regards,
    Reetesh Sharma

  • How to clear the cookie in midlet before quite the midlet?anyone?pls

    i am fresh in J2ME . Can anyone teach me on how to clear the cookie in midlet before i quit from it?
    I designed an application that require login and use session(cookie) management, i need to clear the cookie before or during i quit the midlet, so that the user will need to login again after quit from midlet. Can anyone pls assist me? i need it urgently!

    I designed an application that require login and use session(cookie) management,How did you implement the cookies. This isn't a built-in part of J2ME. You have to implement it yourself (saving the cookie and resending it in future requests), so only you can know how to delete it.
    shmoove

  • How to clear the screen in java?

    Hi,
    How to clear the screen in java without using any loops?
    Thanks

    Just paint with your background color to let the old paintings vanish.

  • How to clear the variable value in session store?

    I'll try to build form for search. There are LOV and
    search button on form. When user don't select anything then push
    search button, I'd like the report to show query everything. I
    mean the report will show like condition where id like '%'.
    And I send variable between form to report by using session
    store.
    I select nothing in LOV but value that return by LOV is
    not null. It's in stead of old value of LOV.
    Please tell me.. How to clear the variable value in
    session store? I'd like to set it to null. If you have greater
    way to do like this, please tell me.
    Thank you.

    Please suggest on this..
    Thanks.

  • How to clear the delivery group in sales order?

    Dear All: 
          My sales order is auto created from CRM by BAPI, but in vbap table, the GRKOR field is 001, only one order ,  how to clear the delivery group in the sales order ?
    Regards
    Peter.

    Thread Locked - Reason Duplicate Post
    How to clear the delivery group in sales order?
    Please dont post the same query twice.  Continue all your queries in one thread
    G. Lakshmipathi

  • How to clear the line items...

    hello friends,
    I am not able to clear line items with F.13 transaction for special G/L Account..i am inputing the values with the Transactions F-48 and F-43(In each transaction v have assigned the same assignment (BSIK-ZUONR)) line items has to be cleared based on Assignment....we can view the details in Tr.code-FBL1N.
    Can any one help me...plzzz
    vamshi

    Hi PK,
    1. Should we maintain OIM for all Excise G/Ls (BED, ECess, SHECess)?
    - Please DO NOT maintain OIM on BED, ECESS and HECESS, only to be maintained for Cenvat Clearing Account. Also note that clearing of Cenvat Clearing is not easy, as in standard SAP, the assignment field is not updated with the same information for the Dr. and cr. line items of Cenvat Clearing Account. You need to use an exit in Substitution for it to populate the P.O. no. and line item at the time of MIRO.
    2. How to clear the BED Excise GLs which is with OIM in our system, it is thru F.13 only?
    You can use F.13 only if the entries are matching not otherwise, else clear all of them manually if you have good control of your account balances.
    3. Can we activate or deactivate OIM any point of time, I mean can it be activated in case the G/L balance amount is not ZERO?
    OIM activation for a GL - Refer Note No.1356457.
    OIM Deactivation :  You can deactivate OIM after making the balance Zero on that Account and by changing the Message No. FH 190 to warning in OBA5.
    4. What is the use of T Code J2IUN, I have gone thru the SDN links, but I am not able to execute the screen. What parameter should we select while executing J2IUN, when we use Pay cenvat from ser tax cr and Pay ser tax from cenvat cr.
    J2IUN is to utllize Excise Duty. The liability of Excise duty is utilized from Excise balances of BED, PLA , Service tax etc.. as per business requirements.
    Hope this helps you.
    Regards,
    SAPFICO

  • How to clear the line items once posted...

    hello experts,
    i m workiing on Enhancements in fi/co...i m not able to get the actual exit..
    How to clear the line items once postings has been done...i.e. once v do postings in f-48 v assign an assignment with special GL a/c as 'A'(one line item generates)....and in Tr.code f-43 once the due as been settled i.e the payment as been done and same assignment has to be given(2nd line item generates) it has to clear with the transaction f.13.but it is not..there is a report program to check fbl1n(tr.code)...once it is cleared it is shown in cleared items else it is shown in open items.....can any one help me out...
    i m providing the tech names of the fields...
    same program for both the transactions-- sapmf05a screen no for f-48--304 and
    f-43 ---110....
    Assignment --- BSEG-ZUONR....AMOUNT ---(cluster table) BSEG-WRBTR....
    SPECIAL GL A/C RF05A-UMSKZ(structure)
    thanks n regards,
    vamshi

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • How to clear the down payment against the vendor invoice in the payment program?

    A down payment is made $25 Later an invoice is posted for $100 Now i want to Pay $75 to Vendor But the Automatic payment program  is not clearing the down payment against the vendor invoice. Could you please help how to clear the down payment against the vendor invoice in the payment program?

    Swathi,
    Need your help i have a strange situation
    1) F-48 and document posted with document no = 15..... in company code = L002 with payment block getting populated automatically
    2) F-48 and document posted with document no= 15..... in company code = Us11 without payment block and the screen does not even show payment block, I had to check this from BSEG table
    My question is
    a) How and where does this payment block is triggered through configured and how to process next steps.
    b) when I use F-48, how do we do the actual payment, is there a check printing and linking it to the KZ document or is check printing done outside the system and the KZ document type does not have any linkage.
    c) If I do FB60 for a higher amount how do we pay partial amount.
    Your response is appreciated.

Maybe you are looking for

  • How can you brand a serial number onto the system board?

    I just replaced a system board and need to brand it with the appropriate serial number.  How do I accomplish that?  I have software to run when I do that with Dells or Lenovos.  How can I do it with an HP?

  • How to write Inline queries in Oracle 10g

    Hi all, The following Procedure is written in SQL Server 2005 . It uses Inline queries and executes it in the end . I want to write the same stored procedure in Oracle 10g. Could you guys please help me in doing the same . CREATE PROCEDURE [dbo].[pro

  • Stock Avaliability Before Billing

    I want the system to automatically check stock quantity when Billing so that i won't over bill the customer or sell what i dont have. eg i have 20 cartons of vimto (Finished Product) in stock and unknowing to me i have raised sales order for 21 carto

  • Report preview keys

    hi every body can i use (up arrow),(down arrow),(right arrow),(left arrow)to move in report insted of use mouse in scrollbar thanks in advance allaha hafiz

  • What's the best way to deal with a crack in the plastic case

    I have a small crack in the pastic case of my MacBook to the left of the TAB key.  It doesn't impact function but I'd like to keep it from getting bigger. I thought about putting some scotch tape across the crack to keep it from flexing or having one