SAP and the Thinking Process
Building stronger Current Reality Trees
In this article, I´m going to show you how SAP ( or other ERPs ) can help you in building your own CRT ( Current Reality Tree ) from the thinking process approach. I won`t cover how to build CRT here. It isn´t my aim now, however, there is a lot of information available on the internet. I´ll focus on one particular aspect needed for constructing CRT, on getting data and facts from the SAP to support entities existence.

In my day to day practice, I use the approach from H. William Dettmer as he calls it “The Logical Thinking Process”. For more details see his great book The Logical Thinking Process – A Systems Approach to Complex Problem Solving. There are tools for constructing CRTs called Categories of Legitimate Reservation: Clarity, Entity Existence, Causality Existence, Cause Insufficiency, Additional Cause, Cause-Effect Reversal, Predicted Effect Existence and Tautology. The second of them is the Entity Existence with its three conditions: Completes, Structure and Validity and just the validity is exactly the point where SAP can help you to gather the needed facts. As Dettmer writes on page 38 ”…Validity is normally established by evidence. Logic tree quality is improved dramatically if documented evidence of cause and/or effect can be produced. This helps avoid speculation or invalid assumptions about causality…”. SAP can support you with the needed data.

Let´s go through my example. On the diagram below you can see one particular branch from my CRT inclusive entities notes. I don´t claim it is perfect and can´t be improved, but for the purpose of finding out all root causes is it sufficient.
My Current reality tree:

Round Box Entities • cause101 – a part of orders are produced too late to due to dates • 102 – some customers don´t accept later dates • cause102 – not all requirements are available as needed • 103 – We start later than needed in some cases • 104 – there is no way to reduce the production time • 105 – there aren´t alternatives for those requirements • – during the production process strikes Murphy • 107 – there is no way to reduce the production time • 109 – We don´t have enough capacity at the right time • 110 – We don´t know exactly all demands beforehand • – Future is unpredictable • 112 – We´re not proactive with customers • 114 [L] – We don´t know exactly all demands beforehand • 117 – One way to be efficient is to reduce setup time • 118 – Workers merge orders • 119 – We move actual orders back • 120 – We use capacity for not actual orders • 121 – The sum of needed time is sometimes higher than available • 124 – we have unnecessary inventory • 125 – We have a backlog • 126 – We have some overloaded resources • 127 – We have not the right buffer (Capacity/time/material) • 128 – We plan our capacity due to history and forecast • 129 – we plan our resources conservative • 130 – All resources must be producing all the time to be efficient • 131 – Plan in CZ must be > 0. • 132 – some actual orders are planed over available capacity • 133 – We don´t have the right planning tool to see overloading • 134 – We DO have the right planning tool to see overloading • 135 – We ignore overloading • 137 – We are scared there will be lack of orders for all resources • – We have some rules to ignore available capacity • 139 – we plan our capacity as a sum • 140 – There are big differences in workloads of resources; 50 % • – A buffer means an idle resource • 144 – We don´t want idle resources • 147 – We all believe in local efficiency • 148 – There are resources with a lower load than the bottleneck • – We have not totally balanced production • 150 – we are measured due to local optimum • 151 – there are no other rules
Here is the German version…………………….

Round Box Entities • cause101 – Wir produzieren manche Aufträge später als kundentermmin • 102 – Manche kunden akzeptieren kein Verzug • 103 – Wir fangen in machen Fällen später an als benötigt • 104 – Es gibt keine Möglichkeit für Reduzierung der Fertigungszeit • 105 – Es gibt keine Alternativen für diese Anforderungen. • – Während der Produktion erscheint Murphy • 107 – there is no way to reduce the production time • 109 – Wir haben nicht genug Kapazität in der richtigen Zeit • 110 – Wir kennen nicht alle Bedarfe Voraus. • – Die Zukunft ist unvorhersehbar • 112 – Wir sind nicht proaktiv mit unseren Kunden • 114 [L] – We don´t know exactly all demands beforehand • 117 – Eine Möglichkeit für Efektivnes ist Reduzierung Rüstzeiten • 118 – Wir fassen Aufträge zusammen • 119 – Wir schieben aktuelle Aufträge nach hinten • 120 – Wir nutzen Kapazität für nicht aktuelle Aufträge • 121 – Die Sume für die benötigte Zeit ist höher als vorhandene • 124 – Wir haben unnötige Bestände • 125 – Wir haben Rückstand • 126 – Wir haben manche überlastete Quellen • 127 – Wir haben nicht den richtigen Puffer(Kapa/Zeit/Material) • 128 – Wir planen unseren Kapazitäts-Bedarf nach Vergangenheit • 129 – Wir planen unsere Quellen konzervativ • 130 – Alle Resourcen müssen laufen/ Wir wollen Efektivnes • 131 – Plan in CZ muss sein > 0. • 132 – Manche aktuelle Auftäge werden überplant über vorhandene Kapazität • 133 – Wir haben nicht den richtigen Plannungswerkzeug • 134 – Wir haben den richtigen Plannungswerkzeug • 135 – Wir ignorieren Überlastungen (kapazitiv no go) • 137 – Wir haben Angst, daß in Zukunft weniger Aufträge sein werden. • – Wir haben Regeln für Ignorierung vorhandene Kapazität • 139 – Wir planen unsere Kapa-Bedarf in Summe • 140 – Es gibt goße Unterschiede unter verschiedenen Resourcen; 50 % • – Ein Puffer heißt ungenutzte Kapazität • 144 – Wir wollen keine ungenutzten Kapazitäten • 147 – Wir glauben in lokale Efektivität • 148 – Wir haben Resourcen die nicht voll ausgelastet sind. • – Wir habe keine komplet ausgewogene Fertigung • 150 – Wir sind nach lokalen Optimum gemessen = Leistung • 151 – Wir haben keine andere Regeln • 401 – Nicht alle Materialen sind vorhanden in Menge und Qualität wie benötigt • 406 – Wir produzieren mache Teile im Vorlauf Undesirable Effects • UDE100 – Liefertreu ist 50%
Let´s follow each entity for supporting facts which can be gained from the SAP in my case.
Nr. UDE100 says: Delivery performance is about 50%. I suppose each company has its focus and priority on that measurement and has a tool to follow it. In another case, you can get those data from SAP using DB tables VBAK, VBEP, VBAP, VBFA, LIKP, LIPS. I won´t go deeper into how you can build an ABAP program to calculate delivery performance. Firstly it should be easy for an experienced developer and secondly, every company can have its own methodology for calculating its delivery performance.
Nr. 118 “Workers merge orders”: As usually in SAP, there are several ways, to support this statement with facts/data. As an example see coding below comparing production orders with planned orders according to the material number.
Here is the ABAP class for this action :
*&---------------------------------------------------------------------* *& Report ZJAP_GET_ALL_FOR_CP *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zjap_get_all_for_cp. DATA: w_date TYPE sy-datum, w_matnr TYPE matnr, w_delnr TYPE delnr, w_delps TYPE delps, w_delet TYPE delet. SELECT-OPTIONS: p_date FOR w_date, p_matnr FOR w_matnr, p_delet FOR w_delet, p_delps FOR w_delps, p_delnr FOR w_delnr. PARAMETERS: pr_knd RADIOBUTTON GROUP rad2, pr_prod RADIOBUTTON GROUP rad2. PARAMETERS: p_compar RADIOBUTTON GROUP rad1, pr_write RADIOBUTTON GROUP rad1, pr_delet RADIOBUTTON GROUP rad1. CLASS lcl_main DEFINITION . PUBLIC SECTION. CLASS-METHODS: main, class_constructor. METHODS: constructor . PRIVATE SECTION. CLASS-METHODS: do_it. ENDCLASS. CLASS lcl_compare DEFINITION. PUBLIC SECTION. TYPES: BEGIN OF t_compr. TYPES: matnr TYPE matnr, menge_f TYPE mng01, menge_p TYPE mng01, pomer TYPE p LENGTH 16 DECIMALS 2. TYPES END OF t_compr. CLASS-METHODS: class_constructor, display, do_it. METHODS: constructor IMPORTING i_afko TYPE afko. PRIVATE SECTION. CLASS-DATA: lt_compr TYPE TABLE OF t_compr, lt_afko TYPE TABLE OF afko, ls_afko TYPE afko, lo TYPE REF TO lcl_compare. DATA: ls_afko_my LIKE ls_afko, lt_afko_my LIKE lt_afko, ls_compr TYPE t_compr, lt_plaf TYPE TABLE OF plaf, ls_plaf TYPE plaf. METHODS: get_line. ENDCLASS. CLASS lcl_main IMPLEMENTATION. METHOD main. DATA: ls_zjap TYPE zjapcp. IF pr_write IS NOT INITIAL. …….. ELSEIF pr_delet IS NOT INITIAL. …….. ELSEIF p_compar IS NOT INITIAL. lcl_compare=>do_it( ). ENDIF. ENDMETHOD. METHOD class_constructor. ENDMETHOD. METHOD constructor. ENDMETHOD. METHOD do_it. lcl_order=>do_it( ). ENDMETHOD. ENDCLASS. CLASS lcl_compare IMPLEMENTATION. METHOD class_constructor. SELECT * FROM afko INTO TABLE lt_afko WHERE gstrs IN p_date AND getri IN p_date AND plnbez IN p_matnr. SORT lt_afko STABLE BY plnbez. DELETE ADJACENT DUPLICATES FROM lt_afko COMPARING plnbez. ENDMETHOD. METHOD do_it. LOOP AT lt_afko INTO ls_afko. CREATE OBJECT lo EXPORTING i_afko = ls_afko. lo->get_line( ). CLEAR: ls_afko, lo. ENDLOOP. display( ). ENDMETHOD. METHOD constructor. ls_afko_my = i_afko. SELECT * FROM afko INTO TABLE lt_afko_my WHERE plnbez = ls_afko_my-plnbez AND gstri IN p_date AND getri IN p_date. SELECT * FROM plaf INTO TABLE lt_plaf WHERE matnr = ls_afko_my-plnbez AND psttr IN p_date AND pedtr IN p_date. ENDMETHOD. METHOD get_line. DATA: lv TYPE i. ls_compr-matnr = ls_afko_my-plnbez. CLEAR:ls_afko_my. LOOP AT lt_afko_my INTO ls_afko_my. ls_compr-menge_f = ls_compr-menge_f + ls_afko_my-gamng. lv = lv + 1. CLEAR: ls_afko_my. ENDLOOP. ls_compr-menge_f = ls_compr-menge_f / lv. CLEAR lv. LOOP AT lt_plaf INTO ls_plaf. ls_compr-menge_p = ls_compr-menge_p + ls_plaf-gsmng. lv = lv + 1. CLEAR: ls_plaf. ENDLOOP. ls_compr-menge_p = ls_compr-menge_p / lv. CLEAR lv. IF ls_compr-menge_f > 0 AND ls_compr-menge_p > 0. ls_compr-pomer = ls_compr-menge_f / ls_compr-menge_p. APPEND ls_compr TO lt_compr. ENDIF. ENDMETHOD. METHOD display. DATA: lo_alv TYPE REF TO cl_salv_table, lo_funct TYPE REF TO cl_salv_functions_list. TRY. cl_salv_table=>factory( IMPORTING r_salv_table = lo_alv CHANGING t_table = lt_compr ). CATCH cx_salv_msg . ENDTRY. lo_funct = lo_alv->get_functions( ). lo_funct->set_all( abap_true ). lo_alv->display( ). ENDMETHOD. ENDCLASS. START-OF-SELECTION. lcl_main=>main( ).
Nr. 126 “We have some overloaded resources” and Nr. 140 “There are big differences in workloads of resources”: Again, there is not only one option for mining data. I chose the following approach with function modules CR_CAPACITY_PERIODS and CR_CAPACITY_AVAILABLE_PERIODS. See method get_data_for_his_db
Here is the ABAP class for this action :
LOOP AT lt_kapid INTO lv_kapid. CREATE OBJECT lo_graph EXPORTING i_kapid = lv_kapid. lo_graph->get_data_for_his_db( EXPORTING iv_peart = p_peart iv_intvls = p_intvls IMPORTING et_utilization_his = lt_out ). APPEND LINES OF lt_out TO lt_output. CLEAR: lv_kapid, lo_graph, lt_out. ENDLOOP. METHOD get_data_for_his_db. DATA: ls_zcapauti TYPE zcapauti. gv_peart = iv_peart. gv_plus = iv_intvls. modify_start_end( ). get_capa_available( ). get_load_exact( ). get_load_kbed( ). get_period_text( ). LOOP AT gt_data_graph INTO gs_data_graph. ls_zcapauti-mandt = sy-mandt. ls_zcapauti-zpeart = gv_peart. ls_zcapauti-zhis = sy-datum. ls_zcapauti-zkapid = gv_kapid. ls_zcapauti-zload = gs_data_graph-load. ls_zcapauti-zavailable = gs_data_graph-available. ls_zcapauti-zload_kbed = gs_data_graph-load_kbed. READ TABLE gt_period_text INTO gs_period_text INDEX sy-tabix. ls_zcapauti-zperiod_tx = gs_period_text-period_text. ls_zcapauti-zperiod = gs_period_text-period. APPEND ls_zcapauti TO et_utilization_his. CLEAR: gs_data_graph, ls_zcapauti, gs_period_text. ENDLOOP. METHOD modify_start_end. DATA: lv_horizon TYPE sy-datum, lt_result TYPE TABLE OF fkk_date, ls_result TYPE fkk_date, w_titel TYPE string VALUE 'Achtung!!!', w_txt TYPE string VALUE 'Perioden Bereich zu groß!!'. lv_horizon = sy-datum + 400. start = sy-datum. CASE gv_peart. WHEN 'A'. end = start + gv_plus. WHEN 'C'. CALL FUNCTION 'FKK_DTE_CALC_NEXT_DATES' EXPORTING i_base_date = sy-datum * I_BASE_TIME = '000000' i_periode = 'W' i_period_factor = gv_plus i_horizon_date = lv_horizon * I_HORIZON_TIME = '235959' * I_USE_FACCAL = ' ' * I_WORKDAY_INDICATOR = '-' * I_DONT_CHECK_DATE_IN_PAST = ' ' TABLES t_result = lt_result * CHANGING * I_DAYCORRECT = 0 EXCEPTIONS horizon_in_the_past = 1 horizon_before_base = 2 no_dates = 3 initial_base_date = 4 OTHERS = 5 . IF sy-subrc <> 0. CALL FUNCTION 'FC_POPUP_ERR_WARN_MESSAGE' EXPORTING popup_title = w_titel is_error = ' ' message_text = w_txt start_column = 25 start_row = 6 . ENDIF. READ TABLE lt_result INTO ls_result INDEX 1. end = ls_result-datum. WHEN 'D'. CALL FUNCTION 'FKK_DTE_CALC_NEXT_DATES' EXPORTING i_base_date = sy-datum * I_BASE_TIME = '000000' i_periode = 'M' i_period_factor = gv_plus i_horizon_date = lv_horizon * I_HORIZON_TIME = '235959' * I_USE_FACCAL = ' ' * I_WORKDAY_INDICATOR = '-' * I_DONT_CHECK_DATE_IN_PAST = ' ' TABLES t_result = lt_result * CHANGING * I_DAYCORRECT = 0 EXCEPTIONS horizon_in_the_past = 1 horizon_before_base = 2 no_dates = 3 nitial_base_date = 4 OTHERS = 5 . IF sy-subrc <> 0. CALL FUNCTION 'FC_POPUP_ERR_WARN_MESSAGE' EXPORTING popup_title = w_ titel is_error = ' ' message_text = w_txt start_column = 25 start_row = 6 . ENDIF. READ TABLE lt_result INTO ls_result INDEX 1. end = ls_result-datum. ENDCASE. ENDMETHOD. METHOD get_capa_available. CLEAR: gt_avail_per. * Create period for each day (shifts can be different by day): CALL FUNCTION 'CR_CAPACITY_PERIODS' EXPORTING datub = end datuv = start * KAPEL = ' ' kapid = gv_kapid * MRPCAL = ' ' * PEANZ = '000' peart = gv_peart "A = day; C = week * PEBEG = ' ' * PEDAU = '000' * VERSN = * ZRAST = ' ' TABLES t_per = gt_avail_per. * Get available capacity for each day by shift: CALL FUNCTION 'CR_CAPACITY_AVAILABLE_PERIODS' EXPORTING exact_breaks = 'X' shifts = 'X' unit_si = 'X' "in seconds TABLES t_avail = gt_avail_per EXCEPTIONS hierarchy_not_found = 1 object_not_in_hierarchy = 2 version_without_hierarchy = 3 parameter_not_with_time = 4 OTHERS = 5. LOOP AT gt_avail_per INTO gs_avail_per. CALL FUNCTION 'DATE_TIME_CONVERT' EXPORTING date = gs_avail_per-datuv time = gs_avail_per-zeitv IMPORTING point_in_time = gs_avail_per-startpoint * EXCEPTIONS * DATE_BEFORE_REL_DATE = 1 * DATE_TO_BIG = 2 * OTHERS = 3 . IF sy-subrc <> 0. * Implement suitable error handling here ENDIF. CALL FUNCTION 'DATE_TIME_CONVERT' EXPORTING date = gs_avail_per-datub time = gs_avail_per-zeitb IMPORTING point_in_time = gs_avail_per-endpoint * EXCEPTIONS * DATE_BEFORE_REL_DATE = 1 * DATE_TO_BIG = 2 * OTHERS = 3 . IF sy-subrc <> 0. * Implement suitable error handling here ENDIF. MODIFY gt_avail_per FROM gs_avail_per. CLEAR: gs_avail_per. ENDLOOP. ENDMETHOD. METHOD get_load_exact. DESCRIBE TABLE gt_avail_per LINES lines. READ TABLE gt_avail_per INTO gs_avail_per INDEX lines. CLEAR: lines,gt_zcapavrglst, lt_zcapavrglst. SELECT * FROM zcapavrglst INTO CORRESPONDING FIELDS OF TABLE gt_zcapavrglst WHERE kapid = gv_kapid AND dat01_s <= gs_avail_per-datub. LOOP AT gt_zcapavrglst INTO gs_zcapavrglst. get_vrg_distributed( ). CLEAR: gs_zcapavrglst. ENDLOOP. "make ne data for gt_data_graph CLEAR: gt_zcapavrglst. MOVE-CORRESPONDING lt_zcapavrglst TO gt_zcapavrglst. CLEAR: gt_data_graph. LOOP AT gt_avail_per INTO gs_avail_per. gs_data_graph-period = sy-tabix. gs_data_graph-available = gs_avail_per-angeb / 60. " available in sec. demand iminute gs_data_graph-anein = 'MIN'. "pozdeji dynamicky? gs_data_graph-bedein = 'MIN'. "pozdeji dynamicky? LOOP AT gt_zcapavrglst INTO gs_zcapavrglst WHERE kapid = gv_kapid AND period = gs_data_graph-period . gs_data_graph-load = gs_data_graph-load + gs_zcapavrglst-capa_demand . " available in sec. demand in minute CLEAR:gs_zcapavrglst. ENDLOOP. gs_data_graph-overload = gs_data_graph-load_kbed / gs_data_graph-available. APPEND gs_data_graph TO gt_data_graph. CLEAR:gs_avail_per, gs_data_graph. ENDLOOP. ENDMETHOD. METHOD get_vrg_distributed. DATA: next TYPE sy-tabix, ls_help LIKE gs_avail_per. LOOP AT gt_avail_per INTO gs_avail_per. next = sy-tabix + 1. IF gs_zcapavrglst-dat01_s < gs_avail_per-datub. "do it IF gs_zcapavrglst-dat00_s < gs_avail_per-datub. "ramec jedne periody => rovnou zapis gs_zcapavrglst-period = sy-tabix. APPEND gs_zcapavrglst TO lt_zcapavrglst. CLEAR: gs_zcapavrglst.EXIT. ELSEIF gs_zcapavrglst-dat00_s = gs_avail_per-datub. IF gs_zcapavrglst-time00_s < gs_avail_per-zeitb. "ramec jedne periody => rovnou zapis gs_zcapavrglst-period = sy-tabix. APPEND gs_zcapavrglst TO lt_zcapavrglst. CLEAR: gs_zcapavrglst. EXIT. ENDIF. ELSEIF gs_zcapavrglst-dat00_s > gs_avail_per-datub. gs_zcapavrglst-period = sy-tabix. " cut!!! cut_vrg( date_start_in = gs_zcapavrglst-dat01_s time_start_in = gs_zcapavrglst-time01_s date_end_in = gs_avail_per-datub time_end_in = gs_avail_per-zeitb ). READ TABLE gt_avail_per INTO ls_help INDEX next. gs_zcapavrglst-dat01_s = ls_help-datuv. gs_zcapavrglst-time01_s = ls_help-zeitv. ENDIF. ELSEIF gs_zcapavrglst-dat01_s = gs_avail_per-datub. IF gs_zcapavrglst-time01_s < gs_avail_per-zeitb. "do it IF gs_zcapavrglst-dat00_s = gs_avail_per-datub. IF gs_zcapavrglst-time00_s < gs_avail_per-zeitb. "ramec jedne periody => rovnou zapis s_zcapavrglst-period = sy-tabix. APPEND gs_zcapavrglst TO lt_zcapavrglst. CLEAR: gs_zcapavrglst. EXIT. ENDIF. ELSEIF gs_zcapavrglst-dat00_s > gs_avail_per-datub. gs_zcapavrglst-period = sy-tabix. "cut!!!! cut_vrg( date_start_in = gs_zcapavrglst-dat01_s time_start_in = gs_zcapavrglst-time01_s date_end_in = gs_avail_per-datub time_end_in = gs_avail_per-zeitb ). READ TABLE gt_avail_per INTO ls_help INDEX next. gs_zcapavrglst-dat01_s = ls_help-datuv. gs_zcapavrglst-time01_s = ls_help-zeitv. ENDIF. ENDIF. ENDIF. CLEAR:gs_avail_per, next. ENDLOOP. ENDMETHOD. METHOD get_load_kbed. DATA: lt_kapid TYPE cybt_kapid_tab, lt_kbed_index TYPE TABLE OF cysel_obj, ls_kbed_index TYPE cysel_obj, ls_kbedd TYPE kbedd, lt_kbedd TYPE TABLE OF kbedd, lv_ruckstand TYPE sy-datum. lv_ruckstand = start - 60. APPEND gv_kapid TO lt_kapid. CALL FUNCTION 'CY_BT_KBED_SEL_READ' EXPORTING i_date_from = lv_ruckstand i_date_to = end TABLES t_kapid_imp = lt_kapid kbed_itab_exp = lt_kbed_index EXCEPTIONS no_entry = 1 OTHERS = 2. LOOP AT lt_kbed_index INTO ls_kbed_index. CLEAR ls_kbedd. * Get real capacity requirements record: CALL FUNCTION 'CY_BT_KBED_READ_WITH_INDEX' EXPORTING i_index = ls_kbed_index-indexakt i_flg_conv = ' ' i_flg_work = ' ' i_flg_only_kbed = ' ' IMPORTING kbedd_exp = ls_kbedd EXCEPTIONS no_entry = 1 OTHERS = 2. CHECK NOT ls_kbedd IS INITIAL. APPEND ls_kbedd TO lt_kbedd. ENDLOOP. CLEAR: gt_buffer, gs_buffer. LOOP AT lt_kbedd INTO ls_kbedd. gs_buffer-idxkbed = sy-tabix. get_load_kbed_distributed( ls_kbedd ). CLEAR: ls_kbedd, gs_buffer. ENDLOOP. SORT gt_buffer BY period ASCENDING. LOOP AT gt_data_graph INTO gs_data_graph. gs_data_graph-period = sy-tabix. LOOP AT gt_buffer INTO gs_buffer WHERE period = gs_data_graph-period. gs_data_graph-load_kbed = gs_data_graph-load_kbed + gs_buffer-load. CLEAR:gs_buffer. ENDLOOP. gs_data_graph-overload = gs_data_graph-load_kbed / gs_data_graph-available. MODIFY gt_data_graph FROM gs_data_graph. CLEAR: gs_data_graph, gs_avail_per. ENDLOOP. ENDMETHOD. METHOD get_period_text. CLEAR:gt_period_text. LOOP AT gt_avail_per INTO gs_avail_per. gs_period_text-period = sy-tabix. CALL FUNCTION 'PERIODS_TEXT_GET' EXPORTING calendar_id = gc_calendar_id date = gs_avail_per-datuv * FISCAL_YEAR_VARIANT = ' ' period_type = gv_peart * NO_CENTURY = ' ' * NO_NR_OF_PERIODS = ' ' IMPORTING period_text = gs_period_text-period_text * EXCEPTIONS * DATE_AFTER_RANGE = 1 * DATE_BEFORE_RANGE = 2 * DATE_INVALID = 3 * FACTORY_CALENDAR_NOT_FOUND = 4 * T009B_NOTFOUND = 5 * T009_NOTFOUND = 6 * UNKNOWN_PERIOD_TYPE = 7 * WRONG_INPUT = 8 * OTHERS = 9 . IF sy-subrc <> 0. * Implement suitable error handling here ENDIF. APPEND gs_period_text TO gt_period_text. CLEAR: gs_avail_per, gs_period_text. ENDLOOP. ENDMETHOD.
To be continued….