Get Example source ABAP code based on a different SAP table
ID FORM • STRUCTURE FORM (obsolete)
FORM>, STRUCTURE> Short Reference >
ABAP_SYNTAX_OBS ... STRUCTURE struc ...>
What does it do? A formal parameter p1 p2 ...> of a subroutine can be specified with the addition STRUCTURE> instead of typing>>, where struc> must be a program-local structure (data object, no data type) or a flat 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 using STRUCTURE>, the actual parameter must be at least as long as the formal parameter:
In the case of a structured actual parameter, its fragment view> must match the fragment view of the corresponding initial part of struc>.
An elementary actual parameter must be character-like and flat and the corresponding initial part of struc> can contain only components of this type.
Latest notes: Formal parameters typed with STRUCTURE> can usually be replaced by formal parameters typed with TYPE> or LIKE>. If a casting is necessary, generic formal parameters should be used and assigned to field symbols using the statement ASSIGN>> and the addition CASTING>. NON_V5_HINTS ABAP_HINT_END
Example ABAP Coding
This example assigns the character string text> the structure line>. ABEXA 00286 ABAP_EXAMPLE_END