Display DDL Source Codes in SAP GUI using ABAP Program

Source: http://www.kodyaz.com/sap-abap/display-d…views-in-sapgui.aspx
Capture Date: 15.04.2018 23:39:00

To display DDL source codes of SAP CDS objects like CDS Views in SAP GUI ABAP developer can run DEMO_SHOW_DDL_SOURCE program.
CDS objects like CDS views or CDS table functions are created and maintained in ADT Tools like SAP HANA Studio with SQL Console.
When you are in SAP GUI and want to see source codes of a CDS view, you can use ABAP program DEMO_SHOW_DDL_SOURCE .

CDS View created using SQL DDL Document

Here is BSIS CDS View in SAP HANA system which I use SE11 transaction to display DDL SQL View.

Note that there is DDL Source section which has the value “BSIS_DDL”. When I double click it, I get only a small part of the SQL DDL source codes of the CDS view.

ABAP programmers should realize the warning:
Data Definitions can only be edited using ADT in Eclipse
Message no. DDIC_ADT_DDLS005

So if you have SAP HANA Studio ADT Tool installed, using the Eclipse IDE it is possible to display the SQL data definition language source codes of the CDS view.

Fortunately, there is an ABAP report to display source codes of SQL DDL views.

DEMO_SHOW_DDL_SOURCE to Show DDL Source Codes of CDS Views

SAP provided ABAP program DEMO_SHOW_DDL_SOURCE to display DDL source codes of CDS views or other CDS objects easily in SAP GUI environment without using SAP HANA Studio.

Launch SE38 ABAP transaction to execute DEMO_SHOW_DDL_SOURCE report

Run the program with F8

Enter the DDL source name (name of the SQL DDL document) and press Enter button. Please check on SE11 for DDL Source attribute. Do not use the DDL SQL View name instead of DDL Source name.

Although the format of the SQL codes is confusing the developers, all of the SQL DDL codes of a CDS view can be displayed with DEMO_SHOW_DDL_SOURCE ABAP program without the requirement of an installed SAP HANA Studio.


If DEMO_SHOW_DDL_SOURCE ABAP report does not exist on your SAP system, you can try to create it by using following ABAP codes.

" copy of DEMO_SHOW_DDL_SOURCE ABAP report



METHOD main.
DATA name TYPE string.
cl_demo_input=>request( EXPORTING text = 'DDL Source' CHANGING field = name ).
cl_dd_ddl_handler_factory=>create( )->read(
name = CONV ddlname( to_upper( name ) )
ddddlsrcv_wa = DATA(ddlsrcv_wa) ).
CATCH cx_dd_ddl_read INTO DATA(exc).
cl_demo_output=>display( exc->get_text( ) ).
IF ddlsrcv_wa-source IS INITIAL.
cl_demo_output=>display( |Nothing found| ).
cl_demo_output=>display( replace( val = ddlsrcv_wa-source sub = |\n| with = '' occ = 0 ) ).


demo=>main( ).

I could get a better formatted SQL DDL source view of the CDS view I created at CDS View tutorial using “Z_Ddlsqlview” in the DDL Source input parameter as follows

Functional Programming – Try Reduce in JavaScript and in ABAP | SAP Blogs

Source: https://blogs.sap.com/2017/02/27/functio…ascript-and-in-abap/
Capture Date: 11.03.2018 19:42:51


In my previous blog Functional programming – Simulate Curry in ABAP I simulate a very important concept “Curry” in functional programming world using ABAP.

In that blog I use the curry idea in the example below:
In this blog, as blog title, I will show another approach by leveraging built-in function reduce in JavaScript Array and Reduce keyword in ABAP to fulfill the same requirement.
First see official documentation for Array.reduce here.
Follow the idea of functional programming, I first declare three dedicated functions which are responsible for a specific task in line 6 ~ 8.
Then in line 10, I construct a new composite function which will finally executes the three small functions driven by reduce.

Reduce in ABAP

Now let’s see how we can achieve the same function in ABAP.
If we use the traditional imperative programming paradigm, the code is written as:
DATA: lv_input TYPE string value 'Jerry Java Scala',
      lv_result TYPE string.

SPLIT lv_input AT space INTO TABLE DATA(lt_temp).
   lv_result = lv_result && |{ <temp>  case = lower }| .
   IF sy-tabix <> lines( lt_temp ).
      lv_result = lv_result && '-'.

