Include Control ?

Hi Everbody,
I would like to include control.
Example ;
Include this code will not work unless it runs. 
   CHECK it_data IS not INITIAL.
   PERFORM excel_data_trasfer USING: it_header it_data.
I want to check these include and content.
INCLUDE ole2incl.
INCLUDE zp0812_exceltransfer.
The content of the code INCLUDE zp0812_exceltransfer .
*&  Include           ZP0812_EXCELTRANSFER
DATA:  application TYPE ole2_object,
       workbook    TYPE ole2_object,
       sheet       TYPE ole2_object,
       cells       TYPE ole2_object,
       cell1       TYPE ole2_object,
       cell2       TYPE ole2_object,
       range       TYPE ole2_object,
       font        TYPE ole2_object,
       column      TYPE ole2_object,
       shading     TYPE ole2_object,
       border      TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: ld_colindx TYPE i,   "Column index
      ld_rowindx TYPE i.   "row index
*field symbol to hold values
FIELD-SYMBOLS: <fs>.
FIELD-SYMBOLS:
<itab> TYPE STANDARD TABLE,
<wa> TYPE any.
DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
DATA: ld_filename TYPE string,
      ld_path TYPE string,
      ld_fullpath TYPE string,
      ld_result TYPE i,
      gd_file TYPE c.
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = 1.
CALL METHOD OF
    application
    'Workbooks' = workbook.
* Yeni bir çalışma sayfası oluştur
SET PROPERTY OF application 'SheetsInNewWorkbook' = 1.
CALL METHOD OF
    workbook
    'Add'.
* İlk Excel Sayfası Oluştur
CALL METHOD OF
    application
    'Worksheets' = sheet
  EXPORTING
    #1           = 1.
CALL METHOD OF
    sheet
    'Activate'.
SET PROPERTY OF sheet 'Name' = 'Sheet1'.
form EXCEL_DATA_TRASFER  using  itab_header TYPE table
                                itab_data   TYPE table.
* Excel tablo için başlık verilerini indirme  *
ld_rowindx = 1. "başlıklar 1. satırdan başlayacak
LOOP AT itab_header ASSIGNING <wa>.
*Satır index i için sy-tabix i kullan
  ld_rowindx = sy-tabix.
* Geçerli satır için sütun doldurmak
  CLEAR ld_colindx.
  DO.
*  Tablo sütünlarını Assign <fs>  et
    ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <fs>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    ld_colindx = sy-index.
    CALL METHOD OF
        sheet
        'Cells' = cells
      EXPORTING
        #1      = ld_rowindx
        #2      = ld_colindx.
    SET PROPERTY OF cells 'Value' = <fs>.
  ENDDO.
  CLEAR <wa>.
ENDLOOP.
"ENDFORM.               " EXCEL_DATA_TRASFERS
* Excel tablo verileri indirme          *
CALL METHOD OF
    application
    'Worksheets' = sheet
  EXPORTING
    #1           = 2.
CLEAR: ld_rowindx, ld_colindx.
LOOP AT itab_data ASSIGNING <wa>.
  ld_rowindx = sy-tabix  + 1. "2. Satırdan başlatıyoruz.
*   Fill columns for current row
  CLEAR ld_colindx.
  DO.
    ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <fs>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    ld_colindx = sy-index.
    CALL METHOD OF
        sheet
        'Cells' = cells
      EXPORTING
        #1      = ld_rowindx
        #2      = ld_colindx.
    SET PROPERTY OF cells 'Value' = <fs>.
  ENDDO.
  CLEAR <wa>.
ENDLOOP.
* Hücre yakalama aralığının düzenlenmesi      *
*Hücre başlangıcı
CALL METHOD OF
    application
    'Cells'     = cell1
  EXPORTING
    #1          = 1     "down
    #2          = 1.    "across
*Hücre Sonu
CALL METHOD OF
    application
    'Cells'     = cell2
  EXPORTING
    #1          = 1     "down
    #2          = 16.   "across
