Saving the data of text editor ?

Hello
I have ceated a text editor using the following code..
TOP declarations
DATA :init,
      container TYPE REF TO cl_gui_custom_container,
      editor    TYPE REF TO cl_gui_textedit.
DATA: CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
     EDITOR TYPE REF TO Cl_GUI_TEXTEDIT,
      REPID LIKE SY-REPID.
CONSTANTS: LINE_LENGTH TYPE I VALUE 250.
Process Before Output
====================================================
IF EDITOR IS INITIAL.
    repid = sy-repid.
    CREATE OBJECT custom_container
       EXPORTING
          CONTAINER_NAME = 'BOX'
       EXCEPTIONS
          CNTL_ERROR = 1
          CNTL_SYSTEM_ERROR = 2
          CREATE_ERROR = 3
          LIFETIME_ERROR = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5.
    CREATE OBJECT editor
          EXPORTING
             parent = custom_container
            WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
             WORDWRAP_POSITION = line_length
             WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
  ENDIF.                 "editor is initial
*==============================================================
With this code i am able to achieve the text editor.
My requirement is to save the text that is typed in the text editor. If any can help me to achive this task will be highly appriciated.
Thks

check the sample code..
this will be in edit mode , you activate the save button, when you press the save button get the text as table using the method GET_TEXT_AS_R3TABLE, now save that internal table to DB.
REPORT  zvijay_textedit.
DATA:
  obj_cust     TYPE REF TO cl_gui_custom_container,
  obj_text     TYPE REF TO cl_gui_textedit.
* Internal table to display
DATA:
BEGIN OF i_table OCCURS 0,
  line(132) TYPE c,
END OF i_table.
START-OF-SELECTION.
  CALL SCREEN 100.
*&      Module  STATUS_0100  OUTPUT
*       text
MODULE status_0100 OUTPUT.
* To create the object custom container
* screen
  CREATE OBJECT obj_cust
      EXPORTING
          container_name = 'CONTAINER'
      EXCEPTIONS
          cntl_error = 1
          cntl_system_error = 2
          create_error = 3
          lifetime_error = 4
          lifetime_dynpro_dynpro_link = 5.
  IF sy-subrc NE 0.
  ENDIF.                             " IF sy-subrc NE 0
* create the a TextEdit Control
  CREATE OBJECT obj_text
    EXPORTING
       parent = obj_cust
       wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
       wordwrap_to_linebreak_mode = cl_gui_textedit=>true
    EXCEPTIONS
        OTHERS = 1.
  MOVE: 'SDN Sample code' TO i_table.
  APPEND i_table.
  CALL METHOD obj_text->set_text_as_r3table
    EXPORTING
      table  = i_table[]
    EXCEPTIONS
      OTHERS = 1.
* Flush
  CALL METHOD cl_gui_cfw=>flush
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc NE 0.
  ENDIF.                               " IF sy-subrc NE 0
ENDMODULE.                 " STATUS_0100  OUTPUT
Regards
Vijay Babu Dudla

