For value generation on a table-like tab (GRID), the generation classes shall inherit from /SCT/QP_CL_GEN_STD by default.

The type definition for the parameter transfer is normalized:

  • For individual elements from the VAL table: Structure/SCT/QP_S_GENER

  • For individual elements from the PMK table: Structure /SCT/QP_S_GENER_PMK

  • For VAL elements in table form: Table type /SCT/QP_T_TAB_GENER

  • For PMK elements in table form: Table type /SCT/QP_T_GENER_PMK

As a rule, 3 different scenarios can be used:  

  • Data transfer with individual parameters:
    The import and/or export parameters are explicitly named: an automatic order calculation can be applied here: the signature of the methods is analyzed to determine the optimal order within a class.

  • Data transfer with parameter table:
    The parameters are only known at runtime, the methods are called statically in the lexicographic order: The programmer is responsible for extending the methods so that the number of calls is minimized.

  • Self-supply of import parameters: The retrieval of values must be programmed in the generation method, no automatic sequence calculation is possible.

There are examples for these 3 scenarios:  Programming Examples (P)

For single elements, the name of the parameter must correspond to the element name on the tab.

The name is free for table parameters. (according to SAP naming convention for parameter name).

The methods only accept IMPORT (optional) and or EXPORT parameters. The CHANGING and RETURNING parameters are not supported.

If individual parameters (as IMPORT or EXPORT) are defined, a sequence determination of the public methods is carried out to be able to resolve the dependency of the individual methods automatically. No automatism can be used for methods with table parameters. Here, the lexicographical order of the method names is used: the programmer should therefore determine the order in which the methods are called within the generation class.

The IMPORT and EXPORT parameters only refer to elements that are provided at the object type. A generation method can only write back values to the same object type by passing parameters.

If the method requires values from other parameters that are not on the object type, you can dispense with IMPORT parameters; the access must then be programmed in the method. In this case, the automatic sequence determination does not return any results and the lexicographical order applies.

IMPORT parameter

Individual parameters:

If a parameter is queried that is not part of the object type, an empty structure is returned.

If a parameter is queried that exists but has not yet been assigned a value, an initial line is generated for this element (key fields, element, and controlling attributes are filled, the value assignment remains empty).

If this parameter is to be assigned a value (e.g. by user input or an earlier generation), all possible fields (key fields, element, control attributes, valuation) are filled.

Table parameters:

At the runtime of the generation, a table of all valued elements of the object type is automatically created, including all non-valued elements that are marked as start-initial or mandatory in Customizing.

Depending on the size of the table, it can be time-consuming to create it. If possible, access with specific individual parameters is more efficient.

EXPORT parameter

Individual parameters:

If a value has already been assigned to an export parameter (e.g. by a user input or an earlier generation), all possible fields of the export structure are prefilled. If the parameter is not assigned a value, an initial line is generated (analogous to import parameters).

Table parameters:

The individual entries are to be created in the generation method.

For this, an auxiliary method exists to generate an entry: mo_parent→get_value_gen( ). See Programming Examples (P)

No matter if the IMPORT or EXPORT parameter the structures and tables are identical. However, this does not mean that all fields can be manipulated.

Mandatory fields for EXPORT

  • Element respectively MKMNR

Optional fields

  • msgtyp (A,E, S,I W)

  • rowgrp/ldfnr 

  • moderef

  • visible

  • mandatory

  • origin

  • Valuefields:

VAL

PMK

value    
value_min
value_max
value_eih
drkzwert 
drkzsoll 
drkzist  

werks           
pmtnr           
qstprver        
katalgart1      
auswmenge1      
auswmgwrk1      
auswvers1       

sollintuntmin   
sollintunt      
sollintnennwert 
sollintobe      
sollintobemax   
sollintranget   
sollintplranget 

sollextuntmin   
sollextunt      
sollextnennwert 
sollextobe      
sollextobemax   
sollextranget   
sollextplranget 

solleinh       
drkzwert       
drkzsoll       
drkzist        
altzeugtxt     
altsollzeugunt 
altsollnennwert
altsollzeugobe 
altzeugeinh    
nkom           
refzeug