Ansicht
Dokumentation

OHIRURP_PA_PUNIS_003 - Add Standard Texts to Output Forms

OHIRURP_PA_PUNIS_003 - Add Standard Texts to Output Forms

ROGBILLS - Synchronize billing plans   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

In this IMG activity, you add standard texts to the PDF-based forms that the following print output programs generate:

  • Disciplinary measures based on the Disciplinary Measures/Offenses infotype (0860) (HRUA_DISC)
  • Employment contracts and additional agreements (HRUA_LABOR_CONTRACT)

To include standard texts in the PDF-based forms, proceed as follows:

  • Change the data that the print output programs enter on the form
  • Prepare a form interface
  • Prepare a form layout
  • Employment contracts
    You have created a standard text in the Standard Text transaction.

Change Data that Print Output Programs Enter on Form

To change the data that the print output program enters in the form, implement one of the following BAdIs as required:

Next, prepare a form interface for the forms that include the additional long texts.

Prepare Form Interface

  1. In the Form Builder transaction (SFP), call the interface for theform that you want to add standard texts to:
  • HR_RU_DISCIPLINE (disciplinary measures)

  • HR_RU_LC (employment contracts and additional agreements)

  1. Copy the standard form interface to your own namespace.
  2. Add a new global data definition with a variable name for each standard

text, for example, LTEXT1, to the interface. Each variable must be of type TLINE_TAB.

  1. Choose Initialization -> Code Initialization and enter thefollowing source code for each text that you want to add to the form.

Enter the corresponding variable name that you created in the previous step in the TABLES part of the coding, for example, ltext1.

DATA: ls_ltids type PRU_LONG_TEXTS,
ls_tdkey TYPE PRU_LONG_TEXT_ID.

MOVE FORM_DATA-s1d-LONG_TEXT_IDS
to ls_ltids.

move ls_ltids-txtid01
TO ls_tdkey.

CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = ls_tdkey-id
language = ls_tdkey-language
name = ls_tdkey-name
object = ls_tdkey-object
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
lines = ltext1
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Finally, prepare a new form layout to include the additional long texts that you want to print on the PDF-based forms.

Prepare Form Layout

  1. Copy one of the following standard forms to your own namespace and call the form in change mode:
    HR_RU_DISCIPLINE (create disciplinary measures)
    HR_RU_DISC_CANC (cancel disciplinary measures)
    HR_RU_LC (employment contracts)
    HR_RU_LCA (additional agreements for employment contracts)
  2. Call the form in change mode and go to the Context column in the right frame.
  3. To display the additional long texts, choose the global data definition that you created in the Prepare Form Interface section above withthe secondary mouse button and choose Create -> Text for the corresponding number of long texts that you want to add to the output form.
  4. Enter the following properties for each long text:
  • In the left frame:

Property Value
Name LTEXTn, where n is the number of the text that you create
Type Category Internal table
Type Name TLINE_TAB

  • In the right frame:

Property Value
Text Type Dynamic Text
Field LTEXTn, where n is the number of the text that you create
Style SYSTEM

  1. Edit the layout of the form as required. To do this, choose the Layout tab page and drag and drop the new text field from the Data View section to the required location on the layout.
  2. In the Data View section, select the new long text object and choose the Object tray.
    1. Enter the following parameters on the Field tab page:
      Select the Text Field as the type.
      Select Allow Multiple Lines
      Select Limit Length and in the Max Chars: field, enter 0
      Select the field format Rich Text.
      In the Presence field, select Visible.
      In the Locale field, select Default locale.
    2. Enter the following parameters on the Binding tab page:
      In the Name field, enter the name of the long text (for example, LONGTEXT1).
      In the Default Binding field, enter $record.LONGTEXT1.
      In the Data Format field, select XHTML.
    3. In the Accessibility tray, in the Screen Reader Precedence field, select None.
Style






Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 8419 Date: 20240523 Time: 173523     sap01-206 ( 68 ms )