SAP ABAP Data Element CFBBSVAR_ADDSEL (Is Callup with Variant via Report/Report Interface Allowed?)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       KC (Package) Cost Accounting Controlling EIS
Basic Data
Data Element CFBBSVAR_ADDSEL
Short Description Is Callup with Variant via Report/Report Interface Allowed?  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type BOOLEAN    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
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 10 Indicator 
Medium 15 RRI variant 
Long 25 Variant callup 
Heading 35 Variant callup via rept/rept interf 
Documentation

Definition

This indicator is only relevant if the indicator 'Additional selection' (ADDSELKZ) is set. This determines whether reports (whose selection screen entry fields are generated by the application) can be called up with a variant using the report/report interface. This means that, for assignment of reports where ADDSELKZ = 'X', an entry field for the variant is only provided when the indicator is set. (For assignment of reports where ADDSELKZ = SPACE, an entry field for the variant is provided by default.)

In order to ensure a successful callup with a variant using the report/report interface, the application must provide the callback routine RSTI_VARIANT_VALUES_ADD in the generated program as well as the callback routines RSTIFIELD_FUELLEN and ADD_SEL_TAB_FUELLEN. The task of this form routine is to fill the table ADD_SEL with variant values.

Note the following:

  1. If a field already contains values received from a sender, then these are not overwritten by variant values.
  2. Exceptions here are parameters and select options that were declared as 'protected' in the variant definition. These values are always transferred to the ADD_SEL_TAB and overwrite sender values if applicable.
  3. If a field has no sender values, the relevant variant values are included in the ADD_SEL_TAB.
  4. Parameters and select options that were defined in the variant definition as required entry fields are treated as required fields. This means that if no value has been transferred from the sender for this field, and the variant has no value for the field, then you must set the POPUP flag (= 'X').

When you call up the routine, the table ADD_SEL already contains the sender values.

The following example refers to the FM Funds Management application and corresponds with the examples detailed in the section 'Additional selection'. For the select option fields S_FICTR, S_FIPOS and S_FINCD, the appropriate variant values are returned.

*---------------------------------------------------------------------*
*       FORM rsti_variant_values_add                                  *
*---------------------------------------------------------------------*
* Callback routine. It is called via the report/report interface,
* if a drilldown report is called via a variant.
* The selection table ADD_SEL is filled with the variant values for the
* select options S_FICTR, S_FIPOS, and S_FINCD.
* Table SPEC_FIELDS contains special variant fields, which are marked
* as protected or obligatory in the variant definition.
* The field RFIELD contains the parameter/select-option name.
* TRFLG = 'E' markes a protected variant field and
* TRFLG = 'I' markes an obligatory variant field.
* The table VALUES contains all variant values, also the values of
* the fields which are not protected or obligatory.
*
* Protected variant values are always added to ADD_SEL, whereas
* corresponding old entries are deleted.
* Other variant values are only added if, as yet, there is no
* value for the corresponding field in ADD_SEL.
* If the parameter/select option is marked as obligatory, then at the
* end of the routine it is checked whether ADD_SEL contains a value for
* that parameter/select option. If this is not the case, the flag POPUP
* is set, which means that the selection screen is displayed.
************************************************************************
FORM rsti_variant_values_add
     USING    i_t_spec_fields  TYPE rsti_t_fie
              i_t_values       TYPE rsti_t_par
     CHANGING c_t_add_sel      TYPE rkd_t_add_sel
              c_via_sel_screen TYPE char1.
* add protected variant values
  PERFORM prot_variant_values_add
          USING    i_t_spec_fields
                   i_t_values
          CHANGING c_t_add_sel.
* fill empty fields with variant values
  PERFORM not_prot_variant_values_add
          USING    i_t_values
          CHANGING c_t_add_sel.
* check if the selection screen must be displayed
  PERFORM display_sreeen_check
          USING    i_t_spec_fields
                   c_t_add_sel
          CHANGING c_via_sel_screen.
ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  PROT_VARIANT_VALUES_ADD
*&---------------------------------------------------------------------*
*   The protected variant values of the select options 'S_FICTR',
*   'S_FIPOS', and 'S_FINCD' are filled into the selection table
*   ADD_SEL. Old corresponding entries are removed.
*----------------------------------------------------------------------*
FORM prot_variant_values_add
     USING    i_t_spec_fields TYPE rsti_t_fie
              i_t_values      TYPE rsti_t_par
     CHANGING c_t_add_sel     TYPE rkd_t_add_sel.
  DATA: l_s_field   TYPE rstifields,
        l_s_para    TYPE rsparams.
  DATA: l_s_add_sel TYPE cedst.
* protected variant fields are marked with 'E'
  LOOP AT i_t_spec_fields INTO l_s_field
     WHERE trflg EQ 'E'
       AND (    rfield EQ 'S_FICTR'
             OR rfield EQ 'S_FIPOS'
             OR rfield EQ 'S_FINCD' ).
*   remove old entries
    DELETE c_t_add_sel WHERE fnam EQ l_s_field-rfield.
    LOOP AT i_t_values INTO l_s_para
         WHERE selname EQ l_s_field-rfield.
*   in many cases the values LOW and HIGH must be transformed into
*   internal values. Because, if the variant has not knowledge about
*   the converstion exit, the external value is stored. Here not done
      CLEAR l_s_add_sel.
      MOVE-CORRESPONDING l_s_para TO l_s_add_sel.
      l_s_add_sel-fnam = l_s_field-rfield.
*      Note: in some applications the parameter/selection option
*      name (here contained in RFIELD)is not identical to the
*      corresponding name in the field FNAM of ADD_SEL.
      APPEND l_s_add_sel TO c_t_add_sel.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                               " PROT_VARIANT_VALUES_ADD
*&---------------------------------------------------------------------*
*&      Form  NOT_PROT_VARIANT_VALUES_ADD
*&---------------------------------------------------------------------*
*   The unprotected variant values of the select options 'S_FICTR',
*   'S_FIPOS', and 'S_FINCD' are filled into the selection table
*   ADD_SEL, if there are no entries so far for these select options.
*----------------------------------------------------------------------*
FORM not_prot_variant_values_add
     USING    i_t_values      TYPE rsti_t_par
     CHANGING c_t_add_sel     TYPE rkd_t_add_sel.
  DATA: l_s_para      TYPE rsparams.
  DATA: l_s_add_sel   TYPE cedst.
  DATA: l_add_value   TYPE boolean.
  DATA: l_selname_old TYPE rsparams-selname.
  SORT i_t_values BY selname.
  LOOP AT i_t_values INTO l_s_para WHERE
              (   selname EQ 'S_FICTR'
               OR selname EQ 'S_FIPOS'
               OR selname EQ 'S_FINCD' ).
    IF l_selname_old NE l_s_para-selname.
*     check if a value exists already
      READ TABLE c_t_add_sel
           WITH KEY fnam = l_s_para-selname TRANSPORTING NO FIELDS.
*   Note: for sa
History
Last changed by/on SAP  19991129 
SAP Release Created in