diff --git a/.abapgit.xml b/.abapgit.xml new file mode 100644 index 0000000..9bb224b --- /dev/null +++ b/.abapgit.xml @@ -0,0 +1,10 @@ + + + + + E + /src/ + FULL + + + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0b99191 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +<<<<<<< HEAD +name: Bug report +======= +name: Bug report +>>>>>>> refs/heads/master +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**SAP Product Version (please complete the following information):** + - + + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..0fdc9b6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,13 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + +<<<<<<< HEAD +======= + +>>>>>>> refs/heads/master diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..435cb2f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' +<<<<<<< HEAD + +======= + +>>>>>>> refs/heads/master +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4d194db --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,46 @@ +## Status +**READY/IN DEVELOPMENT/HOLD** + +## Migrations +YES | NO +<<<<<<< HEAD + +======= + +>>>>>>> refs/heads/master +## Description +A few sentences describing the overall goals of the pull request's commits. + +## Related PRs +List related PRs against other branches: + +branch | PR +------ | ------ +other_pr_production | [link]() +other_pr_master | [link]() + + +## Todos +- [ ] Tests +- [ ] Documentation + + +## Deploy Notes +Notes regarding deployment the contained body of work. These should note any +db migrations, etc. + +## Steps to Test or Reproduce +Outline the steps to test or reproduce the PR here. + +```sh +git pull --prune +git checkout +bundle; script/server +``` + +1. + +## Impacted Areas in Application +List general components of the application that this PR will affect: + +* \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..18c9147 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md index 5f772a1..aa952a9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # abapHtmlButton -Hmtl button for your screen +HTML button for your sap screen + + +Inspired by and expanded from the book "ABAP Cookbook" + +- Version requirement: 702 +- MIT License + +### Installation +- install via [abapGit](https://github.com/larshp/abapGit) +- install all html colors and demo buttons via report "ZHTML_BTN_INSTALL" (optional) + +### Customizing +- Colors in DDIC-Tab "ZHTML_COLORS" (Colorname, Hex-Code) +- Buttons in DDIC-Tab "ZHTML_BTN_TYPES" (TYPE, TEXT, Color, FUNC-Code) + + +### Demo +Transaction "ZHTML_BTN_DEMO" diff --git a/src/package.devc.xml b/src/package.devc.xml new file mode 100644 index 0000000..6da9052 --- /dev/null +++ b/src/package.devc.xml @@ -0,0 +1,10 @@ + + + + + + Html Button + + + + diff --git a/src/zcl_html_button.clas.abap b/src/zcl_html_button.clas.abap new file mode 100644 index 0000000..d9411c6 --- /dev/null +++ b/src/zcl_html_button.clas.abap @@ -0,0 +1,270 @@ +"!

HTML Button

+CLASS zcl_html_button DEFINITION + PUBLIC + CREATE PUBLIC . + +PUBLIC SECTION. + + INTERFACES zif_html_button . + + ALIASES get_btn_fields + FOR zif_html_button~get_btn_fields . + ALIASES get_btn_type + FOR zif_html_button~get_btn_type . + ALIASES set_active + FOR zif_html_button~set_active . + + TYPES: + ty_html_table TYPE STANDARD TABLE OF text1000 . + + "!

CONSTRUCTOR

+ METHODS constructor + IMPORTING + !i_btn TYPE zhtml_button . + PROTECTED SECTION. +PRIVATE SECTION. + + DATA mt_events TYPE cntl_simple_events . + DATA: + ms_event LIKE LINE OF mt_events . + DATA: + mt_html TYPE STANDARD TABLE OF text1000 + WITH NON-UNIQUE DEFAULT KEY . + DATA: + mv_html LIKE LINE OF mt_html . + DATA mv_url TYPE text1000 . + DATA mv_color TYPE string . + DATA mo_container TYPE REF TO cl_gui_container . + DATA mo_html TYPE REF TO cl_gui_html_viewer . + DATA mv_inactive TYPE char01 . + "!

HTML Button

+ DATA s_btn TYPE zhtml_button . + "!

HTML Button Fields

+ DATA s_btn_fields TYPE zhtml_button_fields . + + METHODS handle_sapevent + FOR EVENT sapevent OF cl_gui_html_viewer + IMPORTING + !action + !frame + !getdata + !postdata + !query_table . + METHODS build_html_code + IMPORTING + !iv_text TYPE clike + !iv_color TYPE clike + !iv_ok_code TYPE clike + CHANGING + !ct_html TYPE ty_html_table . + METHODS read_btn_db + IMPORTING + !i_btn_type TYPE zhtml_button-btn_type . + METHODS set_controls . + METHODS set_btn_color . +ENDCLASS. + + + +CLASS ZCL_HTML_BUTTON IMPLEMENTATION. + + + METHOD build_html_code. + DATA lv_html LIKE LINE OF ct_html. + + CONCATENATE + '' + 'BUTTON' + '' + '' + '' + '' + '' + INTO lv_html. + APPEND lv_html TO ct_html. + + ENDMETHOD. + + + METHOD constructor. + + DATA: lt_events TYPE cntl_simple_events, + ls_event LIKE LINE OF lt_events, + lt_html TYPE ty_html_table, + lv_url TYPE text1000. + + s_btn = i_btn. + + set_controls( ). + + +*== check if container is bound + CHECK s_btn-container IS BOUND. + + read_btn_db( i_btn-btn_type ). + + set_btn_color( ). + +**== create HTML control + CREATE OBJECT mo_html + EXPORTING + parent = s_btn-container. + + CHECK mo_html IS BOUND. + +*== Register SAPEVENT + CALL METHOD mo_html->get_registered_events + IMPORTING + events = lt_events. + ls_event-eventid = cl_gui_html_viewer=>m_id_sapevent. + ls_event-appl_event = ' '. + READ TABLE lt_events TRANSPORTING NO FIELDS WITH KEY eventid = ls_event-eventid. + IF sy-subrc <> 0. + APPEND ls_event TO lt_events. + mo_html->set_registered_events( lt_events ). + ENDIF. + + SET HANDLER handle_sapevent FOR mo_html. + +*== build HTML code for Button + CALL METHOD build_html_code + EXPORTING + iv_text = s_btn_fields-btn_text + iv_color = s_btn_fields-btn_color + iv_ok_code = s_btn_fields-ok_code + CHANGING + ct_html = lt_html. + +*== load created HTML code into HTML control + CALL METHOD mo_html->load_data + IMPORTING + assigned_url = lv_url + CHANGING + data_table = lt_html. + +*== show HTML page + mo_html->show_url( lv_url ). + + ENDMETHOD. + + + METHOD handle_sapevent. +*== data + DATA ucomm TYPE syucomm. + +*== button active? + CHECK mv_inactive = space. + +*== cast user command + ucomm = action. +*== set user command + cl_gui_cfw=>set_new_ok_code( ucomm ). + ENDMETHOD. + + + METHOD read_btn_db. + SELECT SINGLE * FROM zhtml_btn_types INTO CORRESPONDING FIELDS OF s_btn_fields WHERE type EQ i_btn_type. + ENDMETHOD. + + + METHOD set_btn_color. + + IF s_btn_fields-btn_color IS INITIAL. +*== set default color + s_btn_fields-btn_color = '#F2E1AF'. + ENDIF. + + ENDMETHOD. + + + METHOD set_controls. + +* DATA lr_container TYPE REF TO cl_gui_container. + + IF s_btn-cc_name <> space AND s_btn-container IS INITIAL. +*== create custom container + CREATE OBJECT s_btn-container + TYPE + cl_gui_custom_container + EXPORTING + container_name = s_btn-cc_name. +* ELSE. +**== use given container +* lr_container = s_btn-container. + ENDIF. + ENDMETHOD. + + + METHOD zif_html_button~get_btn_fields. + + ENDMETHOD. + + + METHOD zif_html_button~get_btn_type. + + ENDMETHOD. + + + METHOD zif_html_button~set_active. + + DATA lt_html TYPE ty_html_table. + DATA lv_url TYPE text1000. + +*== set flag for handler + mv_inactive = ''. + +*== build HTML code for Button + CALL METHOD build_html_code + EXPORTING + iv_text = s_btn_fields-btn_text + iv_color = 'grey' + iv_ok_code = s_btn_fields-ok_code + CHANGING + ct_html = lt_html. + +*== load created HTML code into HTML control + CALL METHOD mo_html->load_data + IMPORTING + assigned_url = lv_url + CHANGING + data_table = lt_html. + +*== show HTML page + mo_html->show_url( lv_url ). + ENDMETHOD. + + + method ZIF_HTML_BUTTON~SET_INACTIVE. + DATA lt_html TYPE ty_html_table. + DATA lv_url TYPE text1000. + +*== set flag for handler + mv_inactive = 'X'. + +*== build HTML code for Button + CALL METHOD build_html_code + EXPORTING + iv_text = s_btn_fields-btn_text + iv_color = 'grey' + iv_ok_code = s_btn_fields-ok_code + CHANGING + ct_html = lt_html. + +*== load created HTML code into HTML control + CALL METHOD mo_html->load_data + IMPORTING + assigned_url = lv_url + CHANGING + data_table = lt_html. + +*== show HTML page + mo_html->show_url( lv_url ). + endmethod. +ENDCLASS. diff --git a/src/zcl_html_button.clas.xml b/src/zcl_html_button.clas.xml new file mode 100644 index 0000000..d5c099e --- /dev/null +++ b/src/zcl_html_button.clas.xml @@ -0,0 +1,36 @@ + + + + + + ZCL_HTML_BUTTON + E + HTML Button + 1 + X + X + X + + + + ZCL_HTML_BUTTON + CONSTRUCTOR + E + CONSTRUCTOR + + + ZCL_HTML_BUTTON + S_BTN + E + HTML Button + + + ZCL_HTML_BUTTON + S_BTN_FIELDS + E + HTML Button Fields + + + + + diff --git a/src/zcl_html_button_cntl.clas.abap b/src/zcl_html_button_cntl.clas.abap new file mode 100644 index 0000000..c935cf3 --- /dev/null +++ b/src/zcl_html_button_cntl.clas.abap @@ -0,0 +1,113 @@ +"!

HTML Button CNTL

+CLASS zcl_html_button_cntl DEFINITION + PUBLIC + FINAL + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES zif_appl_object . + INTERFACES zif_html_button_cntl . + + ALIASES appl_type + FOR zif_appl_object~appl_type . + ALIASES o_appl_message + FOR zif_appl_object~o_appl_message . + ALIASES create_btn + FOR zif_html_button_cntl~create_btn . + ALIASES get_appl_type + FOR zif_appl_object~get_appl_type . + ALIASES get_btn_by_guid + FOR zif_html_button_cntl~get_btn_by_guid . + ALIASES set_appl_type + FOR zif_appl_object~set_appl_type . + + "!

