Transaction Notification - User Table
Hi experts.
I'm wondering if it's even possible to create an IF statement on SAP Transaction Notification that looks up to an user table.
Regards,
Eduardo Araujo.
So, I take this and I use the name of my table instead of "@PODGRUPA"?
@EDIT
I've tried this:
IF(@object_type = '-3 @FLAGCADPAC' AND @transaction_type IN ('A', 'U'))
BEGIN
IF (1=1)
BEGIN
SET @error = 1
SET @error_message = 'Teste'
END
END
But with no success.
I've tried "IF (1=1)" o make an test if it works.
Between "-3" and my table name, I've used TAB, space, and even without anything between them, but no success too.
Regards.
Similar Messages
-
Transaction Notification en Tablas de Usuario
Buenos dias,
Tengo la siguiente pregunta, se puede usar el SP Transaction Notification para validar el llenado de tablas de usuario y como lo hago???
como determino el objectype????
Gracias.
Pasen buen dia.Buen dia Douglas,
Las tablas de usuario no poseen ObjecType debido que el objec type es propio de las tablas de SAP Business one.
Para poder colocarle Transaction Notification debes crear un UDO vinculado a tu tabla de usuario, en ese momento se crea el ObjectType a tu tabla de usuario.
Saludos,
Wuilmer Venegas -
Use SP Transaction Notification for trigger on user defined table
Hi i need some help. I have a user defined table in sap (@LAU_ACCT) .
I need way to catch the event on the table (update , delete , add).
I heard about SP Transaction Notification , but how use it with udt ?
Thanks!Hi Pavel,
it is only possible if the UDT is registered as part of an object ( UDO ) - further info http://scn.sap.com/thread/3277846 . So for pure UDT actions you have to find another way ( SQL trigger, UI API, periodic query ).
regards,
Maik -
Transaction Notification For User Defined Object
Dear Expert,
I want to create a transaction notification for my user defined form. I have a matrix on my form which has a field as 'Code'. I want that this field (On Row Level) should have unique values all the time while adding or updating the form.
Object Type: MaterialMaster
Table Name: MaterialDetails
FieldName: U_Code
Plz help me to get this notification.
RegardsHi Amit,
Please check below query.
IF @object_type = 'MaterialMaster' AND @transaction_type IN('A','U') and @error = 0
BEGIN
IF ( SELECT COUNT(*)
FROM MaterialDetails A
WHERE A.U_Code IN (SELECT U_Code FROM MaterialDetails WHERE U_Code = @list_of_cols_val_tab_del)
GROUP BY A.U_Code
HAVING COUNT(*) > 1
) >1
BEGIN
set @error = -10
set @error_message = 'You can not Add Dublicate Code'
END
End
Hope this help
Regards::::
Atul Chakraborty -
Transaction Notification. How to include table Itemgroup in code
Hi.
I need to include some code in SP_TN that must be run at changing of values in the fields of the table ItemGroup (OITB).
What will be the first stroke in TN
like:
1. If @object_type = N'XXX' - in this case I need a number of object of this table, or
2. if @TableName = 'ItemGroup' or OITB
or something else
With regards
MaximNOB -1 - Not an Object
GNR 0 - General Object
ACT 1 - Accounts
CRD 2 - Cards
DSC 3 - Discount Codes
ITM 4 - Items
VTG 5 - Vat groups
PLN 6 - Price List Names
SPP 7 - Special Prices
ITG 8 - Item Groups
RTM 9 - Rates matching
CRG 10 - Card payment groups
CPR 11 - Contact persons
USR 12 - Users
INV 13 - Invoices
RIN 14 - Revert Invoices
DLN 15 - Delivery Notes
RDN 16 - Revert Delivery Notes
RDR 17 - Orders
PCH 18 - Purchases
RPC 19 - Revert Purchases
PDN 20 - Purchase Delivery Notes
RPD 21 - Revert Purchase Delivery Notes
POR 22 - Purchase Orders
QUT 23 - Quotations
RCT 24 - Receipts
DPS 25 - Deposits
MTH 26 - Match History
CHH 27 - Checks History
BTF 28 - Journal Batches
BTD 29 - Journal Batches Directory
JDT 30 - Journal Transactions
ITW 31 - Item - Warehouse accumulators
ADP 32 - Printing Administration
CLG 33 - Contact Log
RCR 34 - Recurring Transactions
NNM 35 - Objects Next Serial Number
CRC 36 - Credit Cards
CRN 37 - Currency Codes
IDX 38 - Index (Madad)
ADM 39 - Administration
CTG 40 - Credit Terms
PRF 41 - Form Preferences
BNK 42 - Bank pages
MRC 43 - Firm groups (Marca)
CQG 44 - Card query groups
TRC 45 - Ttansaction codes
VPM 46 - Payment to vendor
SRL 47 - Serial numbers
ALC 48 - Import expenses
SHP 49 - Shipment types
LGT 50 - Length units
WGT 51 - Weight units
ITB 52 - Item groups
SLP 53 - Sales person
FLT 54 - Reports filter
TRT 55 - Transaction types
ARG 56 - Arancel (custom) groups
CHO 57 - Checks paid to vendors (Outgoing checks)
INM 58 - Inventory match
IGN 59 - Inventory General Entry
IGE 60 - Inventory General Exit
PRC 61 - Profit Center
OCR 62 - Overhead cost rate
PRJ 63 - Project
WHS 64 - Warehouses Codes & Names
COG 65 - Commission groups
ITT 66 - Item Tree links
WTR 67 - Warehouses Transfers
WKO 68 - Work Orders
IPF 69 - Import file
CRP 70 - Credit pay systems
CDT 71 - Credit Due Terms
CRH 72 - Credit History
SCN 73 - Substitutional catalog num
CRV 74 - Credit Payments
RTT 75 - Index & currency rates
DPT 76 - Deposit Temporary
BGT 77 - Budget
BGD 78 - Budget STRsystem
RCN 79 - Retailer chains
ALT 80 - Alert templates
ALR 81 - Alerts pool
AIB 82 - Alerts In box
AOB 83 - Alerts Out box
CLS 84 - Contact log subjects
SPG 85 - Special prices for groups
SPRG 86 - Run externals applications
MLS 87 - Mailing lists
ENT 88 - Panama - enterada
SAL 89 - Panama - salida
TRA 90 - Panama - traspaso
BGS 91 - Budget Scenario
IRT 92 - Interest Rates
UDG 93 - User defaults groups
SRI 94 - Items serial numbers
FRT 95 - Finance Reports Template
FRC 96 - Finance Reports Categories
OPR 97 -
OIN 98 -
OIR 99 -
OSR 100 -
OST 101 -
OFR 102 -
CLT 103 - Contact log types
CLO 104 - Contact log locations
ISR 105 - Internet Service Request
IBT 106 - Item batch numbers
ALI 107 - Alternative Items
PRT 108 - Partners
CMT 109 - Competitors
UVV 110 - User valid values
FPR 111 - Finance period
DRF 112 - Document draft
SRD 113 - Internal manage of SRI and IBT
UDC 114 - User display categories
PVL 115 - Pelecard Vendors List
DDT 116 - Deduction at source - Terraces
DDG 117 - Deduction at source - Groups
UBR 118 - Users - Branch
UDP 119 - Users - Departments
WST 120 - Workflow - Steps
WTM 121 - Workflow - Templates
WDD 122 - Workflow - Documants
CHD 123 - Check out drafts
CINF 124 - Company info
EXD 125 - Expenses definition
STA 126 - Sales Tax Authorities
STT 127 - Sales Tax Authorities Type
STC 128 - Sales Tax Code
CRY 129 - Countries
CST 130 - States
ADF 131 - Address format
CIN 132 - Correction Invoice
CDC 133 -Cash Discount
QCN 134 - User Querry Category Names
IND 135 -VAT Indicator EC
DMW 136 -Data Migrate Wizard Pacages
CSTN 137 -Station Id
IDC 138 - Indicator
GSP 139 - Goods Shipment
PDF 140 -payment draft
QWZ 141 - Query Wizard
ASG 142 - Account Segmantation
ASC 143 - Account Segmantation Categories
LCT 144 - Location
TNN 145 - 1099
CYC 146 - Cycle
PYM 147 - Payment Method
TOB 148 - 1099 Begining Balances
RIT 149 - Dunning Interest Rate
BPP 150 - BP Priorities
DUN 151 -
UFD 152 - User Fields - Descr.
UTB 153 - User Tables
CUMI 154 - User Menu
PYD 155 - Payment run
PKL 156 -
PWZ 157 - Payment Wizard
PEX 158 - Payment Results Table
PYB 159 - Payment Block
UQR 160 - Queries
CBI 161 - Central bank ind
MRV 162 - Material revaluation [was: SST]
CPI 163 - Correction A/P Invoice [was: SLT]
CPV 164 - Correction A/P Invoice Reversal [was: CTR]
CSI 165 - Correction A/R Invoice [was: SCL]
CSV 166 - Correction A/R Invoice Reversal [was: SCO]
SCS 167 - Service Call Status
SCT 168 - Service Call Type
SCP 169 - Service Call Problem Type
CTT 170 - Contract Template
HEM 171 - Employees
HTY 172 - Employee Types
HST 173 - Employee Status
HTR 174 - Termination reason
HED 175 - Education Types
INS 176 - Install Base
AGP 177 - Agent Person
WHT 178 - Withholding Tax
RFL 179 - 347, 349 and WT reports previously displayed
VTR 180 -
BOE 181 - Boe for Payment
BOT 182 - Bill Of Exchang Transaction
FRM 183 - File Format
PID 184 - Period Indicator
DOR 185 - Doubtful Receivables
HLD 186 - Holiday Table
CRB 187 - Bessiness Partner - Bank accounts
SST 188 - Service Call Solution Status [was: 162]
SLT 189 - Service Call Solutions [was: 163]
CTR 190 - Service Contracts [was: 164]
SCL 191 - Service Call [was: 165]
SCO 192 - Service call origin [was: 166]
UKD 193 - User Keys Descr
TSI 280 - A/R Tax Invoice
TPI 281 - A/P Tax Invoice
TXD 282 - A/R Tax Invoice - Drafts
CCD 283 - Cargo Customs Declaration [was: 196] -
Dear All Experts,
My client having some custom requirement in Production Order.
1) When Production Order will created and its status will released then it will allowed user to update any quantity of any items or add any new items but it will not allowed to delete any items from row level.
2) When any item will be deleted then our transaction notification will be raised.
I created one Transaction Notification Code but it will restricted to update anything or delete.
IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '202'
BEGIN
Declare @VisOrder1 nvarchar(255)
Set @VisOrder1=(SELECT Top 1 T1.VisOrder+1 FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (T0.Status = 'R' and T1.VisOrder=(select TOP 1 VisOrder from wor1 where DocEntry=@list_of_cols_val_tab_del order by VisOrder Desc)))
If @VisOrder1 >0
begin
SET @error = 231
SET @error_message = 'You have not rights to delete any Item - Please Contact System Administrator ' + @VisOrder1
end
END
Please help me for solve this problem.
I wait for your warm replay.
Thanks & Regards,
Nishit MakadiaHi,
Please check these threads. Let me know your feedback.
http://scn.sap.com/thread/3518208
http://scn.sap.com/thread/3545101
Thanks & Regards,
Nagarajan -
TSQL for capture and insert to a user table when blcoking is happening on a SQL server
Hi,
I am searching for a TSQL which will capture the blocking script to a table with execution plan and all other necessaryu details. I tried with below script but its not giving the text for blocked statement
I t will be nice if i get RequestingText and BlockingTest
SELECT @@servername as Instancename,getdate() as [date],session_id,start_time,status,command,database_id,blocking_session_id,
wait_type,wait_time,last_wait_type,ST.TEXT AS SQL,
wait_resource,open_transaction_count,cpu_time,total_elapsed_time,reads,writes,logical_reads,text_size from sys.dm_exec_requests SR
CROSS APPLY SYS.DM_EXEC_SQL_TEXT(SR.SQL_HANDLE) AS ST
where blocking_session_id >0
I tried the below link also, this this script also got blocked
http://blog.sqlauthority.com/2010/10/06/sql-server-quickest-way-to-identify-blocking-query-and-resolution-dirty-solution/But when you run select * from sys.sysprocesses where blocked >0
i can see blocking
and it will be nice if I get RequestingText and BlockingTest
in the user table
You can get the requesting text for the spid that is blocked, plus all the other information you get from sys.sysprocesses by
select SUBSTRING(st1.text, (p.stmt_start/2)+1,
((CASE p.stmt_end
WHEN -1 THEN DATALENGTH(st1.text)
ELSE p.stmt_end
END - p.stmt_start)/2) + 1) AS RequestingText,
p.*
from sys.sysprocesses p
CROSS APPLY sys.dm_exec_sql_text(p.sql_handle) AS st1
where p.blocked <> 0;
But you will not bee able to get the command that caused the lock that is causing the blocking. SQL does not keep that information. For a lock, it only keeps the spid that owns it, what is locked, and the kind of lock. It does not keep
the command that caused the lock. And while you can, at least sometimes get the last command the blocking spid has issued, but that may well not be the command that caused the lock. The command that caused the lock might be anything the blocking
spid ran since it entered transaction state. And since that could be the last command or many, many commands ago, you won't be able to get that information with a query into the system tables and/or views.
Tom -
Error in Synchronize User Tables through LDAP
Hello Guys, we have SSM 7.5 SP9 with HPUX/DB2, we change the UME authenticate method access to LDAP, but we get an error message when trying to "Synchronize User Tables" (User Syncronization error, check the log for details), the log did not find much information:
#2.0 #2011 08 03 17:34:00:196#0-300#Info#/Applications/UMECache# #CPM-TM#sap.com/xappscpmsmstrategymanagement#00215E83AD48072F00000007001A8012#825514250000007571#sap.com/xappscpmsmstrategymanagement#com.sap.cpm.sm.auth.UMECache#pipadmin#0#SAP J2EE Engine JTA Transaction : [313459a002dffffffca]#39070320BD0211E0A63600215E83AD48#39070320bd0211e0a63600215e83ad48#39070320bd0211e0a63600215e83ad48#0#Thread[Managed_Application_Thread_17,5,Managed_Application_Thread]#Plain##
Retrieved child groups of: strategy#
It also deleted the cache in File Manager: / memorycache / syncstat.
I believe it's necessary to do some change in the authentication method for NWCE, but where is this change made?
Rgrds, VitorianoVitoriano,
I recommend you consult the SSM installation guide again. There are Java System Properties you have to modify in NetWeaver CE -
CMSAuth
GroupUniqueKey
And some other configuration changes you may need to make as well.
Regards,
Bob -
TRANSACTION NOTIFICATION PARA ORDENES DE PRODUCCION
BUENAS TARDES. ALGUIIEN QUE ME PUEDA DECIR PARA QUE SIRVEN LAS SIG. LINEAS DEL TRANSACTION NOTIFICATION
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255) SE QUE ESTE TOMA EL VALOR DEL CAMPO CLAVE DE LA TABLA SOBRE LA CUAL HACEMOS EL CODIGO.
@list_of_cols_val_tab_del nvarchar(255)
Y SI ALGUIEN A CONSEGUIDO BLOQUEAR UNA ORDEN DE PRODUCCION PARA QUE NO PUEDA SER CERRADA SI NO HAN INGRESADO LOS PRODUCTOS QUE SE FABRICARON.Hola...
Hace tiempo que no pasaba por acá, revisa el siguiente post..
Espero te sea de ayuda
Saludos, -
Transaction Notification with Addon
Hi guys,
I want to be able to get a transaction notification whenever a sales order is added in SAP B1. I want to retrieve the document entry of the sales order in an Addon that uses only the DI API. I have a lot of experience in building addons, but have no experience with transaction notification. How can this be done?
Thanks,
CostasHi Costas
Is your customer a new one? I mean:
Pricing is only applicable to new customers with a contract date after July 15th 2013.
Take into account that in case you only want to be able to get new SO from B1 system you would probably need to buy only one license which suggested price is 750 EUR. I know it is certainly not nothing but still it is not that much.
As for your question regarding TN I'd do it like this:
use PostTransactionNotice procedure to grab a DocEntry of new SO and insert it into your own log table; you can also write a trigger on ORDR table to achieve it
create CLR procedure to do something with logged DocEntry from your table using DotNet; you probably want to be able to pass a parameter to this procedure and get some output after its execution
use a SQL job to grab only new records from your log table and execute a CLR against each one; update status in your log table; write down error, error message and so on...
If have never done any CLR before check this link to learn how easily it can be done to use regex within SQL Server:
http://www.sqllion.com/2010/12/pattern-matching-regex-in-t-sql/
Kind regards,
Radek -
TRANSACTION NOTIFICATION, COMO BLOQUEAR CAMPO CARDNAME EN DATOS MAESTROS-SN
COMO PUEDO PONER UN BLOQUEO EN EL TRANSACTION NOTIFICATION PARA QUE NO SE PERMITA MODIFICAR EL CAMPO DE RAZON SOCIAL (CARDNAME) NI CONDICIONES DE PAGO (GROUPNUM) DE DATOS MAESTROS DE SOCIOS DE NEGOCIOS (OCRD)??
GRACIAS DE ANTEMANO A TODOS.MUCHAS GRACIAS, ME SIRVIO TU RESPUESTA PARA VER COMO IBA A SACAR EL ULTIMO CAMBIO DE X SOCIO DE NEGOCIOS.
LO QUE PUDE CONSTRUIR FUE ESTO:
-- BLOQUEO DE RAZON SOCIAL EN DATOS MAESTROS SN
-- Aqui le decimos que actue solo cuando el tipo de objeto sea 2 (Ventana de Socios de Negocios, y cuando este en modo Crear y Actualizar)
IF @object_type = 2 and @transaction_type in ('U')
BEGIN
-- Declaramos una variable que guarde el valor de la razon social de SN
declare @newname varchar(100)
--en la sig. consulta el nombre de razon social que estamos llenando lo guardamos en @newname
Select @newname=cardname from ocrd where cardcode=@list_of_key_cols_tab_del
--En la consulta anterior no estoy seguro si este correcto utilizar @list_of_key_cols_tab_del para que se tome el valor
--del cardcode del campo que estamos llenando de razon social.
if @newname <> (select CardName from acrd where CardName=@list_of_key_cols_tab_del and LogInstanc=(select max(loginstanc)
from acrd where CardCode=@list_of_key_cols_tab_del and cardcode=@list_of_key_cols_tab_del))
--en consulta anterior se compara si el valor nuevo a guardar o actualizar es diferente al que ya existe en la tabla de historial de SN
begin
set @error = 1
set @error_message = 'Acceso denegado para cambio de Razon Social'
end
END
--END
MUCHAS GRACIAS POR SU AYUDA.. -
Buen día, quiero hacer un transaction notification que dispare un update a una tabla en el momento que se escriban seriales en la tabla OSRN, pero no tengo idea de como hacerlo en el SP, es decir, como veo en el transaction notification que se hizo una operacion sobre esa tabla? o mejor dicho como capturo la operacion?
Saludos.Hola Alejandro, si uso este pedazo de codigo me afecta si alguien crea otra cosa relacionada con ese codigo 100000045 o ya esta casado con la tabla OSRN alli??
IF @object_type=10000045 AND @transaction_type IN ('A')
BEGIN
Declare @Serial varchar(59)
Set @Serial = (Select DistNumber From osrn where AbsEntry = (@list_of_cols_val_tab_del))
update [@TS_SERIALES] set U_ts_usado = 1 where U_ts_co_chasis = (@Serial)
--set @error = 1
set @error_message = N'Serial actualizado' +@Serial +' S/N : ' + @IntSer
end
Saludos -
Transaction Notification to Prevent Duplicate Barcodes
Hi,
I please need a transaction notification to prevent users from using the same bar code on more than one item i.e. barcode xyz may only appear once in the codebars field in oitm.
Thanks
JacquesI assume you want to allow the empty bar code field.
Then nsert this in your SBO_SP_TransactionNotification stored procedure after the line
-- ADD YOUR CODE HERE
If @object_type = '4' and @transaction_type in ( 'A','U')
BEGIN
declare @B nvarchar(16)
set @B=(Select isnull(I.CodeBars,'') From OITM I
Where I.ItemCode=@list_of_cols_val_tab_del)
If @B!='' and exists
(Select I.CodeBars From OITM I
Where I.CodeBars=@B and I.ItemCode!=@list_of_cols_val_tab_del)
Select @error =12, @error_message = 'Duplicate bar code !!'
END -
Transaction Notification en Proceso de Autorizacion
Sera posible ejecutar un Transaction Notification, en el momento que se aprueba un documento?
Ejemplo:
Recibe la alerta de solicitud de aprobación, elije Aprobar y luego da click en el boton OK o Aceptar.
Mi pregunta es: en ese momento que le da Click, es posible ejecutar un Transaction Notification, debido a que revise la tabla
OWDD y WDD1 y no tiene un objtype propio, o no es reconocido como un Documento.
En espera de sus Repsuestas.
Gracias anticipadas.Buen dia Douglas,
No es posible realizarlo ya que como tu indicas no tiene un Objtype, para poder realizar un transaction debe existir un Objtype.
Saludos,
Wuilmer venegas -
Use Transaction Notification in Approval Procedures
Hi
I want to use the "SBO_SP_TransactionNotification" Stored procedure in one of my approval procedures. I have implemented a approval procedure based on certain criteria when a "PURCHASE ORDER" is created. Now i want to send an email out to certain users when a approval is needed for a PO.
I m not sure if transaction Notification is being used when Approval procedure are involved. For all POs that does not require an approval , my code for emailing uses in the SP is working fine.
Has anybody came across this scenario? pls help.
thanks
raghuSBO_SP_TransactionNotification is not compatible with approval procedure. This is clear mentioned in SAP Notes. You may not use this SP in associated with approval. I think there are alternative ways to achieve your goal.
Thanks,
Gordon
Maybe you are looking for
-
Customized notification message template in Workflow Builder for iExpense
Hi Gurus! I have a few requirements to change the notification format of the AME Expense Report Approval Message and one of which is to add a due date of the notification in the subject line of the email. So i have created a new message template, add
-
Change Pointers for Customer Classification
Hi All, I am using Object Class 'DEBITOR' to capture the Customer Classification changes.I am able to see the entries in BDCP but not in CDHDR and CDPOS Whenever i add the classifcation to the customer. I need to add these classification changes to m
-
Cursor size is stuck at medium size
Changed my cursor size just to see how it looked, but after i had changed up to medium and large it would not let me change down to the normal cursor size. So now im stuck with a big cursor and its VERY annoying. tried turning the computer off and al
-
Avoid summarization in cj88 to COPA
Hi All, do you know if is there any way to avoid summarization in cj88 to COPA? I need to settle a WBS to COPA, and maintain the original splitting of cost of sale from Results Analysis. Regards Simone
-
Intelleligent play list impossible to select by Ablum
Hello, Do you know why Apple remove the possibility to make intelligent play list by album ? It's a very big error, don't you think ?