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

Similar Messages

  • Line item not copied in SDF /KN when creating based on Return order

    Hi,
    Anybody , can help me?
    I try to replace a damaged good returen by the customer,by doing the follwing actions.
    1 Creat return order based on orginal oder.
    2. Try  to create SDF/KN based on Return oder, but line item is  not copied.
    How can solve this?
    Regards
    rajeev

    Hi,
    Check the copying control betwee these orders in VTLA, and check the item category is maintained in the copying control.
    Prase

  • Vendor not intended when create SC using create limit item

    Hi All,
    This is a challenging issue for all of us...
    SRM : 5.0
    ECC : 6.0
    I am facing the problem when creating the Shopping cart..
    When i click on Centralized purchasing -- > Shop -- > Create Limit item
    and give the Desc, Product category, Value limit, Expected value, Date between, Supplier and Follow-up actions as Confirmation and Invoice and account assignment as Known and click add to shopping cart..
    It is giving a message vendor not intended for purchaing org.. in the Item under Good/Service field value LIMIT is getting created automatically.. I dont understand how it is getting created..
    If i try to create one more item and specify the Good/service as our custom field value  , for this item there are no error and
    no message saying Vendor not intended for Purchasing organization..
    Please help me in finding out the issue.So that will be greatful to you..
    Advanced thanks
    Points will be rewarded..
    Regards
    Raju

    Hi Teja,
    I agree with you answer..
    When i tryo to create SC using the Product which are repliacted from ECC to SRM.. I am able to create SC successfully. That means vendor is properly intended to the Porg and Pgrp right...
    When i click on Centralized purchasing -- > Shop -- > Create Limit item
    and give the Desc, Product category, Value limit, Expected value, Date between, Supplier and Follow-up actions as Confirmation and Invoice and account assignment as Known and click add to shopping cart..
    It is giving a message vendor not intended for purchaing org.. in the Item under Good/Service field value LIMIT is getting created automatically.. I dont understand how it is getting created and Product type is neither a Material nor service.. The product type field vale is blank....
    Please help me in finding out the issue.So that will be greatful to you..
    REgards
    Kumar

  • Vendor capacity check when creating PO

    Hello Friends.
    We have a business process situation where we would like to check Vendor capacity at time of creating PO (NB) for raw materials to ensure that we do not place POs for more than Vendor capacity.
    Ideally it would be great if there is any way to check all open PO qty and compare with Vendor capacity at time of placing PO - converting PR to PO or direct PO creation.
    We are in ECC 6.00.
    Appreciates your comments/suggestions.
    Thanks,

    Thanks all for your comments but option for contract will not work in our case and here is the reason.
    We want to make sure that we do not have open PO qty more than what Vendor can supply at any point of time. Business reason is sometimes there is surge in finished goods demand and MRP will create new PRs for raw materials and planners will keep converting these PRs to PO withouth knowing how much open qty already Vendor has to supply. So if we have somewhere a check point in system where it checks and warn if open PO qty is more than particular limit set somewhere for example, PIR etc.
    Please comment.
    Thanks in advance - vbhai

  • Select Vendor Email Address when creating PO

    Hi Guys;
    When I create PO for send by email, the system get Email Address from Vendor.   But some vendors got two or more email address.   For example;
    001 [email protected]    Standard
    002 [email protected]
    003 [email protected]
    In the PO Header data I select email address 002, and SAVE PO.  The system send PO to the email address 001, but the PO Header got email address 002.
    How I send the PO with the email address selected?
    Regards,
    Hector

    Boss
    The smart form program will call the concern function ..First check the code in the smartform
    *Select Email-id from ADR6 table
    Select single smtp_addr from ADR6 into lv_smtp_addr where
                        ADDRNUMBER = lv_adrnr.
    As Per SAP OSS Notes ---
    When using external mail, the following basic settings are required:191470
    1. You must maintain an e-mail address in the address in the vendor master.
    2. The same applies to your own user master. You also have to specify an e-mail address there in order to identify the sender.
    Note that it is not possible to change the e-mail address of the vendor via the SAP purchase order transaction (ME21N, ME22N, and so on).
    You can only make a permanent change using the vendor master transactions XK02 or MK02.
    You can use a temporary email address in Transaction ME21N.
    Address the table in the smartform where you get the temporary email address in Transaction ME21N .
    Hope it will help you and solve your problem
    Thanks
    Jeevan

  • Custom FPM application: why is not visible when creating iview?

    hi,
    I am trying to modify an exiting mss application which is a fpm application.
    i use the self service admin tool to copy the standard fpm application to a deltalink, and ,according to the documentation , next step should be creating an iview (webdynpro iview), and the delta link should be visible as an application variant ,but it's not there.
    i tried many times and option ,but failed.
    does anyone know what's going wrong?
    another question is , if i build a new fpm application using the given tool, can it be visible when i create the iview? under which webdynpro component? i can only see com.sap...
    br.
    zj

    Hi,
    I've the same problem, after copy the FPM application as delta linkit doesn't appear as  anew app_variant when I create a new iview.
    Does anybody know why this occurs?
    Thanks!
    Pablo.

  • 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

  • Cannot Send EDI Copy of PO for Fax Vendors

    Hi,
    Please i need more help related to this issue.
    Cannot Send EDI Copy of PO for Fax Vendors. Its SAP ECC to Hubspan purchase order Mappings.
    Please suggest me what shall i do for it?
    Thanks in advance.
    Edited by: XI/PI Moderator on Mar 1, 2011 10:35 AM

    The issue is when purchase order made or something a copy of PO need to send as EDI copy by fax to vendors.
    and the change required from PI side is
       PI Changes
    a.       Remove the split on PI side to only send 1 message per Idoc to the corresponding vendor
                                                                  i.      Make the change to pull the recipient from the Idoc control record partner
    how we can send a copy of a PO from a FAX Vendor to a 3rd Party vendor via Hubspan.
    Edited by: XI/PI Moderator on Mar 1, 2011 12:20 PM

  • Aging Report with Customer/Vendor Ref. No. should allow backdate

    Aging Reports for Suppliers and Customers.
    The current printing of the aging reports using Sales Document tab or the Purchase Document tab does not tie with the GL balances when the dates are backdated. It is important that the detail aging report to show the customer/ vendor ref. no.
    There are times when urgent outgoing/ incoming payment are entered into the system for the current period when the vendor detail aging reports or the customer statement with the customer/ vendor ref. no is not ready to be printed for the previous period.
    By allow backdating, it gives the users much needed flexibility in creating the transactions into SAP Business One without having to wait till all the previous month financial reporting is finalized. This is especially important during the financial year end.
    Current Workaround: None.

    Hello,
    Thank you for your input. The limitation is solved in 2007 A / 2007 B version as a part of new Internal Reconciliation concept.
    Regards,
    Peter Dominik
    Solution Manager
    B1 Product Definition Team

  • Customer Vendor Ref. No. in Incoming Payment

    B1 8.8 PL14 and PL18
    Are we able to include the Customer Vendor Reference Number in the Incoming Payment?
    1. Open Incoming Payment
    2. Select Form Settings
    3. Cust./Vendor Ref No is selected as Visible but the Incoming Payment window does not display the Cust./Vendor Ref. No.
    I then Deselect Cust./Vendor Ref No in the form settings and Click OK.  Then I open the Form Settings window and the Cust./Vendor Ref No. is still set as visible. 
    What am I missing?

    This is what I did and is seams to be working.
    1. Tools -> Customization Tools -> User Defined Field - Management
    2. Expand Payments
    3. Click Paid Documents
    4. Click Add Button
    5. Create a query to auto-populate the field
    SELECT T0.[NumAtCard] AS 'BP Reference No.' FROM  [dbo].[OINV] T0  WHERE T0.[DocNum] = $[$20.1.0]
    6. Save the Query
    7. Open the Incoming Payment window
    8. Place cursor in the new field and select Tools -> Customization Tools -> User-Defined Values - Setup
    9. Select Search in Existing User-Defined Values according to Saved Query
    10. Select the Saved Query
    11. Select Auto Refresh
    12. Select When Field Changes
    13. Select Customer/Vendor Code

  • DRQ : Customer / Vendor ref. no. duplication check

    Hi Expert,
    At present Customer / Vendor ref. no. duplication check is perform on all documents (e.g. A/R Invoice / A/P Invoice)
    Where as I believe it should be performed Customer / Vendor wise.
    The reason is simple, say in a new year all customer / vendor will generate their respective A/R invoice OR A/P invoice starting from 1. So verifing it accross the documents seems sence less. If is verified that whether the same Customer / Vendor 's same document is entered earlier or not then it makes sence.
    Samir Gandhi

    as I reach 10 post, I have to compulsorily close this thread

  • A/P Invoice Vendor Ref Number Field updating after adding the Invoice Copy

    Hi All,
                  I am able to change the Vendor Reference number in A/P Invoice Document after adding the Document.  I want to restrict this to happen. Plzz help how to do this????
    Regards,
    Sree.

    1.The Modify Posted A/P Documents authorization refers to some fields only, e.g. the Due Date or Pay to address.
    2. Additional authorization can be defined only for full forms, not for fields.
    3. The SP Joseph suggests will refuse those modifications when the Vendor ref is empty.
    To avoid modifying the Vendor ref you can use this code:
    IF @Object_type = N'18' and @transaction_type = N'U'
    BEGIN
    declare @li int
    set @li=
    (select max(t.LogInstanc)
       from ADOC t
       where t.ObjType=18 and t.DocEntry=@list_of_cols_val_tab_del)
    IF
       (select isnull(t.NumAtCard,'')
        from ADOC t
        where t.ObjType=18 and t.DocEntry=@list_of_cols_val_tab_del
          and t.LogInstanc=@li-1)
    !=(select isnull(t.NumAtCard,'')
       from OPCH t
       where t.DocEntry=@list_of_cols_val_tab_del)
    begin
      Set @error = 10
      Set @error_message = N'Vendor refernce not modifiable !'
    end
    END
    Or if you want to allow modifying an unfilled reference, then this:
    IF @Object_type = N'18' and @transaction_type = N'U'
    BEGIN
    declare @li int
    declare @pref nvarchar(100)
    set @li=
    (select max(t.LogInstanc)
       from ADOC t
       where t.ObjType=18 and t.DocEntry=@list_of_cols_val_tab_del)
    set @pref=
    (select isnull(t.NumAtCard,'')
        from ADOC t
        where t.ObjType=18 and t.DocEntry=@list_of_cols_val_tab_del
          and t.LogInstanc=@li-1)
    If @pref !='' and @pref !=
    (select isnull(t.NumAtCard,'')
       from OPCH t
       where t.DocEntry=@list_of_cols_val_tab_del)
    begin
      Set @error = 10
      Set @error_message = N'Filled vendor refernce not modifiable !'
    end
    END

  • Vendor ref. no. not appearing in print preview of vendor aging report

    Dear all,
    Vendor reference number is not appearing in print preview of vendor ageing report,we have
    customized template AGE3 collection report,we have taken print outs before a month,vendor
    reference number get printed in report,now it is not appearing
    What could be problem ?
    Any one faces this issue ?
    We are using SAP Business One 2005 B (7.40.252)  SP: 00  PL: 41.
    Latest patch upgrade to PL:46 will solve the issue ?
    Jeyakanthan

    hi all,
    Thru a workaround i brought up vendor reference number in print preview/print,
    Applied formatted search in  journal remarks of ap invoice thru query
    SELECT $[OPCH.NumAtCard]
    ,this will populate vendor ref. no in journal remarks
    which can be displayed in details in aging report.
    Is there any solution other than above to bring vendor reference number in print ?
    Jeyakanthan

  • [PLD] vendor ref Number variable in outgoing payment  ?

    Hello,
    How to display the vendor ref Number in PLD on printing outgoing payment document.
    We want display the ref in every line.
    wath is the variable number ? 
    Rgds,
    Thierry

    Hello Thierry,
    On the Outgoing Payments Screen if you check on the
    Customer / Vendor Reference Number, you would automatically see the Vendor Reference No in the rows where the invoices are displayed.
    This information also carries to the template and when you preview/print the template this information is printed through the <b>Documents paid variable</b>
    <b>SYSTEM VARIABLE NO 130</b>  This is Field_340 in the
    <b>Outgoing Payment (System)</b> template <b>in the End of Report Area.</b>
    Best wishes
    Suda

  • Ref No in Vendor Aging Report

    Hello,
    i experienced the phenomenon that in the aging reports the ref number is not always there. although in the invoice documents the field is filled out.
    when i look at the report in the designer i just see that this field has its data from a variable.
    can anybody help me? did anyone has the same problem?
    best regards, philipp

    Have you tried to print preview the report ?
    In my PL30 version, even if the A/P invoice has been closed, I can update the vendor ref no.
    SO, I suggest you to cut the vendor ref no.in the invoice no. where its vendor ref no. is not available in the aging report, then update it. After that, you paste it and update it.
    Let us know if the vendor ref no. is available or not.
    if not, submit a ticket to SAP support or upgrade to PL37
    Rgds

Maybe you are looking for