Tcode for any table
Hi expert
I have created a ztable and maintained table maintenance generator . On production server user want a Tcode for particular table that auto maticaly open the screen where data will be posted.
Thanks
shekhar
Hi,
There is no tcode for any table.
Itu2019s only other way that u use tables in your transactions.
Press F1 in the field for which u want the table.
Then it will show some description... there clicks on technical settings button
in properties it will show some info including table name....
Regards,
Shamma
Similar Messages
-
POV-After creating Tcode for a table SM30 I want F4 Help here
Hi All,
After creating Tcode for a table, When I am trying to give table entries thro' this Tcode, I want F4 help for those fields. Apart form assigning "Fixed values" in Domain level how can I achieve this.
Points Assured.
Regards,
SureshHi,
You need to create search helps based on this table for each filed or one for all the fields with proper import and export paramters. Or else you can give check table entries for each of the table fields for which you need the F4 help. Check table us assigned to a field using the Foriegn key assignment.
Best Regards,
Sesh -
How to come up with a magic number for any table that returns more than 32KB?
I am in a unique situation where in I am trying to retrieve values from multiple tables and publish them as XML output. The problem is based on the condition a few tables could retrieve data more than 32KB and a few less than 32KB. Less than 32KB is not an issue as XML generation is smooth. The minute it reaches greater than 32KB it generates a run time error. Just wondering if there is any way to ensure that the minute the query's results is greater than 32 kb, it should break say - if the results is 35KB, then I should break that result into 32 KB and 3kb; once done then pass this data to be published as an XML output. This is again not just for one table, but all the tables that are called in the function.
Is there any way?? I am unable to get any ideas nor have I done anything so complex from production support stand point. Would appreciate if someone can guide me on this.
The way it is, is as follows:
I have a table called ctn_pub_cntl
CREATE TABLE CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id NUMBER(18)
,table_name VARCHAR2(50)
,last_pub_tms DATE
,queue_name VARCHAR2(50)
,dest_system VARCHAR2(50)
,frequency NUMBER(6)
,status VARCHAR2(8)
,record_create_tms DATE
,create_user_id VARCHAR2(8)
,record_update_tms DATE
,update_user_id VARCHAR2(8)
,CONSTRAINT ctn_pub_cntl_id_pk PRIMARY KEY(ctn_pub_cntl_id)
Data for this is:
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_SBDVSN'
,TO_DATE('10/2/2004 10:17:44PM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.TSZ601.UNP'
,'SAP'
,15
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_TRACK_SGMNT_DN'
,TO_DATE('02/06/2015 9:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.WRKORD.UNP'
,'SAP'
,30
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_FXPLA_TRACK_LCTN_DN'
,TO_DATE('10/2/2004 10:17:44PM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.YRDPLN.INPUT'
,'SAP'
,30
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_FXPLA_TRACK_LCTN2_DN'
,TO_DATE('02/06/2015 9:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.TSZ601.UNP'
,'SAP'
,120
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_FXPLA_TRACK_LCTN2_DN'
,TO_DATE('04/23/2015 11:50:00PM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.YRDPLN.INPUT'
,'SAP'
,10
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_FIXED_PLANT_ASSET'
,TO_DATE('04/23/2015 11:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.WRKORD.UNP'
,'SAP'
,10
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_OPRLMT'
,TO_DATE('03/26/2015 7:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.WRKORD.UNP'
,'SAP'
,30
INSERT INTO CTNAPP.ctn_pub_cntl
(ctn_pub_cntl_id
,table_name
,last_pub_tms
,queue_name
,dest_system
,frequency
VALUES
(CTNAPP_SQNC.nextval
,'TRKFCG_OPRLMT_SGMNT_DN'
,TO_DATE('03/28/2015 12:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
,'UT.TSD.WRKORD.UNP'
,'SAP'
,30
COMMIT;
Once the above data is inserted and committed, then I created a function in a package:
CREATE OR REPLACE PACKAGE CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH
IS
TYPE tNameTyp IS TABLE OF ctn_pub_cntl.table_name%TYPE INDEX BY BINARY_INTEGER;
g_tName tNameTyp;
TYPE tClobTyp IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
g_tClob tClobTyp;
FUNCTION GetCtnData(p_nInCtnPubCntlID IN CTN_PUB_CNTL.ctn_pub_cntl_id%TYPE,p_count OUT NUMBER ) RETURN tClobTyp;
END CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH;
--Package body
CREATE OR REPLACE PACKAGE BODY CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH
IS
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
child_node xmldom.DOMNode;
child_elmt xmldom.DOMElement;
leaf_node xmldom.DOMNode;
elmt_value xmldom.DOMText;
tbl_node xmldom.DOMNode;
table_data XMLDOM.DOMDOCUMENTFRAGMENT;
l_ctx DBMS_XMLGEN.CTXHANDLE;
vStrSqlQuery VARCHAR2(32767);
l_clob tClobTyp;
l_xmltype XMLTYPE;
--Local Procedure to build XML header
PROCEDURE BuildCPRHeader IS
BEGIN
child_elmt := xmldom.createElement(doc, 'PUBLISH_HEADER');
child_node := xmldom.appendChild (root_node, xmldom.makeNode (child_elmt));
child_elmt := xmldom.createElement (doc, 'SOURCE_APLCTN_ID');
elmt_value := xmldom.createTextNode (doc, 'CTN');
leaf_node := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
leaf_node := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
child_elmt := xmldom.createElement (doc, 'SOURCE_PRGRM_ID');
elmt_value := xmldom.createTextNode (doc, 'VALUE');
leaf_node := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
leaf_node := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
child_elmt := xmldom.createElement (doc, 'SOURCE_CMPNT_ID');
elmt_value := xmldom.createTextNode (doc, 'VALUE');
leaf_node := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
leaf_node := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
child_elmt := xmldom.createElement (doc, 'PUBLISH_TMS');
elmt_value := xmldom.createTextNode (doc, TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
leaf_node := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
leaf_node := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
END BuildCPRHeader;
--Get table data based on table name
FUNCTION GetCtnData(p_nInCtnPubCntlID IN CTN_PUB_CNTL.ctn_pub_cntl_id%TYPE,p_Count OUT NUMBER) RETURN tClobTyp IS
vTblName ctn_pub_cntl.table_name%TYPE;
vLastPubTms ctn_pub_cntl.last_pub_tms%TYPE;
BEGIN
g_vProcedureName:='GetCtnData';
g_vTableName:='CTN_PUB_CNTL';
SELECT table_name,last_pub_tms
INTO vTblName, vLastPubTms
FROM CTN_PUB_CNTL
WHERE ctn_pub_cntl_id=p_nInCtnPubCntlID;
-- Start the XML Message generation
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createElement(doc, 'PUBLISH');
root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
--Append Table Data as Publish Header
BuildCPRHeader;
--Append Table Data as Publish Body
child_elmt := xmldom.createElement(doc, 'PUBLISH_BODY');
leaf_node := xmldom.appendChild (root_node, xmldom.makeNode(child_elmt));
DBMS_SESSION.SET_NLS('NLS_DATE_FORMAT','''YYYY:MM:DD HH24:MI:SS''');
vStrSqlQuery := 'SELECT * FROM ' || vTblName
|| ' WHERE record_update_tms <= TO_DATE(''' || TO_CHAR(vLastPubTms, 'MM/DD/YYYY HH24:MI:SS') || ''', ''MM/DD/YYYY HH24:MI:SS'') ' ;
-- || ' AND rownum < 16'
DBMS_OUTPUT.PUT_LINE(vStrSqlQuery);
l_ctx := DBMS_XMLGEN.NEWCONTEXT(vStrSqlQuery);
DBMS_XMLGEN.SETNULLHANDLING(l_ctx, 0);
DBMS_XMLGEN.SETROWSETTAG(l_ctx, vTblName);
-- Append Table Data as XML Fragment
l_clob(1):=DBMS_XMLGEN.GETXML(l_ctx);
elmt_value := xmldom.createTextNode (doc, l_clob(1));
leaf_node := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
xmldom.writeToBuffer (doc, l_clob(1));
l_clob(1):=REPLACE(l_clob(1),'<?xml version="1.0"?>', NULL);
l_clob(1):=REPLACE(l_clob(1),'<', '<');
l_clob(1):=REPLACE(l_clob(1),'>', '>');
RETURN l_clob;
DBMS_OUTPUT.put_line('Answer is' ||l_clob(1));
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.put_line('There is no data with' || SQLERRM);
g_vProcedureName:='GetCtnData';
g_vTableName:='CTN_PUB_CNTL';
g_vErrorMessage:=SQLERRM|| g_vErrorMessage;
g_nSqlCd:=SQLCODE;
ctn_log_error('ERROR',g_vErrorMessage,'SELECT',g_nSqlCd,p_nInCtnPubCntlID,g_vPackageName,g_vProcedureName,g_vTableName);
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR : ' || SQLERRM);
ctn_log_error('ERROR',g_vErrorMessage,'OTHERS',g_nSqlCd,p_nInCtnPubCntlID,g_vPackageName,g_vProcedureName,g_vTableName);
END GetCtnData;
PROCEDURE printClob (result IN OUT NOCOPY CLOB) IS
xmlstr VARCHAR2 (32767);
line VARCHAR2 (2000);
BEGIN
xmlstr := DBMS_LOB.SUBSTR (result, 32767);
LOOP
EXIT WHEN xmlstr IS NULL;
line := SUBSTR (xmlstr, 1, INSTR (xmlstr, CHR (10)) - 1);
DBMS_OUTPUT.put_line (line);
xmlstr := SUBSTR (xmlstr, INSTR (xmlstr, CHR (10)) + 1);
END LOOP;
END printClob;
END CTN_PUB_CNTL_EXTRACT_PUBLISH;
If you notice my query:
vStrSqlQuery := 'SELECT * FROM ' || vTblName
|| ' WHERE record_update_tms <= TO_DATE(''' || TO_CHAR(vLastPubTms, 'MM/DD/YYYY HH24:MI:SS') || ''', ''MM/DD/YYYY HH24:MI:SS'') ' ;
|| ' AND rownum < 16'
The minute I comment
|| ' AND rownum < 16' ;
, it throws an error because this query returns around 600 rows and all of those rows need to be published as XML and the tragedy is that there is a C program in between as well i.e. C will call my packged functions and then will do all the processing. Once this is done will pass the results back to C program. So obviously C does not recognise CLOB and somewhere in the process I have to convert the CLOB to VARCHAR or instead of CLOB I have to use VARCHAR array as a return type. This is my challenge.
Anyone that can help me to find out the required magic number and also a brief know how, I would appreciate that. Many thanks in advance.Not sure I understand which part is failing.
Is it the C program calling your packaged function? Or does the error occur in the PL/SQL code, in which case you should be able to pinpoint where it's wrong?
A few comments :
1) Using DOM to build XML out of relational data? What for? Use SQL/XML functions.
2) Giving sample data is usually great, but it's not useful here since we can't run your code. We're missing the base tables.
3) This is wrong :
vStrSqlQuery := 'SELECT * FROM ' || vTblName || ' WHERE record_update_tms <= TO_DATE(''' || TO_CHAR(vLastPubTms, 'MM/DD/YYYY HH24:MI:SS') || ''', ''MM/DD/YYYY HH24:MI:SS'') ' ;
A bind variable should be used here for the date.
4) This is wrong :
elmt_value := xmldom.createTextNode (doc, l_clob(1));
createTextNode does not support CLOB so it will fail as soon as the CLOB you're trying to pass exceeds 32k.
Maybe that's the problem you're referring to?
5) This is most wrong :
l_clob(1):=REPLACE(l_clob(1),'<?xml version="1.0"?>', NULL);
l_clob(1):=REPLACE(l_clob(1),'<', '<');
l_clob(1):=REPLACE(l_clob(1),'>', '>');
I understand what you're trying to do but it's not the correct way.
You're trying to convert a text() node representing XML in escaped form back to XML content.
The problem is that there are other things to take care of besides just '<' and '>'.
If you want to insert an XML node into an existing document, treat that as an XML node, not as a string.
Anyway,
Anyone that can help me to find out the required magic number
That would be a bad idea. Fix what needs to be fixed.
And please clearly state which part is failing : the C program or the PL/SQL code?
I'd vote for PL/SQL, as pointed out in [4]. -
Function modules for Transaction SE16 for any table whole data
Hi Experts,
i need to pass report or function module input as table name:LFA1.
I Need to get all the data with fileds for those table.
say : i/p
paramters: s_tabname like (tabname).
here s_tabname ='lfa1'.
output :all the fileds details with whole data like se16 or se11 transaction for table.
is there any function module.
Thanks
nagHi,
you can create this easily using runtime creation of objects and SALV for display.
Although I would never do something like this...
REPORT zzzz.
DATA:
gr_itab TYPE REF TO data,
gr_salv TYPE REF TO cl_salv_table.
PARAMETERS:
p_table TYPE tabname.
FIELD-SYMBOLS:
<tab> TYPE table.
START-OF-SELECTION.
create data gr_itab type table of (p_table).
ASSIGN gr_itab->* TO <tab>.
select *
from (p_table)
into table <tab>.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_salv
CHANGING
t_table = <tab> ).
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
DATA:
lr_functions TYPE REF TO cl_salv_functions_list.
lr_functions = gr_salv->get_functions( ).
lr_functions->set_all( abap_true ).
gr_salv->display( ).
You won't find anything simpler.
Regards,
Clemens -
How to find Tcode for database table
Hi Gurus,
I need to find out tcode for Standard SAP table in SCM APO '/SAPAPO/PBMVWT' for maintaining Plannning book text in different languages.
The problem is that Table maintainance is not maintained so SM30 wont work. I tried Where used list option for table but no tcode or report found using this table..
Kindly help
SwapnilHi,
there is no maintenance txn. If you need to have text in different languages, you need to do it as follows:
- logon for example once in english
- goto txn /SAPAPO/SDP8B
- maintain the text in English and activate the planning book.
- Logon in the other Language
- enter /SAPAPO/SDP8B again
- Type in the text in the other language and activate the Planning book again.
This will give the planning book language specific texts.
Best regards
Rico Frenzel -
Creating Tcode for Custom Table
Hi all,
I have created a custom table ZSALESMANAGER, I have created a Maintenance view for this table ZSALESMANAGER_MV. I have to create a custom Tcode for this maintenance. so that when the i enter this tcode i should get the maintenance view scree of the table.
Please help me, how to do this.
Thanks & Regards,
Poorna.please go throught below link ..... it was given with screen shots of the T.code Creating for the table after the maintaince view had been created ......
<a href="http://">http://www.sapdevelopment.co.uk/tips/tips_tabmaint_tcode.htm</a>
<a href="http://">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc</a>
reward points if it is usefull ...
Girish -
Hallo,, all
i want to set DDL for 2 table and other table not have DDL,
How to use DDL parameter in extract group..?
Thanks,
RiyasYes, i was used that..
how to use 1 table include DDL and many table exclude DDL..
DDL INCLUDE MAPPED OBJNAME <schema>.<table2>
or
DDL INCLUDE MAPPED OBJNAME <schema>.<table2> , EXCLUDE OBJNAME <schema>.<table2>
this params not work..:(
thanks,
Riyas -
Hi all,
Can anyone tell me the t code for comparing tables
Regards,
SowmyaHi,
If it for data then,
SCMP Check the table data across clients..
cheers,
jacks -
Hi experts,
Can anyone provide me the transaction codes to fill the setup
tables of:
2lis_11_vaitm
2lis_12_vcitm
2lis_13_vditm
2lis_04_p_matnr
2lis_02_itm.
Full points will be assigned.
Thanks & Regards,
V N.Hello,
Goto SE93 OLI*BW -> F4 you will get all the Setup table tcodes
OLI1BW INVCO Stat. Setup: Material Movemts
OLI2BW INVCO Stat. Setup: Stor. Loc. Stocks
OLI3BW Reorg.PURCHIS Extract Structures BW
OLI4BW Restructure of PPIS Extract Strctrs
OLI7BW Restructure of VIS Extr. Struc. Ord.
OLI8BW Restructure VIS Extr. Str. Delivery
OLI9BW Restructure VIS Extr. Str. Invoices
OLIFBW Restruct. Rep. Manuf. Extr. Structs
OLIIBW Reorg. of PM Info System for BW
OLIQBW Reconstruct QM Infosystem for BW
OLISBW Reorg. of CS Info System for BW
OLIZBW INVCO Setup: Invoice Verification
Thanks
Chandran
Edited by: Chandran Ganesan on Jun 11, 2008 3:31 PM -
Script will create database, 3 database objects and publish.
The error is due to the generation script to create the conflict tables that is not stripping out default constraints that reference a UDF.
As you can see below, the failure is on the generation script for the conflict table.
The conflict table should be a bucket table that shouldn’t enforce data integrity.
See how the default constraints for the columns someint and somestring were stripped out of the generation logic however the default constraint that utilizes a UDF persist and uses the same object name that was used on the production table (The
bold line) , this occurs if I explicitly name the constraint or let the system generate the name for me like in the example posted.
The only way I could see getting around this right now is to drop all default constraints in the system that uses a UDF, publish then add the constraints back which is vulnerable to invalid data and a lot of moving
steps. This all worked with SQL 2000, 2005, 2008, 2008r2, it’s stopped working in SQL 2012 and continues to not work in SQL 2014.
Error messages:
Message: There is already an object named 'DF__repTable__id__117F9D94' in the database.
Could not create constraint. See previous errors.
Command Text: CREATE TABLE [dbo].[MSmerge_conflict_MergeRepFailurePublication_repTable](
[id] [varchar](8) NULL CONSTRAINT [DF__repTable__id__117F9D94] DEFAULT ([dbo].[repUDF]()),
[somedata] [varchar](64) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NULL,
[someint] [int] NULL,
[somestring] [varchar](64) NULL
Parameters:
Stack: at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.Snapshot.YukonMergeConflictTableScriptingManager.ApplyBaseConflictTableScriptToPublisherIfNeeded(String strConflictScriptPath)
at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScriptingTransaction(SqlConnection connection)
at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScripting()
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleCftScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 2714)
Get help: http://help/2714
Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
Get help: http://help/1750
Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
Get help: http://help/1750
Pauly C
USE [master]
GO
CREATE DATABASE [MergeRepFailure]
ALTER DATABASE [MergeRepFailure] SET COMPATIBILITY_LEVEL = 110
GO
USE [MergeRepFailure]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create view
[dbo].[repView] as select right(newid(),8) as id
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[repUDF]()
RETURNS varchar(8)
BEGIN
declare @val varchar(8)
select top 1 @val = id from [repView]
return @val
END
GO
create table repTable
id varchar(8) default([dbo].[repUDF]()),
somedata varchar(64) null,
rowguid uniqueidentifier ROWGUIDCOL default(newid()),
someint int default(1),
somestring varchar(64) default('somestringvalue')
GO
insert into reptable (somedata) values ('whatever1')
insert into reptable (somedata) values ('whatever2')
go
/*test to make sure function is working*/
select * from reptable
GO
/*Publish database*/
use [MergeRepFailure]
exec sp_replicationdboption @dbname = N'MergeRepFailure', @optname = N'merge publish', @value = N'true'
GO
declare @Descrip nvarchar(128)
select @Descrip = 'Merge publication of database ''MergeRepFailure'' from Publisher ''' + @@servername +'''.'
print @Descrip
-- Adding the merge publication
use [MergeRepFailure]
exec sp_addmergepublication @publication = N'MergeRepFailurePublication', @description = N'@Descrip',
@sync_mode = N'native', @retention = 14, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true',
@enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21,
@ftp_subdirectory = N'ftp', @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false',
@dynamic_filters = N'false', @conflict_retention = 14, @keep_partition_changes = N'false', @allow_synctoalternate = N'false',
@max_concurrent_merge = 0, @max_concurrent_dynamic_snapshots = 0, @use_partition_groups = null, @publication_compatibility_level = N'100RTM',
@replicate_ddl = 1, @allow_subscriber_initiated_snapshot = N'false', @allow_web_synchronization = N'false', @allow_partition_realignment = N'true',
@retention_period_unit = N'days', @conflict_logging = N'both', @automatic_reinitialization_policy = 0
GO
exec sp_addpublication_snapshot @publication = N'MergeRepFailurePublication', @frequency_type = 4, @frequency_interval = 14, @frequency_relative_interval = 1,
@frequency_recurrence_factor = 0, @frequency_subday = 1, @frequency_subday_interval = 5, @active_start_time_of_day = 500, @active_end_time_of_day = 235959,
@active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repTable', @source_owner = N'dbo', @source_object = N'repTable', @type = N'table',
@description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000010C034FD1, @identityrangemanagementoption = N'manual',
@destination_owner = N'dbo', @force_reinit_subscription = 1, @column_tracking = N'false', @subset_filterclause = null, @vertical_partition = N'false',
@verify_resolver_signature = 1, @allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true', @check_permissions = 0, @subscriber_upload_options = 0,
@delete_tracking = N'true', @compensate_for_errors = N'false', @stream_blob_columns = N'false', @partition_options = 0
GO
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repView', @source_owner = N'dbo', @source_object = N'repView',
@type = N'view schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
@destination_owner = N'dbo', @destination_object = N'repView', @force_reinit_subscription = 1
GO
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repUDF', @source_owner = N'dbo', @source_object = N'repUDF',
@type = N'func schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
@destination_owner = N'dbo', @destination_object = N'repUDF', @force_reinit_subscription = 1
GOMore information, after running a profile trace the following 2 statements, the column with the default on a UDF returns a row while the other default does not. This might be the cause of this bug. Is the same logic to generate the object on
the subscriber used to generate the conflict table?
exec sp_executesql N'
select so.name, schema_name(so.schema_id)
from sys.sql_dependencies d
inner join sys.objects so
on d.referenced_major_id = so.object_id
where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
and d.class in (0,1)
and d.referenced_major_id <> object_id(@base_table, ''U'')
and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__id__117F9D94]'
exec sp_executesql N'
select so.name, schema_name(so.schema_id)
from sys.sql_dependencies d
inner join sys.objects so
on d.referenced_major_id = so.object_id
where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
and d.class in (0,1)
and d.referenced_major_id <> object_id(@base_table, ''U'')
and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__somein__1367E606]'
Pauly C -
User Exit / BADI for any tables -
Hi
I would like to know whether there is any User Exit / BADI that is existing in SAP whenever an Table is called in the Application . So if i probably find the User Exit / BADI then probably i can control the flow of certain records in the table . The table may be an Standard table or custom table
Thanks and Regards
K.Nadesh KumarHi
I was just finding out if there is any USER EXIT / BADI that will be executed whenever an table is called . My requirement was that if i could find the USER EXIT / BADI so that i can control the flow in my program itself . The requirement may be to restrict new datas . However i got another solution .
Thanks and Regards
K.NadeshKumar -
Function to create change log for any table
Hi
There is some FM which give me information what was changed in ztable for actually process.I got.
It is BAL -
RFC-enabled authorization checks for specific tables?
I am developing an Excel application which calls several BAPIs and RFC-enabled FMs, most notably RFC_READ_TABLE. While I will provide security at the FM level by checking S_RFC for these FMs, I need to find a way of restricting access for users to specific tables based on certain table fields? Is there any SAP-delivered FM/BAPI that will let me do this?
My understanding is that although RFC_READ_TABLE does check S_TABU_DIS, it only checks tables based on their belonging to a particular table classIt is not checking authorization for an individual table. What this means is that users will need to have access to the table class or classes to which the table or tables belong, for any tables that are being read by RFC_READ_TABLE.
Please correct me if I am wrong in my understanding, or if there is a standard solution for a situation like this.Hi john,
1. What this means is that users will need to have access to the table class or classes to which the table or tables belong, for any tables that are being read by RFC_READ_TABLE.
U are perfectly right.
2. The users will have to be given rights
NOT TABLE WISE,
But authorisation group wise.
3. Note : S_TABU_DIS
The main purpose of this authorisation object
is for standard tools like sm30 only.
Its also used in the FM RFC_READ_TABLE .
regards,
amit m. -
Hi all
I want to create the Tr. code for the zTable.
For this i followed this navigation.
From Se11
Given the table name
Clicked on change
Clicked on Utilities
Clicked on Table maintainence Generator
Clicked on Environment
Then It showing Transaction code in diabled mode
How i can enable?
Is it possibel to create the tcode for the table or not >
If yes, How ? Plz clarify.
Message was edited by: Prashanth KondaHi Prashanth,
If your purpose is to provide a T-code for entering values directly in to table without going to SE11 , create entries like that. Then What Sravathi suggested is the right approach . This is the standard approach to provide table maintenanance to the users who require it like Functional people and end users .
1.T-code SE93
2. Give the Tcode according your naming conventions.
3.choose Create then it will ask for the description
in the lower of the screen you can see 4 options select the last one .
4.In the Transaction Input box give SM30 and make a check mark in the below check box , skip intial screen.
5.In the end of the screen you can find subscreen lablled Default value
select VIEWNAME in the column NAME OF SCREEN FIELD and in the next column type your Z-TABLE.
If your requirement is to provide this T-CODE for inserting/modifying values then Type UPDATE in NAME OF SCREEN FIELD Column and the next column 'X'.
If your requirement is to just show the table then you can select SHOW .
<i>Hope This Info Helps YOU.</i>
Regards,
Raghav -
HOW TO KNOW THE TCODE FOR CREATING A NEW ENTRY IN A PARTICULAR TABLE
HI,
CAN YOU PLEASE LET ME KNOW THE PROCEDURE TO GET THE TCODE FOR CREATING A NEW ENTITY IN A TABLE .
EG: IS THERE ANY PROCEDURE TO KNOW THAT IF I CREATE A NEW ENTITY IN MM01 IT WILL BE STORED IN TABLE MARA.
THANKING YOU.Hi Venkata,
If you want to know, for a given table, which transaction/program(s) will create a new record, there is no easy procedure, other than to refer to experts who deal with these programs.
It is possible to get a list of programs that refer to a table. SE11, select the table, select the 'where-used' icon, select programs, execute. You will be presented with a list of programs that read or write to that table. From that list you would have to determine which one(s) create records, using your ABAP skills. From those selected programs you would have to find which, if any, had a transaction assigned.
Many tables are updated by more than one program/transaction. Many other tables are not updated by ANY interactive transaction.
If you ever decide to go ahead with this research, make sure you publish it. You could probably make yourself a bit of money.
Regards,
DB49
Maybe you are looking for
-
Hi All New to this forum, but not new to computers and printers. I will try to make this as short as possible. I was given this Canon ip4700 printer. I was using a Canon MP530 for a long time and was very pleased with it, but felt it was getting
-
I'm creating a music DVD for a school project. The Main Menu has a Play All and Select Song featuring music from the band I recorded. My professor has requested that, for the songs, he be able to navigate using buttons between songs. Basically I set
-
Display 3 Panels in one frame.....
Hi I need to display 3 different panels in one frame. The first panel will contain a JXTreeTable [North] The second Panel will contain a Tree [Center] The third Panel will contain a JXTreeTable [South] I am unable to get this working as the component
-
Washington Post articles and opinions that are clicked on in my email, no longer display the text of the article or opinion. This is a recent development and may be caused by a Firefox upgrade as I did not previously have this problem. The problem do
-
Automated Save for web + All user slices + Preset?
I've got a large PSD templade filled with web slices, each containing web button graphics. These are always saved in three states: "-off", "-on" and "-active" in .png format. To speed things up, I've prepared: * 3 "Layer comps" (that toggles layers o