Initialising constants using text-element

hiii, I want to initialize the constant data object used in my ABAP program with the value of text element, Can anybody plz tell me how to do so?

Actually in my program I was using some constants data object to hold the description of the field name which will be displayed in ALV list in header. for example,, like this
*Constants for Field Descriptions:
Constants:
          c_text1 TYPE descr_40 VALUE 'Material',
          c_text2 TYPE descr_40 VALUE 'Description',
          c_text3 TYPE descr_40 VALUE 'Phys Inv Doc',
          c_text4 TYPE descr_40 VALUE 'Plant'.
Now i want to make these descriptions <u><b>language independent</b></u> hence i tend to use text element like this:-
    c_text1 TYPE descr_40 VALUE text-001
but this thing is not working giving some error.

Similar Messages

  • Using text elements in so10 standard texts

    How to use text elements in so10 standard texts.

    HI,
    In DDIC we have two structures :
    1. THEAD  - Text Header
    2. TLINE    - Text Lines
    SO10 is the tcode..for standard text...
    We have a FM to read the text ... read_text...
    and save_text is for create text..
    this text is are used in SAP scripts...
    the standard text is identified by three parameters :
    1. Text Name
    2. Text ID ( ST  for standard text )
    3. Language
    hope helpfull
    Raghunath.S

  • Create colum headings using text elements

    Hi Experts,
    I want to create column heading of a report using text element, how can i create create column headings using text elements and how can i use in the top-of-page event.
    Thanks

    Hi,
    1 For Creating Text Element,
    go to Se38 -
    > Write Name of the Program - > Click Change button - > Then go to GoTo on Menu Bar--> text Elements
    > Select Text Symbol
    In First Column( Sym)  Write any Number which is not used  like 001, 002.....
    In Second Column (Text) write in text or description .... like Sales Order....
    U can use this text Symbol in code -
    >  text-001, text-002.....
    2 In order to insert a report heading in to the ALV grid you need to perform the following steps:
                        1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'top-of-page' FORM
                    2. Create 'top-of-page' FORM
    3 In order to add event functionality such as 'END_OF_PAGE' to the ALV grid you need to setup the
      IT_EVENTS option of the ALV function module. Also depending on which event you are using you
       may also need to setup the print parameters by activating the IS_PRINT option. Please note for events
      such as end_of_page, end_of_list etc they will not be displayed on screen but only in the printed
       output.
            Step 1. Add data declaration for events and print parameters
            Step 2. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include parameter 'it_events' and 'is_print'
            Step 3. Add code to setup events table and print parameters
            Step 4. Create event FORM(s), which are executed when event is triggered
    Thanks & Regards,
    ShreeMohan

  • How can I use Text-Elements in Dynpro Buttons ?

    Hello Experts,
    I have create a dynpro screen with the screen-painter.
    In this screen have a button, in which label i want to use defined textelements.
    This has the advantage that i can expand it to other languages.
    The screen is an standard screen.
    In the Button i have to try using   &&Text-001&& , but it doesn't show me the contain of Text-001 .
    It show me &&Text-001&& as label in the button.
    How can I do  ?
    Which possibilties are existing ?
    Thanx in advnace for your responses
    Best Regards

    In button attributes select output field . Then in program define a vairable for the button with the same name and assign the text element to it before screen is displayed.
    data: button(10) type c. "your button name
    button = text-001.
    call screen 100.
    Regards
    Marcin

  • Bex. Query in 3.5 : All Variable values using Text Elements not shown

    I am using a Variable, for which I am suppose to select more than 15 values . After executing the report, I am trying look for these values using Layout--> Display Text Elements --> All.
    Only first 10-11 values are shown and the rest are shown as ...
    As such, I cannot see all the values in WAD too, in the info tab. 
    Is there any limitations to display the values with text elements ?
    Any idea how to display all the values ?
    Thanks

    You are right. I can do this if I select Filter values.
    But, I am trying to show the values entered for the variables using Layout-->Display Text elements --. Alll or variables.
    These are the values shown in the web template. The filter values goes to the data analysis tab, which are fine.
    I want to display all the values in the information tab, but only few values are show and rest are shown as ...        The same is the case when I select Layout-->Display Text elements --> All or variables. after I execute the query.

  • Problem using text element with type TEXT INCLUDE in smartforms

    Hi,
    I am working on smartform.
    My requirement is to print the text which can range from 1 to 99 (free text). I am using TDNAME, TDOBJECT and TDID from STXH table and putting it in the fields Text Name, Text Object and Text ID of text element created with type "TEXT INCLUDE" in window in smartform.
    It works Fine only when I put exact value of TDNAME in Text Name field.
    But in my case TDNAME can vary according to value of AENNR from Table AENR.
    So I am trying to use a variable called W_TDNAME and pass TDNAME value to it. I am putting this W_TDNAME in the field TEXT NAME. And it says "Inlcude text W_TDNAME does not exist".
    HELP ME OUT.
    ANSWERS WILL BE AWARDED..
    Tushar

    Hi Tushar,
    When you see in Text name field, there is a small button at the end of that field. This is to switch the dynamic field value option on. Click that and use the format &field_name& to enter your variable in that field.
    Deepak Charanyan

  • Use of Text elements

    Hi all,
    I have created a window and giving text elements in that window.Now i m Adding a lin of type /E in change editor to use text element.i needed it it to specify text elements in SPRO transaction.
    So for that i want to add text elements in Form in SPRO transaction.
    Also want to know that is it possible to use condiitons in Text elements?
    Suggess me it's Urgent for implement.
    <b><REMOVED BY MODERATOR></b>
    Thanks
    Sanket sethi
    Message was edited by:
            Alvaro Tejada Galindo

    Hi
    Text elements in SAPscript are the individual text components of a form. In the different windows, you can define text elements with different attributes. For printout, the print program accesses them. Text elements can also contain variables (symbols) and SAPscript control statements.
    In simple words, Text Elements are the only way to transfer the data from report program to FORM using WRITE _FORM FM.
    Check this link(Very Helpful) :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db38b494511d182b70000e829fbfe/frameset.htm
    You can define the text elements in sap script to group the texts that you want to display...like a condition..
    Ex..
    /E TEXT1
    P1 This is a first text element..
    Then use WRITE_FORM function module to call the text element
    CALL FUNCTION 'WRITE_FORM'
    ELEMENT = 'TEXT1'.
    You can also call the write_form function module within a loop..
    Check this link(Very Helpful) :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db38b494511d182b70000e829fbfe/frameset.htm

  • Is it good practice to define text elements in User exits & there by using?

    Hi Experts,
    Simple doubt that, am wrting code in a User Exit. So, here my code works only, if the DOC TYPE = 'XXX'.
    So, instead of using hard coding as 'XXX', I wuld like to use a text element, like
    if DOC TYPE = text-xxx.
    my logic.
    endif.
    and creating the same text element.
    so, let me know that,
    Is it safe/recommended to use text-element in exits?
    Is it good practice to define text elements in User exits?
    thanq

    u can also use SET ID's if u dont want to hardcode like that in ur program.
    if u use SET ids , no need of transport request in case of change in the DOC types , directly u can change values in that set it , its like a master id.
    sytax will be like this
    doc_type in g_doc_type(this is set id ).
    for creation of set ids see tcode GS01.
    regards
    Prabhu

  • In Footer text elements are spliting in smartform

    Hi,
    In smartform, I am using text elements for printing gross / net totals in the Main window -> Table -> Footer. Now problem I am facing is all the set of elements are breaking from page to page. I want it print in one page with out any page break. How should I do that. Please suggest.
    Thanks
    Ram

    Hi,
    In the footer text , in the output options tab ..there is a check box "Page protection".. Check that..
    Documentation for "Page protection"
    In some cases you may want to avoid that text is divided by a page    
    break. Therefore, you can protect text sections with a page protection.
    Thanks,
    Naren

  • Addition of extra Space issue in site studio text element

    Hi,
    we have implemented WCM for our website. We are in webcenter PS3 version.
    At places where we have used text element for titles of various sections,
    if we append one extra space and save it, it displays as   in front end.
    When we remove the space, it does not clear. But if we cut and paste once the word once again it is perfect.
    Is there any solution to trim that space when it is displayed at front end. Please suggest.
    Regards,
    Bhaskar

    enclose your text element with strTrimWs.
    Removes spaces from the beginning and end of a string.

  • Smartform splitting footer text elements

    Hi,
    I am using text elements for printing gross / net totals in the Main window -> Table -> Footer.  Now problem I am facing is all the set of elements are breaking from page to page. I want it print in one page with out any page break. How should I do that. Please suggest.
    Thanks
    Ram

    Depending on what system you are in, you may be able to check the Page Protection checkbox in the Table node's Output Options tab.  (I'm in 4.6C and this option is not available, but it may be available in your system).
    Or you can try checking the No Page Break checkbox in your Line Type definition.

  • Text element in smartforms

    Hi guys,
    What is the use of text elements in smartforms? I am getting confused. For texts, we generally use text modules rite? So what is the difference between the two. Wehn am i to use text element and when am i to choose text module. Please explain me in detail
    Regards,
    Prem

    Hi,
    Text Elements (locally in form)
    To include data from the form interface (data from application tables) or system data (date, time) into the text, use system fields or user-defined fields in the text When processing the form, SAP Smart Forms replaces these fields with the corresponding values
    Text Modules (for reusing texts)
    You can use text modules to store texts that frequently appear in your forms which is stored centrally in the system. This detaches text maintenance from form maintenance, with the result that you do not need to call the Form Builder to edit individual texts.

  • Text elements creation in user exit

    Hi All,
    I have written code in user exit MV45AFZZ(include program ) ,now i need to create text elements.
    The above include is in standard program SAPMV45A,which will ask access key for creating text elements.
    Can any one give me some inputs,like,can i go ahead using accesskey or any alternative procedure exists for enhancing text elements without accesskey?
    Thanks & Regards
    Seshagiri.

    Hi
    Create one message class or use any created message class(custom). In that write ur text elements and use that in include.
    In same program and same include which u r telling, we created one message class called Z_SDRQC and using text elements from this message class in this include. check below sample code for that.
    Reward if it is helpful.
    Thanks
    Siva Kumar
    IF SY-TCODE = c_tcode1.
              MESSAGE a006(z_sdrqc).
            ELSEIF SY-TCODE = c_tcode2 OR SY-TCODE = c_tcode3.

  • Selection text and text elements contents not displayed

    I have a language related problem
    I have 2 servers .
    In first server I logged in english language and the selection text and text elements are displayed in English.
    The requirement is I dont want to translate these texts it should be displayed in English only even if I log into SAP with other language.
    So if I log in german I see the texts in English in the first server.
    But this is not the case with second.
    If I log in with English I see the english texts but if I do in german I am not able to see this english text with proper contents .
    Can anybody let me know if there are any settings to be done ? As its working fine in first server but not in second .
    Edited by: Jalpa Shukla on Oct 22, 2008 11:19 AM

    Hello Jalpa Shukla,
    If you want to display the text in english language only better dont use Text-element
    instead of using text element you hard the text in the program then you will display the text in same in English.
    Try in this way, If not past the code i will give the solution

  • Calling Script without Text element

    Hi All
    Can we call script without using text element in driver program.
    Ex: in write_form without writing text element only passing window name
    Thanks in Advance
    Regards
    Suji

    hello
    NO, you can not use write_form without TEXT element name .
    Regards
    Geeta Gupta

