SAP Script - Text in BOX.

Hi all,
This is the following code I have written.
/: POSITION MAIN /* name of the window */
/: BOX XPOS '0' CM YPOS '0' CM FRAME 10 TW
/: BOTTOM
/: BOX XPOS '2' CM YPOS '23.3' CM WIDTH '17' CM HEIGHT '1' CM FRAME 5 TW
p1 Conditions apply /p1 is paragraph format*/
/: ENDBOTTOM
I have a main window and I have a box at the bottom of the main window. Now I want to write the text "Conditions apply" in that box.
Can anyone please help me with this.
Regards,
Varun.

Hi Varun,
Please do the following at "p1 Conditions apply /p1 is paragraph format*/":
For Normal text
/*  IF Condition
/:If &EKPO-WERKS& EQ '101'  '.
/*  Write your text
/: &TEXT&  "--Write your text
/:ENDIF.
For Include TEXT (Text maintained as Standard text):
/* --IF condition
/:If &Varible& EQ 'X'. 
/* Write include text ZTEXT--Replace with ur Standard text
/: INCLUDE ZTEXT  OBJECT TEXT ID ST LANGUAGE EN PARAGRAPH ST
/:ENDIF.
Hope this may help you.
Lanka

Similar Messages

  • Adding Fields to New Hire SAP Script, Text ID PAMA

    Hi there,
    I have successfully created a sapscript email to be sent via Dynamic Actions for the notification of New Hires and Terminations.  This has been accomplished via feature M0001 (we have created two new features u2013 M00NH & M00TM), dynamic action (T588z), Business Workplace, distribution lists, etc.  All are working correctly, and an email is being generated and forwarded to appropriate parties.
    Now we have been asked to add extra fields to the SAP Script text for New Hire and Termination.  These are text fields for Employee Group, Employee Subgroup, among others.
    Our syntax has been set up as follows:
    &'Employee Group:             'P0001-PERSG(02)&
    &'Employee Group Text:        'T501T-PTEXT(20)&
    &'Employee Subgroup:          'P0001-PERSG(02)&
    &'Employee Subgroup Text:     'T503T-PTEXT(20)&
    For the New Hire action, we are getting the Employee group and Employee subgroup codes to display but we are NOT getting the Employee Group or Employee Subgroup texts to display.  To confuse the issue, we ARE getting these text fields to display for the Termination script.  Our ABAP'er is also having difficulty determining how to bring in these fields to the New Hire script.
    We have researched this website have tried the instructions given by one user..... which states that we needed to go to our SAPscript text and make the following changes:
    " To get other HR data into your standard text (from SO10):
    Insert > Symbols > Program symbols (now you'll see a list of print programs, and i guess this is where the ABAP grabs the data).
    Highlight the one for HR Master data, and click the DDIC button.
    Double click the table you need data from (e.g P0000, P0001 or P0002).
    Finally select the field you want."
    I have done this, but when I get to the Program symbols, I do not see a print program for HR Master Data.  I only see RPUCOB02 - Processing of Qualifying COBRA Events and Letters & SAPMSSCE - SAPscript Standard Text Maintenance. 
    I tried to use the RPUCOB02 and inserted the text for Employee Subgroup as a test.  But it did not work as the text still did not display.
    The other oddity is that for the Termination sapscript text, the Employee Group and Employee Subgroup text displays correctly.  To test our syntax, we then connect the Termination sapscript text to the 'New Hire' action and reran the New Hire action.  The Employee Group and Employee Subgroup text fields then disappeared.  So it worked when the action was a termination, but did not work when the action was New Hire.
    The difference between these two actions is that the feature for the sapscript generation for New Hires is being generated upon saving of I0002 (which is created AFTER I0001) - we needed the Employee's name in the text.  For the Termination action, the feature is set to generate the mail upon saving of I0001.  This is the only difference between the two.  But as I need the employee name to display, it seemed the best approach.  I did try to generate the New Hire sapscript after saving of I0008, but had the same problem. 
    Does anyone know how we can add text fields to our New Hire sapscript text and actually get them to display?  We would also like to display the Org Unit text (&'ORGEH_2nd_TEXT(40)&) or even  the Supervisor (from the OM relationship).  But they do not display for the New Hire sapscript either. And our ABAP'er is able to insert the Supervisor logic, but the field still does not display.
    Thanks very much for any help.
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:23 PM
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:24 PM

    I am going to repost this question to the HR forum as it may be more appropriately an HR forum questions.
    Thanks
    Cathryn

  • Formatted Text Edit & SAP Script Text

    I'm working through a business requirement to input some long text, and then update an existing SAP script text object (attached to a sales order).
    I'm using a formatted text editor to allow the users to enter the text - however I can't find a utlity that allows me to convert this data into a format that can be saved into a sap script text.
    Thanks,
    Heather

    Hi Heather,
    Please check this...
    Re: From Web Dypro Text area to SAP Script  text object(Tline table)
    http:///Tutorials/Smartforms/PassingTableData/Script1.htm ... add saptecnical.com before tutorials.
    Cheers,
    Kris.

  • PLZ HELP SAP SCRIPT ISSUE (DYNAMIC BOX)

    Hi all
    I want to include a dynamic text (means number of lines can vary) inside a box .
    please guide me how i can create this box whose size would be dynamic according to this text.
    plz help i am not able to find ne solution
    Thanx in advance
    Edited by: SARABPREET CHADHA on Mar 14, 2008 11:33 AM

    Following things to be done in Driver program.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          ID              = TEXT_ID
          LANGUAGE        = PRINT_LANGUAGE
          NAME            = TEXT_NAME
          OBJECT          = TEXT_OBJECT
        IMPORTING
          HEADER          = TABLE_HEADER
        TABLES
          LINES           = TABLE_LINES
        EXCEPTIONS
          ID              = 01
          LANGUAGE        = 02
          NAME            = 03
          NOT_FOUND       = 04
          OBJECT          = 05
          REFERENCE_CHECK = 06.
    then
      CALL FUNCTION 'WRITE_FORM_LINES'
        EXPORTING
          HEADER    = TABLE_HEADER
          WINDOW    = WINDOW
        IMPORTING
          FROMPAGE  = FROMPAGE       " not interested ?
        TABLES
          LINES     = TABLE_LINES
        EXCEPTIONS
          FUNCTION  = 01
          TYPE      = 02
          UNOPENED  = 03
          UNSTARTED = 04
          WINDOW    = 05.
    and then in sap script.
    /:           INCLUDE &THEAD-TDNAME& OBJECT &THEAD-TDOBJECT& ID &THEAD-TDID&
    /:           PARAGRAPH T6 LANGUAGE
    Your text will apper in sapscript.
    Award points if useful...

  • Sap script creating dynamic box problem

    Hi all,
    I am unable to create dynamic box in sap script.
    Because the printing lines in the main window changing from one customer to another customer.
    So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
    Advance thanks for your suggestion
    Regards,
    Sudhakar.

    In script form u can write following code
        /:       DEFINE &MY_XPOS& = ' '
        /:       DEFINE &MY_YPOS& = ' '
        /:       DEFINE &MY_HEIGHT& = ' '
        /:       DEFINE &MY_WIDTH& = ' '
        /:       PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
        /:       CHANGING &MY_XPOS&
        /:       CHANGING &MY_YPOS&
        /:       CHANGING &MY_HEIGHT&
        /:       CHANGING &MY_WIDTH&
        /:       BOX XPOS '&MY_XPOS' MM  YPOS '&MY_YPOS' MM  HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
    In report u can write following code
    Form Get_Box_Size TABLES IN_PAR  STRUCTURE ITCSY
                             OUT_PAR STRUCTURE ITCSY.
         Loop at Out_Par.
              Case Out_Par-Name.
                   When 'MY_XPOS'.
                         Out_Par-Value = 100.
                   When 'MY_YPOS'.
                         Out_Par-Value = 57.
                   When 'MY_HEIGHT'.
                         Out_Par-Value = 300.
                   When 'MY_WIDTH'.
                         Out_Par-Value = 'Does it matter?'.
              EndCase.
              Modify Out_Par.
         EndLoop.
    EndForm.

  • Why do we use include in sap script text element

    Hi SDNers,
    Why do we use include statement or what does that stands for in an text element of a sap script.
    Details with examples and explanation please
    Thanks & Regards,
    Ranjith N

    Hi Ranjith,
    Please go through this.
    &VBDPL-ARKTX&
    /: INCLUDE &VBDPL-TDNAME& OBJECT VBBP ID 0001
    If your include contains
    = arflebarflegloop
    and vbdpl-arktx contains 'myarticletext'.
    Then the output document will contain a line:
    myarticletext arflebarflegloop
    If the include contains
    arfelbarflegloop
    then the output document will contain the lines:
    myarticletext
    arflebarflegloop
    (Subject to whatever the prevailing paragraph format is - * means use current format).
    Think about what would happen if instead of having an include, you hardcoded the text of the include in your sapscript.
    I found this at http://www.sapfans.com/sapfans/forum/devel/messages/31158.html
    Regards,
    Sharat.

  • Sap script text printing issue..

    Hi,
    I have a SAP script with a text symbol say &abc& defined in the SAP script main window.
    From the print program I want to pass some text to this text symbol.
    In the print program I have an internal table with lines of text, sometime it can have just one line of
    text CHAR512 length or it can have multiple lines of char512 length text.
    Now how do I pass these lines to the text symbol &abc& ?
    I tried to do the following, but it does not help...
    DATA l_data TYPE STRING.
    loop thru the internal table
    concatenate l_data with text got from internal table
    endloop
    CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
        EXPORTING
          name   = '&abc&'
          value  = l_data
        EXCEPTIONS
          OTHERS = 0.
    I debugged and saw that l_data has most of the text (not all) but the sap script's printed output
    has only few text.
    what should I do to get all the text displayed on the printed output ?
    thnks

    Hi Vivek,
        Including two work area next to each other should not be a problem because i am doing the same thing. Check whether the length of field of work area one is over lapping the field of other work area.
    Note: Reward points if helpful.
    Cheers,
    Shafiq

  • Sap script  text overlaping

    Hi All,
    I have a Sap script which was executing fine .. but since few day i am geeting a problem.
    The issue is the two text are getting overlapped.
    Like we have the address of the vendor and some description the bothis working fine if the address is of not much in lines
    but if the if the number of line is more than the same(adress) gets overlapped....
    example:
    Adress:
    C/o So and so,
      Street 21
      city  Pune
      Coutry India
    Dear Sir / madam,
    which is fine but the same get overlaped once number of lines get increased.
    <Mean the coutry india will be overwrriten along with Dear Sir....
    Kindly help me on this, as i am new to abap and sap scripts
    many thanks in advance,
    Edited by: Anuj112143 on Feb 11, 2011 6:27 AM

    Hi All,
    I more input. When i change the font size this problem gets  resloved . for instant.
    i have change the font size of addres which is overlapping with another text Dear Sir.
    No there us no overlaping after the font is change, but i the client do not want to change the font.
    so i would request you to help me on this.
    many thanks.

  • SAP Script - Window and box

    Hello All
    I have done changes to include few(3) lines in a SAP Script window. Because of those 3 lines, contents that were printed earlier are not getting printed.
    The window is getting printed inside a box and it is defined as
    BOX FRAME 10 TW.
    Window height is 22.50 Ln,width 9.50 CM.
    To rectify this should I increase the height of this window or should I define the attributes of the box
    Please reply at the possible earliest.
    Thanks in advance.

    Check this
    Setting default parameters for a box:
    You can use the POSITION and SIZE commands to set default parmeters for a box.
    Instead of: 
    /: BOX XPOS '11.21' MM  YPOS '5.31' MM  HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW
    You can write:
    /: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
    /: SIZE HEIGHT '2' MM WIDTH '76' MM
    /: BOX  FRAME 10 TW INTENSITY 10
    This can be usefull if you gave several boxes that share the same parameters.
    If you want to set the position realtively to the window use POSITION WINDOW
    to set the position to the top/left start of the window. Then use POSITION 
    to set the current position relatively to the start of the Window. 
    Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
    /: POSITION WINDOW
    /: POSITION XORIGIN '+5' MM  YORIGIN '+10' MM
    the position is now 5 MM from the left and 10 MM from the top of the window
    NOTE: After using the position command you can move the current position
    realtively to the last used position
    /: POSITION XORIGIN '+10' MM  YORIGIN '+20' MM
    Now the position will be X = 15 and Y = 30
    Drawing a line. You can draw a line by setting the Height or Weidth to 0
    and add a frane. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100

  • SAP-Script - Draw Table (Boxes) with variable number of lines

    Hello,
    I want to create a Table with Frames in a SAP-Script Form. First of all I don´t know the position of the table in the window main. It can be page 2 or 3 on top or in the middle. But i have to describe a position like
    POSITION YORIGIN '12.95' CM.  How can i position the table in a variable way?
    And i don´t know the number of lines of the table. How can I manage to draw the correct numbers of boxes as numbers of lines exist?
    Kind Regards
    Carsten Fuchs

    Hi carsten,
    1. Drawing GRID (just like excel, matrix)
       is very cumbersome in sapscript layout.
      (either dynamically, or hardcoded)
    2. Moreover, the final look,
       may or maynot appear as requried,.
      ie. exactly with proper alignment and grid lines.
    3. If the font size is required to change,
      then the dynamic position also changes.
    4. If the grid is supposed to go to the next page,
      again the calculation and logic becomes tougher.
    5. To use grid, its better to use smartform,
       which provided FINE CONTROL of the grid
      and its lines and width, height, style etc.
    6. In sapsctip, at most we can use
       UNDERLINE (_) and PIPE (|)
    regards,
    amit m.

  • SAP Script :  Date is Boxes ??

    Dear All,
    I wanted to print date in boxes. i,e MM DD YY in boxes.
    I am doing like this.
    /: SET DATE MASK = 'MM.DD.YY'
    and then playing with Box Command, to draw vertical lines in between DD, MM and YY... with
    BOX HEIGHT '0.5' CM FRAME 10 TW
    BOX XPOS '.48'  CM WIDTH 0 TW HEIGHT '0.5' CM FRAME 10 TW
    BOX XPOS '.78'  CM WIDTH 0 TW HEIGHT '0.5' CM FRAME 10 TW
    Is this a right method ?? or Else
    Should there be a Standard method to print Date in Boxes ..
    Please let me know ...
    Thanks
    Regards
    venkat.

    Hi
    I think it is correct approach.
    here is some more details
    To define the formatting of date fields, use the SET DATE MASK control command. Executing this command causes all subsequent date fields to be printed using the specified format.
    Syntax:
    /: SET DATE MASK = 'date_mask'
    In the date mask, you can use the following codes:
    ·     DD: day (two digits)
    ·     DDD: day name - abbreviated
    ·     DDDD: day name - written out in full
    ·     MM: month (two digits)
    ·     MMM: month name - abbreviated
    ·     MMMM: month name - written out in full
    ·     YY: year (two digits)
    ·     YYYY: year (four digits)
    ·     LD: day (formatted as for the L option)
    ·     LM: month (formatted as for the L option)
    ·     LY: year (formatted as for the L option)
    All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
    Assuming the current system date is March 1st, 1997.
    /: SET DATE MASK = 'Foster City, MM/DD/YY'
    &DATE& -> Foster City, 03/01/97
    /: SET DATE MASK = 'MMMM DD, YYYY'
    &DATE& -> March 01, 1997
    The date mask may be reset to the default setting by using an empty string:
    /: SET DATE MASK = ' '
    The abbreviated and full forms of the names of the days and months are stored in the language dependent TTDTG table under the following keys:
    ·     %%SAPSCRIPT_DDD_dd: abbreviated day name
    ·     %%SAPSCRIPT_DDDD_dd: full form of day name
    ·     %%SAPSCRIPT_MMM_mm: abbreviated month name
    ·     %%SAPSCRIPT_MMMM_mm: full form of month name
    dd: day number 01 = Monday,..., 07 = Sunday
    mm: month number 01 = January,..., 12 = December
    regards
    vinod

  • Need logic in sap script text elements.

    Hi experts
    I need a logic for the below requirement in text elements.
    I am giving IF condition for some tax codes against to C - Form., But my condition given in second line is getting failed  .
    my condition logic
    /:       IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD'
    /:        &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    T2     ,,SALES TAX/VAT&V_VAT_PER& u201CAGAINST C FORM",,,,,,,,,,&V_VAT_sum(C)&
    /:        ELSE
    T2       ,,SALES TAX/VAT&V_VAT_PER&,,,,,,,,,,&V_VAT_sum(C)&
    Please let me know what is to be given TAG COLUMN  for second line in IF condition .
    and i am getting correct output for tax codes CA CC CD which are given in first line, But no getting the correct out for tax codes DA and DE.
    Thanks & Regards
    Suresh
    Edited by: suribabu124 on Apr 21, 2010 5:19 PM

    Hi,
    in the below i feel that you forgot to mention the OR condition.
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    soultion like.
    /: IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD' OR
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.

  • Purpose of RSTXTRAN program for SAP-Script ?? ??

    Purpose of RSTXTRAN program for SAP-Script ?? ??
    when it is required to run that program ?

    Hi sarit,
    Purpose of RSTXTRAN program for SAP-Script Transfer of SAP script Texts to a Correction.
    The report RSTXTRAN allows a set of SAP script texts (or the text key) to be transferred to a correction or repair of the transport system. The name of the correction/repair can either be transferred as a report parameter, or the correction/repair can be selected later in a selection window. The text key can be qualified generically using the asterisk character (*).
    When the report has been executed, the list of selected texts appears. Individual texts can be deselected in this list. When the function "Continue" is executed, the final list of texts which are to be transferred is displayed. The transfer of texts to the correction/repair can now be activated by the appropriate function, and must be confirmed in a dialog box.The requirements for this as follows.
    There is a correction/repair in which the selected text keys can be entered, if it is not being processed. The report can only insert text keys in corrections or repairs, not however in transport requests. However, the objects contained in a correction can be transferred to a transport request with the correction and transport system transaction.
    It should also be noted that the report selects texts in the current client, but that the transport system generally exports texts from client 000.
    When the report has been executed,the output can be a list of the selected texts. Information about whether transfer to the correction/repair was possible is displayed for each text key.
    Reasons for failed transfer include
    o the correction/repair is currently being processed
    o the correction/repair does not exist
    For Example
    All German standard texts with the ID ST, whose names begin with SAPSCRIPT, are to be entered in the correction B20K009999. The report parameters are then assigned values as follows:
    o Correction: B20K009999
    o Text object: TEXT
    o Text name: SAPSCRIPT*
    Thanks,
    Usha

  • Problem in pinting sap script

    what is this syntex in sap script plz explain BOX XPOS '0'CM YPOS '0'CM WIDTH '2'CM HEIGHT '3.5'CM FRAME 10 TW.   what is 'frame 10 tw' is here?

    hi,
    the syntax implies,
    BOX
    this draws a box at the specified  position with the specified size.
    xpos ypos upper---upper left corner of the box
    width Width of the box.
    height: Height of the box.
    frame: Thickness of frame around the box. Default: 0 (no frame).
    intensity : grayscale value of box contents as % .
    TW (twip)  · PT (point)    · IN (inch)    · MM (millimeter)   · CM (centimeter)   · LN (line)   · CH (character).
    tw is an unit of measurement
    BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    Regards
    Jayapriya

  • Queries of SAP Script

    Hi Freinds,
    Can You Please tell me what is the purpose  of 'DEFINE' 'CHANGING' and 'USING' in sap script text.
    Why we use perform statement in sap script  text.
    Thanks in advance.

    Hi Amar,
    'DEFINE' is used to declare variables and assigning values to it.
    Ex: DEFINE &VAR1& = 'ABC'.
          DEFINE &VAR2& = SPACE.
    USING and CHANGING is a part of PERFORM.
    PERFORM is basically used to call a FORM which could be written in a subroutine pool. A subroutine pool is needed to fetch the data or performing commands such as 'LOOP-ENDLOOP' as script is not capable of handling it.
    Thus to pass values to the FORM from PERFORM we use 'USING' and to retrive the values(the calulated one) from FORM back to PERFORM we use 'CHANGING'.
    EX. DEFINE &VAR1& = '5'
          DEFINE &VAR2& = '4'.
    PERFORM 'SUB_CALCULATE' IN PROGRAM 'Z_ADD'
    USING &VAR1&
    USING &VAR2&
    CHANGING &SUM&.
    Here 'SUB_CALCULATE' is PERFORM name
           'Z_ADD' is SUBROUTINE POOL name
    Now values '5' and '4' will be paased to subroutine and logic for their sum will be written in that and it will return the value '9' to 'SUM'.
    Syntax for 'FORM' will be:
    FORM sub_calculate  TABLES:input_sum STRUCTURE itcsy
                               output_sum STRUCTURE itcsy.
    Reward points if helpful.

Maybe you are looking for