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

Similar Messages

  • Problem in transporting the text elements for user exit EXIT_SAPLV09A_002

    Hi  All,
    I am facing a problem in transporting the text element (text symbol) for the exit EXIT_SAPLV09A_002. It is implemented and transported but the text elements are not transported and even if I try to delete them and then create them again, on activation it doesn't prompts for TO and it version its shows it as local object. I have tried to manually assign the TO by using limu as id of program and rept as type and SAPLXV09 as the name of the object but still it doesn't allows as an error message comes prompting local object cannot be assigned to TO. Kindly suggest solution this problem.
    Regards,
    Sachin
    Edited by: Sachin Dangayach on Nov 15, 2010 4:21 PM

    Hello ,
               In the Quality after you run the report check in the layout option>display text elements> variables and check what value is displayed for the use exit variable , if it is correct then problem may be in the selection you gave when you run the report if the user exit variable value is wrong , then set a break point in the code and run the report from rsrt and check where the error is.
    hope it is clear
    assign points if useful

  • Text Symbol in User exit

    Hello Friends ,
    I have a z - include ZX45AI91 in an user exit . I do not want to hard code the error message "Not authorized to update sales order  at this level"  instead use a Text symbol from the z - programs that triggers this exit .
    When I use the text symbol it gives me an error message that Access key is required .
    Please advise if this is possible
    Thanks ,
    Hari

    I think you are not getting my point .
    This is what is currently in the code :
    if l_user_level < approved_level.
              message e999 with 'Not authorized to update sales order at this level'.
          endif.
    I want to be able to use like :
    if l_user_level < approved_level.
              message e999 with text-054.
          endif.
    The text-054 is a text element in any z program .
    Is this possible ?
    Thanks

  • Text retrieval in user exit

    Hi,
    Is there any way to retrieve the header text and operation text (if exists) in the user exit 'USER_EXIT_SAVE'  before the work order ( in plant maintenance ) gets saved to the database.
    i.e. we don't have the actual work order number and SAP represents it at this time as '%00000000001'.
    Thanks for any clues
    Ravi

    I think you are not getting my point .
    This is what is currently in the code :
    if l_user_level < approved_level.
              message e999 with 'Not authorized to update sales order at this level'.
          endif.
    I want to be able to use like :
    if l_user_level < approved_level.
              message e999 with text-054.
          endif.
    The text-054 is a text element in any z program .
    Is this possible ?
    Thanks

  • Reg Text symbols in user exit

    Hi,
    I have created 3 new text elements in exit EXIT_SAPMM06E_013. I created them by logging into SAP by language DE this is because when i tried to change the text symbols in EN it was not allowing me to change. Now when I logon in language EN always its giving me information message "Untranslated texts from master language DE will also be displayed." So to avoid this information message do I have do any transaltion? Will there be any issue with this message when I transport this to another server?
    Thank You,
    Juli

    go to the test element list and follow the path GOTO->Translation .. translate the text elements from DE to EN .. this will stop ur error message. It's better you do that the transaltion before you move to the other server.
    Hope That Helps
    Anirban M.

  • Best practice on integration message augmentation via user exit or rfc call

    I am looking for documentation that would provide best practices on whether to use user exits to augment the data on an IDOC or to forward the standard SAP produced IDOC to PI where rfc calls are made to augment the data as required for the specific target system.
    I am sure there are pros and cons for both solutions, but I am hesitant to use user exits since we now have moved the knowledge of what a target system wants from the integration layer to the source layer.  If a second target system comes along in the future, the user exit becomes more complicated with additional target specific requirements. 
    Any links to best practice documentation on this subject is greatly appreciated.
    Edited by: Sean Sweeney on Oct 15, 2009 6:59 PM

    Hi Steve,
    Might be trying for solution for a long time, If i understood your question clear let me clarify you few points.
    You are trying to access the bex query which is designed with the exit's in the background based on the logic and trying to call the entire dimensions and key-figures in a single connection. Then you are trying to map those data in the charts.
    Steve, try to make more connections based upon the logic and split them. use the same query but split them by sales per customer group, sales per day, sales per week by making three different connections and try. You can merge the prompts from all connections.
    Hope this Helps!!!
    Sorry if i misunderstood your question.
    --SumanT

  • How can I define global variable in user exit whic I can use anywhere.

    Hi all,
    How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.
    What I mean is I want to define 1 global table.
    In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.
    Thanks a lot in advance.

    You can use EXPORT  TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.
    EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
    IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'

  • Tab strip push button text change for user-exit screen

    Hi experts
       How can I change the text of Tab strip push button which is maitained by screen user-exit.Such as I maintained the user exit MEREQ001,In the screens of TCODE me51n there have a subscreen named
    "CUSTOMER DATA",Now I want change the text.
    thanks in advance
    BR
    Chris

    create ab push button without any text. In the run time you can assign test to this as follows.
    suppose name of the button is PUSHBUT.
    PUSHBUT = 'EDIT'.

  • Text Element in SAP-Script and Box

    Hi Gurus
    Q1.what is the meaning of text element's in sap-script.e.g.
    /E INSPECTION_STATION_INFO
    /E SAMPLE_INFO
    /E PHYS_SAMPLES_HEADLINE..
    I have to use these elements in my script.i am not able to understand what does it mean?
    Q2.how we can draw a Tabular format in Script?
    Q3.How we can draw Box?
    Thanks in advance

    Hi,
    Text Elements
    You can define text elements (window texts) for each window. On the Form: Request screen, choose Edit ® Text elements.
    The print program accesses text elements by name, formats them and prints them in the respective window. That is, the program can decide which text elements should be printed in a particular window. It calls these text elements by name to print them. You must therefore change text element names in the print program if you make any changes to text element names in a form.
    In the layout of a text element, you can use only the paragraph and character formats defined in the form.
    Example of a text element in an order confirmation:
    /E ITEM_LINE
    IL &VBDPA-POSNR&,,&VBDPA-MATNR&,,&VBDPA-ARKTX&
    / &'Customerarticlenumber 'VBDPA-IDNKD' '&&'Position
    / 'VBDPA-POSEX&
    This example shows a section of a main window of a form, with an item line of an order confirmation. The /E in the tag column is used to identify the text as a text element, ITEM_LINE is the name of the text element.
    Default Text Element
    At the start of a window, you can define a text element without the /E command in the paragraph format column. This text is always printed at the start of the window. It is not necessary to insert this text explicitly via a print program.
    For more go to this link: Character formats and attributes
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
    Boxes:
    Use the following code
    /: BOX XPOS 1 MM YPOS 2 MM WIDTH 20 MM HEIGHT 40 MM FRAME 10 TW.
    Box is the command used for printing box in script.
    XPOS - x- axis position
    ypos - y axis position
    http://help.sap.com/saphelp_470/helpdata/en/d1/802ec5454211d189710000e8322d00/content.htm
    Regards,
    Omkaram.

  • 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

  • SapScript  'MAIN' Window without 'Text Element'

    Why is it, if we run 'MAIN' Window without defining 'Text Element'(/E), it displays the contents twice.. The same doesn't happens with other 'Variable' windows..

    Hi Main window is different from Var window.
    Var window will call only once .
    But main window it will call many times, it will go to Driver program and come back to populate the data.
    for Clear info debug and see.
    regards
    vijay

  • WIB - Creating Selector of Parameter Groups via Text Element

    Hello,
    I am trying to code an HTML <Select> tag that will execute various Planning Functions upon selection. 
    I have created a Text Element and placed this below the Hidden Function Pushbuttons that define the Parameter Group to use. 
    I modeled the HTML code placed in the Text Element after HTML code generated when using a Function Selector object within the WIB.  Here is the code that I am using:
    <select name="tstFuncs" onChange="javascript:bspSubmit('tstFuncs'); return false;">     
    <option value="FuncPushButt1">CompNameofButton1</option>
    <option value="FuncPushButt2">CompNameofButton2</option>
    <option value="" selected>-- Select --</option>
    </select>
    I tried both the Javascript funciton bspSubmit() and bspSubmitDdl().  The Parameter Groups do not fire??
    The buttons work correctly with the following:
    javascript:bspSubmit('FuncPushButt2'); return false;
    <a href="#1" onclick="javascript:bspSubmit('FuncPushButt2'); return false;" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Function Pushbutton 1'; return true;" title="Function Pushbutton1"><nobr>Function Pushbutton 1</nobr></a>
    Has anyone else accomplished something similar?

    Thanks Marc,
    Currently I can only use this for a group of parameter groups within the same planning function. 
    Would there be any way to use JavaScript to include functions (i.e. parameter groups) from different Planning Areas/Planning Levels/Planning Functions???
    Also, while I got your attention, did you find out if there is a limit on the lenght of the JavaScript that can be added to a Text Element? Awhile back I was trying to integrate a JavaScript/DHTML menu system within a Text Element.
    Thanks ATC

  • How to Remove Blank spaces in the text elements for a smartform

    Hi All,
    Can any one please help me out to remove the blank spaces in the text elements.
    We are printing Labels using the Zebra Printer and we have rotated the windows to 90 degrees.
    We are able to see out text and barcodes. But the issues is when we are printing the label. We are getting spaces in the Text and in the Text elements fields. I have tried to give &g_name(C)&. But it is not working even i worked with style sheet spaces no luck.
    Currently out text and fields are printing like this
    s h r i y a n
    material number
    1111  -001  -000
    They should print like
    shriyan
    1111-001-000
    According to the ZEBRA suggestions we are using the font helve.
    Plase help us it is very urgent.
    Reward point will be given.
    Thanks

    Hi,
    Just use Condense g_name inside the program lines.
    Just to see how it behaves put a hard breakpoint.
    Break Username. and check the condense statement.
    condense <your field> no-gaps.
    Create program lines ahead of printing. give the field you want to condense in the input and output parameters of the program lines.
    Use condense inside the program lines.
    Thanks,
    Vamshi.

  • How to end a text element

    Hi,
    Iam having a text element which holds the data of an internal table which has 15 records and it prints those records in the main window. Once all these 15 records got printed i need to print a standard text.
    for me what happens is it prints one record and then it prints standrad text then 2nd record and standard text klike this it goes for all 15records. Can any one tell me why this happend and how to correct it.
    the code which i have written is
         /E     E1
         P1   &IT_BKPF-BELNR&     &IT_BKPF-BLDAT&     &IT_BKPF-BUDAT&
         /:      INCLUDE ZTEXT_TEST OBJECT TEXT ID ST LANGUAGE EN.
    Please help.Thanks
    Regards,
    Rose.
    Edited by: camila phyrose on Feb 18, 2009 7:08 AM

    Hi,
    Create a window below main window  and write the standard text there.
    After every record,it will write the standard text there as u have written in the text editor
    without any condition.
    This is bcoz, the text elements only ends when there is another text element.
    If u are sure that only after 15 records it should print the text,then give condition.
    /E E1
    P1 &IT_BKPF-BELNR& &IT_BKPF-BLDAT& &IT_BKPF-BUDAT&
    /: If &w_temp& eq 15.
    /: INCLUDE ZTEXT_TEST OBJECT TEXT ID ST LANGUAGE EN.
    /: Endif.

  • Navigational Attribute as Text Element

    Hi...
    I have a report which shows list of Titles in the first column and the corresponding amounts based on several account and profit center restrictions in the further columns. 
    Titles basically are movie names.
    Titles have navigational attributes like Video Release Date, Theatrical Release Date. These navigational attributes can be displayed in the report. But, the user doesn't want to display them in the report. He wants them to display them as the text elements.
    As we are neither using a filter nor variable on these navigational attributes, these are not being shown as text elements.
    Is there any way, I could show these navigational attributes for a given title as text elements?
    Thanks,
    Sai.

    Ok, let's make this simple. I have a Title: 9381780, which has navigational attribute, Theatrical Release Date: 01/09/2004.
    In my query definition, I have this title restricted by this value 9381780 and the navigational attribute in the rows panel.
    Now, the query displays me the both the Title and it's navigational attribute as columns in the report.
    But, if u see the text elements, I see only Title: 9381780, because it's a filter.
    I cannot see the navigational attribute, Theatrical Release Date: 01/09/2004 in the text elements because it is neither a filter nor a variable.
    I want to display this navigational attribute, Theatrical Release Date: 01/09/2004 in as a text element.
    Hope I made it clear.
    Thanks,
    Sai.

