Create trigger in UDF on Journal Entry

Hi  SAP Users,
       Need help for this ...
       I add User Defined Fields in Journal Entry module, I want this field not to leave blank/empty. Can somebody teach me on how to create a code in SP that will trigger the module to avoid adding the journal entry data if this field in UDF is blank. And where specifically in SP will I put the code if I am pertaining on Journal Entry module
        Thanks
Vissia

Hi,
Try Below...
IF @transaction_type = N'A' AND (@Object_type = N'30')
BEGIN
if Exists ( select T0.TransId from OJDT T0 where  T0.Transtype='30' and
t0.transid = @list_of_cols_val_tab_del and (T0.UDF-NAME is null or T0.UDF-NAME= ''))
BEGIN
SELECT @Error = 1, @error_message = N'Please select UDF Name !!'
END
END
Apply this in sql server >>choose Data base>>Programmbility>>stored procedure>> SP Transaction notification>> Copy above code and paste and execute
Note: Above code is for header level UDF. If your udf is row level then just replace the table name OJDT by JDT1 in above code
Edited by: Deepak Tyagi on Sep 22, 2011 7:30 AM
Edited by: Deepak Tyagi on Sep 22, 2011 7:33 AM

Similar Messages

  • UDF is not updating in journal Entry rows

    Hi Experts,
    I have created an UDF in journal entry and trying to insert the values in it based on the transactions.
    But the UDF is not getting updated through coding where as same query if i run in the SQL database it is getting executed properly and UDF is getting updated.
    Please help in this regard
    Thank You
    Regards
    Md.nazeer Shaikh

    Hi,
    Please post the code that u are using.
    Vasu Natari.

  • R12 AP create account process success while no journal entries produced

    Hi,
    Enviroment:12.0.4
    in AP, the invoice validate and create account all done successfully. while to query journal entries, there isn't any produced journal entries.
    During the create account process, there is no error message, therefore i cann't find what is the problem.
    can anyone give me a guide to how to find the problem is?or what the problem is ?
    any help will be appreaciated.
    Regards,
    Chelsea

    just to give a background of this process in R12
    As we know there are two methods to create Payables Accounting in R12,
    1.Online Accounting method
    The Online Accounting method can be called from either the Invoice or Payment workbench and has the following modes:
    Draft - The accounting is only created in the XLA Subledger tables and is not transferred to the General Ledger. Draft accounting can be recreated based on changes to the transaction data or accounting rules.
    Final - The accounting is created in the XLA Subledger tables and is not transferred to the General Ledger. Accounting created in final mode can not be recreated/altered. Run the Transfer Journal Entries to GL program to transfer these entries from the XLA subledger tables to the General Ledger tables.
    Final Post - The accounting is created in the XLA Subledger tables and is also transferred and posted to the General Ledger tables.
    2)Create Accounting process.
    The Create Accounting process has similar options, you can create accounting in Final or Draft mode and if Final mode is selected, the Transfer to GL parameter can be used to automatically transfer the accounting created by the corresponding run. When the Create Accounting process transfers the journal entries to GL it only transfers the accounting created by the process that calls it. If there is accounting created by the online option = Final or a previous Create Accounting program that was not transferred, that accounting will not be transferred. The Transfer Journal Entries to GL program needs to be ran separately to transfer any accounting created online or created by a previous Create Accounting process that did not transfer the entries.
    Based on the above cases, the following are possible causes of journal entries not transferred in R12:
    1. The accounting is created in Draft mode and can not be transferred.
    2. The accounting is created in error and can not be transferred.
    3. The accounting was created by Online Accounting with Final Mode.
    4. The accounting was created by the Create Accounting process with Transfer to General Ledger = No
    Hope this makes a clear understanding and you know the root cause.

  • Remarks field in Journal Entry form

    Hi All,
      I am wondering how is created the Remarks field in Journal Entry form? It contains a string which describes the journal entry origin and sometimes it contains the Business Partner Code. I would like to know the origin table, field of the string (only the string without BP Code).
    I would like to write a query which contains all available TransType, and one string remark field for every TransType field.
    I wrote the following, but it is not good because the string contains Business Partners Code, more than one line for each TransType field, and doesn't contain every existing TransType type.
    SELECT DISTINCT convert(integer,TransType) As TransType, LineMemo from JDT1 ORDER BY TransType
    Thanks,
    Zoltan

    Zoltan,
    there is not any single table which determines the remarks or memo for Journal entry. in the documents from which, account posting happens (such as invoice) , you will find a field called jrnlmemo in accounting tab (in master table such as OPCH). also, the transtype in OJDT can help you build the case for your query.
    HTH,
    regards,
    Binita Joshi

  • How to update UDF from marketing documents to Journal Entry UDF

    Hi Experts,
    I have a UDF in the marketing documents and I want to save the value to Journal Entry UDF.
    Regards,
    Jummie

    Hello Jummie,
    If I understand correctly, the scenario is that copy the value of UDF from marketing document to the UDF its target JE from when the marketing document is created.
    if so, just listen to FormDataAdd Event for the marketing document, copy the value of udf when document is created.
    Here is the sample code.
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'You may add the target documents, 133 - A/R invoice.
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "133" _
                    And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
                'BubbleEvent = False
            End If
            'Before Action = false,
            'Update product item tree
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "133" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim objectKey As String = String.Empty
                    oCompany.GetNewObjectCode(objectKey)
                    MsgBox(BusinessObjectInfo.Type)
                    Dim oInvoice As SAPbobsCOM.Documents = Nothing
                    oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
                    If oInvoice.GetByKey(CInt(objectKey)) Then
                        'Retrieve the UDF value in documents
                        Dim udfValueInDoc As String = oInvoice.UserFields.Fields.Item("***").Value
                        Dim oJE As SAPbobsCOM.JournalEntries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                        'Retrieve the JE for the document
                        oJE.GetByKey(CInt(oInvoice.JournalMemo))
                        Dim succeeded = True
                        'add you code to copy the UDF from document into JE
                        If succeeded Then
                            'update the production tree succesfully,
                            oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
                        Else
                            oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                        End If
                    End If
                End If
            End If
        End Sub
    Regards, Yatsea

  • Script to update UDF in document to journal entries

    Hi,
    Customer is using 2007A PL30. In SAP B1, there is only 2 global analysis codes(ie Project and Profit Center) but customer has more information to analyse. We add UDF in document row(eg UDF=Customer)but after adding such UDF did not automatically flow to journal entries.
    May I know how to update those additional UDF in document row into journal entries as well so that the "Financial people" will be able to analyse company position by pulling these information in journal entries rather than from AR, AP, Incoming & outgoing payment etc?
    Regards
    Thomas

    Thomas,
    Out of the box the system is designed to take User field defined in the marketing document from the base marketing document to the target document when you use a Copy from or Copy to function.
    This will not work for JE's as JE is not a marketing document.  Updating JE through Transaction Notification might be possible but it is not supported by SAP as it is in violation of their Support agreement.
    Leaving the choice finally to create a SDK solution
    Suda

  • Manual journal entries created in Ap did not see in Accounts Payable Trial

    Hi Experts,
    Report Accounts Payables Trial Balance, with parameter Include SLA/Manuals/Other Sources Flag set to Yes, does not show manual journal entries.
    These Manual journals entries are created in AP
    Navigation: Payables -->Accounting --> Subledger accounting --> Journal Entries.
    Ofter creating the journal entries i ran Accounts Payable Trial Balance, when i go through the output i did not see the Manual journal entries which are created in AP.
    Please help me it is very urgent.
    Regards,
    Raju.

    Pl check your 'Report Defintion' once to ensure that liability accounts that you are using in manual entries are included in report definition.
    Regards,
    Tarun

  • I have two lists. The first is "Tasks", second is "Journal". I need a "Create Journal Entry" link in the Tasks list. How do I do that?

    Let's say I have a Task named "Build SSIS for Duke Energy" and it has another column called Active. Now every day I look at my task list and If I worked on that task I want to create a Journal entry of what I have done. So from the Task
    list I'd like a third column that calls the "Journal Entry" list's new form page and pass it in the ID of the task. I have found several TextToHtml scripts out there, but they have to be stored in a script library, and then sourced to a content
    editor web part. The problem is they don't fire when I have my list grouped. In addition to, every time someone creates a new view, I have to go in and add the Content Editor web part, point to the script....
    Any thoughts. It is the grouped view that really bug me.

    Hi,
    If you only want to add a hyperlink to create a Journal entry in the task list, I recommend to add a Hyperlink column in the task list and then create workflow to update the column.
    You can follow the steps as below:
    Open the task list, add a hyperlink column named Create Journal Entry.
    Create a workflow associated to the task list, start the workflow automatically when an item is created.
    Add actions as below:
    Then when a task is created in the task list, the workflow will be stared automatically to update the “Create Journal Entry” column.
    Thanks,
    Jason             
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How not to get a 'Journal Import Created' description at the Journal Entry Lines?

    For records loaded thru the Journal import,
    I always get a 'Journal Import Created' description at the Journal Entry Lines.
    Instead of this description, I want a
    more useful information which I may
    include at the GL_INTERFACE table
    possibly at the REFERENCE10 field.
    For those who will reply to this question,
    thank you very much in advance.
    null

    To populate this journal description, the Reference10 field must be populated in the GL_INTERFACE table.
    However, I have also discovered (version 11.03) that if you populate this field, but then import summarized journals, Oracle discards the value and reverts to "Journal Import Created" unless the value in the reference10 field is identical for all records to be summarized.
    null

  • Creating a file to be used by report ROIUH_LOAD_JEINTF for journal entry

    Hello everyone,
    My doubt is related to the PRA module -
    I have to create a file to be used by program ROiUH_LOAD_JEINTF for journal entry creation. There are other programs also creating a similar file to what I am expected to create.
    When I observe the existing programs, they have not used OPEN DATASET statement, instead directly used the TRANSFER dataset and then CLOSE DATASET.
    What that does is it creates a file on the app server in a different format with only 1 line even if there may be like 10 lines of journal entry. The file mainly contains # which seems like some internal coding by the system.
    When I tried using the OPEN DATASET statement, it wrote all the lines to the app server that were there in my internal table.
    However, when I do not use the OPEN DATASET statement, it creates a file with just one line and maily # instead of the actual data from internal table.
    Can any one explain what difference does it make to the system when we do not use the OPEN DATASET statement.
    You help would be highly appreciated.
    Thanks and Regards,
    Shipra.

    Hello Satish,
    Thank you for your response.
    I think I was not clear enough about my doubt. I do not have any confusion about what OPEN DATASET would do.
    In my case, there is a file being written to the app server without using an OPEN DATASET for OUTPUT statement. The Z program directly calls a TRANSFER statement.
    The file that is created on the app server looks like:
    7042008-11-01                   000200100840 ######RD##################203               #### #####10012888                #####RI01            MC3                                                                               
    This file is used by the program ROIUH_LOAD_JEINTF. There are several lines in the internal table for Journal Entry creation but only 1 line shows in the file. However, when you debug the program ROIUH_LOAD_JEINTF with the above filename, you would see that it takes up all the JE lines that were passed from the previous program (the Z program) which created this file.
    However, when I changed the Z program to have an OPEN DATASET statement, it had all the lines displayed in the file, the file was very readable.
    I just wanted to know how does the system write to app server when no OPEN DATASET statement is written in the program.
    Hope I am clear this time. Thanks again.
    Regards,
    Shipra.

  • B1if - Create a journal entry

    Hello everyone,
    i hope this is the right section for that scenario, which should be easy but i cannot get it to work. I am trying to create a simple journal entry with the given structure from the B1if Object list. It all works like a charm, except for the scenario when i am trying to use a business partner in the
    <AccountCode>K123456</AccountCode>
    results in: Exception : DI Error: (-5011) Invalid Account Code
    It is necessary for me, to be able to do so. Help is greatly appreciated. Here my full xsl. As of right now it is all hardcoded.
    <AdmInfo xmlns="">
    <Object>30</Object>
    <Version>1</Version>
    </AdmInfo>
    <QueryParams xmlns="">
    <JdtNum/>
    </QueryParams>
    <JournalEntries xmlns="">
    <row>
    <!--multiple such elements are allowed-->
    <ReferenceDate>12.08.2014</ReferenceDate>
    <Memo>Memo</Memo>
    <Reference>Ref 1</Reference>
    <Reference2>Ref 2</Reference2>
    <TaxDate>13.08.2014</TaxDate>
    <DueDate>13.08.2014</DueDate>
    </row>
    </JournalEntries>
    <JournalEntries_Lines xmlns="">
    <row>
    <AccountCode>K123456</AccountCode>
    <Debit>1.00</Debit>
    <Credit>0.00</Credit>
    <DueDate>13.08.2014</DueDate>
    <LineMemo>string</LineMemo>
    <Reference1>R1</Reference1>
    <Reference2>R2</Reference2>
    </row>
    <row>
    <AccountCode>102000</AccountCode>
    <Debit>0.00</Debit>
    <Credit>1.00</Credit>
    <DueDate>13.08.2014</DueDate>
    <LineMemo>string</LineMemo>
    <Reference1>R1</Reference1>
    <Reference2>R2</Reference2>
    </row>
    </JournalEntries_Lines>

    I found the solution myself. You need to use the <ShortName> for the business partner and in the <AccountCode> you need to put your Accounts Receivable account.

  • Include the Journal entry created in Incoming Payments PLD

    Hello Experts!!!
    Is there a way to include the journal entry created in the Incoming Payments PLD?

    hi jennifer,
    You can create query print layout designer report using query.
    SELECT
    T0.TransId, T0.BaseRef, T0.RefDate,
    T1.Account, T1.ShortName, T2.AcctName,
    T1.Debit, T1.Credit
    FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId and
    T1.TransType = 24 INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
    WHERE
    T0.BaseRef = '[%0]' or  T0.RefDate = '[%1]'
    Jeyakanthan

  • How to create a journal entries by sdk

    hi Experts
    I know how to create invoice or order by sdk . but I do not know how to create Journal Entry by sdk. i mean what fields are required. Plz send me a basic template for Journal Entry.
    Regards
    Gorge

    Dim oJounalEntry As SAPbobsCOM.JournalEntries
                ''Passing Jounal Entry
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecset)
                oJounalEntry = Me.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                oJounalEntry.Series = 14
                oJounalEntry.DueDate = Now
                oJounalEntry.ReferenceDate = Now
                oJounalEntry.TaxDate = Now
                oJounalEntry.Lines.ShortName = bpcode
                oJounalEntry.Lines.Credit = amount
                oJounalEntry.Lines.Debit = 0
                oJounalEntry.Lines.DueDate = Now
                oJounalEntry.Lines.TaxDate = Now
                oJounalEntry.Lines.ReferenceDate1 = Now
                oJounalEntry.Lines.Add()
                oJounalEntry.Lines.AccountCode = AccountCode
                oJounalEntry.Lines.Credit = 0
                oJounalEntry.Lines.Debit = amount
                oJounalEntry.Lines.DueDate = Now
                oJounalEntry.Lines.TaxDate = Now
                oJounalEntry.Lines.ReferenceDate1 = Now
                oJounalEntry.Lines.Add()
                lRetCode = oJounalEntry.Add()

  • How to default Ledger to SLA.: Create Subledger Journal Entry

    Here we have default the ledger for Data access sets , but also here not default the ledger.
    steps:
    1. AP-> ACCOUNTING
    Subledger Journal Entry Headers:
    Ledger[  ]

    Dear SAP Student
    It is just like inter unit cash transfers.  Also each department is spending cash on its own.  Now that I would like to know the balance cash departmentwise.
    As you said if I receive and pay through vendors I would be in a position to know only vendor wise balances.  It does not serve my very purpose of deparmentwise balance of cash. 
    I agree with Selva to go in for creating deparmentwise cash journals in the company code since each deparment is incurring expenses also and each department wise balance is also required. 
    Aravind

  • Error in creating GL journal entry

    Hi all,
    I'm looking for some help with an error code. I'm trying to Add a direct time entry that is currently saved in draft form only, and I encounter the following message:
    Error creating GL Journal entries: 10000415 - Linked value 1329 does not exist
    Presumably the 'linked value' refers to the first column of our time entry form, where we enter one of our old format reference numbers and sap brings back its own version of that reference number - so there must be a typo here somewhere? and if this is the case, is there a way sap will point out the relevant entry?
    Thanks

    HI.....
    Where you are saving this Journal Entry as Draft?
    Is it in Posting Voucher. If yes then is this entry still exists in Posting Voucher?
    Please check that first.....
    Regards,
    Rahul

