SAP Texts with Placeholders

Hi All,
we have requirement in which we will be using SAP Texts as templates.
The SAP Text body will have certain placeholders, which has to be filled at the runtime with data. So that the SAP text acts as a template and the data can be filled at runtime.
For Eg: The sap text may contain something like
"Request &Request_number& has been changed by &User_name&."
The above string should be stored as sap text and the placeholders &Request_number& and &User_name& has to be replaced by supplied data.
Is there any standard way to do that with sap texts?
or I have to manually search throught the string and find place holders and replace them?
Please advice.
Thanks,
Anand

hi,
I think the FM 'TEXT_SYMBOL_REPLACE' will solve your problem.
Check below sample prog.
Here is the sample Long Text/standard text which i used.
*     Hi &v_lname& &v_fname&
*       As per your records,you still need to pay the Amt towards Home loan.
       Plz pay at the earliest.
*     Regards
     Credit Team
Here  v_lname and v_fname are the place holders.
The below is the program.
data:  gt_line      TYPE STANDARD TABLE OF tline,
       gs_head      TYPE thead,
       gs_line      TYPE  tline.
data : v_fname type char10,
       v_lname type char10.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = 'LTXT'
          LANGUAGE                      = sy-langu
          NAME                          = 'WD00000000000000012516LTXT'
          OBJECT                        = 'WCDOC'
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
       IMPORTING
          HEADER                        = gs_head
        TABLES
          LINES                         = gt_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      v_fname = 'Lokesh'.
      v_lname = 'Reddy'.
  CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
        EXPORTING
          ENDLINE                = 99999
          HEADER                 = gs_head
        INIT                   = ' '
        OPTION_DIALOG          = ' '
          PROGRAM                = 'ZLOK_TEST_FM_SAVE_TEXT'
          REPLACE_PROGRAM        = 'X'
          REPLACE_STANDARD       = ' '
          REPLACE_SYSTEM         = ' '
          REPLACE_TEXT           = ' '
          STARTLINE              = 1
      IMPORTING
        CHANGED                =
        NEWHEADER              =
        TABLES
          LINES                  = gt_line
loop at gt_line into gs_line.
    write:/ gs_line-TDFORMAT,gs_line-TDLINE.
endloop.
*****End of the program..
Here you can keep the FM 'TEXT_SYMBOL_REPLACE' in a desired internal table loop or select/end select statements to get the values of v_fname and v_lname dynamically. 
Plz..acknowledge ..if this suffice ur requirement or not.
Cheers
Lokesh

