SAP ABAP Data Element UPP_Y_WRITE_FM (Name of a Function Module)
Hierarchy
SAP_BW (Software Component) SAP Business Warehouse
   BW-PLA-BPS (Application Component) Business Planning and Simulation
     UPP (Package) SEM-BPS: Planning Processor and Layout Builder
Basic Data
Data Element UPP_Y_WRITE_FM
Short Description Name of a Function Module  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type FUNCNAME    
Data Type CHAR   Character String 
Length 30    
Decimal Places 0    
Output Length 30    
Value Table TFDIR    
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short FM 
Medium 10 Fct.Module 
Long 15 Function Module 
Heading  
Documentation

Definition

Name of an exit function module for writing data in the Excel Frontend.

With this exit function module you can transfer your own data to the system. It is then presented in Excel in manual planning, wherever you want it. The function module is called up in every PBO. To transfer data to the system, proceed as follows:

Create a function module. To do this, create your function group first and then assign the function module to this function group. Make sure that you use type group SOI because some types are not defined in the Data Dictionary, but in this particular type group. The interface of the function module must be as follows:

  • Importing parameter:
    • I_AREA TYPE UPC_Y_AREA; this parameter contains the technical name of the area to which the layout belongs, and in which you want to display the data.
    • I_PLEVEL TYPE UPC_Y_PLEVEL; this parameter contains the technical name of the planning level to which the layout belongs.
    • I_PARAM TYPE UPC_Y_PARAM; the technical name of the layout.
    • I_INIT TYPE UPP_Y_INITCALL; this parameter is filled by the system when manual planning is started. This parameter is intial with every further PBO.
    • ITO_HEAD TYPE UPP_YTO_HEAD; the characteristics (chanm) and their values (value), as found in the header area, are transferred to this arranged table based on the underlying structure UPP_YS_HEAD. Therefore the table contains the current header combination.
    • IT_LL TYPE UPP_YT_LL; this table based, on underlying structure UPP_YS_LL, contains the (frontend-independent) information from which the Excel screen is formed. The most important fields are RATIO (entry of screen area), CONT (entry of type of cell, for example text, specification, heading), ROW (row within the screen area), COL (column within the screen area), VALUE (value, if the cell contains alphanumeric values) and VALUE_F (value as float number, if the cell contains numeric values).
    • IT_MAP TYPE UPP_YT_MAP;the table is based on underlying structure UPP_YS_MAP. The relationship between the position of a cell within table IT_LL and the actual position in Excel is fixed in this table. The fields RATIO, CONT, LLROW, LLCOL (corresponding to RATIO, CONT, ROW, COL) are used as keys for the identification of cells within table IT_LL. The (absolute) position in Excel is entered with TOP (rows in Excel) and LEFT (columns in Excel). The contents of the cell are stored in external format in the field VALUE_EXT.
  • Exporting parameter:
    • ET_DIMENSION TYPE SOI_DIMENSION_TABLE; in this table you transfer (two-dimensional) Excel areas, in which you want to display the data. Note that these areas can not overlap with those that are used by the system to output data in Excel. If overlaps occur, this results in the program being terminated.
    • ET_CONTENTS TYPE SOI_GENERIC_TABLE; you transfer the data in this table. The relative position within the corrsponding area is entered as the position.
    • ET_STYLE TYPE SOI_STYLE_TABLE; table for transferring names of format templates. In contrast to the transfer of data areas in parameter ET_DIMENSION, it is not critical here if the area to be transferred overlaps with the areas used by the system. If this should occur, the transferred formatting is also used in the areas used by the system.
    • ET_FORMAT TYPE SOI_CELL_TABLE; table for transferring cell formatting. Again it is not critical if the area to be transferred overlaps with the areas used by the system. The transferred formatting is also used in those areas used by the system.
    • ET_STYLE TYPE SOI_STYLE_TABLE; table for transferring names of format templates. Again it is not critical if the area to be transferred overlaps with the areas used by the system. The transferred formatting is also used in those areas used by the system.
    • ET_MESG TYPE UPC_YT_MESG; in this table you can transfer your own messages.

Now enter the name of your function module in the field (of course the function module must already exist). You can use the F4 help for this.

You must note the following when compiling the tables ET_DIMENSION and ET_CONTENTS: The tables are processed sequentially by Excel. The first area is read from the table ET_DIMENSION and its total size N (number of cells contained in it) is determined. Then the first N entries of the table ET_CONTENTS are read and put in this area. After that it proceeds analog to the second area.

You transfer the names of the format templates available in the Excel worksheet in the table ET_STYLE. These must not agree with the data areas.

You transfer formatting for areas in table ET_FORMAT. Again these do not have to agree with the data areas. If you want to leave a certain value unchanged for formatting, (for example font or background color), then set the fields that contain character strings (for example font) to the initial value; fields of type integer to the value -1. You will find some constants for formatting values in the type groups UPPFR and UPPFD.

The system first sets all format templates, including those that may have been transferred to Exit. Then the system sets the number of decimal places and the currencies for the individual areas. The relevant settings for the format templates are overwritten here if necessary. Nevertheless, if you want to change the displayed number of decimal places or the displayed unit using your Exit, then you transfer the relevant settings in your format table. Generally, however, SAP recommends you transfer all formatting settings (as far as possible) in the style table and make no changes to the number of decimal places.

Example:

You want to present the following data in Excel:

Row 10, column 5: 105; row 10, column 6: 106; row 15, column 5: 155.

Allocate the format template 'test' to the data in your area.

The table entries must look as follows:

ET_DIMENSION (ROW, COLUMN, ROWS, COLUMNS):

  • Row 1: 10 5 1 2.
  • Row 2: 15 5 1 1.

ET_CONTENTS (ROW, COLUMN, VALUE):

  • Row 1: 1 1 105.
  • Row 2: 1 2 106.
  • Row 3: 1 1 155.

ET_STYLE (NAME, TOP, LEFT, ROWS, COLUMNS, STYLE):

  • Row 1: ' ' 10 5 1 2 Test.

History
Last changed by/on SAP  20130604 
SAP Release Created in