WRITE: / lv_result.
Now let’s try with Reduce. Here is the ABAP documentation for keyword REDUCE.
See how ABAP code can be re-written using REDUCE:
This version looks quite clear and more human-readable compared with the first imperative one:
1. in line 11~13 there are three command instance created and inserted into a command queue held by variable lo_queue.
2. command queue ZCL_COMMAND_QUEUE internally execute the commands one by one using REDUCE as the execution engine.
The rough design of ABAP solution using REDUCE is listed below:
1. I have declare an interface ZIF_COMMAND which has one method DO to perform concrete command, one method GET_RESULT to return command execution result and method SET_TASK to specify command input.
2. ZCL_COMMAND_QUEUE has internally maintained a command queue. The enqueue operation is provided by public method INSERT.
Another public method EXECUTE is defined to fire the command queue execution.
Inside this method, ABAP keyword is used. The last command in the queue will be returned and its interface method get_result is called to return the final calculation request to consumer call.
Hope this small example can help you understand the reduce usage in functional programming world and how to use command design pattern to resolve some real problem.
The complete source code could be found here.
I have written a series of blogs which compare the language feature among ABAP, JavaScript and Java. You can find a list of them below:

Technical SAP Cutover Steps

Source: https://keremkoseoglu.com/2017/12/10/tec…l-sap-cutover-steps/
Capture Date: 11.03.2018 19:39:10

Here are some of the significant cutover steps for SAP go live.

System integrity:

  • Ensure that packages in dev / QA / live are identical
  • Ensure that E-Mails can be sent from the live system

Transport paths:

  • Ensure that “Transport of Copy” requests can be carried between dev – live systems
  • Ensure that requests in QA STMS can be forwarded to the live system
  • Ensure that workbench / customizing requests can be sent between dev – QA – live

Transport execution:

  • Transport external requests to the live system
  • Transport requests of all finished developments to the live system by selecting original requests & a transport of copies request containing everything
  • Ensure that all requests imported to QA are imported to the live system as well. TPALOG table + Excel VLOOKUP will help.

Soft config:

  • Definition of SM59 connections
  • Definition of SOAMANAGER connections
  • Definition of Z* number ranges in SNRO
  • Customizing of technical Z* tables
  • Ensure SCAL definitions & future maintenance
  • Define jobs

Workflow configuration:

  • Setting up WF-BATCH
  • Workflow configuration in SWU3
  • Ensure that Z* tasks are classified as general task (PFTC_DIS)
  • Execute SWU_OBUF and define a job if needed
  • If you use deadline monitoring, define job for RSWWDHEX


Integrating SAP Screen Personas into the SAP Cloud Platform Portal | SAP Blogs

Source: https://blogs.sap.com/2017/07/03/integra…ud-platform-portal/#
Capture Date: 11.03.2018 15:08:06

There are numerous specific reasons for adding a link to an SAP Screen Personas flavor. In general, though, it’s done in order to streamline the user experience for your employees, customers, and partners who already access information, applications, and services in your organization via the SAP Cloud Platform Portal.

In fact, this is a common scenario for organizations who use the on-premise SAP NetWeaver Portal and who want to benefit from the simplification and other features that SAP Screen Personas brings to their screens (as one customer has done).

Obtain the URL to the flavor that will be added to the portal site.



Launch the Portal service from the SAP Cloud Platform Cockpit.

  1. In the Services tab, scroll down to the bottom to the “Portal” tile.Screen-Shot-2017-07-02-at-4.18.34-PM.png
  2. Click on Go to Service.Screen-Shot-2017-07-02-at-4.36.23-PM.png

Add the flavor URL to the SAP Cloud Platform Portal menu

  1. Click on “Site Directory”.Screen-Shot-2017-07-02-at-5.50.15-PM.png
  2. Hover over the tile of the site to which the flavor is to be added. Then click the “Edit” button.Screen-Shot-2017-07-02-at-6.12.34-PM.png
  3. Click on the menu editor button.Screen-Shot-2017-07-02-at-6.17.19-PM.png
  4. Hover over the first menu item in the list and the click the add button (the plus icon). Next, choose either option. (For this guide, I will choose sub-item.)Screen-Shot-2017-07-02-at-6.34.06-PM.png
  5. Enter the following information as below and then click the “Add” button:Screen-Shot-2017-07-02-at-7.16.49-PM.png
  6. Click the “Save” button.Screen-Shot-2017-07-02-at-7.24.52-PM.png
  7. Click the publish button.Screen-Shot-2017-07-02-at-7.24.52-PM-1.png
  8. Click the “Publish and Open” button.Screen-Shot-2017-07-02-at-7.34.50-PM.png

Test the Menu Item

  1. Once the portal has loaded, hover over the menu item under which the sub-item was placed and then click the menu item for the flavor.Screen-Shot-2017-07-02-at-7.29.30-PM.png
  2. Violà!Screen-Shot-2017-07-02-at-7.39.01-PM.png