3.1 Development of the context

Unlike SFP, here understanding of context simplified.

In the XLSX Worbkench, context is a variable (structure/ int.table/ class instance), that printing program pass to function module 'ZXLWB_CALLFORM' as parameter. Context provides (to the form) data required for resultant file compilation.

Thus, You can use any structure or internal table of class instance (declared in the printing program) as context. Upon condition: context must refer to an ABAP data dictionaty type (transaction SE11) or object type (transaction SE24).

Every row which embedded in context can contain simple fields providing values, also it can contain nested structures/tables/class instances (if required). Number of nested levels are not limited.

If class instance is using as context, You should pass data to public class-attributes. For attibutes declaration please use model :

TYPES: BEGIN OF ty_s_stru ,

field_a TYPE dummy ,

field_b TYPE dummy ,

END OF ty_s_stru .

DATA: ls_stru TYPE ty_s_stru .

instead of:

DATA: BEGIN OF ls_stru ,

field_a TYPE dummy ,

field_b TYPE dummy ,

END OF ls_stru .

Available components for the context:

  • Structure

  • Table

  • Elementary field (predefined Elementary ABAP Types)

  • Class instance

Sample of context (used for Order form) illustrated below: