среда, 30 сентября 2015 г.

Сообщение в монитор загрузки

        l_error_text value #(
          |Не заполнен Материал)
          |BAL_ACC { SOURCE_FIELDS-BAL_ACC }| )
        ).

        monitor_rec value #(
          msgid 'RSRMON'
          msgty 'E'
          msgno '000'
          msgv1 l_error_text[ ]
          msgv2 l_error_text[ ]
        ).
        append monitor_rec to MONITOR.

или
 DATA(l_error_text|Повторная загрузкаCalday {
                              <fs_rez>-calday+6(2)
                              }.{
                              <fs_rez>-calday+4(2)
                              }.{
                              <fs_rez>-calday(4)
                              }|.
        APPEND VALUE #(
          msgid 'RSRMON'
          msgty 'E'
          msgno '000'
          msgv1 l_error_text
        TO monitor.


*******

    if l_error abap_true.
      "Обнаружены ошибки в данных.
      raise exception type CX_RSROUT_SKIP_RECORD.


или 

RAISE EXCEPTION TYPE cx_rsrout_abort.
    endif.

понедельник, 28 сентября 2015 г.

Разные длины полей для FOR ALL ENTRIES IN

Оказывается, ошибку про разные длины полей можно обойти так:

    SELECT /bic/zref
           /bic/zmateria
           /bic/zunit
      FROM /bic/azlcdocl00
      INTO TABLE gt_unit
       FOR ALL ENTRIES IN source_package
     WHERE /bic/zref EQ source_package-/bic/snz
       AND /bic/zmateria EQ source_package-/bic/snomen+0(18).

среда, 2 сентября 2015 г.

Сюрприз от WEB-сервиса

Полезли к заказчику забирать файлы, а там ссылка на общий сайт, а на нём кнопки лайков от социальных сетей...

Как загрузить\выгрузить программу\ФМ\класс из системы (SAPLink)

Очень интересный способ переноса разработок между системами.

Как всегда, на всякий случай дублирую:

Skip to end of metadata
Go to start of metadata

Install

Known ABAP basis versions compatible with SAPlink include:
  • 6.20
  • 6.40(NetWeaver 2004)
  • 7.0 (NetWeaver 2004s)
  • 7.4

Initial

  1. Download the latest version of the SAPlink installer zip file from the SAPlink Project page which contains the following files:
    • SAPlink_installer.txt - hopefully the last program you will ever have to copy and paste
    • NUGG_SAPLINK.nugg - nugget containing necessary objects to install
  2. Extract contents of the SAPlink installer zip file
  3. Copy, paste, save, and activate the contents of the SAPlink_installer.txt file into a new program ZSAPLINK_INSTALLER onto the target SAP system
  4. Execute newly activated program ZSAPLINK_INSTALLER
  5. Use the extracted file NUGG_SAPLINK_INSTALL.nugg for the selection parameter "Installation Nugget"
    WARNING: Using checkbox "Overwrite Originals", will overwrite any existing version of the SAPlink objects that were previously installed onto the system.  Only use when reinstalling or installing a major release where a brand new install is required. Otherwise, follow the normal procedures for upgrade below.
  6. Execute
  7. To avoid an error that the implementation of an abstract class does not exist please run the installation a second time.
  8. Newly installed objects need to be activated manually, as all objects are installed as local and inactive
    1. Run transaction code SE38
    2. On initial screen of SE38, enter program name ZSAPLINK into selection parameter "Program" and hit activate command to show worklist
    3. On worklist screen, select "Whole Worklist" button on bottom to show all inactive objects in your worklist IMPORTANT NOTE: You must click the button labeled "Whole Worklist" to show and select all SAPlink related objects. There are multiple objects that are imported during the initial install and must all be activated for SAPlink to run properly
    4. Select all newly installed SAPlink related objects (ZSAPLINK) and activate
    5. Once activation for all objects is complete, SAPlink can be executed via program ZSAPLINK