Maybe you are looking for

  • Data not populated for Enhanced field

    Hello, I had done enhancement by adding field to the LO Datasource. Written the code in the CMOD to populate the data. When i run init it worked fine and i am able to see the data for the enhanced filed. When i run delta iam not able to see the data

  • Aluminum MacBook Speakers Pop in Bootcamp w. Vista Ultimate

    I have a new aluminum macbook that has an issue of the speakers popping whenever I use the windows vista bootcamp partition. I have the realtek mac os drivers from the cd installed, and I cannot find out how to stop the noise. The speakers will pop w

  • Error when updating blob column

    Hello, im using the SQL-Developer and i have problems with updating blob columns. I'm getting the following error: UPDATE "MED400_INSTALL"."AMEDN_INSURANCE_TEMPL" SET WHERE ROWID = 'AAM6j5ABGAAAADpAAJ' AND ORA_ROWSCN = '26019698898' One error saving

  • MBP superdrive

    I have the same problem. When I try to burn DVD+R disk (in my case Verbatim, if this makes any difference) I receive the following error: The drive reported an error: Sense Key = MEDIUM ERROR Sense Code = 0x73, 0x03 It is clear that this super drive

  • ESS Page not displaying toolbar icons after patching

    We just did a patch upgrade to our QA system and since patching, the icons that were associated with the "Timesheet Entry" page of ESS has reverted back to menu buttons i.e. "Menu", "Settings", "Cancel" etc.  Previously we had 2 icons only.  i.e. pen