How to display text in custom control?

Im doing a module pool program. There I have a Input field ,if user input there, some text I have to show in custom control. I have created custom control . But how to display some text there? what method I have to use?
I have use this code for creating custom control.
CREATE OBJECT EDITOR_CONTAINER
      EXPORTING
        CONTAINER_NAME              = 'TEXTEDITOR'
      EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5.
    CREATE OBJECT TEXT_EDITOR
      EXPORTING
        PARENT           = EDITOR_CONTAINER
        WORDWRAP_MODE    = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
        WORDWRAP_POSITION          = LINE_LENGTH
        WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.

Hi,
You will have to use the method 'set_text_as_r3table' to display your text in the object.
The text will have to be passed as an internal table to the method.
Regards,
Ankur Parab

Similar Messages

  • How to display text on last but one page in SAPSCRIPTS

    how to display text on last but one page in SAPSCRIPTS

    u have create one Foooter window , this has to be called in  only One Page.So hardcode /assign this window to only one PAGE number.
    regards
    Prabhu

  • How to display texts automatic. besides entered value for a field in Trans.

    How to display texts automatically besides the entered value for a field in a standard transaction screen. For example you have a value table and a text table associated to it. Then on entering the value field and pressing enter the text associated should get displayed immediately besides the value. Like if you have 'LOC' as the value and 'Location' as the text associated to it, on entering this value 'LOC', you automatically get the text 'Location' printed besides it automatically in a transaction screen ?
    Message was edited by: Sarika Kedia

    Hi sarika,
    Welcome to SDN.
    1. first of all, such display of text,
       is not automatic.
       (it appears to be automatic)
    2. At design time,
       a) take one extra field for text
         and mark it as OUTPUT ONLY
    3. Then in PBO coding,
        call some module, and in that module
        write code
    4. The code should be to
       select from TEXT Table
       into the work area.
    EG. THE SCREEN TEXT FIELD NAME IS
    T510A-FIELDNAME.
    CLEAR t510a.
      SELECT SINGLE * FROM t510a INTO t510a
      WHERE trfar = FIELVALUE.
    5. This will take care of
       displaying the text value of that field.
    regards,
    amit m.

  • How can i create a custom control, indicator

    This is FredFred,
    How can i create a custom control switch with 3 or more options,
    OFF
    ON
    STANDBY
    Other than rocker, slide, or toggle switch, are there other switches that we can use, hence, the question of creating a custom switch.
    Also, is there a way to create an indicator with two options. Enclosed is a jpeg with an example of what i need
    Thanks in Advance
    Attachments:
    sample switches_displays.bmp ‏720 KB

    Hello.
    Boolean controls can only have 2 possible values, true or false, and there is no way to add more values to them.
    If you need more values, then you must use a numeric control (or a string, but I tend to like numerics better, although strings could be just as useful).
    There are several types of numeric controls you could use to provide 3 or more options. Attached is a VI which shows a ring, a knob, and a slide each with 3 possible values. In your code, you would then perform different actions depending on the numeric value of your control.
    Hope this helps,
    Alejandro
    Attachments:
    NumericsWith3Options.vi ‏14 KB

  • How to display text on last but one page

    how to display text on last but one page

    Hi Preeti,
      If u r working on a smartform then click on th window go to the condition tab there
      at the end u will find events click on the the event on which u want to trigger the 
      print.
      If u r working on a script then create a text element and call this text elemtn at
    the end of processing of the main window, this will make sure that thetext element
    is triggered only at the end.
    I hope that helps u , if not pls let me know.
    Regards,
    Vaibhav B Gawali.

  • HOW CAN WE USE ALV-CUSTOM CONTROL

    Dear Friends,
    How can we use the custom control ALV.please provide the sample PPT or material to learn the container ALV.
    Thanks &Regards,
    Rajkumar.A

    SAP released document on ALV custom control. Pretty cool stuff..
    http://www.saphelpbykevin.com/saphelpbykevin/modules.php?name=Downloads&d_op=getit&lid=10#dl
    Edited by: Kevin Nguyen-Tu on May 14, 2008 7:44 PM

  • How to display text in script as same as text in news paper

    Hi Expets
    I have a requirement i need to display text in script as same as text displayed in news paper
    with out creating any windows. iie ( Abcdef should be in one cloum after some space i need to display 1234)
    please let me know how can i achieve this
    Ex
    1.
    hi abcdef           12345
        abcedf          12345
    abcedf            12345
    Regards
    Suresh
    Edited by: suribabu124 on Jun 15, 2010 7:55 AM

    Hi,
    If you need to print a form like news paper you need go for multiple main windows.We know that we can use 99 main windows in one page.first create one main window and then leave a space then create one more window and select window type as mainwindow.
    while populating data,after completion of one main window the control will move to next main window,which is in the same page.
    Like this you need to analyse and code according to your requirement.

  • Line-logging and protected text on custom control, protect_lines

    I have a module pool with various screens which contain texts.  Because of other requirements, it was necessary to create custom controls which show those texts as a sort of preview pane, that it, a white box which shows the text and allows one to enter new text.  Now the customer would like the text to have log lines and have it be protected.  That is to say, once you enter a text and save your work, both the log line and the new text are preserved and grayed-out allowing only new lines to be entered - you can't go back and change old lines.  Research I've done in the past leads me to believe that using the method protect_lines in the C_TEXTEDIT_CONTROL class is the way to go.  However, I have been having all kinds of trouble with it.  Are there examples which show how to use this?  For example, how do I put a protected log line in the white box, allow the customer to add a new line, protect that line on save and, at the same time, if they don't enter a new line, don't save the log line?
    I've mostly accomplished the above, however, the following still eludes me:
    I have used CL_GUI_TEXTEDIT class to create a custom control for text entry. I am using the PROTECT_LINES method to afix a date/time stamp and then make it non-editable. The problem is, when I am in the editable area and I hit back-arrow until the cursor jumps up to the end of the protected date/time stamp, when I begin typing again, it pulls the last part of the protected text down into the editable area. For example, if your protected text ends in a phone number, say "555-1212", after back-arrowing up to the end of it and beginning to type again, the "1212" will be down in the editable area and will be changeable. Can anyone tell me what I am doing wrong?
    Edited by: Buckman Michael on Dec 3, 2008 6:37 PM

    Further research has led me to believe that the PROTECT_SELECTION method solves this problem.  Specifically, if you look at include file LIQS0F50 at about line 1065 you can see how QM01/QM02 handles this on screen 7710 of SAPLIQS0 when you have line-logging turned on.

  • How do you Create a Custom Control

    Is it possible to create a custom control under LabWindows ?
    I want to creat a control that represents a mobile phone.
    It will be a rectangle with about 4 lines of text displayed in it witch needs to be programmatically entered and the back ground colour needs to be able to be change to represent different states also programmatically.

    I don't know if it's possible to create custom controls under CVI. I can suggest you some hint to help solve your problem.
    As for the second part of your question, you could use a picture ring with different pictures (with different background color) associated with the different states in your program. When program state changes you will only have to SetCtrlVal (panel, control, state) to have the picture ring display the desired colour. I guess this is a simple indicator, so you can put Control mode to indicator and hide inc/dec arrow in order to exclude operator's managing of the control.
    As a workaround about the four line of text to be displayed, what about putting on top of the picture ring a simple text box or text message with transparent backgroud col
    our and frame colour? At the cost of managing two different controls, the matter should work...
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to display TEXT vertically in SMART FORM

    Hai,
    I need to display the column name of a table vertically (readable from bottom to top) in smart form.
    Could any one please tell me how to do this?
    Thanks & Best Regards,
    Maniyam Bhaskar.

    Hi,
    Go through these threads for the discussions happened on similar issue... hope it helps you..
    how to print text vertically in smart forms
    vertical and horizontal printing in same page with smartforms or sapscript
    Good luck
    Narin

  • How to display TEXT more than 500 char in a report as multiple lines.

    Hi Friends,
    i have a requirement like i should display Texts of length more than 500 Characters in a report( ALV LIST) as multiple lines
    I am fetching the data Using FM READ_TEXT
    the output im currently geeting with 150 Char in lenth as a single line
    How we can split the text into multiple lines in a report
    first i would like to know is it possible? if possible please give your valuable suggitions if not is there any alternative way to do this task.
    Thanks & regards
    kumar.

    Hi,
    This is possible but the Solution might not look Standard/Appropriate to you.
    In ALV, you can have Multiple Line Output...There is a Field in the Field Catalogue..called as Row_position...this is by default 0...which means Single row/Line ALV output....You can have this Value in the Range of 0 to 3.......A ALV field with row_position 1, will be displayed in the second line for every record...i.e. you will have multiple line for a single record of ALV.
    In your case......you can use this but you need to split your field in two fields.....but you may end up spliting a single word....but for that also you can design the logic of splitting the Fiel value at SPACE only......
    This may work.......and Sorry if not work......

  • How to display data in Table control?

    Hi Experts,
    Can anyone please explain me how to display the data from two different tables(those two table is related with 1 field) into a single table control?
    For Example: T1 has fields (F1,F2) and
                         T2 has fields (F3,F4) --> here F3 is foreign key for F1
    I need to display the data F1,F2,F3,F4 into the table control.
    Can anyone explain me?
    Thanks in Advance,
    Regards,
    Raghu

    Hi,
    If F3 is foreign key for F1, then both fields will have same values.  Then why do you need to display both F1 and F3?  Either one of them is enough.  Try the following code.
    types: begin of t_table,
                 F1 type T1-F1,
                 F2 type T1-F2,
                 F4 type T2-F4,
              end of t_table.
    data: i_table type standard table of t_table with header line.
    select F1 F2 F4 into table i_table from T1 inner join T2 on T1F1 = T2F3.
    You should create three columns in the table control with names i_table-F1, i_table-F2, i_table-F3.
    After populating the internal table, refresh the control with the following statement.
    REFRESH CONTROL <NAME> FROM SCREEN <SCREEN_NO>.
    All the above statements should be in your PBO Module.
    Regards,
    Hema
    Message was edited by:
    Sorry, Declarations can be in the common include.  Select statement and refresh statement should be in PBO.
            Hema Nagarajan

  • How to display text file in JSP?

    Hi,
    I am new to servlet/JSP/java programming.
    I have been able to download a file using ftp. I dont know who to display it in JSP.
    Here is my code. Any help will be appreciated...
    <%@ page import="java.util.*" %>
    <%@ page import="java.lang.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.dmhistory.*" %>
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <%
    byte[] bytes = new byte[4096];
    URL theUrl = new URL("ftp://user:passwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
    BufferedInputStream in = new BufferedInputStream(theUrl.openStream());
    BufferedOutputStream outstream = new BufferedOutputStream(new FileOutputStream( new File( "D:/temp/log.txt" )));
    int pos = in.read( bytes );
    while ( pos != -1) {
    outstream.write( bytes, 0, pos );
    pos = in.read( bytes );
    %>
    <%
    in.close();
    %>
    DONE!!!
    </body>
    </html>
    How can i display this downloaded file in the browser?
    I want to display it in the original format i.e which new line and carriage returns...line by line..
    Thanks,

    Hi,
    I finally go it to display. but now I have new problem. The browser shows the text without the /n/r.
    But when I view the source using 'view->source', if see that the text has got proper format with newline and carriage returns.
    Any ideas how to display it correctly in the browser?
    <%
                   URL theUrl = new URL("ftp://user:pwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
                   //URL theUrl = new URL("ftp://dbcmaint:[email protected]/migr/Movers_for_Ora8/SNP/logs/SNP-PAC2-20020314.log");
                   URLConnection uc = theUrl.openConnection();
                   InputStream content = uc.getInputStream();
                   BufferedInputStream in = new BufferedInputStream (content);
                   LineNumberReader lnr = new LineNumberReader (new InputStreamReader (in));
                   String tempStr = "";
                   String str = "";
                   while ((tempStr = lnr.readLine()) != null) {
                   str += (tempStr);
                        %>
                        <%=tempStr%>
                        <%tempStr = "";
                        %>
                   <%
                   in.close();
                   lnr.close();
              %>
    Thanks

  • ALV Display on the Custom Control

    Hi Friends,
    Iam developing a Module Pool program where I call a ALV grid on a custom control.
    I have only one screen in which i have a input field and a custom control.
    when I enter a material number in the input field and press ENTER the custom control should be populated with some of the material details. I have written all the logic. But the problem is when i press enter the custom control is not filled but after I press the REFRESH button present by default on the grid, the details are displayed.
    What is the problem??
    Regards,
    Raju...

    HI,
    Use the method <b>REFRESH_TABLE_DISPLAY</b> after filling the new values into <b>it_outtab</b> table. in the PBO flow logic of your Module pool program.
    <b>CALL METHOD grid1->refresh_table_display.</b>
    Regards,

  • How to display Headline in custom panel in Adobe ?

    I would like to create custom file info panel for XMP that display few fields that are already in File Info. I would like display following fields:
    - headline
    - description
    - keywords
    To display description and keywords I have two lines:
    cat_container_edit_text(horizontal: align_fill, height: gTextViewHeight, xmp_path: 'Keywords', v_scroller: true);
    edit_text(horizontal: align_fill, height: 54,
    xmp_path: 'Description', container_type: alt_struct,
    v_scroller: true);
    and it works but how to display Headline? Where I can find xmp_path for other fields?
    Regrds
    Michal Szymanski
    http://podroze.szymanskich.net

    I've found answer:
    group(placement: place_row, spacing: gSpace, horizontal: align_fill, reverse: rtl_aware)
    static_text( name: '$$$/CustomPanels/Widgets/static_text=Naglowek:',font: font_small_bold_right, vertical: align_top);
    edit_text(horizontal: align_fill, height: 54, xmp_namespace: photoshop, xmp_path: 'Headline', container_type: alt_struct, v_scroller: true);

Maybe you are looking for

  • Problems while creating a physical Standby

    Hi, I am trying to setup a physical standby database with oracle 10g. I configured a specific log archive destination: LOG_ARCHIVE_DEST_3 = 'SERVICE=ORAMPSEC REOPEN=60 MAX_FAILURE=3 LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=OR

  • Bootcamp not installed

    OK, help. I installed Snow Leopard when it first came out and there is no Bootcamp on my iMac. I looked in the install disk and there is no option to install Bootcamp. I upgraded to Lion and still no Bootcamp. Where am I going wrong? What do I do to

  • Problem with pasting a smart object in Photoshop

    I create artworks using both Illustrator and Photoshop by pasting different elements as smart objects in Photoshop on different layers  but I often have a problem. To make the pasted content  positioned exactly on the same place as in Illustrator, I

  • Master data settings in Costing tab

    HI i have made settings in costing 1for SFG, FG , RM and packing packing material like this i have selected with quanity structure and material origin tabs and profit center common and for sfg and fg variance key assign. i have got a dout like as we

  • Imac verliert verbindung zu maus+tastatur

    nach kurzer zeit (manchmal 5 manchmal 10 minuten) verliert er die verbindung zu maus(Kabel) und tastatur (bluetooth), läuft sonst allerdings weiter. er ist nur nichtmehr steuerbar. was könnte das sein? vom netz genommen etc. hab ich schon. bin nun et