Wednesday, 26 August 2020

Calling MS-SQL stored procedure from ABAP

My SAP System had to call a stored procedure on a 3rd party MS-SQL database. As suggested by many blogs, I used DBCO to maintain the parameters of the database... (kind of a BASIS job, but anyway...)

Then found I could use the DBCursor mechanism to retrieve to a table... but my 3rd Party guy didn't want to use SELECT statements, he wanted to use a stored procedure.

Turns out you can use DBCursor to select from an Stored Procedure too...

We had to "qualify" the database name, pre-empting the stored procedure (see highlight)



data: ls_output type tty_output,                        "This bit will differ in each Stored Procedure,
      lt_output type TABLE of tty_output.         " so I have not put it in!! 

EXEC SQL.
  CONNECT TO 'CO11' AS 'V'
ENDEXEC.
EXEC SQL.
  SET CONNECTION 'V'
ENDEXEC.
EXEC SQL.
  open dbcursor for
  EXEC [DatabaseName].[dbo].[StoredProcedureName] 700, '2041', 'S1233124'
endexec.
DO.
  EXEC SQL.
    FETCH NEXT dbcursor INTO :ls_output-SerialNumber,
                             :ls_output-MACID
  ENDEXEC.
  IF sy-subrc = 0.
    APPEND ls_output to lt_output.
    clear ls_output.
    CONTINUE.
  else.
   exit.
endif.
enddo.


Monday, 11 November 2019

SMARTForms Colour Border Gotcha

This just foxed me for an hour :(

When changing the border colours/widths/settings of a table (or I guess, a window, graphic, whatever) you have to re-create the entire border.

Weirdly, this means you can set the width to 5mm, and the colour to Green, and add a top border...
Then a 3mm brown left border, then a 10 TW lower border...

I was changing widths/colours of existing borders, but not re-creating. So you CAN'T just change them... (MEME ALERT)



Wednesday, 2 October 2019

VOFM Copy Routine being ignored!?

I found that using the Modification Assistant meant that the VOFM changes were not registered, but switching it off got the object activated and RV45C601 inserted into the main RV45CNNN program.
Prior to that, I'd been running RV80HGEN and all that jazz, RV45C601 had been created, and had code in it, but because it hadn't been listed / registered / recorded in RV45CNN, it didn't have access to any of the variables and was not called.

Wednesday, 10 July 2019

Android "App Not Installed" using Cordova

Okay, so there's a billion reasons why this might occur...

In my case, I managed to fix it by:

Checking the version of the phone [Settings->About Phone->Android Version] - mine was 5.1.1 i.e. Android Lollipop

Googling which SDKs were valid:

Codename
VersionAPI level/NDK release
Marshmallow6.0API level 23
Lollipop5.1API level 22
Lollipop5.0API level 21
KitKat4.4 - 4.4.4API level 19

So I'm shooting for API 22... 

Changing the app\config.xml


Also updated the version: 



Monday, 28 January 2019

Eclipse Grinding... Part 2

Okay, I've calmed down now...

If you ever actually manage to load the thing : Preferences->General->Startup/ShutDown you can choose which plugins get invoked. I switched ALL these off, and even though this included some SAP related Plugins, I was still able to do everything I needed to. This sped it all up!

Tuesday, 15 January 2019

Eclipse is grinding my gears. Random Rant post, no useful information! :)

It sucks. I try and find merit where I can, try and see the bright side, and this makes for a good life on the whole. However, I'm getting increasingly frustrated with SAP washing their hands of responsibility of maintaining a decent development environment.

Having followed various blogs on the web explaining how to allocate more memory to Eclipse, and switch off all the plugins, I'm still only successfully launching the application about half the time, and then frequently hanging when trying to do mundane tasks like opening a CDS view, or interrogating a package.

I just wish there was an alternative. The way they've Eclipse hooking into the GUI Logon pad to pick up server details for logons was a really neat trick. As a way of developing UI5 applications and then loading on to BSP works nicely...

It's just it'll be working okay for a bit then for some reason I can't quite discern, it'll not load, or load and not work. AAAARRRHRHHGHHHGHGH!!

Wednesday, 5 December 2018

Cloud WebIDE - Grunt


So I merrily built an application in WebIDE, and could test using the Application-Test function... but when trying to deploy, I get “Unable to find local grunt” and “npm ERR! code EINTERGITY” errors.

So the whole point of Grunt is to “minify” the code, which makes it more efficient for the computer / phone to use, simultaneously making the code horrific to read and maintain.

Reversing the “Add Grunt” steps (WebIDE was doing these automatically) in


by removing the Gruntfile.js and package.json files from the app 




means that deployment is done without minification, and deploys in like 2 seconds.