PSR — лайфхак (запись экрана пользователя для поддержки)

Привет.

Лайфхак. Пуск — Выполнить — psr — кнопка Ентер. Нажимаем запись, показываем проблему, добавляем комментарии по кнопке, отправляем полученный архив в поддержку. Ваши инциденты решаются в разы быстрее!

Вот пример того, что получается. psr_test

РЕКОМЕНДУЮ! Это бесплатная утилита от Microsoft.


Интеграция с AviaSales

Маленький пятничный подарок, реализованный за 1 час времени с нуля — прошу, интеграция с AviaSales.

Хотите, чтобы в модуле управления командировками можно было получать реальные цены на авиабилеты? Вот кусок кода, который можно вставить в бадишку для поиска билетов. Это образец, дальше сами сообразите. А полное решение будет в новой книге от меня 😉

 

REPORT ZAVIASALES.

DATAlo_http_client     TYPE REF TO if_http_client,
lo_rest_client     TYPE REF TO cl_rest_http_client,
lv_url             TYPE        string,
lv_body            TYPE        string,
lo_response    TYPE REF TO     if_rest_entity.
cl_http_client=>create_by_url(
EXPORTING
url              ‘http://api.travelpayouts.com’
IMPORTING
client                   lo_http_client    » HTTP Client Abstraction
exceptions
argument_not_found 1
plugin_not_active  2
internal_error     3
others             4
).
CREATE OBJECT lo_rest_client
EXPORTING
io_http_client lo_http_client.

IF lo_http_client IS BOUND AND lo_rest_client IS BOUND.
lv_url ‘/v1/prices/cheap?origin=MOW&destination=HKT&depart_date=2015-11&return_date=2015-12&token=ВАШТОКЕН’.
cl_http_utility=>set_request_uri(
EXPORTING
request lo_http_client->request    » HTTP Framework (iHTTP) HTTP Request
uri     lv_url                     » URI String (in the Form of /path?query-string)
).

* HTTP GET
lo_rest_client->if_rest_client~get).

* HTTP response
lo_response lo_rest_client->if_rest_client~get_response_entity).

* HTTP return status
DATA(http_status)   lo_response->get_header_field‘~status_code’ ).

* HTTP JSON return string
DATA(json_responselo_response->get_string_data).
write json_response.

ENDIF.

Результат выглядит вот так. И его уже можно разобрать на части, сложить в поля.

{«success»: true, «data»: {«HKT»:{«0»:{«price»:36693,»airline»:»SU»,»flight_number»:274,»departure_at»:»2015-11-24T19:15:00Z»,»return_at»:»2015-12-09T11:40:00Z»,»expires_at»:»2015-10-19T14:18:50Z»},»1″:{«price»:25654,»airline»:»CA»,»flight_number»:910,»departure_at»:»2015-11-22T18:55:00Z»,»return_at»:»2015-12-10T01:40:00Z»,»expires_at»:»2015-10-17T18:14:29Z»},»2″:{«price»:26837,»airline»:»EY»,»flight_number»:68,»departure_at»:»2015-11-19T12:50:00Z»,»return_at»:»2015-12-15T06:55:00Z»,»expires_at»:»2015-10-18T14:54:47Z»},»3″:{«price»:37979,»airline»:»SU»,»flight_number»:22,»departure_at»:»2015-11-16T16:10:00Z»,»return_at»:»2015-12-14T01:50:00Z»,»expires_at»:»2015-10-19T13:11:55Z»}}}}


Расширение в PHAP_CATALOG

Я тут для себя напишу, вы не читайте. Привет 🙂

Делали сегодня расширение в формуляре аттестации (PHAP_CATALOG), чтобы считался процент выполнения цели. Вроде бы все просто должно быть. Сделал реализацию бади HRHAP00_VAL_DET. Прописал в настройках формуляра. Выбираю для столбца способ определения значения (Value Determination), а мне система в ответ говорит, что для столбца FAPP нельзя использовать расширение. И гугл молчит, и мне становится грустно.

И вот откопал, что оказывается надо в нашей реализации бади заполнить методы

IF_EX_HRHAP00_VAL_DET~CUST_CHECK_EXECUTABILITY

IF_EX_HRHAP00_VAL_DET~CUST_COLUMN_RESTRICTION

, которые отвечают за возможность использования этого расширения для конкретного типа столбца. Стоило поставить всем и всем можно (available = ‘X’ и executable ‘X’), перезайти, как все прописалось корректно 🙂 

Вот где об этом написано, ткните, пожалуйста?


PU19 Tax Reporter inside

Если вы вдруг окажетесь в США или Канаде, и вам придется настраивать налоговую отчетность, то сразу рекомендую изучить отладчик и эти две программы. Без этого ну никак нельзя понять как оно работает. Это аналог нашего DAQ, который тоже без определенной дозы не всегда можно понять. В Северной Америке законодательство в части налогов по заработной плате очень интересное. Там меньше самих налогов, но гораздо извращеннее их трактование, расчет. Хотя отчетность существенно проще нашей.

 

REPORT RPCTRSU0.
************************************************************************
* Tax report scheduler(). *
* 1. Two processes in producing tax forms. *
* — process A (read PCL2 and store form fields in PCL4) *
* — process B (read PCL4 and generate SAPscript/HRforms/TEMPSe) *
* 2. The scheduler dictates how the Tax reporter processes are *
* to be split. *
* 3. It also partly serves in translating the user input into *
* program input. *
************************************************************************

 

REPORT RPCTRCU0 MESSAGE-ID PN USING DATABASE PNP LINE-SIZE 132.
************************************************************************
* RPCTRCU0() To read payroll results and generate Tax reports. Also *
* stores the reported values on the cluster PCL4-U1. *
************************************************************************

 

 

First, the forms cluster (table PCL4, RELID U1) is filled by program RPCTRCU0. This program extracts data from a number of areas, including:
„« Master Data
„« Results table RT of payroll results cluster PCL2
„« Manual entries from tax interface tables T5UT1 and T5UT2
„« Tables T51R5 and T51R1, which are populated by Third Party Remittance functionality.
Once program RPCTRCU0 has completed processing, the raw data that is to be reported on paper and magnetic media forms is stored in forms cluster PCL4, in an unformatted state. Once all necessary table entries have been created in the forms cluster, program RPCTRCU0 ceases processing and a second program, RPCTRPU0, is run to read these entries. It subsequently formats these entries and generates reporting data in the various media supported by Tax Reporter, both on paper, SAPscript forms, HRFORMULA reports, or simple lists) and magnetic media (TemSe ¡V that is, temporary sequential ¡V files, magnetic tape, and diskette).

In an effort to fill forms cluster PCL4 and produce output in the shortest period possible, Tax Reporter employs the scheduling program RPCTRSU0. Program RPCTRSU0 executes one or more instances of cluster fill program RPCTRCU0 and print program RPCTRPU0 in order to divide the size of the reporting run.