UDM_DISPUTE: Templates don't load first time - sap

I've created a few templates for dispute management (UDM_DISPUTE) and I want to create new documents with them for cases. The first time I load the transaction, the templates don't exist. Then I want to create a new document from a template like this:
STEPS:
1. Select a case
2. Open the Linked Objects tab
3. Right-click various folder
4. Select Create
5. Select Create with template
The first time it says there are no templates, but if I select the case again after that and try it again, it works.
Any idea why this happens?
STEP 1
STEP 2

Related

ssms -- how to create table same as table on another server without data

I need to create a table similar to the one on another server.
How can I do this using ssms?
I am able to copy table from one server to another with data using Tasks | Export data but not sure how to create without data.
Right click on the database you want the shell of in the SSMS gui.
Choose Tasks ---> Generate Scripts
There is a glossary of sorts on the left side of the panel
Under Introduction: Choose Next
Under Choose Objects: (1)Check Select Specific Objects. (2) Expand the "Tables" section. (3) Check the table(s) you want to generate.
Under Set Scripting Options: (1)Choose Save to File.
(2) Set the Destination Drive and location.
(3) Click Advanced
There are lots of options under advanced start with these two, you may need to adjust others, but not likely.
(1) Script for Server Version - Set to the server version you will be restoring the empty database, OR the same version as the source database.
(2) Types of data to script - Choose Schema Only
Click OK
Click Next
Click Next
Should get all green icons on success.
Click finish.
Go to Destination database, open your file, execute the query.

Check the names of Tables/Views/Procs and compare with those from a different database

I am currently in the process of moving tables, views, and stored procedures from one database in SQL Server to another database on the same server. A couple weeks ago, I had already started manually moving some of these procdures, and I am unsure of which ones I have moved so far. I want to write a query that compares the tables I have already moved to database 2 to the ones in database 1, and lists the stuff in database 1 I have not moved yet. I guess I am confused as to where to start, as I don't have much experience in using the system tables.
The easiest way would be to disregard which you already did, script them all out using the SSMS Generate Scripts task, and do a DROP/CREATE or check for existence just to be sure.
Open SSMS
Open the object explorer, connect to your instance,
and open the Databases folder
Right click on the database that
has the object you want to move over and click Tasks, then click
Generate Scripts
Click the Select specific database objects radio button and select all the tables/procs/etc you want to move over. Click Next
Click Advanced, change Script Drop and CREATE to SCRIPT DROP AND CREATE (or change Check for object existence to TRUE), then change Types of Data to Script to Schema and Data
Click Save to File radio button and script it all out
Here's something that should work.
select
name
,type_desc
from
CurrentDatabase.sys.objects
where
is_ms_shipped <> 1
and type_desc in ('VIEW','SQL_STORED_PROCEDURE','USER_TABLE') --add in trigers, TVF, etc that you may want...
except
select
name
,type_desc
from
YourNewDatabase.sys.objects
where
is_ms_shipped <> 1
and type_desc in ('VIEW','SQL_STORED_PROCEDURE','USER_TABLE') --add in trigers, TVF, etc that you may want...

SQL Server - Scripting a table

I want to create a clone table(same table structure) with an already existing table. I know one of the ways is :
Right click on table name -> Script table as -> Create To -> New query editor
I also found out another way would be:
Right click on database name -> Tasks -> Generate scripts -> choose the tables you want
Along the way, you can set scripting options to script whatever I want such as constraint,indexes,triggers,etc.
So what would be the difference between these two methods?
As far I tried both method and both produce the same outcome, or at least that's what I see.
I do realize that all the STATISTICS in a table cannot be scripted if I opt for the first method but if I go for the second method, I could script all the statistics to the clone table by setting the statistic settings to script stats and histograms as well. This would not be possible in the first method.
Can someone shed some light on this?
Thanks
As per my Knowledge Both are same. Ie. Create To-> New Query window also generates the script but it only allowers you to create the table - You Can't specify what all need to be included in the create script since this is a default template. It will by default generate the scripts for all the constraints available in the table.
Whereas Using the Generate Scripts option, you will have more control over the script that is being generated, Like you can Generate the script for the inserts, You can choose whether generate the script for keys and constraints or not etc.
So If you just want to generate the Create script, then you can right-click the table and choose to create to --> New Query window or If you wish to have more control over the process then maybe try the Generate scripts option.
Also, If your requirement is just a table with the same structure as well as data - Without the constraints, Then you can try the Select * INTO option
SELECT * INTO T2 FROM T1
Please visit these link for more info
Generate Scripts for Data in the Tables of SQL Server
Options for scripting SQL Server database objects
With below option you will not be able to generate the script to copy the data
Right click on table name -> Script table as -> Create To -> New query editor
But if you are generating the script from Task, you will be able to copy structure as well as data
Right click on database name -> Tasks -> Generate scripts -> choose the tables you want

Oracle Apex Data Load

After creating some pages using Apex 5.1's Data Load Wizard, would it be possible via the Page Designer to somewhere hack into the data and add in 2 extra column data. I am attempting to add the following columns (1) Updater (2) Update date/time. I was able to do the same thing with an Interactive Grid page by adding PL/SQL code to the 'Save' Page Processing section but could not do the same for the Data Load Pages.
I have a five attribute table, 2 of which (Updater, Update date/time) are hidden to the APEX app user.
One option is to use a Data Load Transformation Rule. You can add this by editing the Data Load Definition via Shared Components. You specify the column, and you can specify a Rule Type of PLSQL Expression and set the expression to whatever you want, e.g. SYSDATE.
Another option is to add a trigger to the table to set those columns.

Generate script in SQL Server Management Studio

If I have a table with data in a database in SQL Server, how can I generate a script that will create the table and add the data too?
If I right click on the table then select Script Table As > Create to > File, that generates a script to just create the table without the data. What I need is a script that creates the table and adds the data that is already existing in the table or 2 separate scripts, one that creates the table and one that adds the data.
Here what you have to do:
right click the database (not the table) and select tasks --> generate scripts
Next --> select the requested table/tables (from select specific database objects)
next --> click advanced --> types of data to script = schema and data
next and finish
Use SSMS scripting feature (Rightclick on database->Tasks->Generate Scripts)
or
use SSMS Tools Pack
Here You can see step by step process of Generate script in SQL Server Management Studio :
Step 1: Right Click on Your Database --> Select Task-->Generate Script..
Step 2: Select Next in Script Wizard
Step 3: Select Script Entire Database
Step 4:Choose Your File Name
and Finish
Now you can use your script file.
Be aware that generating scripts (schema and data) does not export duplicate ROWS
Do a test (only need 2 columns and half a dozen rows) - I wondered what was happening - in the end it turned out to be a good thing in this instance