Similar Messages

  • Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache of sent text?

    Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache sent the text?
    For example, I posted an article on a news site, but found that only a small part of my article was posted.

    I'm not sure whether Firefox saved that information. There is a chance that it is in the session history file, especially if you haven't closed that tab yet. To check that:
    Open your currently active Firefox settings folder (AKA your Firefox profile folder) using
    Help > Troubleshooting Information > "Show Folder" button
    Find all files starting with the name sessionstore and copy them to a safe working location (e.g., your documents folder). In order to read a .js file, it is useful to rename it to a .txt file. Or you could drag it to Wordpad or your favorite word processing software.
    The script will look somewhat like gibberish, but if you search for a word in your article that doesn't normally appear in web pages, you may be able to find your data.
    Any luck?
    For the future, you might want to consider this add-on, although I don't know how long it saves data after you submit a form: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/].

  • Problem with Refreshing the data bound text fields

    Folks,
    First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
    I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
    In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
    public void prerender() {
            try {
                userID=getSessionBean1().getUserID();
                getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
                getWeb_userDataProviderUserDetail().refresh();
                info("prerender: Refresh called");
            } catch (Exception ex) {
                error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.prerender():", ex);
            setReadWrite();
    public String btnSave_action() {
            try {
                getWeb_userDataProviderUserDetail().commitChanges();
                getWeb_userDataProviderUserDetail().refresh();
                info("Data Provider Refreshed in SAVE");
                _readOnly=true;
                form1.discardSubmittedValues("saveVForm");
                info("User Updated New:"+userID);
            } catch (Exception ex) {
                log("Error Description", ex);
            return null;
        public String btnEdit_action() {
            try {
                _readOnly=false;
                //info("User ID Edt="+getSessionBean1().getUserID());
            } catch (Exception ex) {
                error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.btnEdit_action():", ex);
            return null;
        private void setReadWrite(){
            // Set read-only to true or false for all text fiels
            this.btnEdit.setVisible(_readOnly);
            this.btnSave.setVisible(!_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_email_client.setReadOnly(_readOnly);
            this.user_email_office.setReadOnly(_readOnly);
            this.user_fname.setReadOnly(_readOnly);
            this.user_lname.setReadOnly(_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_password.setReadOnly(_readOnly);
            this.user_password_conf.setReadOnly(_readOnly);
            this.user_phone_cell.setReadOnly(_readOnly);
            this.user_phone_cell_aac.setReadOnly(_readOnly);
            this.user_phone_client.setReadOnly(_readOnly);
            this.user_phone_home.setReadOnly(_readOnly);
            this.user_phone_office.setReadOnly(_readOnly);
        }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
    Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
    Any idea what I am doing wrong here?
    Thanks

    Here is my experience with it. I have three text
    boxes to be filled out. They are part of a virtual
    form with an add button as the submit. You can fill
    out the 3 and add them and a node is added to a tree
    component. When you click on a node in the tree
    component (the submit to another virtual form that
    the 3 buttons participate in) the text fields should
    be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
    They will not display the values though...having
    nothing to do with read only. If I disable them
    before hand...they display the updated values. If I
    set their value at the top or bottom of prerender,
    they display the change...if I set the value in an if
    conditional that is hit (I have checked many times)
    in prerender, they will not display the values. If I
    set them in the tree handler anywhere, they will not
    display the values. This is very frustrating and is
    wasting tons of my time...I simply want to load the
    text fields based on the tree node that was
    clicked...I have messed with this for hours and it
    certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
    Posting your prerender code might help. Also, your action handler.
    >
    >
    - Mark

  • Not saving the data in two tables

    Hello,
    its my production problem, i have an update form where you can update the records and these
    records will sit in the temp tables until the final approval from the supervisor.
    In this update form i have two table where i am saving the data one is dup_emp to save the
    officer data and another is the dup_address to save the officer where he worked data.
    in this form address form is pop up screen where you can update and gets back to the original
    form where you can see all the other fields. my problem is if a user hit the cancel button on
    address form example the user doesnt want to update any information on that screen so user
    cancel that screen, and comes to the other screen where the user makes the changes to the
    appropriate fields and hits the SAVE button. in this case its saving only to the dup_emp table
    data not the address data from the address form to dup_address table for the same record.
    if the user cancels in both the screens cancel button it should delete the record from both the
    tables but cancel in form and saves in another form it should save the record in both the
    tables.
    here is my code from both cancel buttons from both the forms.
    this is code is from address form cancel button.
    delete from dup_address
    where address_id=:address_id
    and parent_table_name='emp';
    commit;
    CLEAR_BLOCK;
    go_block('DUP_EMP');
    This code is from dup form of the cancel button
    declare
    temp_address_id varchar2 (12);
    begin
    delete from dup_emp
    where secondemp_id =:dup_emp.secondemp_id;
    delete from dup_address
    where parent_t_id=:global.secondemp
    and parent_table_name='emp';
    commit;
    clear_block;
    go_block('secondaryemp');
    END;

    Hi,
    As Aravind mentioned, it's nothing related to workflow. You have to find a BADI in tcode PA30 that could be used after the infotype is updated. So, you can use FM SAVE_TEXT.
    Regards,

  • 3110 Classic ... How do I display the date a text ...

    Hello All
    I've checked the manual ... I've rooted through the phone settings ... I've read the site's FAQs ... I've searched these discussion boards !
    Can any kind soul please tell me - how do I persuade my phone to tell me the date a text was received ?
    It cheerfully shows the time - which is fine if I remember to check the phone on a daily basis. However, if I've omitted to check for a few days, knowing the time, but not the date, is less than helpful.
    Am I just having a blind spot ... or is a date stamp for received texts not available on this model ?
    Many thanks, Anonany
    Solved!
    Go to Solution.

    Thank you, JimmyIreland !
    Believe it or not ... I had tried looking under Message Details.
    What I hadn't thought to do - until prompted by your reply - was to "arrow/scroll down" to move to the next section of the screen !
    Many thanks for taking the time and trouble to put me out of my misery.
    Kind regards, Anonany

  • Plz help me its urgent i have iphone i dnt want my deleted texts my phone was jailbroken if i do restore widout backup should i jailbreak again ,should i unlock again,will the data of texts premantly erased plz answr me

    Plz help me its urgent i have iphone i dnt want my deleted texts my phone was jailbroken if i do restore widout backup should i jailbreak again ,should i unlock again,will the data of texts premantly erased plz answr me

    Jailbroken phones cannot be discussed in an Apple forum. If you synced your phone with your computer the texts will be in the backup, so if you restore the backup you may get them back, but with a jailbroken phone it's anybody's guess what will happen.

  • How to validate plan data before saving the data

    I have a total row in my planning layout which is a summation of plan data in 2 other rows. While saving the data, I should check whether the total is 200 and if not the data should not be saved. How can I achieve this! Any help would be appreciated.
    Regards,
    Tipo.

    Hi,
    I'm also facing the same problem in my development...I tried above all the ways,but we cannot stop saving the wrong data.In this case you have to write the java script for save button, before saving the data if it is correct then go for the next step to save other wise throw an error message or without save the data .
    You need to write the JAVA script for save button,in this code you need to read the data form the layout and check the total value, i am not sure if layout is dynamic how we can achieve this???.
    My development also stopped for this issue,In my case i  have two layouts ,one is for actual and another one is for Planing layout(Function - Distribution equally),using the fox code i succeed to read and throw an error message for incorrect data but i can not stop to saving for incorrect total data.
    Once you solved this problem please post the message in SDN.This type of requirements is very tough and we need to share to our friends.
    Thanks.

  • Saving the data through subscreens

    Hi,
    I have created a dialog program in which there is a tabstrip with 3 tabs in it.On the main screen I have the school name.In the first subscreen of the tabstrip there is school details,in the second tab there is teacher deails and in the third tab there is students detail.I am writing the code in the PAI module of the main screen for saving the data.
    when 'SAVE'.
         ztable-school_name= it_school-school.
         and so on.
    But when I am pressing the save button on the main screen the data is not getting saved.Do I need to write the code in the PAI module of the subscreens.Please suggest some solution.

    hi shashi,
    since u r displaying values in all the three tabs, the functionality of save should be given in PAI of main screen. If u do it in PAI of subscreens, it will not be triggered as u r not inputing any there..
    Rgds.,
    subash

  • How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App

    Darrell,
    Thanks for this response. After I posted mine, I saw that the resetForm JavaScript method is documented as being supported starting with version 10.5: http://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/js.html
    But I haven't been able to get it to work. Can you clarify if support was indeed added and if it works for you?

  • Table Maintenance Events - "Event 02 After Saving the Data in the Database"

    Hi,
    Can we identify the record marked for deletion in the "Event 02 After Saving the Data in the Database" ?
    Thanks & Regards,
    Esha Raj

    Look at online documentation :
    - [Event 02: After Saving the Data in the Database|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . - [Internal Table TOTAL|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . - [Field Symbols <ACTION> and <ACTION_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . . - [Constants for Field Symbols <ACTION>, <ACTION_TEXT>, <XACT> and <XACT_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    Regards,
    Raymond

  • Want the code for "Text Editor"

    Hi..
    can any one send me the code for text editor.

    Just use TextPad. :o)Presumably he wants a Java program.
    Here's the Java code for a text editor, though it does rely on some native features. You may have to tweak it a bit, but it should be a good start. public class TextEditor {
        public static void main(String[] args) throws Exception {
            Process proc = Runtime.getRuntime.exec("Notepad.exe");
            proc.waitFor();
    }

  • Saving the data into the tab limited text file

    Dear Friends ,
    please help me at the earliest possible , i want to store the data into an text file which is tab limited ,previously i was able to the same into the excel sheet using the jakarta HSSF POI , an open source library to store the data into the EXCEL sheet , now friends please tell me whether is there any other open source to store the data into the tab limited text file what i mean by tablimited is the data is to be saved as
    Name        Email-id        phone          streeet          city
    sri            @some.com     9434           jahdui          hye
    asdf         @.com           3455           sdgsdf         retlike this so please suggest me
    thank you in advance,
    bye
    sriharsha

    Consult the docs for BufferedWriter and from there.
    regards
    Christian
    import java.io.*;
    public class Test
         public static void main(String[] args)
              BufferedWriter writer;
              String[][] s = { {"Name","Email-id","phone","streeet","city"},
                        {"sri","@some.com","9434","jahdui","hye"},
                        {"asdf","@.com","3455","sdgsdf","ret"}};
              try {
                   writer = new BufferedWriter(new FileWriter("out.txt"));
                   for (int j=0; j< s.length; j++) {
                        for (int i = 0; i < s[j].length; ++i) {
                             writer.write(s[j]+"\t");
                        writer.newLine();
                   writer.close();
              } catch (IOException e) {
                   e.printStackTrace();

  • How to drag global data in text editor in smart forms

    Hello friends,
    I am doing a smartform. I tried to drag the global data from field list and drop it in text editor but its not working.
    can you please help me how to do that or is it need any extra settings?
    Please help me friends.
    Thanks,
    Manisha
    Edited by: PATIL MANISHA on Apr 23, 2010 12:14 PM

    Hi Manisha,
    It is looking very strange. But still try to do following may be helpfull.
    1. First activate your smart form after declaring the variable in Global definition. Then try to drag n drop from Field list
    2. Or else click on Editor tab of Text node, Then Goto-> change editor (You will get a editor same as Sapscripts)
    put the variable like that:
    HT : &W_TOTAL-MASSG&
    Try this. Best luck...
    Regrads,
    Lokesh.

  • Error while loading the data from text file

    Hi,
    I got an error " Data Value Encountered before all Dimensions selected" while loading the data from the text file.
    Can any one please suggest me the solution.

    Possible Solutions
    Make sure that the data source is valid.
    Is a member from each dimension specified correctly in the data source or rules file?
    Is the numeric data field at the end of the record? If not, move the numeric data field in the data source or move the numeric data field in the rules file.
    Are all members that might contain numbers (such as "100") enclosed in quotation marks in the data source?
    If you are using a header, is the header set up correctly? Remember that you can add missing dimension names to the header.
    Does the data source contain extra spaces or tabs?
    Has the updated outline been saved?

  • "Save As" is saving the date years back.. not current date..??

    I just upgraded to Elements 10 and I've found this problem...
    When I create a scrapbook page and and go to save it as "Save As" for both my PSD & JPG files, it is saving the file date that my background layer was added to my Elements Organizer, no the actual date that I created the page.
    Example:  I created a page last night, I named "JFK.jpg".  When I got to Explorer to upload to Shutterfly and look for the file with details, it shows: JFK.jpg  1709kb    JPEG Fomat    03/28/2008 7:24AM
    I always sort by date to find my most recent pages and this is driving me crazy!!  Please help!  Any Suggestions???

    Two possibilities.
    First create a formula that will give you the date as a text cell.
    If you dates are in the B column then you could add
    =TEXT(B1;"YYYY-MM-DD")
    in the C column. This will then export correctly for you.
    This way means moving columns around of course.
    Second - the format of the data is controlled by your global language settings.
    Tools > Options > Language Settings > Language
    Use the Local Settings drop down to select a local that gives your the format you need. It is a thought any way.

Maybe you are looking for

  • FDM Check PDF Validation Report

    Hi all I'm currently using validation rules in FDM but when I get de PDF report it comes out all messy, I supposed it's becuase of the text size been shown but this "lenght" seems to change between Validation Groups. For example my first validation g

  • Set-up clarification worklist fr payment lot

    Dear reader We would like to use a workflow for the clarification worklist for payment lots in an ISU 472 system. The aim for us is to post clarification items in different inboxes depending on the BP type of the BP. We already checked the documentat

  • Language change in music store?

    Hi all.....I am english and live in Austria. iTunes insists on displaying the store info in German. I can't find any option to change the language to english....any help? Thanks

  • All Templates in Spanish!?

    I just got my Macbook... when i started playing with iWeb I realized that all the Templates are in (what appears to be) Spanish. I then checked my Pages trial and the temps are also in Spanish. Why? I'm assuming I clicked somewhere and made it spanis

  • Is there a switch for 'FORCE' when creating object type?

    Where is the property to indicate whether or not to include the keyword FORCE when creating an object type?