CALL METHOD OF
    application
    'Range'     = range
  EXPORTING
    #1          = cell1
    #2          = cell2.
*Hücre Özelliklerinin Düzenlenmesi Yazı Fontu Renk VS.*
* Yazı Fontunun Ayarlanması
GET PROPERTY OF range 'Font' = font.
SET PROPERTY OF font 'Bold' = 1.
SET PROPERTY OF font 'Size' = 10.
* Gölgelendirme özelliklerinin ayarlanması
CALL METHOD OF
    range
    'INTERIOR' = shading.
SET PROPERTY OF shading 'ColorIndex' = 15. "renk - farklı renk
SET PROPERTY OF shading 'Pattern' = 1. "pattern - solid, striped vs
FREE OBJECT shading.
* Değişim Aralığı- Değerleri(1,2 and 3)
FREE range.
CALL METHOD OF application 'Cells' = cell1  "Hücre başlangıcı
  EXPORTING
    #1 = 1     "aşağı
    #2 = 1.    "karşısı
CALL METHOD OF application 'Cells' = cell2 "hücre bitişi
  EXPORTING
    #1 = 3     "aşağı
    #2 = 16.   "karşısı
CALL METHOD OF
    application
    'Range'     = range
  EXPORTING
    #1          = cell1
    #2          = cell2.
* Kenar kalınlığı özellikleri
CALL METHOD OF
    range
    'BORDERS' = border
  EXPORTING
    #1        = '1'.  "sol
SET PROPERTY OF border 'LineStyle' = '1'. "satır stilisolid, dashed...
SET PROPERTY OF border 'WEIGHT' = 2.                        "max = 4
FREE OBJECT border.
CALL METHOD OF
    range
    'BORDERS' = border
  EXPORTING
    #1        = '2'.  "sağ
SET PROPERTY OF border 'LineStyle' = '1'.
SET PROPERTY OF border 'WEIGHT' = 2.                        "max = 4
FREE OBJECT border.
CALL METHOD OF
    range
    'BORDERS' = border
  EXPORTING
    #1        = '3'.   "üst
SET PROPERTY OF border 'LineStyle' = '1'.
SET PROPERTY OF border 'WEIGHT' = 2.                        "max = 4
FREE OBJECT border.
CALL METHOD OF
    range
    'BORDERS' = border
  EXPORTING
    #1        = '4'.   "alt
SET PROPERTY OF border 'LineStyle' = '1'.
SET PROPERTY OF border 'WEIGHT' = 2.                        "max = 4
FREE OBJECT border.
*eşit aralıktaki tüm hücre değerlerinin üzerine 'Test' yazar
* SET PROPERTY OF range    'VALUE' = 'test'.
* Metin genişliğinin otomatik olarak ayarlanması  *
CALL METHOD OF
    application
    'Columns'   = column.
CALL METHOD OF
    column
    'Autofit'.
FREE OBJECT column.
* Excel tablosunu kayıt yeri seçerek kayıt etmek*
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
         " window_title      = ''
          default_extension = 'XLS'
          default_file_name = 'accountsdata'
          initial_directory = 'c:\temp\'
        CHANGING
          filename          = ld_filename
          path              = ld_path
          fullpath          = ld_fullpath
          user_action       = ld_result.
         " parameters  = ld_fullpath.
CALL METHOD OF
    sheet
    'SaveAs'
  EXPORTING
    #1       = ld_fullpath                 "filename
    #2       = 1.                          "fileFormat
FREE OBJECT sheet.
FREE OBJECT workbook.
FREE OBJECT application.
endform.                    " EXCEL_DATA_TRASFER
So this time I wanted to run include.
Thanks...
Best Regards...

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

