Copy invoicenumber to customer ref. no.

Hello,
For banking purposes I need the invoicenumber in the customer ref. no.
For this I use a formatted search in the invoice form. So far, no problem.
But now I want to use the automatic summary wizard to make invoices from deliveries. Here I cannot copy the invoicenumer to the customer reference.
What can I do? Do I have to make an add-on, a query, or is this a setting somewhere? I'm using 2004, is this different in 2005?

Hi,
You could do the following:
Go to the SQL Server Enterprise Manager. Open your database, go to stored procedures. There open the SBO_SP_TransactionNotification called one.
There is already some code here. Look for a commentary that says "Add your code here" or something similar. There you should paste the code bellow:
IF (@object_type ='13' ) and (@transaction_type = 'A' )
begin
   update OINV
   SET NumAtCard = T1.DocNum
   FROM OINV T1
   WHERE T1.DocEntry = @list_of_cols_val_tab_del
end
More info:
13 is the invoice object type. For more object numbers see DI API.
A is about dding. The other options are U for Update, D for Delete, C for Cancel, L for Close.
IMPORTANT: We are not supposed to do direct updates to the database. They are not supported by SAP.
Regards,
Ibai Peñ

Similar Messages

  • Copy Customer Ref No to Vendor Ref No when create back to back Order

    Hi,
    I would like to copy Customer Ref No to Vendor Ref No when create back to back Sales Order to Purchase Order.  Please suggest a way.
    Does i need to do before form add?
    If BusinessObjectInfo.FormTypeEx = "65" And BusinessObjectInfo.BeforeAction = True Then
    End If
    Please help!
    Regards,
    Anna

    Hello Anna,
    You should update purchase order (copy the customer no ref to the vendor ref) after action (pVal = false), see the sample code here.
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "65" _
                    And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
            End If
            'Before Action = false,
            'Update purchase order
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "65" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD ) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim objectKey As String = String.Empty
                    'Get the purchase order key added right now
                    oCompany.GetNewObjectCode(objectKey)
                    Dim oPurchaseOrder As SAPbobsCOM.Documents = Nothing
                    oPurchaseOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
                    If oPurchaseOrder.GetByKey(CInt(objectKey)) Then
                        Dim oLines As SAPbobsCOM.Document_Lines = oPurchaseOrder.Lines
                        Dim salseOrderNum As String = oLines.BaseEntry
                        'add you code to get the custoemr ref of the sales order and set it the purchase order
                        lRetCode = oPurchaseOrder.Update
                        If lRetCode = 0 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
    Kind Regards
    -Yatsea

  • Blocking of Duplicate Customer Ref Number in AR Invoice

    Good Morning Experts,
    Just want to know how to block duplicate customer reference number in AR Invoice Entry.  System is currently give message that "Customer ref number already exists in this document type..". 
    My set up for Document Remarks Include in Document Settings is BP Reference Number.  Is there any additional set up that needs to be done so that system will block duplicate reference number?
    Version SAP 2007A
    PL 30
    Localisation Australia/New Zealand
    Thanks
    Sandra

    Hi
    You can try this sp_transaction notification : Copy the given code to store procedure sp_transaction notification where it says --add code here
    if (@object_type = '13' or @object_type = '15')
    and (@transaction_type= 'A' or @transaction_type= 'U')
    begin
    declare @venno as varchar(100)
    if @object_type = '15'
    begin
    select @venno = NumAtCard
    from opdn
    where docentry =@list_of_cols_val_tab_del
    if 1 != (select count(docentry) from ODLN with(nolock) where NumAtCard = @venno)
    begin
    select @error = 1
    select @error_message = 'Duplicate Customer ref no in SO Receipts. ! '
    end
    end
    else
    if @object_type = '13'
    begin
    select @venno = NumAtCard
    from opch
    where docentry =@list_of_cols_val_tab_del
    if 1 != (select count(docentry) from OINV with(nolock) where NumAtCard = @venno)
    begin
    select @error = 2
    select @error_message = 'Duplicate vendor ref no in AR Invoices. ! '
    end
    end
    end
    This will block the transaction when you have duplicate customer reference . It will let you put same customer reference in Sales order  but it will block from delivery
    <b>Please test it in test environment </b>
    Thank you
    Bishal

  • Customer Ref No in PLD (Outgoing Excise Transaction)

    Hi,
      How do I get the Customer Ref No in Out going excise transaction PLD..? I do copy it from the Delivery Transaction. I'm Using SBO2005(B)
    Thanks and Regards,
    Aditya

    hi aditya,
    Add a database field in PLD,double click it--> In properties
    select source type database,
    select delivery from table,customer/vendor reference number
    Check it & let me know.
    Jeyakanthan

  • Customer Ref. No. to document the Customer PO

    The customer uses the Customer Ref. No. field to document the Customer PO No., and would like to copy this field to the Delivery and then to the Invoice, to appear in the same field in each document.
    How Can I do this?

    Sibasish,
    The posts above explain how to get the Ref No on target documents in a one to one scenario.  However, I think you might be asking how you copy the Ref No field to targets when you are consolidating multiple documents into one.
    Example:
    You have 3 Orders for the same customer, each with a different Ref no.
    You want to copy all of them to 1 Invoice, but keep the Ref No.s from each Order on the Invoice
    You'll need to create a formatted search to pull the Ref No down to the row.
    1.  Create a UDF on the row of marketing documents called "Ref No." or something similar
    2.  Write a query to pull the Ref No. down to the row
    3.  Attach the query to the Ref no. field on the row with a formatted search
    Now, when you add items to Orders, you'll have the Ref No on each row, which will get copied over to terget documents whether you consolidate them into one or don't consolidate at all.
    Hope that provides a little extra insight,
    Brad Windecker

  • When I duplicate or copy slides, my custom theme images turn into question marks.  Why, and how can I copy themes with slides?

    When I duplicate or copy slides, my custom theme images turn into big grey boxes with an 'x' through them and a question mark in the middle in their new destination.  When I go look at the master slides, I see that there are now two sets of masters, one for the my custom theme and a new one just like it, but with no images.
    How can I copy (or duplicate) my slides?

    OK, got it ...  the Power ON Factory reset procedures might have changed with GB ... 
    To get to a Factory reset using the Power up method:
    1.  Power Off phone
    2. Press & Hold the HOME Button
    3. Press and Hold the Power ON button.
    You come up to the Triangle with the Exclamation mark & android guy.
    Press BOTH the Up and Down Buttons at the same time.  This brings up the Blue menu of options.
    use the Up/Down arrows to scroll thru the choices. Press the POWER Button to Select the menu item you choose.
    You can harmlessly test this and just choose to Reboot without doing anything, just to see how it works in case you ever need to do this in the future.
    edit:  It was concluded in the test group that they changed this process to align it with the new DX2 as the camera button isn't hard-wired like it is in the DX. So likely they just wanted to make this process the same for both platforms.  At least it sounds like a good reason...

  • [PLEASE HELP] Display Customer Ref. No. in Pick List

    Hi,
    We are trying to display Customer Ref. No. (from Sales Order / Res. Invoice) in the pick list.
    I have created a new UDF in the PIck List row.
    But I am not sure what is the correct query to use to call this out so I can link it to the UDF.
    Could someone please help us?
    Thank you very much.
    Edited by: Anfernee Chang on Nov 21, 2011 5:53 AM

    shafi_sunshine wrote:
    Hi ,
    >
    > Try This....
    >
    > You can  use FMS
    >
    >
    > SELECT $[$14.0.0]
    >
    >
    >
    > Thanks
    > Shafi
    Hi shafi_sunshine,
    I have tried both of the following queries,
    SELECT $[ORDR.NumAtCard]
    SELECT $[$14.0.0]
    but it's hasn't worked. It returned the following error in the pick list screen
    Internal error (3006) occurred.
    Thank you.

  • How to avoid duplicated customer ref. no when create new sales order?

    Hi,
    In my company, we need input customer ref. no when create a new sales order, but I found there was no any validation to avoid input a existed number.
    Can somebody show me how to add some check function on this filed?
    thanks.

    Hi,
    This can be handled in standard system.
    Go to Administration> System Initialization> Document Settings>Per Document (Tab)> Select Sales Order-->Tick Block release (When duplicated  customer reference no. occurs).
    Thanks,
    Joseph

  • To create a formatted search with customer ref no.

    Hi there, I am new to formatted searches and I am trying to do the following:
    on the delivery docket when the customer ref no is filled in I want this to populate a UDF called ordr_U_CAllREF
    I have the udf created and it is called Cust Ref.
    can someone please give me some tips on how to create this please?
    thank you.
    E

    Hi Edel,
    Try this.
    Select $[ORDR.NumAtCard.0]
    Save above query in query manager and go to Sales Order Form and put cursor on U_CAllREF UDF and press Alt+Shift+F2 and it will ask you to link the query by using 3rd option and simply link this FMS to U_CAllREF.
    Hope this will help you.
    Regards,
    Rahul

  • What does Customer refer to in  the following script?

    What does Customer refer to in the following script? Is it a class name?
    What does return refer to?
    public class Order
    +{+
    +// ...+
    public Customer getCustomer()
    +{+
    return (Customer)m_cacheCustomers.get(m_customerId);
    +}+
    +// ...+
    +}+
    Thank you

    jetq wrote:
    What does Customer refer to in the following script? Is it a class name?
    What does return refer to?
    public class Order
    +{+
    +// ...+
    public Customer getCustomer()
    +{+
    return (Customer)m_cacheCustomers.get(m_customerId);
    +}+
    +// ...+
    +}+
    Thank youHi Frank,
    in this example the Customer is the Java class of objects which are put into a cache and is not Coherence specific at all. This is just the return type similarly to how a (stored) function in Oracle may return a row-type containing multiple values.
    The return is a Java keyword which in a non-void method instructs the JVM to return the value of the expression following it from the method as the method return value if an expression follows it, and in a void method it simply returns from the method (no return value in this case, similarly to stored procedures).
    Sorry for my saying so, really no offense intended, but judging from your questions you might want to attend at least a beginners Java course.
    Best regards,
    Robert

  • Need an alert for Customer Ref. No on Sales order.

    Dear All,
    I have a question concerning Customer Ref. No. tab in the Sales Order.  We use this tab to enter the customers PO number.  if I create and save a Sales Order with a PO number, is there a way to ALERT me when I try to make a new Sales Order using the identical PO number as previously saved. 
    e.g. I have a SO#1 Customer Ref. No is #10. Then I have a SO#5 Customer Ref. No. is #10 too. When I type in #10, is there anyway to pop-up me an ALERT to let me know I have #10 for SO#1 already?
    Thanks.
    Yuka

    Hi Yuka,
    Check below code in SP_Tran
    If @object_type = '22'
         begin
              Declare @refcli as nvarchar(2)
              Select @refcli =
              (SELECT top 1 T0.NumAtCard
              FROM OPOR T0
              where T0.docentry = @list_of_cols_val_tab_del
              order by NumAtCard
              from OPOR where docentry = @list_of_cols_val_tab_del
              if @refcli='' or @refcli is null Or @refcli=@refcli
              begin
              set @error = 1
              set @error_message = 'No vendor References !!! Or vendor References is Already exists!!!'
         end
    end
    Hope this will helps you.
    Thanks,
    Sachin

  • A text on the invoice header It is copied from the customer master

    Hi need to create a text in smart form the requirement is as below
    It’s a text on the invoice header.It is copied from the customer master to the order than to delivery and finally on the invoice.
    Regards
    Rasheed

    Hi!
    You have to write a code in your SMARTFORM for this.
    First you have to read the customer master data from the table KNA1.
    Then you have to read from the SD order and invoice, this can be found in table VBPA.
    Regards
    Tamá

  • PLD report customer statment not showing Customer Ref No

    I am having an issue with PLD report Customer Statment,
    there is a box for the customer reference number but it comes up blank each time.
    i tried multiple times to solve this issue with each time getting closer but never successfully solving the issue.
    This is a system report and when i look for the inner value instead of seeing database i see FREE TEXT
    i am guessing because the value is hardcoded.
    I have tried to call the OINV.NUMATCARD directly on the field, and saw that  field was not available.
    This report was fine in 2005 now that we are in 2007 the field is left blank.
    before posting to sap i wanted to know if any of you have had this issue.
    Relevant Answers will be awarded points.
    Thanks.
    Edited by: Sebastiano Todaro on Jan 13, 2009 4:04 PM

    Hi,
    Are you trying to Print Preview using the template Customer Aging Report (One page per customer) and find that the BP reference Number is empty?
    Have you tried to check the Print Preview by double clicking on the customer row, open the Customer Receivables Aging - Details window, and preview the report using the same
    template?
    You can refer to Note No. : [1248669|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1248669]
    Regards,
    Jitin
    SAP Business One Forum Team

  • Copying data for custom includes in FB50

    I have added new fields to FB50 by using the screen painter in SAPLFSKB screen 100. I created new fields in CI_COBL called ZZNAME1 and ZZPARVW. These now appear on FB50. The problem is, data that is entered into those fields disappears when trying to save the document in FB50. How can I make that data persist? I believe that I need to copy the data from ZZNAME1 and ZZPARVW into the real fields NAME1 and PARVW, but where would I put the code to copy that data?

    Is there any way to find the source of data for the Custom tables. The source can be either any function, procedure, package or a trigger or any other process. The reason why I need to know about it is because we have some custom tables that are used by some custom Reports. Sometimes those reports comes out blank because the data in these custom tables is blank. So I need to know which processes are populating data in these custom tables. Any help would be really appreciated !!I do not think there is a direct way to find out the source of the data unless your custom processes are documented.
    You may enable AutditTrail (search the forum for links/docs) and see if this would help.
    Thanks,
    Hussein

  • Route Calls based on first 2 digits of customer Ref#

    Hi,
    I just want some help with an IVR script I am preparing.
    The idea is to route calls to a different ICM script depending on the Ref# entered by the customer.   Reference numbers are currently 11 digits long (I used Get Digit String to gather the Ref#).
    - For References starting by 10, send to X script
    - For References starting by 11 to 19, send to Y script
    - For References starting by 2, send to Z script
    1) What is the best way of identifying and routing the calls to the specified target as written above?. 
    2) Are there any good practices for these sort of tasks?
    3) is there an specific functions I can use.
    Following are the details of my site:
    - Cisco CRS 4.5
    - Cisco ICM 7.1
    Thanks very much for your support
    I am not really an UCCE developer, But I intend to learn as mich as I can
    Regards

    My personal choice is to put all the decision making in ICM, mostly because there's usually just one ICM script and multiple IVRs which need to be updated in order to make a change.  That being said, here's a high level on how to do it.  In the IVR you collect your reference number and pass it to ICM as an enterprice variable, lets say Peripheral Variable 1.  In ICM you have an IF node which uses the following function if(left(PV1,2)="10", this looks at the two left most variables and checks if it is 10 or not.  If it's 10 you can send it to one ICM script if it's not 10 then you have another IF node which checks if it's something else.
    david

Maybe you are looking for

  • DVD.app and Sonica Theater no sound

    Hello, I have a problem with the DVD.app and Sonica Theater USB 7.1 sound card. I get sound through the USB sound card with every application, Quicktime, VLC (while playing DVDs also), iTunes...but I cannot get sound through the USB card when using t

  • Find screen number for enhancement.

    How to identify screen number for a particular standard SAP transaction for enhancement. Suppose I want to enhance any screen of any transaction how to search/identify customer screen number and enhance them, I want to add some fields or tab or anyth

  • BSP Application in Portal and WebAS Authentication popup

    Hello, we have a very well running SAP Portal SP14 and a BSP application running WebAS 6.20. SSO between Portal and WebAS works perfect. Profiles are maintained and verify.der is imported. But: From time to time we have users which open logon to port

  • How does "pre-sign" works if I live in Colombia?

    I ordered an iMac online in the Store, and I'm designated a shipping address to my carrier's office in Miami, which is going to send it to me in Colombia. I'm right now in Colombia.

  • Same transaction variant runs differently on different servers

    Hi experts, We have created a transaction variant for MK01. Our production system consists of 3 servers. Everything is ok when we use this transaction variant on the main server, but there is a dump when the transaction variant is run on another serv