Creation of mandatory UDF in A.R Invoice

Dear All,
I am facing the problem for mandatory field creation.
Even i write this below code when adding A.R Invoice it mandatory field is not working.
alter proc SBO_SP_TransactionNotification  
@object_type nvarchar(20),     -- SBO Object Type 
@transaction_type nchar(1),   -- [A]dd,  <u>pdate, [D]elete, [C]ancel, C[L]ose 
@num_of_cols_in_key int, 
@list_of_key_cols_tab_del nvarchar(255), 
@list_of_cols_val_tab_del nvarchar(255) 
AS 
begin 
-- Return values 
declare @error  int    -- Result (0 for no error) 
declare @error_message nvarchar (200)   -- Error string to be displayed 
select @error = 0 
select @error_message = N'Ok' 
if @transaction_type = 'A' and @object_type = '13'
begin
if exists(select T0.docdate from OINV T0 where T0.docentry = @list_of_cols_val_tab_del and
T0.U_EnvUbTm = null )
begin
select @error = 100, @error_message = N'You need enter value to the UDF'
end
end
-- Select the return values 
select @error, @error_message 
end
Please help me.
Thanks in Advance.
Edited by: vivek.Y on May 18, 2011 1:57 PM

Hi Vivek......
Try this one......
If @object_type='13' and @transaction_type='A'
BEGIN
if exists(select T0.docdate from OINV T0 where T0.docentry = @list_of_cols_val_tab_del and
T0.U_EnvUbTm Is null )
BEGIN
Select @error = -1,
@error_message = 'You need enter value to the UDF'
End
End
Regards,
Rahul

