Run SQL command before add document
Paul Witmond
Hello,To keep some data correct we must run a sql command before we add the document.
When we capture the click on the add button and run our script we have a problem.
We want to :
User click on add --> our sql script --> add document
Please advise
Regards,
Paul
Sascha Balke
Hi Paul,have you a example for your requirement?
Paul Witmond
Hi Sascha,When we make an inventory transfer we must update a user table (whscode is not updated correct).
update [dbo].[@CIM_E001] set [U_CIM_WH]=T2.whscode FROM [dbo].[@CIM_E001] T0 inner join OSRI T2 on t0.U_CIM_IN=t2.itemcode and t0.U_CIM_EN=t2.intrserial WHERE T0.U_CIM_WH <> T2.WhsCode
I would to do this when pressing the ADD button in the screen
Regards,
Paul
Peter Braendle
you can add your sql-code in the sap transaction_notification directly like:--If @object_type in ("Your Formtype") and @transaction_type='A'
--begin
--exec Your Stored Procedures
--end
@transaction_type='A' for Add
@transaction_type='U' for Update
0
Please sign in to leave a comment.
Comments
0 comments