ProNovia Produkte Korrekturanleitung
Knowledge Base ID / Version	OBJ-212 / V9.24.4	
Ausgabe Korrekturanleitung	I / MK / 18.01.2023	
Farblegende Korrekturen	INSERT	REPLACE THIS	REPLACE WITH	DELETE	

Klasse		/PCH/CLA_BUSINESS_OBJECT	
Methode	SET_LONGTEXT	

METHOD set_longtext.

  DATA:
      ls_ltext_key          TYPE /pch/bo_longtext_info
    , ls_longtext           TYPE /pch/bo_longtextes
    , lt_description_types  TYPE /pch/bo_object_descr_type_t
    , lv_changes            TYPE abap_bool
    , lv_scope              TYPE string
    , lt_description        TYPE /pch/bo_object_descr_t
    , lv_delete_text        TYPE abap_bool
>>>START INSERT
    , lr_data               TYPE REF TO data                            "MK/OBJ-212
>>>END INSERT
    .
  FIELD-SYMBOLS:
      <ls_longtext>         TYPE /pch/bo_longtextes
    , <ls_description>      TYPE /pch/bo_object_descr
    , <ls_description_type> LIKE LINE OF lt_description_types
>>>START INSERT
    , <lv_description>      TYPE csequence                              "MK/OBJ-212
>>>END INSERT
    . 

 . . .

      IF <ls_longtext>-_internal_change_mode = c_change_mode-change
      OR <ls_longtext>-_internal_change_mode = c_change_mode-insert.
        <ls_description>-has_long_text = abap_true.

        "MK: Die Langtextzeile kann Meta-Zeichen (Bereich Fett, Bereich unterstrichen...) enthalten. Die wollen wir natürlich NICHT in der Beschreibung haben
>>>REPLACE THIS
        <ls_description>-description = /pronovia/cl_convers_services=>longtext_to_string_first_line( it_longtext = it_longtext iv_language = iv_language ).
>>>REPLACE WITH
        "<MK/OBJ-212 - angepasst
        IF <ls_description_type>-shorttext_rollname IS NOT INITIAL.
          CREATE DATA lr_data TYPE (<ls_description_type>-shorttext_rollname).
          ASSIGN lr_data->* TO <lv_description>.
          <lv_description> = /pronovia/cl_convers_services=>longtext_to_string_first_line( it_longtext = it_longtext iv_language = iv_language ).
          <ls_description>-description = /pronovia/cl_convers_services=>longtext_to_string_first_line( it_longtext = it_longtext iv_language = iv_language ).
        ELSE.
          <ls_description>-description = /pronovia/cl_convers_services=>longtext_to_string_first_line( it_longtext = it_longtext iv_language = iv_language ).
        ENDIF.
        "MK/OBJ-212>
>>>END REPLACE

      ELSE.
        <ls_description>-has_long_text = abap_false.
      ENDIF.

      me->set_descriptions(
          iv_change_token = iv_change_token
          it_descriptions = lt_description ). 

 . . .

ENDMETHOD. 

<ENDE>