CONSTRUCTOR

+ METHODS constructor . + PROTECTED SECTION. + PRIVATE SECTION. + + "!

Button Pointer

+ DATA t_pointer TYPE zhtml_btn_pointer_tt . + DATA o_btn_db TYPE REF TO zif_appl_object_db . + + METHODS get_obj_btn + IMPORTING + !i_btn TYPE zhtml_button + RETURNING + VALUE(ro_button) TYPE REF TO zif_html_button . +ENDCLASS. + + + +CLASS ZCL_HTML_BUTTON_CNTL IMPLEMENTATION. + + + METHOD constructor. + + o_appl_message = zcl_appl_cntl=>get_appl_message( ). + + o_btn_db ?= zcl_appl_cntl=>get_single_obj( 'HTML_BUTTON_DB' ). + + ENDMETHOD. + + + METHOD get_obj_btn. + DATA: lo_button TYPE REF TO zif_html_button, + ls_btn TYPE zhtml_button, + lt_param TYPE abap_parmbind_tab, + ls_param TYPE abap_parmbind, + ls_pointer TYPE zhtml_btn_pointer, + lv_index TYPE sytabix. + + ls_btn = i_btn. + + TRY. + ls_btn-guid = cl_system_uuid=>create_uuid_x16_static( ). + CATCH cx_uuid_error INTO DATA(e_txt). + ENDTRY. + + " Prepare parameter table + ls_param-name = 'I_BTN'. + ls_param-kind = cl_abap_objectdescr=>exporting. + GET REFERENCE OF ls_btn INTO ls_param-value. + INSERT ls_param INTO TABLE lt_param. + + TRY. + CREATE OBJECT lo_button + TYPE ('ZCL_HTML_BUTTON') + PARAMETER-TABLE lt_param. + CATCH cx_sy_create_object_error. + ENDTRY. + + READ TABLE t_pointer ASSIGNING FIELD-SYMBOL() WITH KEY guid = ls_btn-guid. + IF sy-subrc <> 0. + lv_index = sy-tabix. + IF lv_index EQ 0. + lv_index = 1. + ENDIF. + ls_pointer-guid = ls_btn-guid. + ls_pointer-object = lo_button. + INSERT ls_pointer INTO t_pointer INDEX lv_index. + ENDIF. + + ro_button = ls_pointer-object. + + ENDMETHOD. + + + METHOD zif_html_button_cntl~create_btn. + + DATA: lo_button TYPE REF TO zif_html_button. + + lo_button = get_obj_btn( im_btn ). + + + ENDMETHOD. + + + METHOD zif_html_button_cntl~get_btn_by_guid. + + + ENDMETHOD. +ENDCLASS. diff --git a/src/zcl_html_button_cntl.clas.xml b/src/zcl_html_button_cntl.clas.xml new file mode 100644 index 0000000..80935f6 --- /dev/null +++ b/src/zcl_html_button_cntl.clas.xml @@ -0,0 +1,36 @@ + + + + + + ZCL_HTML_BUTTON_CNTL + E + HTML Button CNTL + 1 + X + X + X + + + + ZCL_HTML_BUTTON_CNTL + CONSTRUCTOR + E + CONSTRUCTOR + + + ZCL_HTML_BUTTON_CNTL + O_BTN_DB + E + DB Object + + + ZCL_HTML_BUTTON_CNTL + T_POINTER + E + Button Pointer + + + + + diff --git a/src/zcx_dpg_html_btn_not_exists.clas.abap b/src/zcx_dpg_html_btn_not_exists.clas.abap new file mode 100644 index 0000000..a5e7df6 --- /dev/null +++ b/src/zcx_dpg_html_btn_not_exists.clas.abap @@ -0,0 +1,50 @@ +class ZCX_DPG_HTML_BTN_NOT_EXISTS definition + public + inheriting from CX_STATIC_CHECK + final + create public . + +public section. + + interfaces IF_T100_DYN_MSG . + interfaces IF_T100_MESSAGE . + + constants: + begin of ZCX_DPG_HTML_BTN_NOT_EXISTS, + msgid type symsgid value 'ZHTML_BUTTON', + msgno type symsgno value '001', + attr1 type scx_attrname value 'HTML_BTN', + attr2 type scx_attrname value '', + attr3 type scx_attrname value '', + attr4 type scx_attrname value '', + end of ZCX_DPG_HTML_BTN_NOT_EXISTS . + data HTML_BTN type ZHTML_BTN_TYPE . + + methods CONSTRUCTOR + importing + !TEXTID like IF_T100_MESSAGE=>T100KEY optional + !PREVIOUS like PREVIOUS optional + !HTML_BTN type ZHTML_BTN_TYPE optional . +protected section. +private section. +ENDCLASS. + + + +CLASS ZCX_DPG_HTML_BTN_NOT_EXISTS IMPLEMENTATION. + + + method CONSTRUCTOR. +CALL METHOD SUPER->CONSTRUCTOR +EXPORTING +PREVIOUS = PREVIOUS +. +me->HTML_BTN = HTML_BTN . +clear me->textid. +if textid is initial. + IF_T100_MESSAGE~T100KEY = ZCX_DPG_HTML_BTN_NOT_EXISTS . +else. + IF_T100_MESSAGE~T100KEY = TEXTID. +endif. + endmethod. +ENDCLASS. diff --git a/src/zcx_dpg_html_btn_not_exists.clas.xml b/src/zcx_dpg_html_btn_not_exists.clas.xml new file mode 100644 index 0000000..a90147e --- /dev/null +++ b/src/zcx_dpg_html_btn_not_exists.clas.xml @@ -0,0 +1,31 @@ + + + + + + ZCX_DPG_HTML_BTN_NOT_EXISTS + E + html button not exists + 40 + 1 + X + X + X + + + + ZCX_DPG_HTML_BTN_NOT_EXISTS + CONSTRUCTOR + E + CONSTRUCTOR + + + ZCX_DPG_HTML_BTN_NOT_EXISTS + HTML_BTN + E + Html Button Type + + + + + diff --git a/src/zcx_html_button.clas.abap b/src/zcx_html_button.clas.abap new file mode 100644 index 0000000..662f309 --- /dev/null +++ b/src/zcx_html_button.clas.abap @@ -0,0 +1,37 @@ +class ZCX_HTML_BUTTON definition + public + inheriting from CX_STATIC_CHECK + final + create public . + +public section. + + interfaces IF_T100_DYN_MSG . + interfaces IF_T100_MESSAGE . + + methods CONSTRUCTOR + importing + !TEXTID like IF_T100_MESSAGE=>T100KEY optional + !PREVIOUS like PREVIOUS optional . +protected section. +private section. +ENDCLASS. + + + +CLASS ZCX_HTML_BUTTON IMPLEMENTATION. + + + method CONSTRUCTOR. +CALL METHOD SUPER->CONSTRUCTOR +EXPORTING +PREVIOUS = PREVIOUS +. +clear me->textid. +if textid is initial. + IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID. +else. + IF_T100_MESSAGE~T100KEY = TEXTID. +endif. + endmethod. +ENDCLASS. diff --git a/src/zcx_html_button.clas.xml b/src/zcx_html_button.clas.xml new file mode 100644 index 0000000..52c1a9c --- /dev/null +++ b/src/zcx_html_button.clas.xml @@ -0,0 +1,25 @@ + + + + + + ZCX_HTML_BUTTON + E + Exceptions Html Button + 40 + 1 + X + X + X + + + + ZCX_HTML_BUTTON + CONSTRUCTOR + E + CONSTRUCTOR + + + + + diff --git a/src/zcx_html_button_cntl.clas.abap b/src/zcx_html_button_cntl.clas.abap new file mode 100644 index 0000000..32161e7 --- /dev/null +++ b/src/zcx_html_button_cntl.clas.abap @@ -0,0 +1,37 @@ +class ZCX_HTML_BUTTON_CNTL definition + public + inheriting from CX_STATIC_CHECK + final + create public . + +public section. + + interfaces IF_T100_DYN_MSG . + interfaces IF_T100_MESSAGE . + + methods CONSTRUCTOR + importing + !TEXTID like IF_T100_MESSAGE=>T100KEY optional + !PREVIOUS like PREVIOUS optional . +protected section. +private section. +ENDCLASS. + + + +CLASS ZCX_HTML_BUTTON_CNTL IMPLEMENTATION. + + + method CONSTRUCTOR. +CALL METHOD SUPER->CONSTRUCTOR +EXPORTING +PREVIOUS = PREVIOUS +. +clear me->textid. +if textid is initial. + IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID. +else. + IF_T100_MESSAGE~T100KEY = TEXTID. +endif. + endmethod. +ENDCLASS. diff --git a/src/zcx_html_button_cntl.clas.xml b/src/zcx_html_button_cntl.clas.xml new file mode 100644 index 0000000..b66f2c9 --- /dev/null +++ b/src/zcx_html_button_cntl.clas.xml @@ -0,0 +1,25 @@ + + + + + + ZCX_HTML_BUTTON_CNTL + E + Exceptions Hmtl Button Cntl + 40 + 1 + X + X + X + + + + ZCX_HTML_BUTTON_CNTL + CONSTRUCTOR + E + CONSTRUCTOR + + + + + diff --git a/src/zhtml_btn_install.prog.abap b/src/zhtml_btn_install.prog.abap new file mode 100644 index 0000000..b573b34 --- /dev/null +++ b/src/zhtml_btn_install.prog.abap @@ -0,0 +1,179 @@ +*&---------------------------------------------------------------------* +*& Report ZHTML_BTN_INSTALL +*&---------------------------------------------------------------------* +*& +*&---------------------------------------------------------------------* +REPORT zhtml_btn_install. + +DATA: t_colors TYPE STANDARD TABLE OF zhtml_colors, + t_button_types TYPE STANDARD TABLE OF zhtml_btn_types. + +INITIALIZATION. + + + t_colors = VALUE zhtml_colors_tt( + + ( color_name = 'aliceblue' color_code = '#f0f8ff' ) + ( color_name = 'antiquewhite' color_code = '#faebd7' ) + ( color_name = 'aquamarine' color_code = '#7fffd4' ) + ( color_name = 'azure' color_code = '#f0ffff' ) + ( color_name = 'beige' color_code = '#f5f5dc' ) + ( color_name = 'bisque' color_code = '#ffe4c4' ) + ( color_name = 'black' color_code = '#000000' ) + ( color_name = 'blanchedalmond' color_code = '#ffebcd' ) + ( color_name = 'blue' color_code = '#0000ff' ) + ( color_name = 'blueviolet' color_code = '#8a2be2' ) + ( color_name = 'brown' color_code = '#a52a2a' ) + ( color_name = 'burlywood' color_code = '#deb887' ) + ( color_name = 'cadetblue' color_code = '#5f9ea0' ) + ( color_name = 'chartreuse' color_code = '#7fff00' ) + ( color_name = 'chocolate' color_code = '#d2691e' ) + ( color_name = 'coral' color_code = '#ff7f50' ) + ( color_name = 'cornflowerblue' color_code = '#6495ed' ) + ( color_name = 'cornsilk' color_code = '#fff8dc' ) + ( color_name = 'crimson' color_code = '#dc143c' ) + ( color_name = 'cyan' color_code = '#00ffff' ) + ( color_name = 'darkblue' color_code = '#00008b' ) + ( color_name = 'darkcyan' color_code = '#008b8b' ) + ( color_name = 'darkgoldenrod' color_code = '#b8860b' ) + ( color_name = 'darkgreen' color_code = '#006400' ) + ( color_name = 'darkgrey' color_code = '#a9a9a9' ) + ( color_name = 'darkkhaki' color_code = '#bdb76b' ) + ( color_name = 'darkmagenta' color_code = '#8b008b' ) + ( color_name = 'darkolivegreen' color_code = '#556b2f' ) + ( color_name = 'darkorange' color_code = '#ff8c00' ) + ( color_name = 'darkorchid' color_code = '#9932cc' ) + ( color_name = 'darkred' color_code = '#8b0000' ) + ( color_name = 'darksalmon' color_code = '#e9967a' ) + ( color_name = 'darkseagreen' color_code = '#8fbc8f' ) + ( color_name = 'darkslateblue' color_code = '#483d8b' ) + ( color_name = 'darkslategrey' color_code = '#2f4f4f' ) + ( color_name = 'darkturquoise' color_code = '#00ced1' ) + ( color_name = 'darkviolet' color_code = '#9400d3' ) + ( color_name = 'deeppink' color_code = '#ff1493' ) + ( color_name = 'deepskyblue' color_code = '#00bfff' ) + ( color_name = 'dimgray' color_code = '#696969' ) + ( color_name = 'dodgerblue' color_code = '#1e90ff' ) + ( color_name = 'firebrick' color_code = '#b22222' ) + ( color_name = 'floralwhite' color_code = '#fffaf0' ) + ( color_name = 'forestgreen' color_code = '#228b22' ) + ( color_name = 'gainsboro' color_code = '#dcdcdc' ) + ( color_name = 'ghostwhite' color_code = '#f8f8ff' ) + ( color_name = 'gold' color_code = '#ffd700' ) + ( color_name = 'goldenrod' color_code = '#daa520' ) + ( color_name = 'green' color_code = '#008000' ) + ( color_name = 'greenyellow' color_code = '#adff2f' ) + ( color_name = 'grey' color_code = '#808080' ) + ( color_name = 'honeydew' color_code = '#f0fff0' ) + ( color_name = 'hotpink' color_code = '#ff69b4' ) + ( color_name = 'indianred' color_code = '#cd5c5c' ) + ( color_name = 'indigo' color_code = '#4b0082' ) + ( color_name = 'ivory' color_code = '#fffff0' ) + ( color_name = 'khaki' color_code = '#f0e68c' ) + ( color_name = 'lavender' color_code = '#e6e6fa' ) + ( color_name = 'lavenderblush' color_code = '#fff0f5' ) + ( color_name = 'lawngreen' color_code = '#7cfc00' ) + ( color_name = 'lemonchiffon' color_code = '#fffacd' ) + ( color_name = 'lightblue' color_code = '#add8e6' ) + ( color_name = 'lightcoral' color_code = '#f08080' ) + ( color_name = 'lightcyan' color_code = '#e0ffff' ) + ( color_name = 'lightgoldenrodyellow' color_code = '#fafad2' ) + ( color_name = 'lightgreen' color_code = '#90ee90' ) + ( color_name = 'lightgrey' color_code = '#d3d3d3' ) + ( color_name = 'lightpink' color_code = '#ffb6c1' ) + ( color_name = 'lightsalmon' color_code = '#ffa07a' ) + ( color_name = 'lightseagreen' color_code = '#20b2aa' ) + ( color_name = 'lightskyblue' color_code = '#87cefa' ) + ( color_name = 'lightslategray' color_code = '#778899' ) + ( color_name = 'lightsteelblue' color_code = '#b0c4de' ) + ( color_name = 'lightyellow' color_code = '#ffffe0' ) + ( color_name = 'lime' color_code = '#00ff00' ) + ( color_name = 'limegreen' color_code = '#32cd32' ) + ( color_name = 'linen' color_code = '#faf0e6' ) + ( color_name = 'magenta' color_code = '#ff00ff' ) + ( color_name = 'maroon' color_code = '#800000' ) + ( color_name = 'mediumaquamarine' color_code = '#66cdaa' ) + ( color_name = 'mediumblue' color_code = '#0000cd' ) + ( color_name = 'mediumorchid' color_code = '#ba55d3' ) + ( color_name = 'mediumpurple' color_code = '#9370db' ) + ( color_name = 'mediumseagreen' color_code = '#3cb371' ) + ( color_name = 'mediumslateblue' color_code = '#7b68ee' ) + ( color_name = 'mediumspringgreen' color_code = '#00fa9a' ) + ( color_name = 'mediumturquoise' color_code = '#48d1cc' ) + ( color_name = 'mediumvioletred' color_code = '#c71585' ) + ( color_name = 'midnightblue' color_code = '#191970' ) + ( color_name = 'mintcream' color_code = '#f5fffa' ) + ( color_name = 'mistyrose' color_code = '#ffe4e1' ) + ( color_name = 'moccasin' color_code = '#ffe4b5' ) + ( color_name = 'navajowhite' color_code = '#ffdead' ) + ( color_name = 'navy' color_code = '#000080' ) + ( color_name = 'oldlace' color_code = '#fdf5e6' ) + ( color_name = 'olive' color_code = '#808000' ) + ( color_name = 'olivedrab' color_code = '#6b8e23' ) + ( color_name = 'orange' color_code = '#ffa500' ) + ( color_name = 'orangered' color_code = '#ff4500' ) + ( color_name = 'orchid' color_code = '#da70d6' ) + ( color_name = 'palegoldenrod' color_code = '#eee8aa' ) + ( color_name = 'palegreen' color_code = '#98fb98' ) + ( color_name = 'paleturquoise' color_code = '#afeeee' ) + ( color_name = 'palevioletred' color_code = '#db7093' ) + ( color_name = 'papayawhip' color_code = '#ffefd5' ) + ( color_name = 'peachpuff' color_code = '#ffdab9' ) + ( color_name = 'peru' color_code = '#cd853f' ) + ( color_name = 'pink' color_code = '#ffc0cb' ) + ( color_name = 'plum' color_code = '#dda0dd' ) + ( color_name = 'powderblue' color_code = '#b0e0e6' ) + ( color_name = 'purple' color_code = '#800080' ) + ( color_name = 'RebeccaPurple' color_code = '#663399' ) + ( color_name = 'red' color_code = '#ff0000' ) + ( color_name = 'rosybrown' color_code = '#bc8f8f' ) + ( color_name = 'royalblue' color_code = '#4169e1' ) + ( color_name = 'saddlebrown' color_code = '#8b4513' ) + ( color_name = 'salmon' color_code = '#fa8072' ) + ( color_name = 'sandybrown' color_code = '#f4a460' ) + ( color_name = 'seagreen' color_code = '#2e8b57' ) + ( color_name = 'seashell' color_code = '#fff5ee' ) + ( color_name = 'sienna' color_code = '#a0522d' ) + ( color_name = 'silver' color_code = '#c0c0c0' ) + ( color_name = 'skyblue' color_code = '#87ceeb' ) + ( color_name = 'slateblue' color_code = '#6a5acd' ) + ( color_name = 'slategray' color_code = '#708090' ) + ( color_name = 'snow' color_code = '#fffafa' ) + ( color_name = 'springgreen' color_code = '#00ff7f' ) + ( color_name = 'steelblue' color_code = '#4682b4' ) + ( color_name = 'tan' color_code = '#d2b48c' ) + ( color_name = 'teal' color_code = '#008080' ) + ( color_name = 'thistle' color_code = '#d8bfd8' ) + ( color_name = 'tomato' color_code = '#ff6347' ) + ( color_name = 'turquoise' color_code = '#40e0d0' ) + ( color_name = 'violet' color_code = '#ee82ee' ) + ( color_name = 'wheat' color_code = '#f5deb3' ) + ( color_name = 'white' color_code = '#ffffff' ) + ( color_name = 'whitesmoke' color_code = '#f5f5f5' ) + ( color_name = 'yellow' color_code = '#ffff00' ) + ( color_name = 'yellowgreen' color_code = '#9acd32' ) + + ). + + LOOP AT t_colors ASSIGNING FIELD-SYMBOL(). + TRANSLATE -color_name TO UPPER CASE. + TRANSLATE -color_code TO UPPER CASE. + ENDLOOP. + + t_button_types = VALUE zhtml_btn_types_tt( + + ( type ='DEMO1' btn_text ='DEMO 1' btn_color ='BROWN' ok_code = 'DEMO1' ) + ( type ='DEMO2' btn_text ='DEMO 2' btn_color ='CORAL' ok_code = 'DEMO2' ) + ( type ='DEMO3' btn_text ='DEMO 3' btn_color ='OLDLACE' ok_code = 'DEMO3' ) + ( type ='DEMO4' btn_text ='DEMO 4' btn_color ='GOLD' ok_code = 'DEMO4' ) + ( type ='DEMO5' btn_text ='DEMO 5' btn_color ='TOMATO' ok_code = 'DEMO5' ) + ( type ='DEMO6' btn_text ='DEMO 6' btn_color ='VIOLET' ok_code = 'DEMO6' ) + ( type ='DEMO7' btn_text ='DEMO 7' btn_color ='LIGHTBLUE' ok_code = 'DEMO7' ) + ). + + +START-OF-SELECTION. + DELETE FROM zhtml_colors. + MODIFY zhtml_colors FROM TABLE t_colors. + + MODIFY zhtml_btn_types FROM TABLE t_button_types. diff --git a/src/zhtml_btn_install.prog.xml b/src/zhtml_btn_install.prog.xml new file mode 100644 index 0000000..90c273b --- /dev/null +++ b/src/zhtml_btn_install.prog.xml @@ -0,0 +1,21 @@ + + + + + + ZHTML_BTN_INSTALL + 1 + E + X + X + + + + R + first install Html Button + 25 + + + + + diff --git a/src/zhtml_btn_typess.tobj.xml b/src/zhtml_btn_typess.tobj.xml new file mode 100644 index 0000000..45ad88a --- /dev/null +++ b/src/zhtml_btn_typess.tobj.xml @@ -0,0 +1,44 @@ + + + + + + ZHTML_BTN_TYPES + S + X + CUST + 3 + + + E + ZHTML_BTN_TYPES + S + HMTL Button Types + + + + ZHTML_BTN_TYPES + S + ZHTML_BTN_TYPES + X + X + + + + + ZHTML_BTN_TYPES + &NC& + + + ZHTML_BTN_TYPES + ZHTML_BUTTON + ZHTMLBUTTON + 1 + 0002 + X + X + + + + + diff --git a/src/zhtml_button.fugr.lzhtml_buttonf00.abap b/src/zhtml_button.fugr.lzhtml_buttonf00.abap new file mode 100644 index 0000000..722fe1a --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttonf00.abap @@ -0,0 +1,6 @@ +*---------------------------------------------------------------------* +* view related FORM routines +*---------------------------------------------------------------------* + +* base table related FORM-routines............. +INCLUDE LSVIMFTX . diff --git a/src/zhtml_button.fugr.lzhtml_buttonf00.xml b/src/zhtml_button.fugr.lzhtml_buttonf00.xml new file mode 100644 index 0000000..0035ab6 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttonf00.xml @@ -0,0 +1,13 @@ + + + + + + LZHTML_BUTTONF00 + X + I + E + + + + diff --git a/src/zhtml_button.fugr.lzhtml_buttoni00.abap b/src/zhtml_button.fugr.lzhtml_buttoni00.abap new file mode 100644 index 0000000..c265046 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttoni00.abap @@ -0,0 +1,5 @@ +*---------------------------------------------------------------------* +* view related PAI modules +*---------------------------------------------------------------------* + +INCLUDE LSVIMITX . "base table related PAI modules diff --git a/src/zhtml_button.fugr.lzhtml_buttoni00.xml b/src/zhtml_button.fugr.lzhtml_buttoni00.xml new file mode 100644 index 0000000..18c7b06 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttoni00.xml @@ -0,0 +1,13 @@ + + + + + + LZHTML_BUTTONI00 + X + I + E + + + + diff --git a/src/zhtml_button.fugr.lzhtml_buttont00.abap b/src/zhtml_button.fugr.lzhtml_buttont00.abap new file mode 100644 index 0000000..27d1786 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttont00.abap @@ -0,0 +1,23 @@ +*---------------------------------------------------------------------* +* view related data declarations +*---------------------------------------------------------------------* +*...processing: ZHTML_BTN_TYPES.................................* +DATA: BEGIN OF STATUS_ZHTML_BTN_TYPES . "state vector + INCLUDE STRUCTURE VIMSTATUS. +DATA: END OF STATUS_ZHTML_BTN_TYPES . +CONTROLS: TCTRL_ZHTML_BTN_TYPES + TYPE TABLEVIEW USING SCREEN '0002'. +*...processing: ZHTML_COLORS....................................* +DATA: BEGIN OF STATUS_ZHTML_COLORS . "state vector + INCLUDE STRUCTURE VIMSTATUS. +DATA: END OF STATUS_ZHTML_COLORS . +CONTROLS: TCTRL_ZHTML_COLORS + TYPE TABLEVIEW USING SCREEN '0001'. +*.........table declarations:.................................* +TABLES: *ZHTML_BTN_TYPES . +TABLES: *ZHTML_COLORS . +TABLES: ZHTML_BTN_TYPES . +TABLES: ZHTML_COLORS . + +* general table data declarations.............. + INCLUDE LSVIMTDT . diff --git a/src/zhtml_button.fugr.lzhtml_buttont00.xml b/src/zhtml_button.fugr.lzhtml_buttont00.xml new file mode 100644 index 0000000..db47509 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttont00.xml @@ -0,0 +1,12 @@ + + + + + + LZHTML_BUTTONT00 + I + E + + + + diff --git a/src/zhtml_button.fugr.lzhtml_buttontop.abap b/src/zhtml_button.fugr.lzhtml_buttontop.abap new file mode 100644 index 0000000..6c79f83 --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttontop.abap @@ -0,0 +1,6 @@ +* regenerated at 30.08.2021 10:53:50 +FUNCTION-POOL ZHTML_BUTTON MESSAGE-ID SV. + +* INCLUDE LZHTML_BUTTOND... " Local class definition + INCLUDE LSVIMDAT . "general data decl. + INCLUDE LZHTML_BUTTONT00 . "view rel. data dcl. diff --git a/src/zhtml_button.fugr.lzhtml_buttontop.xml b/src/zhtml_button.fugr.lzhtml_buttontop.xml new file mode 100644 index 0000000..f7e17fc --- /dev/null +++ b/src/zhtml_button.fugr.lzhtml_buttontop.xml @@ -0,0 +1,17 @@ + + + + + + LZHTML_BUTTONTOP + S + D$ + I + S + X + D$S + X + + + + diff --git a/src/zhtml_button.fugr.saplzhtml_button.abap b/src/zhtml_button.fugr.saplzhtml_button.abap new file mode 100644 index 0000000..f42a504 --- /dev/null +++ b/src/zhtml_button.fugr.saplzhtml_button.abap @@ -0,0 +1,21 @@ +* regenerated at 30.08.2021 10:53:50 +******************************************************************* +* System-defined Include-files. * +******************************************************************* + INCLUDE LZHTML_BUTTONTOP. " Global Declarations + INCLUDE LZHTML_BUTTONUXX. " Function Modules + +******************************************************************* +* User-defined Include-files (if necessary). * +******************************************************************* +* INCLUDE LZHTML_BUTTONF... " Subroutines +* INCLUDE LZHTML_BUTTONO... " PBO-Modules +* INCLUDE LZHTML_BUTTONI... " PAI-Modules +* INCLUDE LZHTML_BUTTONE... " Events +* INCLUDE LZHTML_BUTTONP... " Local class implement. +* INCLUDE LZHTML_BUTTONT99. " ABAP Unit tests + INCLUDE LZHTML_BUTTONF00 . " subprograms + INCLUDE LZHTML_BUTTONI00 . " PAI modules + INCLUDE LSVIMFXX . " subprograms + INCLUDE LSVIMOXX . " PBO modules + INCLUDE LSVIMIXX . " PAI modules diff --git a/src/zhtml_button.fugr.saplzhtml_button.xml b/src/zhtml_button.fugr.saplzhtml_button.xml new file mode 100644 index 0000000..a36b10e --- /dev/null +++ b/src/zhtml_button.fugr.saplzhtml_button.xml @@ -0,0 +1,19 @@ + + + + + + SAPLZHTML_BUTTON + X + S + D$ + F + S + E + X + D$S + X + + + + diff --git a/src/zhtml_button.fugr.tableframe_zhtml_button.abap b/src/zhtml_button.fugr.tableframe_zhtml_button.abap new file mode 100644 index 0000000..d1624bd --- /dev/null +++ b/src/zhtml_button.fugr.tableframe_zhtml_button.abap @@ -0,0 +1,12 @@ +*---------------------------------------------------------------------* +* program for: TABLEFRAME_ZHTML_BUTTON +* generation date: 30.08.2021 at 11:01:38 +* view maintenance generator version: #001407# +*---------------------------------------------------------------------* +FUNCTION TABLEFRAME_ZHTML_BUTTON . + + PERFORM TABLEFRAME TABLES X_HEADER X_NAMTAB DBA_SELLIST DPL_SELLIST + EXCL_CUA_FUNCT + USING CORR_NUMBER VIEW_ACTION VIEW_NAME. + +ENDFUNCTION. diff --git a/src/zhtml_button.fugr.tableproc_zhtml_button.abap b/src/zhtml_button.fugr.tableproc_zhtml_button.abap new file mode 100644 index 0000000..44138b0 --- /dev/null +++ b/src/zhtml_button.fugr.tableproc_zhtml_button.abap @@ -0,0 +1,10 @@ +*---------------------------------------------------------------------* +* program for: TABLEPROC_ZHTML_BUTTON +* generation date: 30.08.2021 at 11:01:38 +* view maintenance generator version: #001407# +*---------------------------------------------------------------------* +FUNCTION TABLEPROC_ZHTML_BUTTON . + + PERFORM TABLEPROC. + +ENDFUNCTION. diff --git a/src/zhtml_button.fugr.xml b/src/zhtml_button.fugr.xml new file mode 100644 index 0000000..378847e --- /dev/null +++ b/src/zhtml_button.fugr.xml @@ -0,0 +1,931 @@ + + + + + Extended Table Maintenance (Generated) + + LZHTML_BUTTONF00 + LZHTML_BUTTONI00 + LZHTML_BUTTONT00 + LZHTML_BUTTONTOP + SAPLZHTML_BUTTON + + + + TABLEFRAME_ZHTML_BUTTON + Extended Table Maintenance: Upper Level + + + VIEW_ACTION + 'S' + + + VIEW_NAME + DD02V-TABNAME + + + CORR_NUMBER + E070-TRKORR + ' ' + + + + + DBA_SELLIST + VIMSELLIST + + + DPL_SELLIST + VIMSELLIST + + + EXCL_CUA_FUNCT + VIMEXCLFUN + + + X_HEADER + VIMDESC + + + X_NAMTAB + VIMNAMTAB + + + + + MISSING_CORR_NUMBER + + + + + VIEW_ACTION + P + Aktion mit Tabelle: anz./änd./transp. (S/U/T) + + + VIEW_NAME + P + Name der Tabelle + + + CORR_NUMBER + P + Korrekturnummer für durchgeführte Änderungen + + + DBA_SELLIST + P + Selektionsbedingungen für den DB-Zugriff + + + DPL_SELLIST + P + Selektionsbedingungen für die Anzeige + + + EXCL_CUA_FUNCT + P + Tabelle mit dynam. zu deaktivierenden CUA-Funkt. + + + X_HEADER + P + Kontrollblocktabelle für die Tabelle + + + X_NAMTAB + P + Kontrollblocktabelle für die Tabellen-Felder + + + MISSING_CORR_NUMBER + X + Korrekturnummer fehlt + + + + + TABLEPROC_ZHTML_BUTTON + X + Lower-level extended table maintenance + + + FCODE + 'RDED' + + + VIEW_ACTION + 'S' + + + VIEW_NAME + DD02V-TABNAME + + + CORR_NUMBER + E070-TRKORR + ' ' + + + + + LAST_ACT_ENTRY + + + UCOMM + + + UPDATE_REQUIRED + + + + + CORR_KEYTAB + E071K + + + DBA_SELLIST + VIMSELLIST + + + DPL_SELLIST + VIMSELLIST + + + EXCL_CUA_FUNCT + VIMEXCLFUN + + + EXTRACT + + + TOTAL + + + X_HEADER + VIMDESC + + + X_NAMTAB + VIMNAMTAB + + + + + MISSING_CORR_NUMBER + + + SAVING_CORRECTION_FAILED + + + + + FCODE + P + gewünschte Funktion des Bausteins + + + VIEW_ACTION + P + Aktion mit Tabelle: anz./änd./transp. (S/U/T) + + + VIEW_NAME + P + Name der Tabelle + + + CORR_NUMBER + P + Korrekturnummer für durchgeführte Änderungen + + + LAST_ACT_ENTRY + P + Index der Cursorposition in der Anzeigetabelle + + + UCOMM + P + letztes User-command innerhalb der Viewpflege + + + UPDATE_REQUIRED + P + Flag: Einträge verändert, Sichern erforderlich + + + CORR_KEYTAB + P + Tabelle mit den Keys der zu transport. Einträge + + + DBA_SELLIST + P + Selektionsbedingungen für den DB-Zugriff + + + DPL_SELLIST + P + Selektionsbedingungen für die Anzeige + + + EXCL_CUA_FUNCT + P + Tab. der nicht zu aktivierenden CUA-Funktionen + + + EXTRACT + P + Tab. der gerade sichtbaren Daten (Anzeigetabelle + + + TOTAL + P + Tabelle, mit allen von der DB gelesenen Daten + + + X_HEADER + P + Kontrollblocktabelle für die Tabelle + + + X_NAMTAB + P + Kontrollblocktabelle für die Tabellen-Felder + + + MISSING_CORR_NUMBER + X + Korrekturnummer fehlt + + + SAVING_CORRECTION_FAILED + X + Fehler beim Sichern der Korrektureinträge + + + + + + +
+ SAPLZHTML_BUTTON + 0001 + E + View Maintenance: Overview Screen ZHTML_COLORS + N + 0001 + 061 + 255 +
+ + + SCREEN + SCREEN + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + SCREEN + 001 + 001 + 255 + 059 + X + X + X + X + ENTRY + X + X + X + X + X + MULTIPLE + NONE + X + 002 + + + + + SCREEN + SCREEN + PUSH_TMPL + VIM_POSI_PUSH + ____________________ + 061 + 019 + 020 + 020 + 001 + POSI + CHAR + X + N + + + SCREEN + SCREEN + TEMPLATE + VIM_POSITION_INFO + ______________________________ + 061 + 040 + 030 + 030 + 001 + CHAR + X + X + X + N + <_--32_DIMENS>X + + + SCREEN + SCREEN + OKCODE + OK_CODE + ____________________ + 020 + 020 + 001 + CHAR + X + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + TEMPLATE + VIM_FRAME_FIELD + ____________________________________________________________ + 001 + 060 + 060 + 001 + CHAR + X + X + N + X + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + TEXT + *ZHTML_COLORS-COLOR_NAME + Color_Name______________________________ + 001 + 001 + 040 + 030 + 001 + CHAR + X + V + N + X + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + TEXT + *ZHTML_COLORS-COLOR_CODE + Color_Code______________________________ + 001 + 002 + 040 + 010 + 001 + CHAR + X + 1 + N + X + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + CHECK + VIM_MARKED + 001 + 001 + 001 + 001 + CHAR + X + X + X + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + TEMPLATE + ZHTML_COLORS-COLOR_NAME + ______________________________ + 001 + 001 + 030 + 030 + 001 + KEY + CHAR + X + X + X + N + + + TABLE_CTRL + TCTRL_ZHTML_COLORS + TEMPLATE + ZHTML_COLORS-COLOR_CODE + ________ + 001 + 002 + 008 + 010 + 001 + KEY + CHAR + X + X + X + N + + + + + PROCESS BEFORE OUTPUT. + + + MODULE LISTE_INITIALISIEREN. + + + LOOP AT EXTRACT WITH CONTROL + + + TCTRL_ZHTML_COLORS CURSOR NEXTLINE. + + + MODULE LISTE_SHOW_LISTE. + + + ENDLOOP. + + + * + + + PROCESS AFTER INPUT. + + + MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND. + + + MODULE LISTE_BEFORE_LOOP. + + + LOOP AT EXTRACT. + + + MODULE LISTE_INIT_WORKAREA. + + + CHAIN. + + + FIELD ZHTML_COLORS-COLOR_NAME . + + + FIELD ZHTML_COLORS-COLOR_CODE . + + + MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST. + + + ENDCHAIN. + + + FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX. + + + CHAIN. + + + FIELD ZHTML_COLORS-COLOR_NAME . + + + FIELD ZHTML_COLORS-COLOR_CODE . + + + MODULE LISTE_UPDATE_LISTE. + + + ENDCHAIN. + + + ENDLOOP. + + + MODULE LISTE_AFTER_LOOP. + + + + 0 + 1 + 1 + 2 + 3 + 1 + 0 + 0 + 1 + 1 + 1 + 3 + 3 + 4 + 4 + 4 + 3 + 3 + 3 + 4 + 4 + 4 + 3 + 1 + 1 + +
+ +
+ SAPLZHTML_BUTTON + 0002 + E + View Maintenance: Overview Screen ZHTML_BTN_TYPES + N + 0002 + 061 + 255 +
+ + + SCREEN + SCREEN + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + SCREEN + 001 + 001 + 255 + 059 + X + X + X + X + ENTRY + X + X + X + X + X + MULTIPLE + NONE + X + 001 + + + + + SCREEN + SCREEN + PUSH_TMPL + VIM_POSI_PUSH + ____________________ + 061 + 019 + 020 + 020 + 001 + POSI + CHAR + X + N + + + SCREEN + SCREEN + TEMPLATE + VIM_POSITION_INFO + ______________________________ + 061 + 040 + 030 + 030 + 001 + CHAR + X + X + X + N + <_--32_DIMENS>X + + + SCREEN + SCREEN + OKCODE + OK_CODE + ____________________ + 020 + 020 + 001 + CHAR + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEMPLATE + VIM_FRAME_FIELD + ____________________________________________________________ + 001 + 060 + 060 + 001 + CHAR + X + X + N + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEXT + *ZHTML_BTN_TYPES-TYPE + +_______________________________________ + 001 + 001 + 040 + 020 + 001 + CHAR + N + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEXT + *ZHTML_BTN_TYPES-BTN_TEXT + Button_Text_____________________________ + 001 + 002 + 040 + 080 + 001 + CHAR + X + V + N + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEXT + *ZHTML_BTN_TYPES-BTN_COLOR + Color_Name______________________________ + 001 + 003 + 040 + 030 + 001 + CHAR + X + V + N + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEXT + *ZHTML_BTN_TYPES-OK_CODE + Current_Function_Code___________________ + 001 + 004 + 040 + 070 + 001 + CHAR + X + V + N + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + CHECK + VIM_MARKED + 001 + 001 + 001 + 001 + CHAR + X + X + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEMPLATE + ZHTML_BTN_TYPES-TYPE + ____________________ + 001 + 001 + 020 + 020 + 001 + KEY + CHAR + X + X + X + N + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEMPLATE + ZHTML_BTN_TYPES-BTN_TEXT + ________________________________________________________________________________ + 001 + 002 + 080 + 080 + 001 + CHAR + X + X + X + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEMPLATE + ZHTML_BTN_TYPES-BTN_COLOR + ______________________________ + 001 + 003 + 030 + 030 + 001 + CHAR + X + X + X + X + X + X + + + TABLE_CTRL + TCTRL_ZHTML_BTN_TYPES + TEMPLATE + ZHTML_BTN_TYPES-OK_CODE + ______________________________________________________________________ + 001 + 004 + 070 + 070 + 001 + CHAR + X + X + X + X + + + + + PROCESS BEFORE OUTPUT. + + + MODULE LISTE_INITIALISIEREN. + + + LOOP AT EXTRACT WITH CONTROL + + + TCTRL_ZHTML_BTN_TYPES CURSOR NEXTLINE. + + + MODULE LISTE_SHOW_LISTE. + + + ENDLOOP. + + + * + + + PROCESS AFTER INPUT. + + + MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND. + + + MODULE LISTE_BEFORE_LOOP. + + + LOOP AT EXTRACT. + + + MODULE LISTE_INIT_WORKAREA. + + + CHAIN. + + + FIELD ZHTML_BTN_TYPES-TYPE . + + + FIELD ZHTML_BTN_TYPES-BTN_TEXT . + + + FIELD ZHTML_BTN_TYPES-BTN_COLOR . + + + FIELD ZHTML_BTN_TYPES-OK_CODE . + + + MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST. + + + ENDCHAIN. + + + FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX. + + + CHAIN. + + + FIELD ZHTML_BTN_TYPES-TYPE . + + + MODULE LISTE_UPDATE_LISTE. + + + ENDCHAIN. + + + ENDLOOP. + + + MODULE LISTE_AFTER_LOOP. + + + + 0 + 1 + 1 + 2 + 3 + 1 + 0 + 0 + 1 + 1 + 1 + 3 + 3 + 4 + 4 + 4 + 4 + 4 + 3 + 3 + 3 + 4 + 4 + 3 + 1 + 1 + +
+
+
+
+
diff --git a/src/zhtml_button.msag.xml b/src/zhtml_button.msag.xml new file mode 100644 index 0000000..330d109 --- /dev/null +++ b/src/zhtml_button.msag.xml @@ -0,0 +1,26 @@ + + + + + + ZHTML_BUTTON + E + Hmtl Button + + + + E + ZHTML_BUTTON + 001 + html button not found + + + E + ZHTML_BUTTON + 002 + html button &1 already exists + + + + + diff --git a/src/zhtml_button_demo/package.devc.xml b/src/zhtml_button_demo/package.devc.xml new file mode 100644 index 0000000..0a2fa6a --- /dev/null +++ b/src/zhtml_button_demo/package.devc.xml @@ -0,0 +1,10 @@ + + + + + + Html Button Demo + + + + diff --git a/src/zhtml_button_demo/zhtml_btn_demo.tran.xml b/src/zhtml_button_demo/zhtml_btn_demo.tran.xml new file mode 100644 index 0000000..957da30 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_btn_demo.tran.xml @@ -0,0 +1,23 @@ + + + + + + ZHTML_BTN_DEMO + SAPLZHTML_BUTTON_DEMO + 0100 + + + ZHTML_BTN_DEMO + 1 + X + X + + + E + ZHTML_BTN_DEMO + Demo HTML Button + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.abap b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.abap new file mode 100644 index 0000000..5be9a3a --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.abap @@ -0,0 +1,67 @@ +*----------------------------------------------------------------------* +***INCLUDE LZHTML_BUTTON_DEMOF01. +*----------------------------------------------------------------------* +*&---------------------------------------------------------------------* +*& Form init_html_buttons +*&---------------------------------------------------------------------* +*& text +*&---------------------------------------------------------------------* +*& --> p1 text +*& <-- p2 text +*&---------------------------------------------------------------------* +FORM init_html_buttons . + DATA: ls_btn TYPE zhtml_button . + STATICS created. + + CHECK created IS INITIAL. + + + IF mo_btn_cntl IS NOT BOUND. + CREATE OBJECT mo_btn_cntl. + ENDIF. + + ls_btn-btn_type = 'DEMO1'. + ls_btn-cc_name = 'CONT_01'. + ls_btn-ok_code = 'DEMO1'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO2'. + ls_btn-cc_name = 'CONT_02'. + ls_btn-ok_code = 'DEMO2'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO3'. + ls_btn-cc_name = 'CONT_03'. + ls_btn-ok_code = 'DEMO3'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO4'. + ls_btn-cc_name = 'CONT_04'. + ls_btn-ok_code = 'DEMO4'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO5'. + ls_btn-cc_name = 'CONT_05'. + ls_btn-ok_code = 'DEMO5'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO6'. + ls_btn-cc_name = 'CONT_06'. + ls_btn-ok_code = 'DEMO6'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + ls_btn-btn_type = 'DEMO7'. + ls_btn-cc_name = 'CONT_07'. + ls_btn-ok_code = 'DEMO7'. + mo_btn_cntl->create_btn( ls_btn ). + CLEAR ls_btn. + + created = abap_true. + +ENDFORM. diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.xml new file mode 100644 index 0000000..b8213f0 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demof01.xml @@ -0,0 +1,21 @@ + + + + + + LZHTML_BUTTON_DEMOF01 + I + S + E + X + + + + R + Include LZHTML_BUTTON_DEMOF01 + 29 + + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.abap b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.abap new file mode 100644 index 0000000..5b69fc2 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.abap @@ -0,0 +1,20 @@ +*----------------------------------------------------------------------* +***INCLUDE LZHTML_BUTTON_DEMOI01. +*----------------------------------------------------------------------* +*&---------------------------------------------------------------------* +*& Module USER_COMMAND_0100 INPUT +*&---------------------------------------------------------------------* +* text +*----------------------------------------------------------------------* +MODULE user_command_0100 INPUT. +CASE sy-ucomm. + WHEN 'DEMO1'. + CALL FUNCTION 'POPUP_TO_INFORM' + EXPORTING + titel = 'HTML Button' + txt1 = 'pressed button' + txt2 = 'DEMO1'. + WHEN 'DEMO2'. + WHEN OTHERS. +ENDCASE. +ENDMODULE. diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.xml new file mode 100644 index 0000000..fe0847e --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoi01.xml @@ -0,0 +1,21 @@ + + + + + + LZHTML_BUTTON_DEMOI01 + I + S + E + X + + + + R + Include LZHTML_BUTTON_DEMOI01 + 29 + + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.abap b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.abap new file mode 100644 index 0000000..58f767f --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.abap @@ -0,0 +1,11 @@ +*----------------------------------------------------------------------* +***INCLUDE LZHTML_BUTTON_DEMOO01. +*----------------------------------------------------------------------* +*&---------------------------------------------------------------------* +*& Module PBO_0100 OUTPUT +*&---------------------------------------------------------------------* +*& +*&---------------------------------------------------------------------* +MODULE pbo_0100 OUTPUT. + PERFORM init_html_buttons. +ENDMODULE. diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.xml new file mode 100644 index 0000000..3355630 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demoo01.xml @@ -0,0 +1,21 @@ + + + + + + LZHTML_BUTTON_DEMOO01 + I + S + E + X + + + + R + Include LZHTML_BUTTON_DEMOO01 + 29 + + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.abap b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.abap new file mode 100644 index 0000000..928efba --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.abap @@ -0,0 +1,9 @@ +FUNCTION-POOL zhtml_button_demo. "MESSAGE-ID .. + +* INCLUDE LZHTML_BUTTON_DEMOD... " Local class definition + +DATA mo_btn_cntl TYPE REF TO zcl_html_button_cntl. + +INITIALIZATION. + +CREATE OBJECT mo_btn_cntl. diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.xml new file mode 100644 index 0000000..15db959 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.lzhtml_button_demotop.xml @@ -0,0 +1,17 @@ + + + + + + LZHTML_BUTTON_DEMOTOP + S + D$ + I + S + X + D$S + X + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.abap b/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.abap new file mode 100644 index 0000000..70c1339 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.abap @@ -0,0 +1,21 @@ +******************************************************************* +* System-defined Include-files. * +******************************************************************* + INCLUDE LZHTML_BUTTON_DEMOTOP. " Global Declarations + INCLUDE LZHTML_BUTTON_DEMOUXX. " Function Modules + +******************************************************************* +* User-defined Include-files (if necessary). * +******************************************************************* +* INCLUDE LZHTML_BUTTON_DEMOF... " Subroutines +* INCLUDE LZHTML_BUTTON_DEMOO... " PBO-Modules +* INCLUDE LZHTML_BUTTON_DEMOI... " PAI-Modules +* INCLUDE LZHTML_BUTTON_DEMOE... " Events +* INCLUDE LZHTML_BUTTON_DEMOP... " Local class implement. +* INCLUDE LZHTML_BUTTON_DEMOT99. " ABAP Unit tests + +INCLUDE lzhtml_button_demoo01. + +INCLUDE lzhtml_button_demoi01. + +INCLUDE lzhtml_button_demof01. diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.xml new file mode 100644 index 0000000..079dbf8 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.saplzhtml_button_demo.xml @@ -0,0 +1,18 @@ + + + + + + SAPLZHTML_BUTTON_DEMO + S + D$ + F + S + E + X + D$S + X + + + + diff --git a/src/zhtml_button_demo/zhtml_button_demo.fugr.xml b/src/zhtml_button_demo/zhtml_button_demo.fugr.xml new file mode 100644 index 0000000..0236c15 --- /dev/null +++ b/src/zhtml_button_demo/zhtml_button_demo.fugr.xml @@ -0,0 +1,133 @@ + + + + + Html Button Demo + + LZHTML_BUTTON_DEMOF01 + LZHTML_BUTTON_DEMOI01 + LZHTML_BUTTON_DEMOO01 + LZHTML_BUTTON_DEMOTOP + SAPLZHTML_BUTTON_DEMO + + + +
+ SAPLZHTML_BUTTON_DEMO + 0100 + E + Html Buttons + N + 0100 + 027 + 120 +
+ + + SCREEN + SCREEN + + + CUST_CTRL + CONT_01 + SCREEN + 002 + 001 + 025 + 005 + + + CUST_CTRL + CONT_02 + SCREEN + 002 + 030 + 025 + 005 + + + CUST_CTRL + CONT_03 + SCREEN + 009 + 013 + 060 + 005 + + + CUST_CTRL + CONT_04 + SCREEN + 017 + 069 + 010 + 010 + + + CUST_CTRL + CONT_05 + SCREEN + 017 + 081 + 010 + 010 + + + CUST_CTRL + CONT_06 + SCREEN + 019 + 010 + 020 + 002 + + + CUST_CTRL + CONT_07 + SCREEN + 022 + 010 + 020 + 002 + + + + + SCREEN + SCREEN + OKCODE + ____________________ + 020 + 020 + 001 + CHAR + X + + + + + PROCESS BEFORE OUTPUT. + + + MODULE pbo_0100. + + + + PROCESS AFTER INPUT. + + + MODULE user_command_0100. + + + + 0 + 2 + 0 + 0 + 2 + +
+
+
+
+
diff --git a/src/zhtml_colorss.tobj.xml b/src/zhtml_colorss.tobj.xml new file mode 100644 index 0000000..688c353 --- /dev/null +++ b/src/zhtml_colorss.tobj.xml @@ -0,0 +1,44 @@ + + + + + + ZHTML_COLORS + S + X + CUST + 3 + + + E + ZHTML_COLORS + S + HTML Colors + + + + ZHTML_COLORS + S + ZHTML_COLORS + X + X + + + + + ZHTML_COLORS + &NC& + + + ZHTML_COLORS + ZHTML_BUTTON + ZHTMLBUTTON + 1 + 0001 + X + X + + + + + diff --git a/src/zhtmlbutton_ddic/package.devc.xml b/src/zhtmlbutton_ddic/package.devc.xml new file mode 100644 index 0000000..be8d69b --- /dev/null +++ b/src/zhtmlbutton_ddic/package.devc.xml @@ -0,0 +1,10 @@ + + + + + + Html Button Dictionary + + + + diff --git a/src/zhtmlbutton_ddic/zcl_html_button_db.clas.abap b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.abap new file mode 100644 index 0000000..c297e8b --- /dev/null +++ b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.abap @@ -0,0 +1,278 @@ +CLASS zcl_html_button_db DEFINITION + PUBLIC + INHERITING FROM zcl_appl_db_admin + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES zif_appl_object . + INTERFACES zif_appl_object_db . + + ALIASES appl_type + FOR zif_appl_object~appl_type . + ALIASES o_appl_message + FOR zif_appl_object~o_appl_message . + ALIASES get_appl_type + FOR zif_appl_object~get_appl_type . + ALIASES set_appl_type + FOR zif_appl_object~set_appl_type . + + METHODS constructor + IMPORTING + !im_table_name TYPE tabname OPTIONAL . + + PROTECTED SECTION. + PRIVATE SECTION. + + ALIASES read_buffer + FOR zif_appl_object_db~read_buffer . + ALIASES read_data + FOR zif_appl_object_db~read_data . + ALIASES save_data + FOR zif_appl_object_db~save_data . + ALIASES data_saved + FOR zif_appl_object_db~data_saved . + + + TYPES: + ty_data_tab TYPE HASHED TABLE OF zhtml_btn_types WITH UNIQUE KEY type . + TYPES ty_data_key TYPE zhtml_btn_types_key . + + DATA gv_table_name TYPE tabname . + DATA flg_on_save TYPE xfeld . + DATA t_backup_delete TYPE ty_data_tab . + DATA t_backup_insert TYPE ty_data_tab . + DATA t_backup_update TYPE ty_data_tab . + DATA t_data_delete TYPE ty_data_tab . + DATA t_data_insert TYPE ty_data_tab . + DATA t_data_old TYPE ty_data_tab . + DATA t_data_update TYPE ty_data_tab . + + METHODS set_handler + IMPORTING + !im_activation TYPE xfeld . + METHODS on_buffer_backup + FOR EVENT buffer_backup OF zcl_appl_cntl . + METHODS on_buffer_refresh + FOR EVENT buffer_refresh OF zcl_appl_cntl + IMPORTING + !im_all_objects . + METHODS on_buffer_restore + FOR EVENT buffer_restore OF zcl_appl_cntl . + METHODS on_buffer_save + FOR EVENT buffer_save OF zcl_appl_cntl . + METHODS save . + +ENDCLASS. + + + +CLASS zcl_html_button_db IMPLEMENTATION. + + + METHOD constructor. + + super->constructor( ). + + IF NOT im_table_name IS INITIAL. + gv_table_name = im_table_name. + ELSE. + gv_table_name = 'ZHTML_BTN_TYPES'. + ENDIF. + + ENDMETHOD. + + + METHOD on_buffer_backup. + _on_buffer_backup. + ENDMETHOD. + + + METHOD on_buffer_refresh. + _on_buffer_refresh. + ENDMETHOD. + + + METHOD on_buffer_restore. + _on_buffer_restore. + ENDMETHOD. + + + METHOD on_buffer_save. + _on_save. + ENDMETHOD. + + + METHOD save. + _save 'ZHTML_BTN_TYPES'. + ENDMETHOD. + + + METHOD set_handler. + + CHECK flg_on_save <> im_activation. + flg_on_save = im_activation. + + " Register for Appl events + SET HANDLER on_buffer_save ACTIVATION im_activation. + SET HANDLER on_buffer_refresh ACTIVATION im_activation. + SET HANDLER on_buffer_backup ACTIVATION im_activation. + + ENDMETHOD. + + + METHOD zif_appl_object_db~clear_data. + + DATA: ls_key TYPE ty_data_key. + + ls_key = im_key. + + DELETE TABLE t_data_delete + WITH TABLE KEY type = ls_key-type. + DELETE TABLE t_data_insert + WITH TABLE KEY type = ls_key-type. + DELETE TABLE t_data_old + WITH TABLE KEY type = ls_key-type. + DELETE TABLE t_data_update + WITH TABLE KEY type = ls_key-type. + + ENDMETHOD. + + + METHOD zif_appl_object_db~read_buffer. + + DATA: ls_data_key TYPE ty_data_key. + + ls_data_key = im_key. + + CLEAR ex_data. + + READ TABLE t_data_update INTO ex_data + WITH TABLE KEY type = ls_data_key-type. + CHECK sy-subrc <> 0. + + READ TABLE t_data_insert INTO ex_data + WITH TABLE KEY type = ls_data_key-type. + CHECK sy-subrc <> 0. + + READ TABLE t_data_delete INTO ex_data + WITH TABLE KEY type = ls_data_key-type. + CHECK sy-subrc <> 0. + + READ TABLE t_data_old INTO ex_data + WITH TABLE KEY type = ls_data_key-type. + CHECK sy-subrc <> 0. + + CALL METHOD read_data + EXPORTING + im_key = im_key + IMPORTING + ex_data = ex_data. + + ENDMETHOD. + + + METHOD zif_appl_object_db~read_data. + DATA: ls_data LIKE LINE OF t_data_old. + +* ls_data = im_key. + MOVE-CORRESPONDING im_key TO ls_data. + + IF ls_data-guid IS NOT INITIAL. + SELECT SINGLE * FROM zhtml_btn_types INTO ex_data + WHERE guid = ls_data-guid. + ELSEIF ls_data-type IS NOT INITIAL. + SELECT SINGLE * FROM zhtml_btn_types INTO ex_data + WHERE type = ls_data-type. + ENDIF. + + IF sy-subrc = 0. + CLEAR ex_new. +* MOVE-CORRESPONDING ls_data to ex_data. + INSERT ex_data INTO TABLE t_data_old. + IF sy-subrc <> 0. + MODIFY TABLE t_data_old FROM ex_data. + ENDIF. + + ELSE. + + ex_new = 'X'. + ex_data = ls_data. + + " Mark new line for saving + IF im_add_new_line = 'X'. + CALL METHOD save_data + EXPORTING + im_data = ex_data. + ENDIF. + + ENDIF. + + + ENDMETHOD. + + + METHOD zif_appl_object_db~save_data. + + + DATA: ls_data LIKE LINE OF t_data_old, + ls_im_data LIKE LINE OF t_data_old, + lv_new TYPE xfeld. + + CALL METHOD set_handler( 'X' ). + + ls_im_data = im_data. + + READ TABLE t_data_old INTO ls_data + WITH TABLE KEY type = ls_im_data-type. + IF sy-subrc <> 0. + lv_new = 'X'. + ENDIF. + + IF im_delete IS INITIAL. + IF lv_new = 'X'. + IF ls_im_data-guid IS INITIAL. + ls_im_data-guid = zcl_appl_services=>get_new_guid( ). + ENDIF. + new_data( EXPORTING im_data = ls_im_data + IMPORTING ex_data = ls_im_data ). + INSERT ls_im_data INTO TABLE t_data_insert. + IF sy-subrc <> 0. + MODIFY TABLE t_data_insert FROM ls_im_data. + ENDIF. + + ELSE. + change_data( EXPORTING im_data = ls_im_data + IMPORTING ex_data = ls_im_data ). + INSERT ls_im_data INTO TABLE t_data_update. + IF sy-subrc <> 0. + MODIFY TABLE t_data_update FROM ls_im_data. + ENDIF. + DELETE TABLE t_data_delete + WITH TABLE KEY type = ls_im_data-type. + ENDIF. + ELSE. + IF lv_new = 'X'. + DELETE TABLE t_data_insert + WITH TABLE KEY type = ls_im_data-type. + ELSE. + DELETE TABLE t_data_update + WITH TABLE KEY type = ls_im_data-type. + INSERT ls_im_data INTO TABLE t_data_delete. + + ENDIF. + + ENDIF. +*ex_data = ls_im_data. + ENDMETHOD. + + + METHOD zif_appl_object~get_appl_type. + re_type = appl_type. + ENDMETHOD. + + + METHOD zif_appl_object~set_appl_type. + appl_type = im_type. + ENDMETHOD. +ENDCLASS. diff --git a/src/zhtmlbutton_ddic/zcl_html_button_db.clas.macros.abap b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.macros.abap new file mode 100644 index 0000000..a1a889b --- /dev/null +++ b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.macros.abap @@ -0,0 +1,3 @@ +*"* use this source file for any macro definitions you need +*"* in the implementation part of the class +INCLUDE zappl_include_db. diff --git a/src/zhtmlbutton_ddic/zcl_html_button_db.clas.xml b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.xml new file mode 100644 index 0000000..aa5e673 --- /dev/null +++ b/src/zhtmlbutton_ddic/zcl_html_button_db.clas.xml @@ -0,0 +1,16 @@ + + + + + + ZCL_HTML_BUTTON_DB + E + db + 1 + X + X + X + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_lvc_button.tabl.xml b/src/zhtmlbutton_ddic/zhtml_btn_lvc_button.tabl.xml new file mode 100644 index 0000000..75ced11 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_lvc_button.tabl.xml @@ -0,0 +1,113 @@ + + + + + + ZHTML_BTN_LVC_BUTTON + E + INTTAB + Customer Buttons + + + + ZHTML_BTN_LVC_BUTTON + LAYOUT_NAME + 0001 + LVC_TNAME + 0 + E + + + ZHTML_BTN_LVC_BUTTON + BUTTON_NAME + 0002 + UI_FUNC + 0 + E + + + ZHTML_BTN_LVC_BUTTON + ICON + 0003 + ICONNAME + 0 + E + + + ZHTML_BTN_LVC_BUTTON + BUTTON_TYPE + 0004 + TB_BTYPE + 0 + X + F + E + + + ZHTML_BTN_LVC_BUTTON + BUTTON_FUNCTION + 0005 + RS38L_FNAM + 0 + E + + + ZHTML_BTN_LVC_BUTTON + BUTTON_POSITION + E + 0006 + 0 + X + 000001 + INT1 + 000003 + INT1 + + + ZHTML_BTN_LVC_BUTTON + DISPLAY_MODE + 0007 + ZAPPL_CTMENU_DISPLAYMODE + 0 + X + F + E + + + ZHTML_BTN_LVC_BUTTON + PARENT_BUTTON + 0008 + UI_FUNC + 0 + E + + + ZHTML_BTN_LVC_BUTTON + QUICKINFO + 0009 + ICONQUICK + 0 + E + + + ZHTML_BTN_LVC_BUTTON + BUTTON_TEXT + 0010 + TEXT40 + 0 + E + + + ZHTML_BTN_LVC_BUTTON + ACTIVE + 0011 + XFELD + 0 + X + F + E + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_lvc_button_tt.ttyp.xml b/src/zhtmlbutton_ddic/zhtml_btn_lvc_button_tt.ttyp.xml new file mode 100644 index 0000000..c951062 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_lvc_button_tt.ttyp.xml @@ -0,0 +1,18 @@ + + + + + + ZHTML_BTN_LVC_BUTTON_TT + E + ZHTML_BTN_LVC_BUTTON + S + STRU + T + D + N + Table Type for ZHTML_BTN_LVC_BUTTON + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_pointer.tabl.xml b/src/zhtmlbutton_ddic/zhtml_btn_pointer.tabl.xml new file mode 100644 index 0000000..0a38f02 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_pointer.tabl.xml @@ -0,0 +1,35 @@ + + + + + + ZHTML_BTN_POINTER + E + INTTAB + Button Pointer + 4 + + + + ZHTML_BTN_POINTER + GUID + 0001 + ZHTML_GUID + 0 + E + + + ZHTML_BTN_POINTER + OBJECT + 0002 + ZIF_HTML_BUTTON + 0 + REF + REF RI + R + I + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_pointer_tt.ttyp.xml b/src/zhtmlbutton_ddic/zhtml_btn_pointer_tt.ttyp.xml new file mode 100644 index 0000000..f0e9414 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_pointer_tt.ttyp.xml @@ -0,0 +1,18 @@ + + + + + + ZHTML_BTN_POINTER_TT + E + ZHTML_BTN_POINTER + S + STRU + T + D + N + Button Pointer + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_text.dtel.xml b/src/zhtmlbutton_ddic/zhtml_btn_text.dtel.xml new file mode 100644 index 0000000..7985a5b --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_text.dtel.xml @@ -0,0 +1,24 @@ + + + + + + ZHTML_BTN_TEXT + E + 55 + 10 + 20 + 40 + Html Button Text + Button Text + Btn Text + Button Text + Button Text + E + CHAR + 000080 + 000080 + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_type.dtel.xml b/src/zhtmlbutton_ddic/zhtml_btn_type.dtel.xml new file mode 100644 index 0000000..15d7a3c --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_type.dtel.xml @@ -0,0 +1,24 @@ + + + + + + ZHTML_BTN_TYPE + E + 11 + 08 + 11 + 11 + Html Button Type + Button Type + Btn Type + Button Type + Button Type + E + CHAR + 000020 + 000020 + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_types.tabl.xml b/src/zhtmlbutton_ddic/zhtml_btn_types.tabl.xml new file mode 100644 index 0000000..d9a03c0 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_types.tabl.xml @@ -0,0 +1,74 @@ + + + + + + ZHTML_BTN_TYPES + E + TRANSP + X + X + HMTL Button Types + X + C + 3 + + + ZHTML_BTN_TYPES + A + 0 + APPL2 + N + + + + ZHTML_BTN_TYPES + MANDT + 0001 + X + MANDT + 0 + X + E + + + ZHTML_BTN_TYPES + .INCLUDE + E + 0002 + X + 0 + ZHTML_BTN_TYPES_KEY + X + S + Html Button Key + S + + + ZHTML_BTN_TYPES + .INCLUDE + E + 0005 + 0 + ZHTML_BUTTON_FIELDS + X + S + HTML Button Fields + S + + + ZHTML_BTN_TYPES + .INCLUDE + E + 0009 + 0 + ZAPPL_ADMIN + X + S + Administrative data + S + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_types_key.tabl.xml b/src/zhtmlbutton_ddic/zhtml_btn_types_key.tabl.xml new file mode 100644 index 0000000..b42a42a --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_types_key.tabl.xml @@ -0,0 +1,32 @@ + + + + + + ZHTML_BTN_TYPES_KEY + E + INTTAB + Html Button Key + 1 + + + + ZHTML_BTN_TYPES_KEY + GUID + 0001 + ZAPPL_GUID + 0 + E + + + ZHTML_BTN_TYPES_KEY + TYPE + 0002 + ZHTML_BTN_TYPE + 0 + E + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_btn_types_tt.ttyp.xml b/src/zhtmlbutton_ddic/zhtml_btn_types_tt.ttyp.xml new file mode 100644 index 0000000..fbdd0c1 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_btn_types_tt.ttyp.xml @@ -0,0 +1,18 @@ + + + + + + ZHTML_BTN_TYPES_TT + E + ZHTML_BTN_TYPES + S + STRU + T + D + N + HTML Button Types + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_button.tabl.xml b/src/zhtmlbutton_ddic/zhtml_button.tabl.xml new file mode 100644 index 0000000..8b66d89 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_button.tabl.xml @@ -0,0 +1,64 @@ + + + + + + ZHTML_BUTTON + E + INTTAB + HTML Button + E + 4 + + + + ZHTML_BUTTON + CC_NAME + E + 0001 + 0 + C + 000264 + CHAR + 000132 + CHAR + + + ZHTML_BUTTON + CONTAINER + 0002 + CL_GUI_CONTAINER + 0 + REF + REF RC + R + C + + + ZHTML_BUTTON + BTN_TYPE + 0003 + ZHTML_BTN_TYPE + 0 + E + + + ZHTML_BUTTON + GUID + 0004 + ZHTML_GUID + 0 + E + + + ZHTML_BUTTON + OK_CODE + 0005 + SYUCOMM + 0 + E + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_button_fields.tabl.xml b/src/zhtmlbutton_ddic/zhtml_button_fields.tabl.xml new file mode 100644 index 0000000..f5db322 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_button_fields.tabl.xml @@ -0,0 +1,86 @@ + + + + + + ZHTML_BUTTON_FIELDS + E + INTTAB + HTML Button Fields + 3 + + + + ZHTML_BUTTON_FIELDS + BTN_TEXT + 0001 + ZHTML_BTN_TEXT + 0 + E + + + ZHTML_BUTTON_FIELDS + BTN_COLOR + 0002 + ZHTML_COLOR_NAME + ZHTML_COLORS + 0 + P + E + + + ZHTML_BUTTON_FIELDS + OK_CODE + 0003 + SYUCOMM + 0 + E + + + + + ZHTML_BUTTON_FIELDS + BTN_COLOR + SYST + MANDT + ZHTML_COLORS + MANDT + 0001 + MANDT + CLNT + 000003 + + + ZHTML_BUTTON_FIELDS + BTN_COLOR + ZHTML_BUTTON_FIELDS + BTN_COLOR + ZHTML_COLORS + COLOR_NAME + 0002 + CHAR + 000030 + + + ZHTML_BUTTON_FIELDS + BTN_COLOR + * + ZHTML_COLORS + COLOR_CODE + 0003 + CHAR + 000008 + + + + + ZHTML_BUTTON_FIELDS + BTN_COLOR + E + ZHTML_COLORS + * + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_color_code.dtel.xml b/src/zhtmlbutton_ddic/zhtml_color_code.dtel.xml new file mode 100644 index 0000000..d6c47f2 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_color_code.dtel.xml @@ -0,0 +1,24 @@ + + + + + + ZHTML_COLOR_CODE + E + 55 + 10 + 20 + 40 + Color code + Color Code + Color Code + Color Code + Color Code + E + CHAR + 000008 + 000008 + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_color_name.dtel.xml b/src/zhtmlbutton_ddic/zhtml_color_name.dtel.xml new file mode 100644 index 0000000..48999d6 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_color_name.dtel.xml @@ -0,0 +1,24 @@ + + + + + + ZHTML_COLOR_NAME + E + 55 + 10 + 20 + 40 + Color Name + Color Name + Color Name + Color Name + Color Name + E + CHAR + 000030 + 000030 + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_colors.tabl.xml b/src/zhtmlbutton_ddic/zhtml_colors.tabl.xml new file mode 100644 index 0000000..4e5309e --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_colors.tabl.xml @@ -0,0 +1,80 @@ + + + + + + ZHTML_COLORS + E + TRANSP + X + HTML Colors + X + C + 3 + + + ZHTML_COLORS + A + 0 + APPL2 + N + + + + ZHTML_COLORS + MANDT + 0001 + X + MANDT + T000 + 0 + X + P + E + + + ZHTML_COLORS + COLOR_NAME + 0002 + X + ZHTML_COLOR_NAME + 0 + X + E + + + ZHTML_COLORS + COLOR_CODE + 0003 + X + ZHTML_COLOR_CODE + 0 + X + E + + + + + ZHTML_COLORS + MANDT + ZHTML_COLORS + MANDT + T000 + MANDT + 0001 + MANDT + CLNT + 000003 + + + + + ZHTML_COLORS + MANDT + E + T000 + + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_colors_tt.ttyp.xml b/src/zhtmlbutton_ddic/zhtml_colors_tt.ttyp.xml new file mode 100644 index 0000000..24c98ad --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_colors_tt.ttyp.xml @@ -0,0 +1,18 @@ + + + + + + ZHTML_COLORS_TT + E + ZHTML_COLORS + S + STRU + T + D + N + HTML Colors + + + + diff --git a/src/zhtmlbutton_ddic/zhtml_guid.dtel.xml b/src/zhtmlbutton_ddic/zhtml_guid.dtel.xml new file mode 100644 index 0000000..ef6f451 --- /dev/null +++ b/src/zhtmlbutton_ddic/zhtml_guid.dtel.xml @@ -0,0 +1,23 @@ + + + + + + ZHTML_GUID + E + SYSUUID_X16 + 04 + 04 + 04 + 04 + Guid + Guid + Guid + Guid + Guid + E + D + + + + diff --git a/src/zif_html_button.intf.abap b/src/zif_html_button.intf.abap new file mode 100644 index 0000000..dbafea8 --- /dev/null +++ b/src/zif_html_button.intf.abap @@ -0,0 +1,13 @@ +"!

