SAPScript /: INCLUDE statement, no new line

dear all, i am sure there is a way of doing this, just cannot see how.
quite simply, i wish to have a description before the
/:INCLUDE &T166P-TXNAM& OBJECT &T166...
gets displayed, but on the same line !
currently this,
/E   ITEM_TEXT              
D1   Material Description   
/:   INCLUDE &T166P-TXNAM& OB...
throws a new line, which i know, but dont want
thanks in advanced
ps. print program must stay the same, also, no shelling out to other zprogram. want to do this in SAPScript

Use a subroutine program to get the Include text value. With this you can get your requirement.
Refer this link
http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Text Include / Read_TEXT  in Smartforms
http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm
http://www.sapdevelopment.co.uk/fmodules/fms_readtext.htm
Edited by: Bala Krishna on Sep 12, 2008 8:36 AM

Similar Messages

  • Sapscript: IF statement over multiple lines ?

    Hi,
    in my sapscript i have to use an IF statement with many OR conditions
    /:   IF cond1 OR cond2 OR cond3 OR cond4 OR cond5 ........
    But i can't write it on one line. Even with SHIFT-F8 to go to the right the line lenght is too short.
    How can i solve this one ?
    regards,
    Hans

    Hi,
    This is not a solution, more a workaround but should avoid the line length problem.
    Define a flag in your form (/: DEFINE &IF_FLAG&), then you can call an ABAP subroutine to set the value of this flag (take a look at the online help for SAPscript PERFORM if you're not familiar with it).  The subroutine will contain your long IF statement and the SAPscript will just contain
    /: IF &IF_FLAG& = 'X'.
    Regards,
    Nick

  • New Line using Transfer Statement

    I need to write data to a text file in a particular format. I am not passing records of an internal table to the text file. I need to pass fields of a single row in a tabular format. For this, I need to use the new line character...I want fields of a single row to be displayed one below the other.
    Any idea on how we could do this?

    Hi vidya,
    1. For application server,
       we have to use open dataset, transfer, close dataset,
       (and take care of the spacing between the fields)
    2. For presentation server,
       we have to use the fm GUI_DOWNLOAD
       and do not pass the parameter
       WRITE_FIELD_SEPARATOR = 'X'
      (when we do not pass this parameter,
       the data is written in FIXED-LENGTH
       including spaces)
      (So when we view the data in notepad,
       the fields will be very much aligned,
        one below the other)
    regards,
    amit m.

  • A new line is showing up on messages I receive. It's seems to be a row of links, including a URL to (maybe) the msg source. How do I get rid of it?

    On my incoming messages, under my toolbars & above the msg header, is a new line. It sort-of looks like another toolbar, but different. It reads from left to right and each word is highlighted white:
    Back Forward Refresh URL: ___________________ Go
    Each of these words except for "URL:" are in boxes as if they are links but they don't work like links.
    What is this and how do I get it off my incoming messages?
    Thanks, nanciewanda

    I have no idea. Perhaps you could post the troubleshooting information so we can have a better look at what is going on.
    Click the Help menu (Alt+H) and select ''Troubleshooting Information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy text to clipboard". Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.

  • New-line code in mapping table

    Hi,
    we have a mapping table that stores the footers of all our companies.
    These have text like " <b.>Company Name...</>.....".
    (Note: ignore the '.' after the '<b' in the previous - I needed it here so I could display the command in SDN- it is not in the text on our system). This works fine and the appropriate section is in bold.
    The question I have is that one of our companies needs the footer to have a second line so I need some sort of '<>' command to force a new line.
    I have tried <cr>, <br>, \n and
    n.
    Does anyone know how to do this?
    Thanks.

    Sesh,
    thanks for your help. I managed to get it working. Not the most elegant bit of code but it works:
        FIELD-SYMBOLS <fs> TYPE ANY.
        ASSIGN '0' TO <fs>.
        SEARCH l_text FOR '\NL'. "I decided to call it '\NL'
        IF sy-subrc = 0.
          SPLIT l_text AT '\NL' INTO l_text2 l_text3.
          ASSIGN l_index TO <fs>.
          IF NOT l_text2 IS INITIAL.
            WHILE NOT l_text2+l_n(80) IS INITIAL.
              l_index = l_index + 1.
              CONCATENATE 'DESC' <fs> INTO l_desc.
              READ TABLE outtab WITH KEY = l_desc.
              outtab-value = l_text2+l_n(80).
              MODIFY outtab INDEX sy-tabix.
              CLEAR outtab.
              l_n = l_n + 80.
              l_wa_o_text-tdformat = '*'.
              CONCATENATE l_wa_o_text-tdline '&' l_desc '&' INTO l_wa_o_text-tdline.
            ENDWHILE.
            APPEND l_wa_o_text TO l_o_text.
          ENDIF.
          APPEND l_wa_o_text TO l_o_text.
          CALL FUNCTION 'CREATE_TEXT'
            EXPORTING
              fid         = 'ST'
              flanguage   = sy-langu
              fname       = 'ZDYNAMIC_TEST'
              fobject     = 'TEXT'
              save_direct = 'X'
            TABLES
              flines      = l_o_text
            EXCEPTIONS
              no_init     = 1
              no_save     = 2
              OTHERS      = 3.
    outtab passed back to SAPScript....
    SAPScript Code:
    INCLUDE 'ZDYNAMIC_TEST' OBJECT TEXT ID 'ST' PARAGRAPH 'Z2'.
    Thanks.

  • What is happening with my new line install?

    Hi,
    I don't normally post on anything like this, but feel I am being left no alternative, other than cancelling my order.
    I am a new customer to BT and on the 14th of May I placed a order for a broadband and phone package, which was to include a new line installation on the 5th June between 8am and 1pm.
    I also ordered a new phone system and dual wifi dongle which all turned up as expected.
    On the 5th June I took a day off work and waited until just after 2:30pm for the engineer not to turn up.
    I received no call, text or email telling me that the appointment had been cancelled, it took me to call BT and finally manage to get to speak to somebody human to find out that it had apparently been delayed.
    First I was speaking to somebody from the UK the next I was put through to order management in India, which started to infuriate me more as the line was really bad and I was calling from my mobile for then to have them hang up on me.
    I called back a further 3 times after being passed from pillar to post to eventually get put back in touch with a order management lady in India again.
    She told me that the problem was with openreach as they reckoned they had tried calling me on the 14th May (when I placed the order) to which I replied I had not received any phone call from them.
    They wanted to know if it was a first or second line installation, I replied 5 times with it is a separate line that needs to be installed and I still don't think she understood after that.
    I was then told I would get an update on the 12th June between 8am and 8pm as to when the line was going to get installed, to which I did and again was a bad line as the call came from India just to be told there is another delay which will be the 19th June.
    At this point I'm beginning to lose my patience, I had waited nearly a month for the line installation to happen to be told that there was another delay which would take another 7 days before somebody updated me again.
    After I put the phone down I received a text from BT sms saying they had tried to contact me but we're unable to do so but not to worry they will be back in contact on the 22nd June?
    Very strange seen as I had just spoken to somebody and was told the 19th June.
    I rang back through to BT and got put through to India yet again where the signal was poor and asked that somebody call me from the UK as nothing seems to be getting sorted.
    Within 10 mins I got a call back and was put through to BT in Dundee, I explained the whole situation over again and was told they would be looking into the problem and would get back to me later on the same day the 12th June.
    It is now the 17th June and I still have no answer as to when the line installation is taking place, so I can start using the equipment I have paid for.
    if I knew in the first place that this was going to be a problem I would have used a different provider other than BT, as a new customer I find their lack of communication and generally not seeming to give a **bleep** about customers poor, with my only choice then being if I don't get the answers I want on the 19th June I will cancel the order and send everything back for a full refund and would advise others not to use BT in the future.
    Sorry for the rant and this being my first post but I am beginning to lose my patience any help would be appreciated.

    Hi lda1979, 
    Welcome to the forum and thanks for your post. 
    I am so sorry that your order has been delayed and you are not getting any information on this. 
    Can you send me in your details using the "Contact The Mods" link found in my profile and I will find out what is happening. 
    Cheers,
    OlgaC 
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Can I choose an exchange for a new line if equidis...

    Hi,
    We are considering purchasing a new build property in the KA6 5HB postcode.
    The sales centre at the property has two phone connections - one from the Prestwick exchange, and one from the Annbank exchange. The postcode for the sales centre is KA6 5HL which is 100 metres distant from the KA65HB postcode although this is not the way it is shown on the Openreach map.
    Broadband speed in the sales office is 18Mbps down, 4Mbps up which would be acceptable.
    The BT site states that 1-2Mbps is possible for this location?
    The Prestwick exchange is due to be upgraded in December this year (shown as Coming soon), however the Annbank exchange is Under Evaluation so is unlikely to be upgraded anytime soon(if ever).
    Is it possible to specify which exchange we would like to be connected to as part of the new line installation.
    Thanks

    very unlikely if Openreach would even consider it and even if it could be done the costs could in the thousands to be done the site office which is showing the speeds you post would only be available as a fibre connection
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Create a new line in the smartforms

    Hi Guys,
    Please let me know to create a new line in the smartforms.
    I tried creating a window with the height length is 0 cms.
    It is allowing to create a line.

    Hi,
    First I need to include the LOGO and next line I need to make a line.
    What do you mean by 'making a line '?
    Is it an empty line?
    If it is just a blank line, while creating the text below the logo just give one line space and then type in your text.
    Regards,
    Shailaja

  • Creating a new line in PLSQL

    I am trying to create a new line by returning a variable from a function by coding the following which worked for the last version of HTML_DB and understood that after my variable named vlname I wanted a new line
    msg := 'NAME: ' || vlname ||'<br><br>';
    When passing back the value of msg now in Application express. This exact code I repeat worked for the last version of HTML_DB.
    I don't know why but the new version thinks it's literal
    and is displaying the name and then actually prints <br><br>.
    Does anyone have a ny suggestions ?
    Thanks
    Aron

    I just did the following:
    Created this function:
    create function br_test
    return varchar2
    is
    begin
      return '&lt;br>qwerty&lt;br>qwerty&lt;br>';
    end;Created a blank page with a html region. I then created an an item of type Display as Text (does not save state). Item Source type = PL/SQL expression or function and Source value or expression = br_test.
    When I run this qwerty is shown twice on seperate lines. What is different in you case?
    Regards Pete

  • XVBAP has the new line item but does not update Sales Order

    Hi
    I need to update the sales order with a new line item when the line item has a base unit of measure as the sales unit. I need to then convert the base unit to sales unit with a whole figure and the rest can be in the base unit.
    I am able to see the update in the xvbap but the line item doesn't get updated.
    I am puting this code in a perform within
    MV45AFZB  within   Form  USEREXIT_CHECK_VBAP
    But I guess I am doing something wrong can someone please take a look at it and tell me what is wrong with the coding.
    *&  Include       ZSD_CREATE_NEW_LINE_ITEM              *
    *&      Form  create_new_line_item
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_NEW_LINE_ITEM .
      CONSTANTS: C_MEINH LIKE MARM-MEINH VALUE 'CSE'.
    Variables Used
      DATA: WS_WMENG LIKE VBEP-WMENG.
      DATA: INPUT  LIKE VBAP-KWMENG,
            WS_EA  LIKE VBAP-KWMENG,
            WS_CSE LIKE VBAP-KWMENG.
      DATA: WS_MVKE_VRKME LIKE MVKE-VRKME.
    Internal Tables and Structures
      DATA: WS_XVBAP LIKE XVBAP.
    DATA:
    it_vbap  LIKE vbap OCCURS 0 WITH HEADER LINE,
    it_vbep  LIKE vbep OCCURS 0 WITH HEADER LINE,
    it_xvbap LIKE vbapvb OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF WS_MARM,
              MEINH LIKE MARM-MEINH,
              UMREZ LIKE MARM-UMREZ,
              UMREN LIKE MARM-UMREN,
            END OF WS_MARM.
      CLEAR WS_MVKE_VRKME.
      SELECT SINGLE VRKME INTO WS_MVKE_VRKME
        FROM MVKE
        WHERE MATNR EQ XVBAP-MATNR
        AND   VKORG EQ XVBAK-VKORG
        AND   VTWEG EQ XVBAK-VTWEG.
      IF VBAP-VRKME <> WS_MVKE_VRKME.
       LOOP AT XVBAP.
          SELECT SINGLE MEINH UMREZ UMREN
            FROM MARM
            INTO WS_MARM
            WHERE MATNR = VBAP-MATNR
            AND   MEINH = WS_MVKE_VRKME.
          IF XVBAP-MEINS <> WS_MVKE_VRKME.
            IF NOT XVBAP-KWMENG = 0.
              WS_WMENG = XVBAP-KWMENG / WS_MARM-UMREZ.
              IF WS_WMENG > 1.
    This means that the line item needs to be split into CSE & EA
                  INPUT  = XVBAP-KWMENG.
                  WS_EA  = INPUT / WS_MARM-UMREZ.
                  WS_CSE = WS_EA.
                  WS_EA  = WS_CSE * WS_MARM-UMREZ.
                  WS_EA  = INPUT - WS_EA.
    Now we have the qty. split into EA & CSE. Now to
    assign it to xvbap
                  XVBAP-KWMENG = WS_EA.
                  XVBAP-VRKME  = WS_MVKE_VRKME.
              READ TABLE XVBAP WITH KEY POSNR = XVBAP-POSNR.
                MODIFY XVBAP INDEX SY-TABIX.
                  WS_XVBAP = XVBAP.
                  WS_XVBAP-KWMENG = WS_CSE.
                MOVE-CORRESPONDING WS_XVBAP TO XVBAP.
                INSERT XVBAP INDEX SY-TABIX.
              ENDIF.
            ENDIF.
          ENDIF.
      ENDIF.     " IF xvbap-vrkme 'EA'.
    ENDFORM.    " create_new_line_item

    Hi Clark,
    Pls check the Include MV45AFZZ instead of the one which you are using . Here in this include MV45AFZZ you can have access to the Header and Line items data .
    Here in this include
          FORM USEREXIT_SAVE_DOCUMENT                                   *
          This userexit can be used to save data in additional tables   *
          when a document is saved.                                     *
          If field T180-TRTYP contents 'H', the document will be        *
          created, else it will be changed.                             *
          This form is called at from form BELEG_SICHERN, before COMMIT *
    form userexit_save_document.
    Endform.
    Either you can write the code you want to update the XVABP table here or you can use the form .
          FORM USEREXIT_MOVE_FIELD_TO_VBAP                              *
          This userexit can be used to move some fields into the sales  *
          dokument item workaerea VBAP                                  *
          SVBAP-TABIX = 0:  Create item                                 *
          SVBAP-TABIX > 0:  Change item                                 *
          This form is called at the end of form VBAP_FUELLEN.          *
    form userexit_move_field_to_vbap.
    endform.
    This are the 2 performs in this include where you can do you code and it will defnitely solve your problem.
    Good Luck to you . Let me know if your problem get solved.
    Thanks & Regards,
    Naidu.

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • Print data at new line in SAP Scripts

    Hi,
    Is there any way that i can print data at new line in sap scripts. I am looping my data and its printing in the same line but i need to print it at new line. Is there any formating options or any command to do that.
    Thanks

    Than you must take all the values from the internal table into the different variables and than print them.
    In program:
    READ TABLE ITAB INTO WA_TAB INDEX 1.
    IF SY-SUBRC = 0.
      VAR1 = WA_TAB-FIELD1.
    ENDIF.
    * read all the lines and fill the VAR variables
    In SAPScript:
    /E LINE_VAR
    /P &VAR1&
    /P &VAR2&
    /P &VAR3&
    /P &VAR4&
    Regards,
    Naimesh Patel

  • af:validateLongRange displaying message: How to insert 'new line' ?

    Hello,
    While using <af:validateLongRange> tag we need to display message in a well formatted way, we have to display each statement in a new line.For eg. : message as displayed by property 'messageDetailNotInRange' must come in three different new lines not as a continuous statement.I tried inserting '\n' escape sequence for new line, but it dint work.I tried spacing the statements but that also is not working out.
    Any idea how can we get this message displayed separately in three rows rather than in a continuous statement ?
    ++messageDetailNotInRange="You have entered a value more than is available. Value entered must be in the range of {2} to {3}.To delete this line, clear the value and click Delete"++
    +<af:validateLongRange id="xyz_VC1" minimum="1"+
    maximum="100"
    messageDetailNotInRange="You have entered a value more than is available. Value entered must be in the range of {2} to {3}.To delete this line, clear the value and click Delete"
    messageDetailMinimum="Minimum {0} allowed is {2}"
    messageDetailMaximum="Maximum {0} allowed is {2}"
    hintNotInRange="#{'xyz'}"/>

    Thx..Done that!! but dint get the desired result ,I put it as :-
    messageDetailNotInRange="You have entered a value more than is available.&lt;br&gt; Quantity entered must be in the range of {2} to {3}.&lt;br&gt; To delete this order line, clear the quantity and click DELETE."
    On corresponding page this message was displayed as :
    You have entered a value more than is available.<br> Quantity entered must be in the range of 1 to 100.<br> To delete this order line, clear the quantity and click DELETE.
    It dint insert line breaks in the message.Do i need to write it differently?
    Above html code is modified once i posted it, it has inserted line breaks here for the br tag i added , but in my actual .jsff page it did not . I can only see br tag displayed as part of message and no new line got inserted.
    I dont see an option to attach a file with the post so that I can show the code to you.
    Edited by: user13439821 on Aug 15, 2011 2:58 PM

  • How to insert new line character?

    Hi all,
    I have two lines to print.
    out.println("Available number of columns="+cols);
    out.println("Number of columns must be present=10");My problem is:
    i want both the lines to be printed one below the other. But, it is displayed in one single line.....
    Can anyone please tell me how to insert new line character?
    I tried with \n, '\n' and \r\n but, in vain......
    Thanks for your time.
    Regards,
    Ashvini

    You should never use "\n" directly.
    The line separator character is different on different operating systems.
    And putting quotes around it in your string will make absolutely no difference in the JSP.
    To find out what the line separator is you should use System.getProperty("line.separator");
    The JSPWriter and PrintWriter classes will automatically use this property with a println statement, so a println will always finish with a line separator.
    The issue here was that HTML by default ignores all whitespace.
    The solutions provided
    - use a <br> tag instead of a carriage return
    - use <pre> tags, which tells the browser not to ignore whitespace. That can be troublesome in JSP which generates a lot of extraneous carriage returns into the code.
    Cheers,
    evnafets

  • NEW LINE CHARACTER

    i am trying to load text into the BASIC TEXT of the material. The input file has matnr and the text. The file we loaded is fine. But in the text editor the # for new line character appears and this is causing problem while writing the text in a sapscript.
    so i am trying to remove the # for the new line character while we load the file. i am using
    data: c_tab like CL_ABAP_CHAR_UTILITIES=>CR_LF. to split the file and it is not being recognized. The input file is a tab delimited text file from excel. and it has " at the begining and ending.
    thanks in advance

    that is problem with Xls , If u have text with any Delimitors then u will get this kind of Stuff.
    prabhu,peram then i will get in text file as "prabhu,peram".
    Regards
    Prabhu

Maybe you are looking for