Skip to Content
Author's profile photo Alvaro Tejada Galindo

PowerBuilder – The new kid on Developer Center’s block

I’m going to be totally honest…the last time I used PowerBuilder was about 8 years or more…and I didn’t think I was going to use it again…until I read this document from my team mate Uwe Kylau called PowerBuilder Developer Center and I knew this was the time.

This days, everything is about SAP HANA and I can’t of course, stay away from it, so I decided to swept away the dust from my PowerBuilder skills and try to make an application involving SAP HANA.

PowerBuilder 12.5 offers to different IDE environments, or better explained, the classic and the enhanced ones. Being an old time developer (more than 14 years now) I decided to go with the classic one.

First thing I did, was to open my PowerBuilder environment and prepared it to support SAP HANA via JDBC.

Easy as it sounds, I just need to go to Tools –> System Options –> Java and choose the folder where then ngdbc.jar is located.



After that, I established the connection with my Amazon Web Services SAP HANA Server. For this I went to Tools –> Database Painter and in the JDB JDBC choose New Profile… –> fill the parameters and I was ready to rock…



With that ready, the time for application creation was just around the corner.

On the menu File –> New. I create a new Workspace and a .NET Windows Forms Application and after that a Grid DataWindow.



When we create a DataWindow we need to specify from where it’s going to take the information. For this one, choose SQL Select, and then choose the table VOTES_DETAIL which we create on the blog Quick SAP HANA and R usecase and as the field choose COUNTRY and then Design –> Distinct. As we don’t want duplicated values. Save it and call it dg_country.



Repeat the same steps but this time for the field Age. Call this one dg_age.

When you have finished with this, create a new DataWindow but this time of type Freeform and choose External as the Data Source in the next window. This will show us a new window asking for a Result Set, use the following.


In the editor window, choose the Country field and the go to the Properties Window and choose Edit. Change the Style type to DropDownDW and fill the following values.


DataWindow is the the value from where we are going to get the data for our DropDown control. Save as call it ff_params.

Create a new DataWindow of type Grid and choose SQL Select as the Data Source. Select all fields and choose Design –> Retrieval Arguments (This is very important as it will allows us to pass the values of the Drop Down control to our report).

Specify the arguments as follows…


In the Where tab fill in the parameters and the arguments. Call this one dg_report.


Now, we have to create a new DataWindow (Don’t worry…it’s the last one) of type Graph and define the following Expressions.




For the graph style, choose what you want…I like pies…


Save it and call it dg_graph.

And now for something completely different…let’s create a PB Object of type Window. From the menu Insert we can put two buttons and simply drag and drop the DataWindows ff_params and dg_report.

Your layout should end like this one…save it and call it w_window.


One important thing before we go into the coding part of this blog, is that we need to go back to the Database Painter, choose our connection and go to the Preview tab, using the Copy button will help us to get the value we need, which is the connection details.


Now…source code! (Screaming please)

Double click the application and write the following code.


Going back and double click the Show Report button and paste this code.


Do the same in the Show Graphic button.


Finally, press right click and choose Script on w_window and add this code.


Let’s run the application and see how it works…



