|
| 1 | +# FAQ |
| 2 | + |
| 3 | +_Change the HTTP Handler and URL Paramters for various configuration possibilities: Theme, Bootstrapping, Conten-Security-Policy etc. |
| 4 | +Check it out [**here.**](https://github.com/abap2UI5/abap2UI5-documentation/blob/main/docs/handler_config.md)_ |
| 5 | + |
| 6 | +## Client & UI |
| 7 | + |
| 8 | +## **1. How to read URL parameters?** |
| 9 | +Use the following snippet: |
| 10 | +```abap |
| 11 | +DATA(lv_search) = client->get( )-s_config-search. |
| 12 | +DATA(lv_param) = z2ui5_cl_xml_view=>factory( client )->hlp_get_url_param( `myparam` ). |
| 13 | +``` |
| 14 | +## **2. How to format numbers, times and dates?** |
| 15 | +Take a look at the following example: <br> |
| 16 | +https://github.com/abap2UI5/demo-demos/blob/main/src/z2ui5_cl_app_demo_47.clas.abap |
| 17 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5/assets/102328295/6b9011b5-94e6-4329-9666-0e779c01b400"> |
| 18 | + |
| 19 | +## **3. How to format the output of currencies?** |
| 20 | +Take a look at the following example: <br> |
| 21 | +https://github.com/abap2UI5/demo-demos/blob/main/src/z2ui5_cl_app_demo_67.clas.abap |
| 22 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5/assets/102328295/fef6e08c-5a34-4aee-9d34-ebb1c5d45275"> |
| 23 | + |
| 24 | +## **4. How to call an url in a new tab?** |
| 25 | +Use the following snippet: |
| 26 | +```abap |
| 27 | +client->timer_set( |
| 28 | + interval_ms = 0 |
| 29 | + event_finished = client->_event_client( action = client->cs_event-open_new_tab t_arg = value #( ( `https://www.github.com/abap2UI5` ) ) |
| 30 | +) ). |
| 31 | +``` |
| 32 | +#### 5. **Which values can be send back via client->_event( t_arg = value # ( ( ... ?** |
| 33 | +Check the documentation [here.](https://openui5.hana.ondemand.com/#/topic/b0fb4de7364f4bcbb053a99aa645affe) There are different ways for adressing the event handler ($event, $source, $params) and you can select your value for example with /mProperties/property.<br> |
| 34 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5-documentation/assets/102328295/6de59970-f766-46fd-a35a-933d26287564"> |
| 35 | +<br> |
| 36 | +You can also call functions directly in the view as explained [here.](https://sapui5.hana.ondemand.com/#/entity/sap.m.ActionSheet/sample/sap.m.sample.ActionSheet/code/view/ActionSheet.fragment.xml) <br> |
| 37 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5-documentation/assets/102328295/17650cca-d84a-4e88-be2b-244ead773b52"> |
| 38 | +<br> |
| 39 | +#### 5. **How can I change the logon language?** |
| 40 | +Set the url parameter sap-language for this and check all other options [here.](https://help.sap.com/doc/saphelp_nw75/7.5.5/de-DE/8b/46468c433b40c3b87b2e07f34dea1b/content.htm?no_cache=true) |
| 41 | + |
| 42 | +## Extension |
| 43 | +#### 1. **How can i call my own custom function?** |
| 44 | +Extend the initial HTTP Get call:<br> |
| 45 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5-documentation/assets/102328295/b671b89f-530b-4a35-98ba-e1a779fc0087"><br> |
| 46 | +And in your application, call the function in the view definition:<br> |
| 47 | +<img width="500" alt="image" src="https://github.com/abap2UI5/abap2UI5-documentation/assets/102328295/2f041184-a8c1-4d11-893a-ee6800b3214c"> |
| 48 | + |
| 49 | + |
| 50 | +## Productive Usage |
| 51 | +#### **1. Can abap2UI5 used in a productive system?** |
| 52 | +The project is technically just an implementation of an HTTP handler and can be used as any other HTTP Service also in a productive scenario. |
| 53 | +#### **2. Are there any dependencies or preparations needed before using abap2UI5 in a productiv scenario?** |
| 54 | +No, but it is recommended to follow these steps before using abap2UI5 apps in a productive scenario: |
| 55 | +1. Transport the abap2UI5 HTTP service and the framework first |
| 56 | +2. Sometimes an extra activation of the HTTP service is needed, along with an adjustment of the UI5 bootstrapping |
| 57 | +3. Test the "hello world" app to ensure that abap2UI5 works correctly |
| 58 | +4. Now continue with tranporting your custom apps... |
| 59 | +#### **3. Does a stable version of abap2UI5 exist?** |
| 60 | +The project will be continuously further developed. Therefore, there is no specific "stable" version. However, adjustments to the public APIs will be kept to a minimum to avoid frequent refactoring of apps. You can use [releases](https://github.com/abap2ui5/abap2ui5/releases/) instead of pulling the main branch and only update from time to time to reduce refactoring efforts. |
0 commit comments