Reg INCLUDE command in SAPscript

Hi Folks,
   Can anybody tell me is it possible to give tab in INCLUDE command in SAPscripts.
   What I mean is I want to display standard text after few spaces.
   Thanks in Advance
   Punit

Hi Punit,
      You cannot give tabs for INCLUDE command. On the other hand you can read the text in your print program using READ_TEXT function module. You can modify the text using SAVE_TEXT and send it to the SAPScript for output.
With Regards,
Nelson

Similar Messages

  • Include command in Sapscript

    Dear all,
    I've added an include command in the main window of my sapscript in order to display text object in my forms. THe thing is that I would like to be able to position the free text not on the left of the windows but in the middle of it. But it seems that I can't use tab strip with the include command.
    /: ,,,,include &VBDPA-TDNAME& OBJECT VBBP ID 0002 Language en does not work for instance.
    Any idea?
    Regards.
    NC.

    Hi,
    Do one thing I am not sure that this will serve your purpose.
    Create one new window and place it on your main window where you want to print that text.
    In that created window INCLUDE your text object and make that window as CENTER justification in paragraph format.
    Here you will face one problem with size of the window.
    That is if your TEXT exceeds your window width or height then the TEXT will be truncated.
    So you need to take care of it.
    Try with this i hope it will solve your issue.
    Thanks.

  • Include command in SapScript to fill in a local field

    Dear all,
    Normally when we are using the INCLUDE SAPscript command, the system is printing the information retrieved.
    My question is, if someone of you know, whether is possible to put the information retrieved into a local field, defined as DEFINE &wa_localfield& := include &tdname& object vbbk ...
    Many thanks in advance !
    Rgds., Anton

    No, that is not possible using the INCLUDE statement.
    Welcome to SDN!
    Regards,
    Rich Heilman

  • What is use of Read-Text  command in Sapscript  plz replay

    What is use of Read-Text  command in Sapscript  plz replay
    i m geting problem with read-text command in sapscript as will as
    perform and endperform .

    Hi Majid,
              It's a function module to read the texts from a text file. Generally it is used to retrieve the long texts.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ´
    ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:  
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    Br,
    laxmi.

  • Indent /tab position for text from INCLUDE texts in SAPscript

    Hi, ABAP colleagues!
    Need your help on this sapscript problem:  How to align texts taken from "INCLUDE TEXT" in SAPscript, according to tab defined in Paragraph Format?
    Or, how to control tab positions for texts which were extracted from “INCLUDE text” commands in SAPscript?
    I defined a paragraph format with tab stop at 8 CH so that with 2 commas (,,) my text will be displayed there.  However it always appears to the left (e.g. 1st column) and not indented at the proper column for description/text (e.g. which is in second column). 
    Pls help, bec a different heading and information is not acceptable to client for the Thailand characters. 
    Above is the description of the problem.  Below are some technical details.
    For specific example, I am editing Zversion of standard sap MM form MEDRUCK Window Main -  Text Element Item Text.
    BG ,,&TTXIT-TDTEXT&
    /: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&
    /: NEW-PARAGRAPH BG
    So far, tried these approaches:
    PARAGRAPH
    NEW-PARAGRAPH
    LANGUAGE '2'
    THANGSAN font
    Any ideas?
    Thank you so much in advance for all your help. Our project team will really appreciate it. May the Lord bless you as we go through our SAP work!
    Sincerely,     
    Celeste

    Hello Caleste,
    Please let me know what settings you have done to solve this issue.
    Help me with steps for Spool Request/Print settings.
    Regards!!
    Surya

  • Importance of language in include command

    Hi All,
    wat is the importance of language in INCLUDE command? in sapscript
    i mean wat happens if we ignore/omit language in INCLUDE command?
    for example i have 3 item texts
    z003 - FR
    z007 - IT
    z008 - BE
    these languages may be changed by the user to any language as per his choice,,,,so we cannot pass hard-code values for lanague in INCLUDE statement..
    Thanks
    John

    John,
    Adding to the points mentioned by our frnds above, if you really want the form output to be displayed in different languages, its SE63 T-code which helps in translation.
    You can create the standard texts in SO10 with teh same name but in different languages. In translation, in the appropriate version you can call the text in the desired language.
    IT works as you require. Try it out and get back for any other issues.
    Regards
    Priya

  • Returncode from include command in sap scipt

    HI,
    If  I include a textelemt with the /: include command I can not identify if that textelement was available or not. So I would like to check a returncode after my include.  Is there any way to do so?
    Because I try to do following as final version:
    include   header_customer_no
    if include fail
    include  header_material_no
    if include fail
    include header_default.
    Any hints how I can do so?
    Thanks
    Jens

    Hi,
    I'm not sure if you can check for this in the SAPScript itself, however, what you could do (if the print program is a Z program) is to add logic to determine if the text exists in table STXH, using the text name, object, id and language.  Based on the results of the select, you could move on to the next STXH until you either get a match or not.  Then you could set global variables to hold the object, id, name and language and pass those to a single INCLUDE statement in the SAPScript element.
    If your print program is not a Z program then you can achieve the same effect by using the /: PERFORM statement to call a subroutine in a Z program object and use this to determine and return the object, id and name.
    Hope this makes sense.
    Regards,   Andy

  • About BOX control command in SAPScript.

    Hi,
    I am using the BOX control command in SapScript.
    Is it possible to assign the values of Xpos and Ypos dynamicalliy.
    In BOX XPOS 16 CH WIDTH 0 MM HEIGHT 18 MM FRAME 10 TW,
    i want to assign the values at runtime, instead of
    xpos 16 , something like Xpos Var, where var contain the value of xposition.

    Hi,
       We cant give the dynamic value in runtime . It should be static.
    Regards,
    Saran

  • Include command line args in executable jar?

    Hello all,
    I'm trying to package up some software which takes 2 command line args to run (for example, java -jar prog.jar FooBar 3.14159). I'm using a utility called Jar2Exe to wrap it up into an exe (still needs JRE to run, but it's nicer packaging for distribution).
    My question is, how can I included command line arguments in the jar? Or can I? Or, are there any exe-wrapping utilities out there that will allow me to accomplish this?
    Thanks,
    -Thok

    Thok wrote:
    Hello all,
    I'm trying to package up some software which takes 2 command line args to run (for example, java -jar prog.jar FooBar 3.14159). I'm using a utility called Jar2Exe to wrap it up into an exe (still needs JRE to run, but it's nicer packaging for distribution).
    My question is, how can I included command line arguments in the jar? Or can I? Or, are there any exe-wrapping utilities out there that will allow me to accomplish this?
    Thanks,
    -ThokOkay, did some more research... It appears you can't specify command line options in a jar, but if you package it into an exe, you can--depending on what utility you use to wrap it, that is. I downloaded a free one (Launch4j) and it does the trick.
    -Thok

  • SUMMING command in SAPScript

    Hello gurus,
    I am trying to use the SUMMING command in SAPScript to output a total on each page of a transfer order.
    According to the sap help, I need to declare the summing total variable within the print program using the TABLES statement, I'm trying to total LTAP-VSOLA so should I be declaring a table of this type? ANd if so, shouldn't I be using a DATA statement for this? I'm confused as to what the help actually means?
    Has anyone used this statement before and have an example that I can see?
    Thanks,
    Ruby

    Try like:
    /: DEFINE &TOT_PRICE&
    /: SUMMING &KOMVD-KBERT& INTO &TOT_PRICE&
    or
    /: DEFINE &SUM& TYPE NETWR and write in the loop
    / &SUM& = &SUM& + &BSEG-WRBTR&
    and use this SUM field
    normally I would prefer to calculate this kind of stuff in the print program. But I guess you are using the original SAP program.
    Amit.

  • ADDRESS Command in SAPScript

    Dear all,
    I'm using ADDRESS ~ ENDADDRESS command in SAPScript. I pass street name to STREET as follow
    NAME name1 name2 name3 name4
    STREET &LFA1-STRAS&
    With the above, my street can be displayed out correctly.
    But i faced problem when i have street2 street3 and street4, like below:
    NAME name1 name2 name3 name4
    STREET &LFA1-STRAS& , &ADRC-STR_SUPPL1& , &ADRC-STR_SUPPL2& , &ADRC-STR_SUPPL3&
    With above, nothing printed for street.
    Could you please point me out where did i code wrong?
    Or we can not pass street2/3/4 to STREET?
    Thank you.

    Hi,
    Just Refer this:
    https://forums.sdn.sap.com/click.jspa?searchID=12447471&messageID=2301405
    Check the below link for details on Text Elements
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e91454211d189710000e8322d00/content.htm
    Regards,
    Shiva Kumar

  • Sapscript include command

    I am printing text lines via INCLUDE statement in Invoice(ZFKORD50). Each text has more than one lines. Just after printing first line it needs to print figures on the same line and then continue with rest of the lines.
    Output should be,
    Line 1            | xxxx | xxxx|
    Line 2
    Line 3
    If I write below code
    INCLUDE lv_name' OBJECT lv_obj ID lv_id' LANGUAGE 'E' PARAGRAPH 'MD'
    = &WRSHB_POS&     &WRSHB_DISC&
    It shows figures at last line of text, (gives below output)
    Line 1
    Line 2
    Line 3
    .........            | xxxx | xxxx|
    How can I achive first out put?
    I have tried using READ_TEXT via subroutine. In that case its not possible to retrive all the text lines in the script. (what if they are in 100s)
    Regards
    K

    Calling through subroutine, means using READ_TEXT function module to get text data?
    I am already calling WRITE_FORM  within loop and then calling subroutine withing that element. For one line item I will have few text lines to print. Amount for that line item should print against 1st line of each line item.
    If I am using read_text via subroutine it prints above format. But when I use subroutine with USING AND CHANGING command, how can I bring all the lines of that text line as USING AND CHANGING doesn't accept internal table. So if I have to get just one line or fixed line it can be called by passing fix number of CHANGING in subroutine.
    In this case number of lines of text are not fixed. It can be n.
    Thanks
    K

  • INCLUDE control command in sapscript

    I have used include control program and got long text for desired object,Problem is i want to move these text into some variable how can it be done.

    Hi,
    In the print program use the FM READ_TEXT to read the standard text..
    Then LOOP AT the text internal table and then concatenate the text and move it to string variable..
    Thanks
    Naren

  • About include text in sapscript form printing

    hi experts:
        I am learning about form printing,the control command-include,for example:INCLUDE ZTEST OBJECT TEXT ID ST.
    the question is:how to ceate the text?
       thanks

    Hi,
    Standard text are used to include a Fixed Note or Rules or regulation document in SAPSCRIPT.
    You can include this text any where in your SAPSCRIPT, just by using include text.
    It is created in SO10 transaction, Where you can create the standard text. Object Name --> Starting with Z, Text ID --> ST, Language --> EN
    Just enter the text you want to display inside the editor and save it.
    Then go to sapscript editor --> in Menu Include --> Text --> Standard.
    It wil get included.
    Hope this may be useful..
    Regards,
    Prashant

  • Rightfax commands in Sapscript/Smartforms

    Hi,
    We are using RIGHTFAX with SAP ECC 5.0 for fax sending functionality.
    I have read all the threads related to RIGHTFAX functionality but would like to have answers for the following.
    1) Where exactly in a SAPSCRIPT / SMARTFORM form do I add the fax control commands (FCL Commands)so that RIGHTFAX connector for SAP R/3 recognise them?
    For eg: I want RIGHTFAX to include a particular cover sheet.For that I need to write the fax control command RFSAP_FCSFILE:file name. But where do I write that inside sapscript/smartform?
    Thanks,
    Bhaskar Pal.
    This message is not answered.Somehow it is showing as being answered already. I would appreciate your help/input on this issue. Please respond.

    Hi.  First try to set your post as unsolved.  There should be a radiobutton on the left of your post to do so.
    TO answer your questions,  what you need to do is to create a page, this page will be printed first.  Put your FCL commands in this page.  When the document is send to the printer device(the one setup for RIGHTFAX), it will have this coding on the first page.  Once it reaches RightFax,  the software will recognize that there is FCL code on this page and will except it, get the values, apply them, and then it strips off this first page.  This is good because we don't want the end user to see this anyway.  So, create a page in your sapscript called FAXPAGE,  put your commands in there and always start your printing at this page. 
    Regards,
    RIch Heilman

Maybe you are looking for