HTML Button

+INTERFACE zif_html_button + PUBLIC . + + METHODS set_active . + METHODS set_inactive . + METHODS get_btn_fields + RETURNING + VALUE(re_btn_fields) TYPE zhtml_button . + METHODS get_btn_type + RETURNING + VALUE(re_btn_type) TYPE zhtml_btn_type . +ENDINTERFACE. diff --git a/src/zif_html_button.intf.xml b/src/zif_html_button.intf.xml new file mode 100644 index 0000000..0f1cd49 --- /dev/null +++ b/src/zif_html_button.intf.xml @@ -0,0 +1,15 @@ + + + + + + ZIF_HTML_BUTTON + E + HTML Button + 2 + 1 + X + + + + diff --git a/src/zif_html_button_cntl.intf.abap b/src/zif_html_button_cntl.intf.abap new file mode 100644 index 0000000..06bccf2 --- /dev/null +++ b/src/zif_html_button_cntl.intf.abap @@ -0,0 +1,22 @@ +"!

HTML Button Cntl

+INTERFACE zif_html_button_cntl + PUBLIC . + + + INTERFACES zif_appl_object . + + METHODS create_btn + IMPORTING + !im_btn TYPE zhtml_button + RETURNING + VALUE(ro_button) TYPE REF TO zif_html_button . + METHODS delete_btn + IMPORTING + !im_btn TYPE zhtml_button. + METHODS get_btn_by_guid + IMPORTING + !im_guid TYPE zhtml_guid + RETURNING + VALUE(ro_button) TYPE REF TO zif_html_button . + METHODS get_btn_by_type . +ENDINTERFACE. diff --git a/src/zif_html_button_cntl.intf.xml b/src/zif_html_button_cntl.intf.xml new file mode 100644 index 0000000..e68e0ac --- /dev/null +++ b/src/zif_html_button_cntl.intf.xml @@ -0,0 +1,41 @@ + + + + + + ZIF_HTML_BUTTON_CNTL + E + HTML Button Cntl + 2 + 1 + X + + + + ZIF_HTML_BUTTON_CNTL + CREATE_BTN + E + Create a HTML Button + + + ZIF_HTML_BUTTON_CNTL + DELETE_BTN + E + Delete a HTML Button + + + ZIF_HTML_BUTTON_CNTL + GET_BTN_BY_GUID + E + get object of HTML Button by guid + + + ZIF_HTML_BUTTON_CNTL + GET_BTN_BY_TYPE + E + get object of HTML Button by type/identifier + + + + +