Maybe you are looking for

  • Date format in xml file

    Hi, I am relatively new to XML and JSP.I am on a project where i have to transfer data to and from an Oracle 8i database to XML using JSP.everything worked fine except for the follwing: the date format in xml is always 'yyyy-mm-dd HH:MM:SS'. the data

  • Calculate line price based on adjustments

    Hi Guru's. Could you please help me to prepare a query? Selling price has to be calculated based on unit_list_price & adjustment details. Two tables Order line & Adjustment data. Pricing group sequence is the order of calculating adjustment at every

  • Cannot find file when starting jnlp from browser

    First of all, im not a web guru, so sorry for my weak knowledge on that part. I have a swing application packed in a war file. In the root of war file i put my jnlp, html that links to jnlp, and jar file. (everything created with NetBeans) But there

  • 800 FSB Boards

    I'm planning to upgrade my motherboard. What's the main difference (other than price) between an 875 based mobo and an 865 board. Also, will gigabit LAN give a boost to my cable internet connection? If I keep all my current componentsexcept the mothe

  • ITunes won't install or uninstall. :(

    Howdy one and all, I've scoured your forums for an answer but I'm not really getting anywhere. :/ I wanted to install iTunes 7 to help fix my ipod (which subsequently fixed itself) but this message comes up each time. So I removed Quicktime from the