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.

Similar Messages

  • 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'.

  • How to retrieve data from a function module and use it in sap script??

    I have a report program, which calls a function module. This function module internally calls an include program. In this program, I have a variable which is to be used in the sap script. How can I send this variable to the sap script

    Hi,
    In your case, Include prog is part of FM, no need to treat it as an Entity.
    Now, Your Answer -
    In SCRIPT - IN Page Window -->
         PERFORM GET_MVAT_TIN IN PROGRAM Z_SCRIPT_PERFORMS_ABAPDB3
         USING &VBDKR-KUNRE&
         CHANGING &STCD1&
         CHANGING &STCD2&
         ENDPERFORM
         IF &STCD1& <> ' '
         <B>MVAT Number :</> &STCD1&
         ENDIF
    Then go to SE38 --> Creat prog with type - Subroutine pool
    In that Write FORM statement for this PERFORM.
    FORM get_mvat_tin TABLES inttab STRUCTURE itcsy
                             outtab STRUCTURE itcsy.
      DATA : v_kunre TYPE kna1-kunnr,
             v_stcd1 TYPE kna1-stcd1,
             v_stcd2 TYPE kna1-stcd2.
      LOOP AT outtab.
        CLEAR outtab-value.
        MODIFY outtab.
      ENDLOOP.
      READ TABLE inttab INDEX 1.
      v_kunre = inttab-value.
      IF v_kunre CA sy-abcde.
      ELSE.
        UNPACK v_kunre TO v_kunre.
      ENDIF.
       " Here You can take your Funcion module ***************************
      SELECT SINGLE stcd1 stcd2 FROM kna1 INTO (v_stcd1, v_stcd2)
                                         WHERE kunnr = v_kunre.
      IF sy-subrc = 0.
        READ TABLE outtab INDEX 1.
        WRITE v_stcd1 TO outtab-value.
        MODIFY outtab INDEX 1.
        READ TABLE outtab INDEX 2.
        WRITE v_stcd2 TO outtab-value.
        MODIFY outtab INDEX 2.
      ENDIF.
    ENDFORM.                                

  • 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.

  • Using many images in a "Text element"

    Hi,
    I'd like your advices and tips about how using multiples images in a Text element. In fact, i'm not completely satisfied with the default Rich Text Editor because when you when to use an image you have to know in advance the url of it...
    I tried to use FCK editor but there is no link between the images uploaded and the portal elements. So it's really hard to maintain.
    Can you explain me how your webmasters include multiples images in a text element ? In my dreams, i wish i had a button which will display all elements of type "Image" (which can be located in a single page)
    Thanks in advance
    Max.

    Hi,
    I'd like your advices and tips about how using multiples images in a Text element. In fact, i'm not completely satisfied with the default Rich Text Editor because when you when to use an image you have to know in advance the url of it...
    I tried to use FCK editor but there is no link between the images uploaded and the portal elements. So it's really hard to maintain.
    Can you explain me how your webmasters include multiples images in a text element ? In my dreams, i wish i had a button which will display all elements of type "Image" (which can be located in a single page)
    Thanks in advance
    Max.

  • Please help for using perform in SAP script

    As subject.
    My sap script code as below:
    /: PERFORM GET_CHAMT_DATE IN PROGRAM ZRAP004
    /:USING    &SPELL-WORD&
    /:CHANGING &SPELL-WORD&
    /:ENDPERFORM
    My program ZRAP004 code as below:
    FORM get_chamt_date USING u_iword TYPE spell-word
                       CHANGING u_oword TYPE spell-word.
    CONCATENATE u_iword '&#20803;&#25972;'(t01) INTO u_oword.
    endform.
    This form is for check printing.
    It's by standard function 'F110' to excute check printing.
    But when i finished this transaction. System return error message as below:
    <b>This routine contains 2 formal parameters, but the current call
    contains 4 actual parameters.</b>
    Please help. Thanks a lot!!

    Hiii
    PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    REPORT zkrpmm_perform_z1medruck .
    DATA : BEGIN OF it_input_table OCCURS 10.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
          w_vbeln LIKE vbak-vbeln,
          w_zcdffa LIKE vbak-zcdffa.
    FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
               input  = w_ebeln
          IMPORTING
               output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.

  • What is the tcode to created standard text to include in sap script

    HI
    what is the tcode to created standard text
    i want to include  standary text in sap script
    regads
    Arora

    Hi ,
    If you want to upload a logo , then u can use program RSTXLDMC if it is in .TIFF format or if you want to upload a grphic which is in .bmp then u can use SE78 or directly u can use SO10 also.
    SAPScript Transaction codes
    SE71 - Form painter
    SE72 - Style maintenance
    SE78 - SapScript Graphics Management
    SO10 - Create standard text module
    Reading Text in SAPScripts
    If you only need to output the text, you don't need to used READ_TEXT like in an ABAP program,
    just use the INCLUDE command in SAPScript.
    It will read the text and output it to your form.
    The Syntax is like this:
    /: INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE &EKKO-SPRAS&
    Check the following link:
    http://sap-img.com/sapscripts.htm
    Regards,
    Raghav

  • How do we identify the standard texts used in a sap script?

    Hi,
    Is there any way that i can identify the standard texts used in SAP scripts?
    Not manually going to each window in the script and checking.
    Will there be any table where I can look ?
    Thanks,
    krishna.

    Hi,
    GO to the forminfo of the sapscript in SE71..and then search for INCLUDE
    after displaying the form...utilities->form info..
    hope this works..
    Thanks
    Naren

  • Using Subroutines in SAP script

    Hi Experts,
    I am trying to get value of Z variables from a subroutine pool program using Perform ... EndPerform in my sap script form.
    In my form window i have written
    PERFORM ITEM_LINE_2F IN PROGRAM ZMEPRINTFORMS
    USING &EKPO-MENGE&
    CHANGING &V_EKPO_MENGE&
    ENDPERFORM
    and in my subroutine pool program i have written:
    FORM ITEM_LINE_2F TABLES IN_PAR STRUCTURE ITCSY
                                                  out_par structure itcsy.
    data :  ZLV_ekpo_menge(17),
              v_ekpo_menge(17),
             ZLV_temp_split_1(14),
             ZLV_temp_split_2(3),
             ZLV_temp_menge(8) type p.
    constants: zc_menge type TDTPRGNAME value 'EKPO-MENGE'.
    field-symbols: <tab> type itcsy.
      loop at in_par assigning <tab>.
        case <tab>-name.
          when zc_menge.
            zlv_ekpo_menge = <tab>-value.
          when others.
        endcase.
      endloop.
      unassign <tab>.
      V_EKPO_MENGE = zlv_ekpo_menge.
      SPLIT V_EKPO_MENGE AT '.' INTO ZLV_TEMP_SPLIT_1 ZLV_TEMP_SPLIT_2.
      IF ZLV_TEMP_SPLIT_2+0(3) = '000'.
        ZLV_TEMP_MENGE = zlv_ekpo_menge.
        WRITE ZLV_TEMP_MENGE TO V_EKPO_MENGE.
      ELSE.
        WRITE zlv_ekpo_MENGE TO V_EKPO_MENGE.
      ENDIF.
      loop at out_par assigning <tab>.
        case <tab>-name.
          when V_EKPO_MENGE.
            <tab>-value = v_ekpo_menge.
          when others.
           Modify out_par.
        endcase.
      endloop.
      unassign <tab>.

    hi,
    FORM ITEM_LINE_2F TABLES IN_PAR STRUCTURE ITCSY
    out_par structure itcsy.
    data : ZLV_ekpo_menge(17),
    v_ekpo_menge(17),
    ZLV_temp_split_1(14),
    ZLV_temp_split_2(3),
    ZLV_temp_menge(8) type p.
    read table in_par index 1.
    V_EKPO_MENGE = zlv_ekpo_menge = in_par-value.
    SPLIT V_EKPO_MENGE AT '.' INTO ZLV_TEMP_SPLIT_1 ZLV_TEMP_SPLIT_2.
    IF ZLV_TEMP_SPLIT_2+0(3) = '000'.
    ZLV_TEMP_MENGE = zlv_ekpo_menge.
    WRITE ZLV_TEMP_MENGE TO V_EKPO_MENGE.
    ELSE.
    WRITE zlv_ekpo_MENGE TO V_EKPO_MENGE.
    ENDIF.
    read table out_par index 1.
    out_par-value = v_ekpo_menge.
    Modify out_par.
    but frankly speaking... i dint understand your logic... finally you are passing the same value ????????
    regards
    padma

  • 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-without element

    Hi Friends,
                     I have a doubt in SAP SCRIPT..pls Clarify it..
    i Got two times one and only first record while execute my Script... i don't know..
    i i have done this without text element suppose if i am passing value with text element  getting first record only ont time..
    May i Know difference passing value with text element and without text element..
    i have post my code also...
    data: begin of itab occurs 1,
          mandt like mara-mandt,
          matnr like mara-matnr,
          end of itab.
    CLEAR ITAB.
    select mandt matnr up to 7 rows from mara
    into corresponding fields of table itab.
    clear itab.
    call function 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZS_SAP'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at itab.
    call function 'WRITE_FORM'
    EXPORTING
      ELEMENT                        = 'NAME '
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  = ITAB
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    call function 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    Your question can't be read. Please reformat your post, use PREVIEW before posting again. 2500 characters maxi.
    Thx

  • 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.

  • Script text element

    Hi what does ZKWERT(I5.1) mean in a text element in scripts, that is it has the letter I in the bracket.
    this is used in scripts. What will be its equivalent in smartforms.
    Smartforms throw a synatx error for the same formatting
    John

    Hi!
    It is a formatting option. Check out this link.
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
    I means "Suppressing Output of Initial Values"
    Regards
    Tamás
    Message was edited by:
            Tamás Nyisztor

  • Error in script : text elements are missing

    Hi ,
      In my print programs iam uaing lots of text elements for a
    zform. I have copied the zform into zform1 and using the same print program and modified the zform1 according to my needs.
    I am not using all the text elements in my zform1 script which is passed from the print program.
    When i execute my zform1 by using the transaction which inturn uses that print program it gives more messages saying 512, 513 , 515 text elements are missing in form Zform1.
    Can anyone tell without touching the print program can i do anything on the script zform1 to reslove this problem.
    Please help me on this.Thanks...
    Regards,
    Rose.

    Hi,
    Ya, whatever Narendra told is right. U nedd to have the text elements in the script if you are calling the same from print program. Just maitain all the text elements with no text it.
    Eg: 
    /: 513
    /: 515
    Regards,
    KK

Maybe you are looking for

  • Error in opening webdynpro abap application

    hi All, I am facing below issue in opening webdynpro abap application, this is first WDA application in production system, please help me in resolving this issue. ============================================================================ Error when

  • Error code -88708 with DAQmx Create Channel (AI-Voltage-Basic)

    Hi, I am trying to construct a VI that moves a piezoelectric stage, the VI then needs to scan voltages from the DAQ card to build up arrays of the voltage and coordinates before constructing a 3D graph. The VI successfully moves the stage and reads t

  • FlashCC Keyboard shortcuts not working

    Hi, I've been using Flash ever since it was owned by Macromedia, and I can't seem to get my head around the keyboard shortcuts in CC. I used to be able to assign convert to symbol to page up and insert frame, keyframe and blank keyframe to F13, F14 a

  • Barcode Issues in Printer

    Hi All, We are using SMARTFORMs to print barcodes. The printer is HP 4350 . When we are printing in Our Development System the Barcodes Prints and the Print Preview are coming out fine . But in our Quality System the barcode Print previews as well as

  • Standard Layout problem

    Dear Friends, I am using standard program FBL1N. After executing I created varient. My problem is in Input Screen Layout option is there, but it is not showing me any layout which i created. Regards