A/R invoice (making udf mandatory)

Hi All Experts,
       I am trying  to make some UDF mandatory in A/R Invoice as object_type '13'  and transaction_type  'A' and 'U'.The problem is it not at all working and this invoice is sent for financial approval ,i am trying this  which is wrong query as
IF @transaction_type = 'A' AND @object_type = '13'
BEGIN   
if exists (Select T0.cardcode from oinv T0 where T0.U_Region is null and T0.DocEntry=@list_of_cols_val_tab_del)
     begin
          SET @error = 10
          SET @error_message = N'Enter Region'
     end
END
Can any one guide me with right query in repect to the approval  process.
Regards,
Inder

Hi!
Try this
IF @transaction_type = 'A' AND @object_type = '13'
BEGIN   
if exists (Select T0.docentry from oinv T0 where (T0.U_Region is null or T0.U_Region = '') and T0.DocEntry=@list_of_cols_val_tab_del)
     begin
          SET @error = 10
          SET @error_message = N'Enter Region'
     end
END

Similar Messages

  • Making UDF Mandatory

    Hello Experts,
    I want to make this UDF mandatory in my item master data. I was referring to: Making UDF's Mandatory .. I tried the code given there and it works!
    However, I also want to make another UDF mandatory in the Business Partner Master Data. I used the same code but it didn't work:
    IF @transaction_type = 'A' AND @object_type = '4'
    BEGIN
    If exists (SELECT T0.CardCode FROM OCRD T0 where T0.U_Telno is null and T0.CardCode=@list_of_cols_val_tab_del)
    begin
    SET @error = 10
    SET @error_message = N'Please Fill In Telephone Number'
    end
    END
    Where did I go wrong? Thanks in advance!

    After reading through some forums on SP, I went on to change the Object Type to 2 and redo the UDF and it works fine now.

  • UDF Mandatory

    Hi all,
    In UDF, can we create Mandatory fields?
    eg: if we are adding inventory transfer we need to set particular UDF field as mandatory, if we forgot to add that field it need to show error? is it possible?
    Remarks: i know by Customization Tools , mandaory field.
    i want to enter data manually or by FMS?
    Thanks
    Anish

    Hi,
    you can do it through SP transaction notification.
    Try following code (For example at Sales Order)
    UDF Mandatory at Sales order----
    IF @transaction_type IN (N'A', N'U') AND @object_type = '17'
    BEGIN
    If exists
    (Select t.U_AB From RDR1 t
       Where t.DocEntry=@list_of_cols_val_tab_del and t.U_AB = '-')
    Select @error = 1,
       @error_message = N'UDF is must '
    END
    You can change object type ,udf name and tables as per your requirment.
    Regards
    Deepak tyagi

  • Making field mandatory in ME21N

    Hi All,
    I need to make the Purch.Requisition field mandatory in the Purch.Order in ME21N.
    it should be mandatory only for one specific company code and DOCtype.
    ( like, mandatory only for CompCode 3000 and doctype NB ).
    the field name is MEPO1211-BANFN.
    Should i be using some screen exit or BADI for this purcpose.
    Thanks.

    Making PR mandatory based on Doc Type can be achieved via SPRO. The path is
    SPRO>Materials Management>Purchasing>Purchase Order>Define Screen Layout at Document Level. Create a new field selection based on your exisiting field selection or modify your exisiting one. It depends on your requirement. Click on Reference data, item You would find PR and some radio buttons. Click the one for Reqd Entry. Save.
    Once this is saved, go to SPRO>Materials Management>Purchasing>Purchase Order> Define Document Type. Enter the updated field selection from above in the document type row for which this change needs to be activated.
    Hope this helps!
    Thanks!

  • Effects of making PR mandatory while creating PO?

    Hi,
    What will be the effect of making PR mandatory while creating PO?

    Dear Ujjwal
    Go to SPRO-Material Managamant-Purchasing--Authorization Managmant-2) Define Functional Auth for buyers---Function Authorizations: Purchase Order Create New function Authority(02- PO With Ref to PR) Mark Ref to Purchase Req.As per require condition.
    Then Go to SU01 pass your SAP ID then goto select parameter and pass Parameter ID as EFB ,Parameter Value 02(as per your confi, and save.)

  • Why invoice currency not mandatory?

    Why is invoice currency not mandatory?
    For instance oinv.doccur is defined as nullable.  inv1 / rin1.currency too.  At the row level there are gaps in our data when zero amounts are entered.  You could argue that a zero amount has no currency yet there would be an intent of currency due to the parent oinv currency.
    Gaps in schema data become a pain (though small) at the reporting side of any system.

    Hi,
    B1 always look up document currency first. Unless you override with different currency in line level, it can be null.
    In your reporting, you need to use the same logic to check document currency first.
    Thanks,
    Gordon

  • UDF MANDATORY FOR SALES INVOICE

    Hi ,
    We have created a UDF (Type Date)
    U_Payment ,
    I want to restrict user to add Sales Invoice Without entering the Date in UDF.
    Please Help.
    Thanks,
    Anitha

    Hi Anitha,
    I am assuming that UDF is U_Payment:
    Please use this SP:
    ---Payment Mandatory for Sales Invoice--
    if @object_type='13' and (@transaction_type='A' or @transaction_type='U')
    begin
    if exists(select docentry from OINV where (U_Payment is null or U_Payment='') and docentry=@list_of_cols_val_tab_del)
    begin
    select @error=1, @error_message='Payment Date is Must'
    end
    end
    This Code will also Restrict user to update existing Sales Invoice.
    Hope This Help.
    Regards,
    Sudhir Sharma

  • Invoice making reference to several POs

    Hello Experts
    Is it possible to make an invoice (in MIRO transaction) making reference to more than one Purchase Orders.
    The issue is that sometimes, they need to create different POs for one purchase because they are allocated to different company codes. But then they receive one invoice for all these POs, so they would like to enter onces, making reference to all those POs.
    Thank you in advance
    Best regards!

    Hi,
    If its for a single Company code then u can achieve this, But in ur case POs belongs to different Company codes. One thing is u need to split the invoice amt as per the company code POs price or else ask ur Vendor to give the invoices based on the company codes or POs.
    regds,
    CB

  • UDF mandatory based on item group?

    Hello -
    Can someone help me make a user defined field in the BP mandatory only when certain item groups are selected on a sales order? The idea is that we have some products that we sell which require a license to obtain. I would like to force my employees to enter that information (license number and expiration) in the BP if one of those items is selected, knowing just eh groups of items is enough.  Ultimately it would be even much better if the expiration date of said license was check for validity as well...but I'd be happy enough knowing that the license was at least referenced.
    Looking forward to your help!
    Best regards,
    Rob

    I assume the UDF-s are row level UDF-s, because they are connected to the item.
    You need two FMS to set the row level UDF-s according to the item and partner and some code in the SBO_SP_TransactionNotification procedure to prevent adding the document, if it contains an overdue expire date.
    With your real UDF names try to connect the next queries to the U_expiredate and U_licencenumber  fields autorefresh according to the itemcode:
    IF (Select i.ItmsGrpCode from OITM I Inner join OITB g
          on i.ItmsGrpCod = g.ItmsGrpCod Where i.ItemCode=$[$38.1.0]) in ('zyx','xyz')
       Select p.U_bpexpdate from OCRD p where p.CardCode=$[$4.1.0]
    IF (Select i.ItmsGrpCode from OITM I Inner join OITB g
          on i.ItmsGrpCod = g.ItmsGrpCod Where i.ItemCode=$[$38.1.0]) in ('zyx','xyz')
      Select p.U_bplicensenumber from OCRD p where p.CardCode=$[$4.1.0]
    Else Select u2018000000u2019
    and insert this in your  SBO_SP_TransactionNotification stored procedure after the line
    --     ADD     YOUR     CODE     HERE )
    IF @transaction_type IN (N'A', N'U') AND @object_type = '17'
    BEGIN
    If exists
    (Select t.Price From RDR1 t
       Where datediff(d,t U_expiredate,getdate())> 0 and U_licencenumber != u2018000000u2019
            and t.DocEntry=@list_of_cols_val_tab_del)
    Select @error = 1,
       @error_message = N'Licence expired ! '
    END

  • UDF mandatory for specific sales/purchasing doc.

    Hi,
    Is UDF can be made mandatory for a specific sales/purchasing document ?
    Jeyakanthan

    Hello,
    Once UDF has been defined with mandatory checked, It will affect all relevant documents.
    You can use approval procedure to monitor this for specific documet types.
    If the UDF is in header level, you also can use query to set up an approval procedure to trigger it if the field is empty.
    Hope this helps.
    regards,
    maggie An
    SAP Business One Forum Team
    Edited by: Maggie An on May 30, 2008 11:05 AM

  • Making fields mandatory

    Hi Gurus,
                  I want to make fields mandatory such as doc. header text , reference in F-02 for all doc. types . So that I can get reports using these fields. Can anybody tell me how can I do (making these fields mandatory) by using SPRO.
    Thanks

    Hi,
    if the fields are available in the field status group assigned to account master data you can make it mandatory by setting it as a "required entry". Caution: every acc. number using this field status group has this field as a mandatroy entry, maybe you have to define add. fiels status groups for only a few accounts where this required entry is necessary.
    In Customizing it can be found by searching for "field status variants" which contains all the "filed status groups". The variants are assigned to each company code.
    BR Christian
    Edited by: Christian Ortner on Jan 22, 2010 1:37 PM

  • Making RFQ mandatory for creation of purchase order

    Hi,
    I need to set up the following:
    1. For specific purchase order document types, RFQ should be mandatory i.e. it should not be possible to create purchase order before RFQ is created.
    2. Purchase orders can be created only if RFQ is approved.  How can i set up the release strategy in RFQ?
    Thanks in anticipation of your reply.

    Hello Sameet,
    1. You can use default parameter EVO to make the RFQ manadatory for purchase order. In the parameter you need to flag mark "reference to reference document " indiactor on Fast processing tab and assign this parameter to the user profile.
    2. For setting up RFQ approval process, please follow the steps:
    You must perform the following steps:
    1.  Create characteristics and classes
            For more on this topic, see Edit Characteristics and Edit Classes.
    Note
    If you wish to link your release procedure to workflow, you must perform steps 2 and 3. You make these settings in Customizing for Business Workflow (Basis -> Business Management).
    Otherwise, continue with step 4.
    2.  Define organizational plan
            For more on this topic, see Edit Organizational Plan.
    3.  Assign standard tasks and activate event-receiver linkage.
            For more on this topic, see Perform Task- Specific Customizing.
    4.  Set up release procedure for RFQs
        a)  Create release group
        b)  Create release code
        c)  Create release indicator
        d)  Create release strategy
    Hope this helps
    Regards
    Arif Mansuri

  • Making Classification Mandatory

    Dear all,
    I've created a class with characteristics for my vendor master. How can I make this classification assignment mandatory upon vendor master creation via XK01, MK01 and FK01? So that users would have to assign a vendor to a class thus entering the mandatory characteristics.
    Please assist.
    Thanks!

    used user exit.
    asation.
    write code vaild
    user exit SAPMF02K
    sample code
    IF I_MSEG-SOBKZ = 'E' AND I_MSEG-KZBWS IS INITIAL.
    MESSAGE E002(ZSD01).
    ENDIF.

  • Making Requester Mandatory in PO Distributions

    Hi,
    We have a requirement to make the Requester field mandatory in the PO
    Distribution screen. I used forms personalization to make the required
    property of that field to True.
    But, when i create a new PO, PO line and save it, it does not validate the
    field in the distributions screen. The field is required ONLY when i
    navigate to the screen. Is there a way we can achieve this?
    Thanks,
    Ashish

    Hi... Try this...
    1. Please goto SPRO>Material Management>Purchasing>Purchase Order>Define Screen layout at Document level
    2. Choose "Me21n" and select "Details"
    3. You will be listed with a bunch of "Field Selection Group", double click on them and look for the specifc field label you are lookin for.
    4. choose "Reqd.entry" for the field label.
    Hope this is helpful
    Regards,
    kumara

  • INVOICE MAKING PROCEDURE IN MM

    HI,
    How can make the invoice in mm and explain the steps to create the invoice and forward me one copy of developed invoice.
    thanks
    sujatha

    Hi Sujatha,
    Are you in the right forum? I think you get more aswers in an other SAP Solution.
    Kind regards,
    Sjoerd Lubbers

Maybe you are looking for

  • Check For Null ResultSet

    i need to do an if statement that if the resultset is not null do condition1 and if it is null...do condition 2... does anyone know how todo this?

  • SharePoint 2013 Search - Disaster Recovery Restore

    Hello, We are setting up a new SharePoint 2013 with a separate Disaster Recovery farm as a hot-standby.  In a DR scenario, we want to restore all content and service app databases to the new farm, then fix any configuration issues that might arise du

  • OS Language change

    I have purchased a G710 Laptop in France and was told I could change the OS to English, I have downloaded  Windows 8.1 in English but how do I change the OS from French please 

  • Installing Application

    Hi, Is it possible to install an application that is not in the ITunes Store? The thing is that I need to set up a password generating application to generate password to connect to my office VPN. And another question. Anyone can help me please with

  • Help! While downloading Lion, I lost WIFI and got error message  . . .

    While downloading Lion, I lost WIFI and got error message "An error has occurred." Tried to re-download and the dowload icon says "OSX Lion--Waiting . . . " Please help!! What should I do?