There you go…a quick and nice application using PowerBuilder and SAP HANA…

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo John Appleby
      John Appleby

      Nice blog, Blag, and simply explained.

      The only place I'm struggling is where this is realistically useful, given where HANA XS is going. With the ability to consume Web Services from HANA to lightweight HTML5 apps using e.g. PhoneGap and jQuery Mobile - I'm struggling to see what use cases PowerBuilder would be useful for.

      I don't see PC .Net Apps of this kind built so often. What do you think? Can you give some examples where PowerBuilder would be the IDE of choice?


      Author's profile photo Alvaro Tejada Galindo
      Alvaro Tejada Galindo
      Blog Post Author

      John!  Thanks for your comment 🙂

      First...I only wrote this blog to demostrate how PowerBuilder can be integrated with SAP HANA.

      Second...we're looking for a wider community, not just SAP centric...PowerBuilder developers might have never heard about SAP, so the kind of application they develop might be pretty different, but in the end they will use a Database...that's where SAP HANA can provide them great value and speed.

      I really don't have any examples showing why you should choose PowerBuilder over any other tool, but for me is like saying, why would you choose Python over's just a matter of choice...developers feel comfortable using one tool or PowerBuilder developers the chance to use SAP HANA is good not only for SAP but for PowerBuilder developers 😉

      In the same spirit I wrote about Python and SAP HANA and Euphoria and SAP HANA...just to show how flexible SAP HANA can be...welcoming developers from other communities to join us...



      Author's profile photo John Appleby
      John Appleby

      Totally agree with your philosophy and PhoneGap/jQuery Mobile are not SAP-centric either. The openness that SAP HANA affords is awesome and this blog is a good example of that.

      However there is a philosophical difference for lightweight apps, because you can keep a lot more of the heavy lifting near the HANA DB using HANA XS than you can using JDBC, which should provide performance benefits.

      As for PowerBuilder, it was described as a dead skill by Computer World in 2007 next to Certified NetWare Engineers 😉

      Are there any PowerBuilder developers out there who can contradict me or give an example of when PowerBuilder would be an awesome tool combined with SAP HANA?

      Author's profile photo Alvaro Tejada Galindo
      Alvaro Tejada Galindo
      Blog Post Author

      Well...I can't deny that...HANA XS will be for sure more powerful and weapon of choice for most applications...can't wait to put my hands on it and build a couple of blogs about it 😉

      And...regarding your link...2007? That's long before SAP bought Sybase and bring PowerBuilder 12.5 -;) "Build easy rock hard"

      I don't know any PowerBuilder developers...but will look for them...I'm sure that someone with more experience than me will be able to build a nice and killer application 🙂



      Author's profile photo John Appleby
      John Appleby

      Hold on - are you suggesting HANA XS and PowerBuilder are competing?

      I didn't see it that way, since HANA XS is just a means to build back-end logic and expose them as Web Services using OData (as I understood it). Is that how you understand it too?

      I assume you can use PowerBuilder on HANA XS to create powerful rich apps. Thought I'm still struggling for use cases 🙂

      Author's profile photo Alvaro Tejada Galindo
      Alvaro Tejada Galindo
      Blog Post Author

      Nope...I'm not suggesting anything...and to be HANA XS knowlegdge is close to null 🙁 That's why I made the wrong assumption...I need to deal with so many technologies that sometimes I tend to mix them or confuse them LOL

      So...getting back to the main idea...PowerBuilder might not be useful or cool for the regular ABAP or Mobile guy, but for the .NET developer it would be a great RAD least that's the impression that I get when I use it...I'm not much experienced in .NET either as I have only used C# and ASP.NET a couple of times but still, the Database integration and manipulation provided by PowerBuilder is very cool...

      About the uses cases...well...we need to give time to time and see how many PB developers jump in 😉



      Author's profile photo Former Member
      Former Member

      The thread gets into discussion of HANA XS. 

      Do either of you have insight into timeline for when HANA XS will be available for production use by customers?    Could you point me to where I can find more info about features/functions that will be initially made available?

      I found XS exercises that Thomas Jung presented in Newtown Square at the HANA codejam but I've found little else.

      We're currently utilizing Gateway to build OData web servcies that read our HANA information models and I'd like to evalaute XS as alternative for some scenarios.

      Author's profile photo John Appleby
      John Appleby

      My understanding based on Ron Silberstein's presentation at NSQ is that XS will be available for limited customer use aka RampUp in the SP5 release of HANA, which is expected in November.

      My corollary is that it will be released to a wide audience in the SP6 release of HANA, expected in H1 2013. That's my assumption rather than product strategy 🙂

      Author's profile photo Former Member
      Former Member

      I'm a PowerBuilder developer. I'm also an ISV in the healthcare industry. I can verify that not only is my application current, relevant, and written in PowerBuilder, but so are at least two of my competitors (including one of the largest names in healthcare in the world).

      To specifically address your question about the relationship between PowerBuilder and SAP, I am unfortunately at the complete opposite end of the spectrum as the author. I am extremely unfamiliar with SAP and don't know what it can offer me. I know that PowerBuilder has always excelled at data access and processing business logic, though. With the plethora of data available within a SAP system, I imagine that PowerBuilder can be used to quickly build data entry applications, maintenance and administration applications... Bottom line: PowerBuilder is an enterprise-level development tool capable of building enterprise-level applications against the enterprise-level data and processes that exist with SAP.

      Author's profile photo Former Member
      Former Member

      Let me start off by applauding Alvaro for taking the initiative to explore the ability to leverage PowerBuilder and HANA together, as well as for sharing this example of how easy it is do so.  Alvaro's blog demonstrates the ease by which a mature, powerful solution like PowerBuilder can be used against HANA.  Bravo!

      To John Appleby’s questions above about PowerBuilder, I am reminding of the famous quote by Mark Twain: “The rumors of my death are greatly exaggerated”.  The same can be said of PowerBuilder.  There are tens of thousands of existing PowerBuilder developers in the market today employed by thousands of companies to maintain and extend tens of thousands of existing PowerBuilder applications that are still being used in production today.  In fact, a recent article from Business Insider ( ) listed PowerBuilder as one of the 10 tech skills that will instantly net you a $100K salary (Note that this article was based on information from the job site, not from information from SAP).  Some in the developer community have debated whether $100K PowerBuilder jobs really exist in mass, but there are plenty of PowerBuilder developers who have responded that they have no trouble finding jobs at this salary level.

      So why is this important?  First, the ease of integration of PowerBuilder with HANA provides a path for the tens of thousands of existing PowerBuilder developers in the market to instantly apply their existing PowerBuilder skills to HANA.  Just think of the plethora of new HANA applications that such a large number of developers could deliver to the market!

      [Sidenote:  A valid question was raised in the comments for this blog as to why anyone would build a new application in PowerBuilder.  It is clear that SAP has worked to do to re-introduce PowerBuilder to our existing external developer community and we will be taking this action.  Unfortunately, the simple report that Alvaro built in his example may have contributed to this question.  As a quick response, keep in mind that PowerBuilder is often used to deliver large transactional applications, where the benefits of reducing development time have a bigger impact.  Additionally, PowerBuilder excels at delivering complex application and some of the capabilities it delivers are difficult or impossible to reproduce in coding languages like Java.  Finally, there is a great company called Appeon that delivers a solution to deploy PowerBuilder applications as highly-scalable web applications.  Appeon has announced that they are developing a similar capability to deploy PowerBuilder applications as mobile applications.  The solution from Appeons does not do a one-time conversion to the PowerBuilder application; rather, the application continues to be maintained and enhanced in PowerBuilder.] 

      Second, Alvaro’s example demonstrates how the thousands of current customers can easily harness the power of HANA to accelerate and enhance the tens of thousands of custom PowerBuilder applications that they currently use in production today.  To take it a step further, these customers could choose to accelerate and enhance select processes in their PowerBuilder applications by using HANA as a “sidecar”, to accelerate and enhance their entire PowerBuilder application by migrating the underlying database to HANA (without having to rewrite the entire application), or to build new “satellite” applications on HANA that integrate and enhance their existing PowerBuilder application without retraining their existing PowerBuilder-skilled developers.  If this approach sounds familiar, it should.  It is exactly the same approach that SAP has taken in leveraging HANA to SAP Business Suite!

      [Sidenote: You may be asking why customers with PowerBuilder applications wouldn’t just rewrite them in JAVA rather than just integrating the existing applications with HANA.  The simple answer is the huge cost, time and effort that would be required to do rewrite the entire applications in JAVA and the relatively little value of delivering the same application in JAVA that they already have in PowerBuilder.  But as Alvaro has demonstrated so effectively in this blog, HANA could be easily integrated with these applications to deliver its proven benefits without all the expense of a complete application rewrite.  I suspect there are a few savvy system integrators out there who will realize the business opportunities this creates and launch services to help PowerBuilder clients integrate HANA into their existing applications.]

      With that, I realize this response has gotten quite long so I will end here.  Let’s see who else can add some insight and what other questions this response raises.

      Author's profile photo Former Member
      Former Member

      I've been the product manager for PB for the past 12 years; our biggest challenges during this time have been quite simple - keep evolving the product to remain current with new technologies that our customers need to use, and tell the market what we're doing. We did a great job on the former and received lots of support from the analyst community, but the latter has been more difficult, mainly because our company's focus was more on corporate messaging v product marketing.  But, there are many customers still using PowerBuilder and there is a lot of momentum in our customer base with folks returning to PowerBuilder. We have hard from customers in state and local government, oil industry, retail, education and just about every other indusrty you can think of who have had initiatives in place to rewrite PB apps. But, even afte years of development and spending millions, sometimes hhundreds of millions, they've come back to PowerBuilder. Many projects failed - the technology built just did not have the functionality needed. Others were so far over budget and no where near completion that they were finally halted.

      Many of our ISVs build commercial software that integrates with SAP ERP, and we are excited to be able to make this process even easier. As for HANA, I see it as Jason noted above -seems like it would be incredibly simple for PB customers to access key enterprise data via HANA and leverage that data in an app.

      Now that we are part of SAP, we have so many opportunities before us and we are just starting to explore, test, and implement new solutions and points of integration. SAP has a plethora of solutions for PB customers, and PB makes app dev incredibly easy. I am looking forward to working with customers and find new ways to combine our products into existing apps as well as build new solutions.

      Author's profile photo Former Member
      Former Member

      Like all great blog posts, Alvero's answers a question while generating many more for the readers to discuss.  I am a long term Sybase, now SAP employee who was peripherally involved with PowerBuilder in the past but have had an opportunity to work more closely with the PowerBuilder community and product over the last few months.  One of the things that has always amazed me is the strength and passion of the PowerBuilder developer community.  PowerBuilder developers are active and vocal in a number of LinkedIn groups, on Sybase Developer Forums (soon to be merged into the SAP Community Network) and at local user group meetings.  PowerBuilder has 40 plus local user groups with 8 or 9 being formed in the last 12 months.  In addition to active developers, there are many more who have PowerBuilder experience at some time in their past. Many like Alvero haven't had the chance to use the product in some time, but it's a little like riding a bicycle, it's pretty easy to return to form once you have learned.  For all the reason iterated in Jason's and Sue's comments, I believe PowerBuilder will become the development environment of choice for many HANA projects initiated in organizations with access to PowerBuilder expertise.  I also think that we will be making a compelling case for new organizations to add PowerBuilder to their toolkit.

      PowerBuilder has been around for what is an amazingly long time in the technology universe.  This has happened as a result of keeping up with changes in technology, a loyal group of developer and the fact that (to borrow an expression) it just works. Bottom line is that we have a lot of developers who we hope will look first to PowerBuilder for their projects because they already know the benefits of doing so. 

      Author's profile photo Alvaro Tejada Galindo
      Alvaro Tejada Galindo
      Blog Post Author

      Jason, Sue and Don: 

      Thanks for the support and for all the interesting comments and points of view that you have added to my blog.  PowerBuilder has really evolved since the last time I use it almost 8 years it's a great tool with tons of cool features to be explored and take advantage of...mixing it with the speed and versatility of SAP HANA, truly amazing things for existing customers can be achieved.  So glad and proud to be part of this conversation.