2

Hey guys I've written some SQL statements in SAP, I want to be able to save the code and run it when ever I need to. The SQL code either locks or unlocks specified users based on the UFLAG value entered. I'm fairly new to SAP/SQL and have no idea on how to actually save this small/simple script.

I used TCODE: db13 then navigated to the Diagnostics tab -> SQL Command Editor.

Any help would be appreciated, thanks!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
oceanlab1
  • 21
  • 1
  • 9

2 Answers2

2

As far as I know, sql scripts cannot be saved in the system. However, you can export to txt and import from txt file. enter image description here In my opinion, it is not a proper way to handle this at db layer. You should write a program and should use open sql statements.

Oguz
  • 1,867
  • 1
  • 17
  • 24
  • 1
    I'm on 7.5 SP3 and I can save them just fine :) They must have added this recently. – andrecito Jul 14 '17 at 11:03
  • Thanks Oguz, yeah i think it isn't best practice to do this on the database layer. Will most likely attempt to write it in a program. Thanks for your help! – oceanlab1 Jul 17 '17 at 23:48
0

In Eclipse(ADT) you can save them as favourites in SQL console. There is a downward arrow in RUN, click on the same will give you options to 'add to favourites', manage favourites etc.