ABAPFORM_STRUCTURE - FORM STRUCTURE
rdisp/max_wprun_time - Maximum work process run time General Data in Customer MasterThis documentation is copyright by SAP AG.
FORM - STRUCTURE
Obsolete Syntax
... STRUCTURE struc ...
Effect
For a formal parameter p1 p2 ... of a subroutine, the STRUCTURE addition can also bespecified instead of typing, whereby struc is a local program structure (a data object, not a data type) or aflat structure from the ABAP Dictionary. This structure is then applied to the formal parameter(Casting) and individual components can be accessed in the subroutine.
When an actual parameter is passed to a formal parameter typed with STRUCTURE, non-Unicodeprograms are only checked to determine whether the length of the actual parameter is at least the same as the length of the structure.
In Unicode-programs, structured and elementary actual parameters are distinguished. For a structured actual parameter, itsUnicode fragment view must match that of struc. For an elementary actual parameter, this must be character-type and flat.
Note
Formal parameters typed with STRUCTURE can normally be replaced by formal parameters typed withTYPE or LIKE. If casting is to be carried out, we recommend that you use generic formalparameters and assign these to a field symbol with the ASSIGN statement and CASTING addition.
Example
In this example, the line structure is assigned to the text character string.
DATA: BEGIN OF line,
col1 TYPE c LENGTH 1,
col2 TYPE c LENGTH 1,
END OF line.
DATA text LENGTH 2 TYPE c VALUE 'XY'.
PERFORM demo USING text.
FORM demo USING p STRUCTURE line.
WRITE: p-col1, p-col2.
ENDFORM.
BAL_S_LOG - Application Log: Log header data ABAP Short Reference
This documentation is copyright by SAP AG.
Length: 2776 Date: 20120522 Time: 060436 triton ( 60 ms )