Similar Messages

  • 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

  • How to make table that will include controls such as drop list?

    How to make table that will include controls such as drop list?
    I need to create table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...

    Hi Nadav,
    I figured out where I missed your point. When you wrote
    table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...
    I was thinking mixed data-types in a [2d] table!
    Looking at the property browser again it looks like no single LV function can do all of that. It can be developed as a pop-up (like the browser is set-up) and then code all of the elegance using an event structure to control the background color of a string indicator while controling the visability of rings that are only made visable when a mouse down is detected. That will get you pretty close.
    So no, my previous response ws not correct for what you are trying to do if you want to duplicate all of the wistles and bells of the property browser pop-up window.
    Please forgive my distraction.
    Ben 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • "Include control entries"-Function

    Hello,
    i found a SAP-article about a problem im trying to solve - to add a new field to the coding-block (account assignment).
    The url is: http://help.sap.com/saphelp_40b/helpdata/es/ba/e92c7dd435d1118b3f0060b03ca329/content.htm
    Now they write:
    <i>"Using the function <b>'Include control entries'</b> you can have the system maintain the appropriate system control tables automatically. This makes the new field available in Customizing just like any other. You can delete these control entries as long as there are no Customizing entries related to the field in question.
    Although deleting the control entries suppresses the field in Customizing, it still exists on the database and cannot be deleted using standard functions without leading to a loss of data."</i>
    Sadly i have no idea what that "Include Control Entries"-Function shall be. Can anyone please guide me in and tell me where i can find or call that function.
    Thanks alot and regards,
    oliver

    John,
    If the program has to fire the include / user exit you need to create the project using CMOD and activate the same.
    You should not delete the include rather double click and use the same include. You should save that to the customer package and transport it as you will not have access to save anything to SAP delivered packages.
    Try to create the include again and the message that you are getting should only be a warning, just hit ENTER and you should be able to proceed further.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • How to delete a row in table control?

    Hi All,
    I have a empty table control which is only use for data input(this data will then be use to store information to a custom table).  I have two buttons, Create Entry and Delete Entry.
    In my screenPainter for the table control, I have the checkbox w/SelColumn ticked and assign variable T_DATA-MARK on it.
    In my code:
    TOP Include
    CONTROLS: tc_data      TYPE TABLEVIEW USING SCREEN 9001.
    PBO
    PROCESS BEFORE OUTPUT.
      LOOP WITH CONTROL TC_ID.
        MODULE LOAD_TABLECTRL.
      ENDLOOP.
    module LOAD_TABLECTRL output.
      READ TABLE T_DATA INTO WA_DATA INDEX TC_DATA-current_line.
      IF SY-SUBRC EQ 0.
        MOVE-CORRESPONDING T_DATA TO WA_DATA.
      ENDIF.
    endmodule. 
    PAI
    PROCESS AFTER INPUT.
       LOOP WITH CONTROL TC_ID.
       ENDLOOP.
    MODULE GET_USER_ACTION.
    module GET_USER_ACTION input.
      WHEN 'DEL'.
        LOOP AT T_DATA INTO WA_DATA WHERE MARK EQ 'X'.
          DELETE T_DATA.
        ENDLOOP.
    In my debug, the internal table T_DATA-MARK does not have any value(s) even if I selected a particular row in my table control. 
    Am I missing something here?
    Thanks

    Hi All,
    Please see the actual screenshots and code below:
    The aim of the table control is just to accept inputs, so the internal table in the PBO is always empty.
    Table Control Screen Painter ScreenShot and Actual SAP Output: http://img710.imageshack.us/img710/4751/tablecontrolrowdelete.jpg
    PBO
    PROCESS BEFORE OUTPUT.
      LOOP WITH CONTROL TC_ID.
        MODULE LOAD_TABLECTRL.
      ENDLOOP.
    module LOAD_TABLECTRL output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        MOVE-CORRESPONDING T_ID_CHECK TO TC_ID.
      ELSE.
          "EXIT FROM STEP-LOOP.
          CLEAR ZQID_CHECK.
      ENDIF.
    PAI
    PROCESS AFTER INPUT.
       LOOP WITH CONTROL TC_ID.
         CHAIN.
          MODULE CHECK_ENTRIES     ON CHAIN-INPUT.     
          MODULE MODIFY_T_ID_CHECK ON CHAIN-INPUT.
          MODULE DELETE_ROW        ON CHAIN-INPUT
         ENDCHAIN.
       ENDLOOP.
    module CHECK_ENTRIES input.
      CASE ok_code.
        WHEN 'DEL'.
            PERFORM F_FILL_ITABCREATE USING ZQID_CHECK-MATNR
                                            ZQID_CHECK-LICHA
                                            ZQID_CHECK-LIFNR.
      ENDCASE.
    endmodule.    
    module MODIFY_T_ID_CHECK input.
    DATA W_TEMPMARK(1) TYPE C.
      MOVE: T_ID_CHECK-MARK TO W_TEMPMARK,
            W_TEMPMARK TO T_ID_CHECK-MARK.
    MODIFY T_ID_CHECK INDEX SY-TABIX TRANSPORTING MARK.
    endmodule.
    module DELETE_ROW input.
      LOOP AT T_ID_CHECK WHERE MARK EQ 'X'.
        DELETE T_ID_CHECK.
      ENDLOOP.
    endmodule.   
    form F_FILL_ITABCREATE  using    us_zqid_check_matnr LIKE MARA-MATNR
                                     us_zqid_check_licha LIKE MCHA-LICHA
                                     us_zqid_check_lifnr LIKE LFA1-LIFNR.
      MOVE: us_zqid_check_matnr TO WA_ID_CHECK-MATNR,
            us_zqid_check_licha TO WA_ID_CHECK-LICHA,
            us_zqid_check_lifnr TO WA_ID_CHECK-LIFNR.
      APPEND WA_ID_CHECK TO T_ID_CHECK.
      CLEAR WA_ID_CHECK.
    endform.
    In my debug, I can now delete the internal table that has a 'X' mark on its respective row but on the SAP screen output, all of my entries are being deleted contrary to what the ABAP debugger is telling me.
    Thanks

  • Get All Controls References

    Hi all
    If somebody know how can i get all controls references of VI (including controls that founds in Tabs and Clusters). I need generic method, because i haven't information about VI (reference to VI i get only at run-time).
    Thanks, Nadav

    To include the controls on Tabs, pass the array from my previous answer into a for loop, use auto-indexing. Place a Class Specifier Constant in the loop, right click on it and set it's type to a Tab Control. Place a "To More Specific Class" function below the constant, and wire the constant into the top.
    If the control from the array that you pass in is a Tab Control, "To More Specific Class" will NOT return an error. Use a case statement and use the No Error case to expose the Tab Control properties. Return the "Pages" property (an array) and pass this into a for loop. Connect a property node to the indexed pages, then select Controls On Page to return an array of controls ON EACH PAGE. You need to set up a shift register and use build array to return all of the controls from all of the pages. Make sure you close the Page Reference.  You can concatenate the array of Tab Control Page items with your original FP Controls.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Layout option doesn't work in Easy Print VI panel, controls on tabs don't appear

    Found two problems with the Report Generation VIs:
    1) In the (Report Generation) Easy Print VI Panel or Documentation.vi, the Layout options don't work (dug down into the sub-VI's and found that they are not connected to anything).
    2) If you have controls or indicators on a Tab Control, and try to use the Easy Print VI Panel or Documentation.vi with the option to include controls in the report, they don't appear. The only controls/indicators that do appear are the ones that are displayed on all of the tabs (ie, create an control and move it on top of the tab control so that it appears on every page).  There is a sub-VI (Expand_control_ref_with_nested_controls.vi) that is called to handle nested controls (ie, clusters, arrays,etc...) but it should have a case to handle tab controls.
    Solved!
    Go to Solution.

    Hey Sajosie,
    Digging into the Sub-VI's you are correct in saying that the Layout Options user input is not connected to anything for most cases. However, In the default case of "Quick Print" the Layout Options are used to modify the layout of the report. In the help for this VI, it mentions that this input is ignored for "Standard Reports" and "HTML" report options. However, it does not mention that this ignoring of the Layout Options is expected for "Word" or "Excel" reports.
    In terms of including controls and indicators in the report that appear on tab controls, I can make a product suggestion to make this sort of front panel design more compatible with the Easy Print VI Panel or Documentation.
    Hope this helps.
    -Ben
    WaterlooLabs

  • One row as editable and other row as non-editable in table control

    Hi Experts,
               Is this possible to make one row as editable and another row is non editable in table control?
    My Requirement is
    1st row non editable field
    Customer code, description,amount will come from the previous screen this will be non editable for user.
    2nd row editable
    User has to enter the amount in 2nd row here the customer code description will be empty.
    If 4 customer are there
    1,3,5,7 should be non editable and 2,4,6,8 should be editable..
    Pls help me in this issue..
    Thanks in Advance!

    hI
    This is a simple Module POOL program with only Table control and nothing else
    " This is Tested to Enable one row and disabling the next row
    in TOP Include
    controls : tc type tableview using screen 100.
    DATA : OK TYPE SY-UCOMM.
    DATA : ITAB TYPE TABLE OF SPFLI WITH HEADER LINE.
    in PBO
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP AT itab WITH CONTROL tc.
       MODULE TC_MOD.
      ENDLOOP.
    in PAI
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT itab.
      ENDLOOP.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TEST'.
      SET TITLEBAR 'TEST'.
      DESCRIBE TABLE itab LINES tc-lines.
      IF tc-lines = 0.
        tc-lines = 20.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE tc_mod OUTPUT.
      DATA : mod TYPE i.
      LOOP AT SCREEN.
        mod =  tc-CURRENT_LINE MOD 2  .
        IF mod = 1.
          IF screen-name = 'SPFLI-CARRID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " TC_MOD  OUTPUT
    Edited by: Ramchander Krishnamraju on Jan 25, 2011 7:17 AM

  • Currency conversion in Controlling Area

    Hi,
    Does any body know where can I find any documents as to what all needs to be done in controlling area for converting local currency to euro? Or if somebody have the documents, please share it.
    Thanks
    SAP FICO

    Hi,
    Look at the documentation contained in the link below. You would see all you need to know for conversion of Local Currency to Euro for all areas, including controlling.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/6e/b203d6f15111d1a5940000e835329b/frameset.htm
    I hope the above helps.
    DO not forget to award the points please.
    Regards,
    Jacob

  • Control panel added to start page

    On Windows 8.1 and Server 2012R2 I can add a link to the control panel and the command prompt to the start page.
    couldn't see that I was able to do that in Windows 10 tech preview

    On Windows 8.1 and Server 2012R2 I can add a link to the control panel and the command prompt to the start page.
    couldn't see that I was able to do that in Windows 10 tech preview
    You do not say which Win 10 TP build you are now using.
    If you are using one of the latest, i.e. 10041 or 10049, you might not need a link to Control Panel or Command Prompts in Start Menu screen.
    Right click at Start button > the popup box gives you a list which, among others, includes Control Panel link and 2 Command Prompt links.
    Adding.....
    Slightly off topic: when you login to your account, it opens to the desktop. Right ?
    So, wouldn't it be more convenient to create shortcuts to desktop ?

  • Including standard text in SAPScript...

    Hi,
    I have created a standard text Z_NOTE in SO10. If I want to include in Sapscript form, how do I do it ?
    Thanks.
    Rajesh

    use the include control command:
    /: INCLUDE Z_NOTE LANGUAGE 'E'
    Assuming that the text is created in English language, in case if it is in a different lnaguage, modify the above include command with respective language.

  • Custom control color property

    With the included controls like the OK boolean you can change the true or false color by going to Properties >> Apperance >>Colors.  Then click the color box to change the state color.  Is it possible to do the same with a custom boolean control?
      I have searched some and it does not sound like it is possible, but I figured that I would ask.  I have a diagram where I used some pipes from the DSC module image navigator to make some boolean pipes.  I just changed the properties for the different colors then pasted them into a boolean control for true/false cases.  But now I am thinking of changing the colors from gray/red to gray/green.  Is there an easier way than just starting over and making new booleans with the desired colors?  Or is there a better trick for custom controls I don't know?
    Thanks
    Solved!
    Go to Solution.

    Here is a sample of the control as a type def and a vi with the Colors(4) property cluster.  I must be doing this wrong or not explaining it correctly.  So if you could look at the files and be able straighten me out I would appreciate it. 
    Attachments:
    Control 3.ctl ‏8 KB
    test1.vi ‏12 KB

  • Including Group Tree in HTML Export

    I have a report in Crystal Reports XI that includes 5 group headers.  When exporting to HTML I would like to include controls similar to the Group Tree so that the user viewing the HTML page can expand and collapse sections (i.e. start with just the Group 1 items displayed all others collapsed and the user could then drill into the Group 2 and then Group 3 levels).   Is there a way to do this through Crystal Reports?  If not are there any alternative approaches I should explore?
    Thanks, Ken

    Hi Ken,
    Not possible in exporting to HTML, it's all static info.
    One option is to create your own WEB application or use Crystal Reports Server to publish your reports to and then users can log in and use the viewers to see them.
    Another option is to send them the RPT file, but they will need a copy of CR to be able to preview it.
    Thank you
    Don

  • 2013 include error

    My LabWindows 2009 project includes a .H file from a UIR file and it compiles and runs correctly as expected.  I migrated to LabWindows 2010 and then 2012 without issue.  However, with LabWindows 2013 the compiler includes a different.H.  My UIR is named Control.UIR which created the include file Control.h, but LabWindows 2013 includes
    C:\Program Files\National Instruments\CVI2013\sdk\include\control.h instead of the one in my project.  The #include statement appears to not care about the first letter being capitalized or not.  My work around is rename my UIR and H files to non-conflicting file names.  Is there something I am missing?
    Thanks.

    The key to the problem is that my project has source files in one subfolder and the Control.h file in another folder.  The Control.h file is included in the project (listed on the left hand side of the LabWindows/CVI window).  LabWindows/CVI 2012 finds the correct Control.h, but LabWindows/CVI 2013 does not.
    I created the following simple project to induce the error.  Follow these steps in LabWindows/CVI 2012 with the Windows SDK installed:
    New project named Test1.prj in an empty folder.
    Create a source file named Test1.c with 1 line of code [#include "Control.h"] and put in it in the same folder.
    Add it to the project.
    Compile the Test1.c file and I get the expected compile errors since it found the control.h files in the SDK folder.
    Create an include file named Control.h with one line of code in it [#define ABC 20] and put in it in the same folder.
    Compile the Test1.c file and compiles without error as expected.
    Now create a subfolder named Source and move the Test1.c file into it.
    Replace the Test1.c file in the LabWindows/CVI project to point to the moved file.
    Compile the Test1.c file and compiles without error as expected.
    LabWindows/CVI 2012 works since it finds the Control.h that is in the project.  Now repeat the process in LabWindows/CVI 2013.  It fails in step #9 above.  Even though the Control.h is part of the project, the compiler appears not to find it if it is not in the same folder as the .C file being compiled.
    Nothing is listed in the "Include paths" feature of LabWindows/CVI.
    I hope this makes sense.

  • Sapscript Control Commands

    Dear All,
                in Sapscript Control Command  there is one command
                INCLUDE .
                Pls explain it.

    Hi Kapoor,
    <b>INCLUDE: </b>To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    <b>Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]
    [NEW-PARAGRAPH np]
    </b>
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
              o Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
              o In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
              o Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
              o In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    All text IDs are allowed in a form.
    In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    0: the text include was successful.
    1: the command could not be executed because it contained syntax errors.
    2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    4: the specified text could not be found.
    <b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their  time.
    Thanks,
    Vinay

Maybe you are looking for