In general, the creation of forms depends on the specification types and the data structures used. Forms are usually created from scratch. QPPD provides templates for the form and data generation:

  • Form: /SCT/QPPD_FORM

  • Style: /SCT/QPPD_STANDARD

  • ABAP class: /SCT/QP_CL_FORMS.

The ABAP class determines all data and the corresponding texts for all hierarchically subordinated nodes:

  • Node header information

  • Object types and their texts

  • Elements with converted values and their short text

  • Columns Elements with values and their short text and headers for tabular displays

  • Technical names of units

  • Standard texts

  • Inspection characteristics

1. Create ABAP-class

create a copy of the ABAP class /SCT/QP_CL_FORMS: 

Customization of data structures Data structures for names and column elements

Type definitions of TS_FORMS-NAME, TS_VAL

Methods: SET_NAMES

Adjustment of the Assignments and Defaults tables

METHOD set_default.
" toBe redefined
"excluded object types
ms_default-range_objtyp = VALUE #( sign = 'E' option = 'CP' ( low = 'STATUS' )
( low = 'ADMIN' )
( low = 'BUILDER' )
( low = 'HEADER' )
( low = 'LOG' )
( low = 'FORMS' )
( low = 'HEADER*' ) ).
"Objecttyp link to formualr table
ms_default-object_table = VALUE #( ( objekttyp = 'INSPCHAR' table = 'INSPECTION' )
( objekttyp = 'COLUMNGRID' table = 'XXX' ) ).
"Default table links and spras
ms_default = VALUE #( table_val = 'BASIC'
table_pmk = 'INSPECTION'
table_txt = 'TEXT'
spras = 'E' ).
ENDMETHOD.

Extension of the languages as a selection of the button

METHOD /sct/qp_if_forms~get_forms.
DATA lt_forms LIKE mt_forms.
 
IF mt_forms IS INITIAL.
super->/sct/qp_if_forms~get_forms( ).
"add multi language forms Formulare hinzufügen
LOOP AT mt_forms ASSIGNING FIELD-SYMBOL(<form>).
DATA(ls_form) = <form>.
ls_form-spras = 'D'. "German
ls_form-ident = |{ <form>-ident } [de]|.
ls_form-standard = abap_false.
INSERT ls_form INTO TABLE lt_forms.
ls_form-spras = 'E'.                         "English
ls_form-ident = |{ <form>-ident } [en]|.
ls_form-standard = abap_false.
INSERT ls_form INTO TABLE lt_forms.
ENDLOOP.
mt_forms = VALUE #( BASE mt_forms ( LINES OF lt_forms ) ).
SORT mt_forms BY sortnr ident.
ENDIF.
rt_forms = super->/sct/qp_if_forms~get_forms( iv_ident = iv_ident ).
ENDMETHOD.

2. create form

create a copy of the /SCT/QPPD_FORM form

Customize interface form

Import Parameter

Type

IS_FORM

ZCL_FORMS=>TS_FORM

Adjusting global structures

Variable Name

Type

MS_NODE

ZCL_FORMS=>TS_NODE

MS_OBJECT

ZCL_FORMS=>TS_OBJECT

MS_VAL

ZCL_FORMS=>TS_VAL

MS_PMK

ZCL_FORMS=>TS_PMK

MS_TXT

ZCL_FORMS=>TS_TXT