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

Similar Messages

  • 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.
    Regards

    Hi 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

  • I Don't know how to use SBO Transaction Notification  procedure

    Hi all
    I don't know how to use SBO Transaction Notification  procedure
    can any body give me description why we use,where we use,how we use some example
    Awaiting soon reply
    Rajkumar G.

    example is for testing, if on delivery is filled ref no of vendor or not
    if @object_type = '20'  and (@transaction_type= 'A' or @transaction_type= 'U')
    begin
         if 1 = (select count(docentry) from opdn with(nolock) where docentry =@list_of_cols_val_tab_del and (numatcard is null or len(numatcard) = 0) )
         begin
              select @error =1
              select @error_message = 'vendor ref no isnt filled'
         end
    end
    next example is for creating BP as vendor and testing, if dont begin for specific sign
    if @object_type = '2' and @transaction_type= 'A'
    begin
    if left(@list_of_cols_val_tab_del, 1) = N'x' or left(@list_of_cols_val_tab_del, 1) = N'X'
         begin
              if 1 = (select count(cardcode) from ocrd where cardcode = @list_of_cols_val_tab_del and cardtype in ('S', N'S') )
                   begin
         select @error =1
              select @error_message = 'Vendor code cannot begin to X sign.'
    end
         end
    end
    is it clear?

  • Need a  code / How  to  call outstanding notification for a loggined user !!

    hi all ,
    Need a  code / How  to  call outstanding notification for a loggined user !!
    i need to create a service  such then when the user logins in he should see the outstanding service..

    Hello Prashanth,
    1) Goto QMEL table read OBJNR of the notification.
    2) Pass the notification number and the language to the function module "STATUS_TEXT_EDIT".
        in the return parameter read the parameter LINE, based on the first four characters you can find out       the status of the notification.
    OSNO - Outstanding notification
    NOPR - Notification in process
    NOCO - Notification completed
    Regards,
    TP

  • What is the Object Type for User Define table ?

    Dear All Experts,
    I create one of the User Define Table with no. of UDF's
    I already register User Define Table with Unique ID.
    As per my knowledge, Unique ID is our Object type for that User Define Table.
    I want to add Transaction Notification Code for created Used Define Table.
    This Transaction Notification prevents user to must enter name in that form.
    IF (@object_type = 'Z_Roto' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U'))
    BEGIN
    If not Exists (Select T0.DocEntry from [@Z_ROTO] T0 Where ( T0.Name is null  OR  T0.Name = ' ' ) AND T0.Code  = @list_of_cols_val_tab_del )
    begin
    SET @error = 1
    SET @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
    End
    End
    Please help me for this problem.
    Thanks & Regards,
    Nishit Makadia

    Hi All,
    Thanks for your replay.
    Below code is working for User Define Table's Transaction Notification
    IF (@transaction_type = 'A' OR @transaction_type = 'U') AND @object_type = 'Z_Roto'
    BEGIN
    If Exists (Select T0.Code from [@Z_ROTO] T0 Where ( T0.Name is null  OR  T0.Name = ' ' ) AND T0.Code  = @list_of_cols_val_tab_del)
    begin
    select @error = 10
    select @error_message = 'Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
    End
    End
    Necessary to Remember 4 Things. That are mentioned below.
    1) Register User Define Table (UDT) with using "Object Registration Wizard". For Example : @object_type = 'Z_Roto'
    2) When you define selection criteria then it must be compulsory for use Code Field. For Example : Select T0.Code from [@Z_Roto]
    3) When you define selection criteria then it must be compulsory for use Code for @list_of_cols_val_tab_del.
    4) Use error code as 10 Number
    Thanks & Regards,
    Nishit Makadia

  • Issue with xsd Data type mapping for collection of user defined data type

    Hi,
    I am facing a issue with wsdl for xsd mapping for collection of user defined data type.
    Here is the code snippet.
    sample.java
    @WebMethod
    public QueryPageOutput AccountQue(QueryPageInput qpInput)
    public class QueryPageInput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class QueryPageOutput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class Account_IO implements Serializable, Cloneable {
    protected ArrayList <AccountIC> fintObjInst = null;
    public ArrayList<AccountIC>getfintObjInst()
    return (ArrayList<AccountIC>)fintObjInst.clone();
    public void setfintObjInst(AccountIC val)
    fintObjInst = new ArrayList<AccountIC>();
    fintObjInst.add(val);
    Public class AccountIC
    protected String Name;
    protected String Desc;
    public String getName()
    return Name;
    public void setName(String name)
    Name = name;
    For the sample.java code, the wsdl generated is as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="SimpleService"
    targetNamespace="http://example.org"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    <xs:schema version="1.0" targetNamespace="http://examples.org" xmlns:ns1="http://example.org/types"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://example.org/types"/>
    <xs:element name="AccountWSService" type="ns1:accountEMRIO"/>
    </xs:schema>
    <xs:schema version="1.0" targetNamespace="http://example.org/types" xmlns:ns1="http://examples.org"
    xmlns:tns="http://example.org/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://examples.org"/>
    <xs:complexType name="queryPageOutput">
    <xs:sequence>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="accountEMRIO">
    <xs:sequence>
    <xs:element name="fIntObjectFormat" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageType" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageId" type="xs:string" minOccurs="0"/>
    <xs:element name="fIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fOutputIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fintObjInst" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="queryPageInput">
    <xs:sequence>
    <xs:element name="fPageSize" type="xs:string" minOccurs="0"/>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    <xs:element name="fStartRowNum" type="xs:string" minOccurs="0"/>
    <xs:element name="fViewMode" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org" xmlns:ns1="http://example.org/types">
    <import namespace="http://example.org/types"/>
    <xsd:complexType name="AccountQue">
    <xsd:sequence>
    <xsd:element name="arg0" type="ns1:queryPageInput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQue" type="tns:AccountQue"/>
    <xsd:complexType name="AccountQueResponse">
    <xsd:sequence>
    <xsd:element name="return" type="ns1:queryPageOutput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQueResponse" type="tns:AccountQueResponse"/>
    </schema>
    </wsdl:types>
    <wsdl:message name="AccountQueInput">
    <wsdl:part name="parameters" element="tns:AccountQue"/>
    </wsdl:message>
    <wsdl:message name="AccountQueOutput">
    <wsdl:part name="parameters" element="tns:AccountQueResponse"/>
    </wsdl:message>
    <wsdl:portType name="SimpleService">
    <wsdl:operation name="AccountQue">
    <wsdl:input message="tns:AccountQueInput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    <wsdl:output message="tns:AccountQueOutput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SimpleServiceSoapHttp" type="tns:SimpleService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="AccountQue">
    <soap:operation soapAction=""/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SimpleService">
    <wsdl:port name="SimpleServicePort" binding="tns:SimpleServiceSoapHttp">
    <soap:address location="http://localhost:7101/WS-Project1-context-root/SimpleServicePort"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    In the above wsdl the collection of fintObjInst if of type xs:anytype. From the wsdl, I do not see the xsd mapping for AccountIC which includes Name and Desc. Due to which, when invoking the web service from a different client like c#(by creating proxy business service), I am unable to set the parameters for AccountIC. I am using JAX-WS stack and WLS 10.3. I have already looked at blog http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html but unable to solve this issue. However, at run time using a tool like SoapUI, when this wsdl is imported, I am able to see all the params related to AccountIC class.
    Can some one help me with this.
    Thanks,
    Sudha.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

  • Error while linking user defined table to user defined field using vb6.0

    Hi,
    I am creating a userdefined field on a SAPB1 table(PDN1) using vb 6.0
    I am trying to link this field to a user defined table.
    When i do that i get the following error:
    "The field 'Related table' should consist of 8 alphanumeric chracters with no valid or default values"
    When i try to do the same thing from SAPB1(not using code) there is no such problem.
    My vb code is as follows:
    Set oUserFieldsMD = oCmp.GetBusinessObject(oUserFields)
    oUserFieldsMD.TableName = "PDN1"
    oUserFieldsMD.Name = "OB_Locn"
    oUserFieldsMD.Description = "WH Location"
    oUserFieldsMD.Type = db_Alpha
    oUserFieldsMD.EditSize = 30
    lRetCode = oUserFieldsMD.Add
    If lRetCode <> 0 Then
        oCmp.GetLastError lErrCode, sErrMsg
        MsgBox sErrMsg
        GoTo Err_
    End If
    If Not oUserFieldsMD.GetByKey("PDN1", 0) Then
        MsgBox "Error"
        GoTo Err_
    End If
    oUserFieldsMD.LinkedTable = "OB_TEST"
    lRetCode = oUserFieldsMD.Update
    Your help will be much appreciated.
    Thanks.

    Great Sébastien!
    Looks like we could not survive here one day without your contribution
    Best regards,
    Frank
    PS: For readers of this thread who don't understand why
    EditSize
    must be "8":
    This is the size of the
    Code
    field in the user-defined table to which the new field OB_Locn (in the DB it will be U_OB_Locn) is linked to...
    So, it should be preferrably of the same size.

  • Help needed for data updation in User Defined Tables

    Hello Experts,
    I am developing one add-on in SAP B1 8.8 to input data in a User Defined Table described as under
    Table Name
    DriverMst UDT Type is No Object
    Description
    Stores the Driver master data which are used to get reference in Sale Delivery Form and Driver data management activity
    User defined fields
    Data Name
    Data source
    Size
    Pane Level
    Description
    Driver Code
    Code
    Alphanumeric
    0
    No object table fixed field
    System Name
    Name
    Alphanumeric
    30
    0
    No object table fixed field
    Full Name
    FullName
    Text
    50
    0
    Father Name
    FatherName
    Text
    50
    0
    Birth Date
    BirthDate
    Date
    0
    Phone Number
    PhoneNo
    Alphanumeric
    50
    0
    Mobile No
    MobileNo
    Alphanumeric
    13
    0
    I have created one form using screen painter displaying text boxes and bind them to the table.
    This form is working absolutely fine when there are some data in table (i.e. Browse using navigation)
    My problem is, when I click add button from tool bar the "OK" button turn to "Add" that means the form is set to Add mode, but when I click "Add" button after entering some data nothing happens and input data is not stored in Table. The same "OK" Button turned to "Update" when I do changes in loaded data, but my changes are not reflected to table after I click "Update".

    Thanks Nagarajan,
    None.
    There is no such query. The table fields is directly linked to Edit Box or Combo Box in form.
    From the examples I learned that I have to do something like this to get my table updated
    Dim oUsrTbl As SAPbobsCOM.UserTable
    Dim Res As Integer
    oUsrTbl = oCompany.UserTables.Item("DRIVERMST")
    oUsrTbl.Code = oBPC.Value 'Item Specific of Driver Code Edit Box
    oUsrTbl.Name = Left(oBPN.Value, 30) 'Item Specific of Name Edit Box
    oUsrTbl.UserFields.Fields.Item("U_FullName").Value = oMFN.Value
    oUsrTbl.UserFields.Fields.Item("U_FatherName").Value = oFTHN.Value
    oUsrTbl.UserFields.Fields.Item("U_BirthDate").Value = oDOB.Value
    oUsrTbl.UserFields.Fields.Item("U_PhoneNo").Value = oPHN.Value
    (Similar For rest ofthe fields)
    Res = oUsrTbl.Add()
    Just let me know that is this necessary to do like above.. To be frank there are few more fields and matrices on the form which I didn't mentioned. I am just trying to get recovered from first step to proceed further.
    Regards

  • Use User Defined Tables in a Marketing Document on Row Level

    Hello All,
    Is there a way to use the fields from a User Defined Table in a Marketing Document on a row level such as for example Purchase Order.
    If this is not possible directly, any known work-arounds?
    Thanks for your effort,
    gr.
    Freek

    Thanks for your idea/workaround. To be more precize, we don't want to pull information from a UDT field into a marketing document, but from the row-level  we like to write information to an UDT field.
    Any idea?
    gr.
    Freek

  • Make CFL for user defined tables in Crystal Report 8.8 ?

    Hi Experts
    Use Follwing qry for CFL ( user defined tables) in Crystal Report But its not Show CFL after run the Report in SAP B1 8.8
    Period@Select T0.*  from @OICC T0
    Thanks & Regards
    Dinesh Lade

    Hi,
    As far as i know, SBO can't figure out in such instance what are you doing, try linking it to an original table.
    I usually use OADM for this purpose.
    Hope this helps.
    Regards,
    Daniel

  • DI Sever for User Defined Table

    Hai Guys,
      I am using B1WS web service. I want to post values to User Defined Table (EX: @TableName)  using web services,is there any services for User Defined Table in Web Services
    please give me a solution for this..

    Hello madhu,
    B1WS is unable to access UDT. But DI Server can access UDT with RecordSet
    SOAP Request Message:
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header>
      <SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
    </env:Header>
    <env:Body>
      <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
       <DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD
    JOIN OCPR ON OCRD.CardCode = OCPR.CardCode
    WHERE OCRD.CardCode IN (SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
      </dis:ExecuteSQL>
    </env:Body>
    </env:Envelope>
    SOAP Response Message:
    <?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS"><BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo>
    <OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>2</Name></row><row><CardCode>C002</CardCode>
    <CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>Z</Name>
    </row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>
    Kind Regards
    -Yatsea

  • Copy user defined table using copy express

    I have created some user defined tables.I want to take backup of these tables using copy express.I created xml file for all these tables.When I copied the tables to another company only two fields were copied Code and Name.Rest of the fields were ignored.

    Hi,
    Check this note:[940539|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000940539]
    Also [984935|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000984935],[1118767|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0001118767],[1059284|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0001059284].
    And i kindly recommend you to upgrade CX Addon to its latest patch.
    Rgds
    Sundar

  • How to pop-up a text box for a grid item on a user defined table?

    Hello,
    I have a user defined table with a grid & one of the columns is for comments. What I'm trying to do is to pop up a text box when double clicking in the column field. This would be the same as the Item Details column in the Sales Order ittems grid.
    Thanks,
    Ron

    Please post your question on SDK forum.  Only SDK could meet your need.
    Thanks,
    Gordon

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Using SQL query on user defined table

    Hi all,
    i'am currently working on a project which use user defined table and i would like to know if sap allow us to do insertion/deletion/update on those table using sql query or if we have to use the DI only?
    thanks
    Best regards,

    Hi,
    Definitely you can insert in UDT. You can update but you cant change the Code field after added the rest of the field
    can be updated. You cant delete in UDT but you cant delete anytime in SQL Management Studio.
    THanks.
    CLint

Maybe you are looking for

  • How do I stop Mail from including myself in 'reply to all' emails?

    I often am in email conversations with many participants. I have to use the 'reply to all' functionality daily and it keeps adding my own email address in the list of CCs. Now, I figured, that this could be because of my exchange accounts aliases. So

  • Getting codec error in  a fcp project NEED HELP ASAP

    All of my other projects seem to be working fine, but one project in Paticular when I try to export using "quickime conversion" I get a codec error....as soon as I hit enter...therefore I cannot get it to convert to a quicktime file. I went an checke

  • Printing Problem in Smartforms

    Hello Experts, I am having the problem with printing the data in smartform. My question is, suppose my preview is containing 6 pages. But when i am giving the print command it is printing onlyone page. I have already used command line in my form. Tha

  • Locale values for the arabic db in oracle 10g

    Please suggest me the locale values for the Oracle 10g client/server that can store arabic data. Please also suggest me the best value for the "Database character set". Note: Both my client and server will be installed on the Arabic version of Window

  • Select Query optimisation

    Hi. Is there any way to optimise the below code. or can i write a join query for this if yes then how.   SELECT land1          zone1     FROM tzone     INTO CORRESPONDING FIELDS OF TABLE t_land     FOR ALL ENTRIES IN int_delivery     WHERE zone1 = in