Similar Messages

  • Mandatory UDF for A/P Invoice

    Hi Experts,
    I have created a UDF U_BillNo in the header lever of marketing documents and kept it as a mandatory field.
    We need to enter the bill no for A/P Invoices at the time of posting.
    What i want is the person cannot post the invoice untill the bill no is entered.if the person didnot enter the bill no means then it needs to show a msg that u cant post invoice without bill no and the billno needs to be refreshed after posting the invoice.
    Pls tell me how to acheive this thru FMS.
    Thanx in advance,
    Best Regards,
    Vamsi.

    Hi Vamsi,
    it is possible on Stored Procedure.
    Try to create this Stored Procedure in TEST Database.
    A/P Invoice Object Type = 22
    if @object_type = '22' and @transaction_type = 'A'
    BEGIN
    if exists (SELECT T0.U_BillNo FROM OPCH T0
    WHERE T0.DocEntry = @list_of_cols_val_tab_del AND T0.U_BillNo=' ')
    begin
    select @error = 1, @error_message = 'you cant post invoice without Bill No'
    end
    end
    OR
    if @object_type = '22' and @transaction_type = 'A'
    BEGIN
    if exists (SELECT T0.DocNum FROM OPCH T0
    WHERE T0.DocEntry = @list_of_cols_val_tab_del AND T0.U_BillNo ISNULL)
    begin
    select @error = 1, @error_message = 'you cant post invoice without Bill No'
    end
    end
    Regards,
    Madhan.

  • Populate a UDF on a AR Invoice

    Hi,
    I have a UDF on an AR Invoice which I need to populate with the AR Invoice Cardcode automatically when I enter the Cardcode on the invoice.
    How do I reference this in a query on the formatted search?
    I remember that I need to reference the field Cardcode as a number but can't remeber how to do this.
    Help please
    thanks
    Mark

    use the following code
    Select $[OINV.Cardcode]

  • Creation of UDF in the AP Invoice Header

    Dear All,
    We would like to create UDF and Link with Formated search for the List of Customers in the AP invoice. The Idea is to capture for which customer the AP Invoice is made.
    Can any body help. We tried creating in the Title of Marketing document but it is getting reflect both in AR and AP Invoice. We want that field to be mandatory.
    Help.
    regards
    siva

    Siva
    When you create a UDF at the Marketing document header, it creates it for all marketing document both AR and AP.
    You could Open the AR document Press CTRLShiftB and uncheck VISIBLE on the user field.
    The formatted search query would be
    SELECT T0.CARDCODE, T0.CARDNAME FROM [DBO\].[OCRD\] T0 WHERE T0.CARDTYPE = 'C'
    Suda

  • How to Make Field "Creation Date" Mandatory (in EP Selection Screen)

    Dear experts,
    I am on SRM 7.0.
    In Shopping Cart, i'd like to set Field "Creation Date" as Mandatory Field in EP Selection Screen / Criteria Maintenance.
    Is there BADI or SPRO need to be maintained?
    Thanks & regards,
    Jack
    Edited by: Jack4ever on Aug 9, 2011 7:42 AM
    Edited by: Jack4ever on Aug 9, 2011 7:43 AM

    Hi Jack,
    Not sure if it possible in standard with any customizing but it might be able to achieve this through webdynpro enhancements.
    Regards,
    Prasanna

  • Creation Of Credit Memos and Applying to Invoices Using API in Payables

    Hi Guys,
    I have a requirment that when ever I create an AP invoice with VAT . I need to create a credit memo with the vat amount aganist that invoice Line and supplier.I adopted the process to create an alert and i will write a interface for this this.I will call the interface procedure inthe alert.Here the problem is i am able to create credit memo but the amount is not applying to invoice.i.e., amount of the main invoice is not reducing. If U guys have any Idea regarding the credit memo applying to invoice using interface,please let me know.
    Thanks In Advance,
    Naresh
    Edited by: Naresh on Sep 23, 2010 5:58 AM
    Edited by: Naresh on Sep 23, 2010 6:01 AM

    we have to link the CM thru PARENT_INVOICE_ID (Parent Invoice).

  • Making Text ID mandatory in Invoice

    Hi Folks,
      Can some one tell me how can you make a TEXT ID mandatory while saving/creating an Invoice( SD Billing Doc) T code VF01/Vf02
    I can see that we can make text id mandatory in sales doc , but we can not for an Invoice. Requirement we  got is to make user commnuity enter a Text Id mandatorily before posting an Invoice. We can not make texd id mandatory in Sales Doc since there are documents which will have blank text types too.
    Is there an exit or any other solution for this problem..I could n't see the text ids in the exit I found . Any help would be appreciated. Thanks, Amit

    Hello Amit
    I am not asking you to make the text mandatory in preceding sales document.I understand that the users must be having the information for text only at the time of billing which they cannot enter at the time of sales order/delivery creation.
    You can put a code in the copying requirement so that at the time of creation of invoice users get the error if the relevant text is missing in order/delivery.The user will not be able to create a billing document without that information.Therefore you will not have to make text mandatory in sales documents at the same time you can ensure that proper text flows to the invoice.
    I will not recommend any checks or error  at the time of  invoice saving through user exits in billing documents...The reason being that most of the time SAP will skip the invoice numbers and every time you get an error you will miss an invoice number.This will generate gaps which is not allowed legally in most of the countries.You can try user exit in includes RV60AFZZ
    Hope it clarifies.
    Thanks
    Vikas

  • UDF at header level will not auto refresh before & after adding the invoice.

    Hi All,
    I have a FMS query in the UDF at AR Invoice header level. I have set the FMS query to auto refresh when tax rate field changes but the UDF doesn't auto refresh when there is a tax code in the document.
    I will need to add the invoice first then open the added invoice and press shift+F2 to get the calculated amount in the UDF to update the invoice.
    How to get the UDF to auto refresh whenever the tax code has changed? Or after the invoice has added?
    The FMS query:
    SELECT sum(T0.[TotalSumSy]) FROM INV1 T0 inner join OINV t1 on t1.docentry = t0.docentry WHERE T0.VatGroup in ('SR','DS','AJS') and t1.docentry = $[OINV.docentry]
    Thanks & BR,
    Leng

    Hi,
    I solved the problem following the steps in SAP note 633285 - Printing the total Vat amounts in each Vat group, https://websmp130.sap-ag.de/sap/support/notes/0000633285
    In order to print  in the  order  the Vat amount  in each vat group Please perform  the followed stages:
    Go to Tools (in the SBO tool bar ) and chose Manage User Field
    In Marketing Documents (Rows) add new fields according to the Num of the vat groups that you are using in Orders (e.g. A1, A2 ,A4) The type : Units and Totals  - the Structure: sum in the order each column will represent the vat amounts in the line but only for certain  Vat Group
    in order that each column will display the vat amount in the line only if it belong to certain Vat group we attach a query to each column: (e.g. we have 3 columns : A1, A2, A4) .the queries are;
    SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A1' FOR BROWSE  SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A2' FOR BROWSE SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A4' FOR BROWSE Now each column will display the vat amount only if it in the relevant vat group
    in the order document printing template you need to add those Vat column in our example we add 3  data fields : the file: Order - Rows , the Field: A1/A2/A4 - you can hide (un visible ) this columns as needed
    in the Repetitive Area Footer add a calculation field for each vat groupthe Type: Column Total , the Column: Order; A1/A2/A4 in each calculate field you will get the sum amount of the vat in the relevant Vat group. (in  addition you can add text fields with a relevant description for the calculation fields)
    Thanks & BR,
    Leng

  • JAVA iso9660/UDF file system creation

    Is there a class or utility in JAVA that will allow the creation of an iso9660 file system for CD's and/or the creation of a UDF file system for DVD's? I am looking for such a class to incorporate into an applcation that is currently under development, and would rather not have to write our own.
    Thanks.

    Is there a class or utility in JAVA that will allow the creation of an iso9660 file system for CD's and/or the creation of a UDF file system for DVD's? I am looking for such a class to incorporate into an applcation that is currently under development, and would rather not have to write our own.
    Thanks.

  • Auto excise invoice creation

    Hi all
    I have done  following setting for auto excise invoice creation
    A) Maintain  excise  group : Checked excise invoice during billing : Check box  flaged
    B)Define accout in account detrmination : If We create it manually perfectly working
    C)business transaction : outgoing excise inovice : add one entry for sale area IN01/01/02  shipping point : INVE & Plant : PVVE ,excise group : EV & excise series ES  & export colulm kept blank beacise this domestic sale area
    But after creating billing document ( t_code  :vf01  doc_typ: F2) excise invoice  is not genrated automatically .
    Reques you all to suggest  why  excise inovice is not created ?

    Hi
    You will have to maintain Default Excise Group and Series Group in IMG> LO General>Tax on Goods Movement> India>Business Transaction>Outgoing Excise Invoice>Maintain default Excise Group and Series Group.
    Also Maintain the  Assign Billing Type to delivery Type.  IMG> LO General>Tax on Goods Movement> India>Business Transaction>Outgoing Excise Invoice>Assign Billing Type to delivery Type.
    Maintain it and then try to create.
    Regards
    Amitesh Anand

  • Making creation profile filed mandatory

    Hi,
    I want to make creation profile (EKPO-ABUEB) field mandatory in scheduling agreement. In the screen layout setting this field does not appear. How can I set this field as mandatory field
    Regards

    Hi
    Here is a alternative.
    Release creation profile is defaulted in Scheduling agreement through vendor master record.
    You can make release creation profile mandatory for the account group.
    In this case system will automatically default the release creation profile in SA.
    Regards
    Girish

  • Formatted Search Querry for UDF

    Dear All,
            My client is using SAP B1 2007 B PL10. Now I am facing a issue like, I have made a UDF in the A/P Invoice Form and hence made it mandatory. But when i make a UDF field as mandatory I have to write a particular default value.  Hence i have written default Value as 0.
          Now whenever i open the A/P Invoice Form,  the mandatory UDF Field is showing default value as 0. But I want to write a Formatted Search Based Querry in a way that the UDF Field should become Nil whenever I Open the A/P Invoice Form.
          Please guide me in writing the Formatted Search Querry by which the UDF Field which is having a Default Value as '0' should become Nil.
        Regards
    Hitesh Parsawala

    Hi Hitesh ,
    You have two option :
    1.Either donot make ur UDF mandatory at the time of creation
    Use sp_transaction notification to validate
    2. Define UDF manadatory at the neginning
    if user donot change the value , triggger approval procedure through FMS
      I think it is
    Select Distinct 'True' from tablename where <userdefined field =''i
    If user donot change, it is going to triger approval procedure
    <You can look for code in forum if that is not working >
    Hope this helps
    Bishal

  • Manual billing event creation using form(Bill,revenue)

    Dear Dina,
    During Manual billing event creation the mandatory columns have set by oracle as Bill amount and Revenue Amount need to be filled, always this bill amount and revenue amount is going to be the same amount.Also for the advance,invoice,retention for all the cases it needs to be filled..what z the purpose behind it??
    what it z indicating???Kindly help me to understand...
    thanks a lot n advance....

    Hi
    The revenue amount of the event will be included in the draft revenue.
    Draft revenue accounting is -
    Credit Revenue
    Debit UER (unearned revenue) or UBR (Unbilled receivables). The system will choose one of those accounts, based on the balance between total revenue and total invoices on that project. When total revenue exceed total invoices sytem debit UBR.
    The invoice amount of the event will be included in the draft invoice.
    Draft invoice accounting is -
    Credit UER or UBR (depends on the balance of both).
    Debit the Receivables account
    Dina

  • Depot sales invoice issue

    Dear SD consultants,
    I am working on depot sales scenario.
    I craeted SO, Delivery .
    While craeteing excise invoice i am using the invoices sent by mfg plant .
    Whils saveing it is not creating any excise invoice and giving message " RG23D updataed , depot excise "
    I activated folio tck in config , but it suppose to craeted excise invoice for depot.
    request your feedback
    Thanks  in advance
    A.Gururajan

    Hi,
    Thnaks for mail
    I activated the palnt as depot also folio nos also activated.My qn si when i execurte J1Ij i am refereeing the invoice sent by facotry and while saving getting the abiove message but system supoopose to give the excise invoice no
    But it is not happening
    pl reply
    or tell me the step by step depot sale process
    I have done SO, Delivery and Excise invoice creation in J1iJ ( i refereed the facory invoices ) and whil saving it is not generating the excise  invoice with number
    Pl reply
    Thanks
    A.Gururajan

  • Excise invoice -removal time

    hi,
    in excise invoice printout we need to print date & time of issue & removal
    BUt in J1ip There is no option to enter this date & time pl suggetest
    is there any field where we can enter this date & time of issue & removal so that it gets printed in excise invoice.

    Do you want to mannually put the time of issue in the system if no than you can take the time from creation of delivery and get printed on invoice by help of abaper and for excise invoice there is a field in j1iin
    REMTIME in table J_1IEXCHDR it can taken .
    Regards,
    Manu

Maybe you are looking for