Maybe you are looking for

  • Showing Contacts in 'Tasks'

    I have tried resolving this with my IT department and Bell with no luck. I'm using a bold.  I manage my affairs with MS Outlook. I organize my Tasks and To Do's for my clients by going to their contact info and assigning a task from there. When I go

  • How to run the sample code using the sdk?

    Hi, I want to run the jsp code from the enterprize sdk available in the sdn community. Can any one tell me how to execute these jsp sample codes and what is the pre-requisite regarding the set up. I already have the deployment ready. thanks AMar

  • Installed Mac OS Lion and now have internet problems??

    So, I've installed the new Mac OS Lion on my MacBook Pro and now can only connect to the internet using Firefox - no Safari, no app store or anything else for that matter.  Has anyone else experienced the same problems? I've never had this problem on

  • Beyond Stupid

    I bought a new mac. I registered it with my Apple ID. Nonetheless, Apple needs to lock up my iTunes account and send me this email? Dear  *****, Your Apple ID, *****@mac.com, was just used to purchase "*****" by ***** from the iTunes Store on a compu

  • AutoConfig failes when running adgendbc.cmd

    I get this error when running adautocfg.cmd on one of me three servers; [AutoConfig Error Report] The following report lists errors AutoConfig encountered during each phase of its execution. Errors are grouped by directory and phase. The report forma