Similar Messages

  • Large multiline text with placeholders?

    I am tasked with creating a PDF that has a dropdown control named "Company_Name". The values in the dropdown are:
    Companmy Alpha Blah
    Comp Baaa
    Industrial CompanyXYZ
    Comp U
    Underneath this dropdown control there needs to be a textbox with several placeholders and the text has to wrap neatly so it can be printed correctly. For example here is the text wht the placeholders:
    {Company_Name}Lorem ipsum dolor sit amet, {Company_Name}consectetur adipiscing elit. Duis ultricies tortor sit amet molestie congue. Vivamus faucibus, purus at varius placerat, augue eros condimentum enim, {Company_Name} eget feugiat.
    Is it possible to do this so the text will wrap nicely no matter how short or long the Company_Name value is?  Will Acrobat Pro do it, or will Adobe InDesign do it?
    Thanks for advice!

    It's possible to do it using a script that inserts the selected company name into the pre-defined string and then populates the text field with it. That string can contain line-breaks to make sure that it breaks where it needs to. This needs to be done in Acrobat, not in InDesign.

  • HTTP Receiver Adapter payload as single line plain text with out any tags.

    Hi PI experts,
    I have a strange problem in http receiver adapter.
    Sender RFC (SAP)  Receiver: HTTP.
    Receiver system expects the output from XI in the below format in a single line plain text with out any tags in the payload. and the content type should be application/x-www-form-urlencoded
    Group=Test&Sentinel=Web%20Server&Facility=5345&Order Number=XT-XWHM-Y-NA&Serial Number=123456&@LABEL_QUANTITY=5&@LABEL_NAME=111114_Q
    Is there any way to achieve this using http receiver adapter. Business is not ready to accept the output from XI not even in a single element instead they only need it as a JUST a plain text.
    Appreciate early response on this.
    Thanks in Advance,
    Jitender

    Dear Ola,
    Could you elaborate how you achieved in catching the response data from the receiver in case of HTTP receiver adapter?
    The target service is not a WebService but some python script that must to receive some paramters via POST request.
         HOW can I post this parameters?
    Here you entered the fields of the message type of the request in the header parameters of the receiver adapter? Thats fine.
    But what about the message type and vice versa of the response from the receiver?
    Regards
    Rebecca

  • How to copy Log text (with Date, Time stamp ) User IDfrom BP to Transaction

    Hi Experts,
                     Can someone guide us how  to copy Log text (with Date ,Time & User ID) fron Business partner  (Prospect) to transactions by text detrmination procedure.
    Regards,
    Basavaraj Patil

    save text
    Fill out following parameters of SAVE_TEXT function module:
    HEADER
    TDOBJECT C 10 BUT000
    TDNAME C 70 10 digit BP number
    TDID C 4 Z001
    TDSPRAS C 1 Language
    INSERT = ’X’
    LINES
    TDFORMAT TDLINE
    |
    |testtttttttttttttttttttttttt( Your text)
    I would suggest you to use some other BAPI that would attach your text to BP than SAVE_TEXT.
    If you still wanted to use SAVE_TEXT then first make sure how the TDNAME is generated. It depends on the text determination procedure. For examples, it can be guid of BP, GUID followed by date or time or else the BP number itself.
    Just go to BP transaction, double click on the text pad, it will open you the SAP Script editor. Click on menu GOTO and select Header which will give you info about your TDID, TDOBJECT, TDNAME....
    Hope this helps.

  • Can we replace OTR text with Images?

    Hi All,
    I just wanted to know can we replace OTR text with Images?
    or
    Can we define an image as an OTR text? so that it can be placed in the page where OTR text is used.
    regards...
    Ravi

    Hi Ravi,
    it is possible to replace an OTR Text with an image.
    You first have to define the Link in the OTR Text where your image is located. This can be everywhere in the Internet or better on a secured intranet server which everyone can reach easily without permission problems. Maybe in the DMZ.
    You can even link it into the MIME Repository of your SAP System as well.
    Then you have to put that OTR Text into a
    <htmlb:textview> Tag and ensure that the switch
    " encode = "TRUE" is enabled.
    Well thats all.
    Keep in mind that the a different language, set in the Internet Explorer or other viewing instances, disables the link if it not "translated" into that language.
    This can also be an advantage if you got multilingual fixed pictures with drawn text in it.
    I suggest you put all your links ( with a Value Field and at least a name field) into a seperate table into the repository for easy maintaining.
    Greetings,
    Dominik
    Edited by: Dominik Lemke on Dec 19, 2007 12:02 PM

  • What is activity in SAP CRM  with examples plz?

    Dear All
       What is activity in SAP CRM  with examples plz?
    Thanks
    CRM Newbee

    Activities are explained in CR010 & CR300. It is a transaction type used to record sales activities e.g. telephone call, email or customer visit or a follow up call, request to fill up a questionnaire or request to set the status to complete etc. in customer/partner engagement lifecycle. This has mainly information like: Activity type partner, texts & dates. However it is an order document like opportunity, sales order etc. & extra information can be added by including customer set types like we do in opportunity, quotation, sales order, conttract etc.
    Activities are a central part of SAP CRM & used across application e.g. Interaction Center, Sales, Marketing etc.
    I hope this should be sufficient & helpful.
    If you need to understand more about basic concept of Activities please see the dropdown list for Activity types..this will give you a good idea as to what are the kinds of business transactions which can be activities.
    Regarding Quotation thing...Quotation is not an activity but 'Create Quotation' or 'Create Quotation as follow up to a lead or opportunity' can be an activity.
    Thanks,
    Vivek

  • Working with placeholders and templates in 10gR4

    I am new to 10gR4 features. Can someone help me in working with placeholders and templates in 10gR4. Is there a document available on that?
    This is what is did. I created a primary page which contains a contribution region for list of articles(dynamic list fragment). Next, I created a secondary page (hcsp file) which is designed to create/update new artcicles. I also added a placeholder before the contribution region for this article by name ArticleDetail.
    I was able to add new articles and work with them as usual like in 10gR3.
    But when I tried to access the contents of a particular article using wcm_place_holder service I am not able to see any contents.
    This is the url for the request
    http://hd-pratapm/ucm/idcplg?IdcService=WCM_PLACEHOLDER&siteId=TestSite&dataFileDocName=TESTCONTENTFILE&templateDocName=ArticleDetail
    where the TESTCONTENTFILE is the content id of the article data file and ArticleDetail is the name of the placeholder placed above article contribution region.
    I tried changing the value of templateDocName to content id of the article (TESTCONTENTFILE) and also tried the content id of eondary page file for article, but the same result. I am not able to see anything on the screen.
    Also tried the same with above values with placeholderDefinitionDocName instead of templateDocName parameter but no good.
    Anything wrong I am doing here?
    Regards,
    Pratap

    I tried something different and I am getting the response but the content is not html.
    This is what I tried
    http://hd-pratapm/ucm/idcplg?IdcService=WCM_PLACEHOLDER&dataFileDocName=TESTARTICLE&templateDocName=TESTARTICLE
    and I got the response which is xml data. I think it is the contributed data file for TESTARTICLE.
    What we are looking for is the html text for presenting the article directly on external sites. The documentation for WCM_PLACEHOLDER says that it should get html directly. I am not able to get it.
    This is the snippet of code of articleDetails.hcsp secondary page
    ================================================================================================
    <!--SS_BEGIN_SNIPPET(fragment1,2)--><!--$ssFragmentInstanceId="fragment1", ssIncludeXml("SS_FRAGMENTS_PLAIN", "fragments/fragment[@id='NavMultiHorizontal']/snippets/snippet[@id='2']/text()")--><!--SS_END_SNIPPET(fragment1,2)-->
    </p>
    <p> </p>
    <p><!--$wcmPlaceholder("QtelArticleDetail")--></p>
    <p>
    <!--SS_BEGIN_OPENREGIONMARKER(region1)--><!--$SS_REGIONID="region1"--><!--$include ss_open_region_definition --><!--SS_END_OPENREGIONMARKER(region1)-->
      <!--SS_BEGIN_ELEMENT(region1_element6)--><!--$ssIncludeXml(SS_DATAFILE,region1_element6 & "/node()")--><!--SS_END_ELEMENT(region1_element6)-->  </p>
    <p><!--SS_BEGIN_ELEMENT(region1_element2)--><!--$ssIncludeXml(SS_DATAFILE,region1_element2 & "/node()")--><!--SS_END_ELEMENT(region1_element2)--> </p>
    <p><!--SS_BEGIN_ELEMENT(region1_element3)--><!--$ssIncludeXml(SS_DATAFILE,region1_element3 & "/node()")--><!--SS_END_ELEMENT(region1_element3)--></p>
    <p><!--SS_BEGIN_ELEMENT(region1_element4)--><!--$ssIncludeXml(SS_DATAFILE,region1_element4 & "/node()")--><!--SS_END_ELEMENT(region1_element4)--></p>
    <p><!--SS_BEGIN_ELEMENT(region1_element5)--><!--$ssIncludeXml(SS_DATAFILE,region1_element5 & "/node()")--><!--SS_END_ELEMENT(region1_element5)-->
    <!--SS_BEGIN_CLOSEREGIONMARKER(region1)--><!--$include ss_close_region_definition --><!--SS_END_CLOSEREGIONMARKER(region1)-->
    ================================================================================================
    Can you please suggest what else needs to be done in order to get html repsonse from WCM_PLACEHOLDER service.
    Regards,
    Pratap

  • Search .docx and replace text with image

    I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using the image names as placeholders, opening the document
    and searching for the image name, replacing it by inserting the image, and doing so for each image in the directory.
    $file is the name of the image in the directory and it loops through them okay.
    foreach($file in Get-ChildItem $savepath -Filter *.jpg)
            # search word doc and replace selected text with image ($file)    
    Also inserting the image seems simple enough from a TechNet article I found, but I've got no idea how to open the Word document and do a search and replace. I found a few articles related to the subject but I couldn't get them to work when I tried to adapt
    them.
    Any help is appreciated. Thanks in advance.

    This 'might' be possible, but I'm having a hard time finding good references to the com object capabilities for inserting an image into a word document.  Creating new, converting format, that sort of thing is straightforward.
    I'd do a search on "powershell word comobject" and variations of insert image update edit, etc.  Or maybe someone else with more experience/knowledge has a magic bullet for you.  Once you get some info on doing it with powershell, expand
    your search by omitting the powershell keyword, there's gotta be some solid documentation for the comobject somwhere, but it will probably be a bit complex.
    You can also:
    $word = new-object -comobject word.application
    $doc = $word.documents.add("<path to word document>"
    and get-member to your heart's content, but finding references and/or documentation might be easier.  
    Good luck!
    Edit:  This could help, but really doesn't give much insight into placement of the image, only helps getting the image into the doc:  http://gallery.technet.microsoft.com/office/44ffc6c8-131f-42f1-b24b-ff92230b2e0a
    If you do find something useful, post it here, I'm sure others could benefit!
    SubEdit:  Should have thought of this already...
    http://msdn.microsoft.com/en-us/library/ff837519(v=office.14).aspx

  • Action on cells with placeholders

    I'm rendering a report with help of Microsoft.ReportViewer.WebForms on a aspx site. Some cells have multiple values with placeholders. When using placeholders the action command doesn't seem to be rendered correctly, the cells aren't rendered as links. Have
    tried to use single values in the cells and then the links are working. The links are referring to another report.
    When I render the report in Visual Studio the links are working but not on the website.
    I need to have placeholders due to that the values in each cell needs to have different colors.
    The cells looks like:
    3 (red)
    5 (blue)
    8 (green)
    Does anyone have a clue how to make the action command to render properly?

    I'm still struggling with this problem. Is there any way to color a text value into different colors without using HTML tags? Like this:
    AAA BBB
    CCC

  • Generating random text for placeholders in Pages

    In the templates that come with Pages the text placeholders are all in Latin, which I think looks quite professional. My question is: how can I generate random Latin text, like in the templates?
    Thanks
      Mac OS X (10.4.7)  

    You can also use the nifty freeware MacLorem, which will generate random Latin text with various specifiable qualities (and can produce mock text for various other "languages").

  • SAP GUI with SNC logon and Hummingbird Exceed - SAP GUI window size issue

    We have discovered an issue when SAP GUI 7.10 is used to logon via SNC and Hummingbird Exceed is used on the same workstation to logon to a UNIX system either via x-windows or telnet.
    When the user logs onto a UNIX system using Hummingbird Exceed, then uses SAP GUI to logon to a SAP system with SNC authentication, the SAP GUI authentication works, but the favourites list is not fully displayed and has to be resized before any of the entries are available.
    Has anybody else seen this issue, and do they know if there is a fix available ? We wondered if there might be an issue with fonts or some other sort of conflict between Exceed and SAP GUI, but it is strange that the problem only occurs if SNC authentication is being used, and when userid+password is used to logon to SAP the problem does not occur.
    Cheers,
    Tim

    Hello Tim and Wolfgang,
    I was curious too as I found it interesting... so I tested a few combinations, but could not reproduce what Tim has described, at least not before my CPU reached 100% and the applications stopped responding (~2GHz processor, 1GB RAM, 48 kbps connection, latency ~ 2 x width of the Pacific Ocean, but Backend 7.00!).
    However I did notice some indications which might be a help (based on 7.00!):
    Back in 4.?? there was a problem in that large menus could not be searched(!). Sorry, I don't have access to SAP now, but from memory the note # was 444043 (or very similar) and introduced a form routine for large menus - from a printscreen I still have the message number which led me to the note - 'I476(S#)'.
    The system certainly distinguishes between MENU_TYPEs and the above note corrections could be found in several locations relating to the SAP menu 'S', the role menu 'A' etc, but I could only see that for favourites 'F' this is implemented for the menu search (when searching, not when loading).
    @ Tim: Ask you customer to create a favourites menu which only has 1 node or max 2 (certainly not more than 4!) and ~ 20 executable objects in it (not more than 30!)? Can they under any conditions achieve the described problem with such a menu?
    If not possible to reproduce, then the closest I could guess is a maximum limit of 4 nodes and max 30 objects for a 'F'avourite menu, before it is a minimum candidate for "performance problems" and consideration to be converted to a role ('A'ctivity group) menu instead.
    Sorry that I can only help by speculating, because I could not reproduce what you have described.
    Hopefully this problem will not happen to me in the New Year, and hope you will solve it for the rest of the year
    Cheers,
    Julius
    Updated memory (not RAM) by: Julius Bussche on Jan 3, 2008 9:07 AM

  • I cant transform my text to 3d text with my photoshop cc what can i do? all 3d options seem to be blocked

    hello i cant transform my text to 3d text with my photoshop cc what can i do? all 3d options seem to be blocked

    Also check your system's capabilities against the Adobe Photoshop requirements:
    System requirements | Photoshop
    -Noel

  • Why can't I text with non Apple equipment?

    Why can't I text with non Apple equipment?

    You can with third party apps. You just can't use Messages in order to text since it only works with other iOS devices and Macs running Mountain Lion.
    https://www.google.com/search?q=texting%20apps%20for%20iPad

  • When texting with more than one person at a time the incoming text scrolls to top of the conversation. anyone out there with the same issue?

    while texting with more than one person at a time the incoming texts scrolls to top of conversation. anyone having this issue?

    I've heard claims it can be done, claims some have done it, and claims that it didn't work for them. This thread is interesting, some indications it should be possible, complaints that it didn't, and also an interesting work-around:
    "How do I text message multiple people at once?"
    http://discussions.apple.com/click.jspa?searchID=-1&messageID=4822260
    You can ask Apple for iPhone changes via this link:
    http://www.apple.com/feedback/iphone.html
    Though if you're requesting hardware changes for iPhone v2 you may want to wait a week (or a month?)...they're probably going to be inundated right now by requests for software changes to the current iPhone.
    (If this has answered your question, please mark your original post as answered)

  • In a group text with two phones that use Imessage and one that does not. The person that does not, does not get my message when its sent in group text. How do i fix this?

    I have a group text with two of my friends. here's each person break down
    person 1 ATT network, using imessage
    person 2 verzion network, using imessage
    person 3 verzion network, using SMS
    All three of us are in a group chat. When person 1 sends a message, person 2 recieves it, but person 3 does not. Then when person 3 sends a message, both person 1 and 2 get it. When person 2 sends an Imessage, person 1 and 3 get it
    so the problem is when person 1 sends an imessage, it doesnt change to sms and person 3 doesnt get it, but person 2's automatilly switches it to green.
    How can person one get their phone to automaticlly switch it to green in group message while keeping on imessage?

    The quote below from http://support.apple.com/kb/HT5760 indicates that it in the situation you describe it should be going as MMS to everyone -- which is not what you are seeing actually happen (and also not what you want to happen if I understand correctly). There may be something else helpful in the link.
    Group messages will be sent using iMessage if all recipients have iMessage enabled. If not, the conversation will be sent as MMS. Group messages use MMS even if the content is text only.

Maybe you are looking for