Change Payment terms combo value when change Total Document

Hi:
I need to change the selected value of payment terms combo (Item 47) of the  form(133). This combo is placed in the third pannel of a form. Always appear the message “Valid Value – Value do not exist”
The code is :
Dim cItem As SAPbouiCOM.ComboBox
If pVal.FormType = "65300" Or pVal.FormType = "133" Then
'facturas deudores y facturas de anticipo de deudores
'cambiamos la forma de pago si llega a cierta cantidad
If pVal.ItemUID = "38" And (pVal.ColUID = "11" Or pVal.ColUID = "17") And pVal.EventType = BoEventTypes.et_VALIDATE And pVal.ItemChanged = True Then
      ' el evento es que cambie el total
      oForm = SBOApp.Forms.Item(FormUID)
      oItem = oForm.Items.Item("4").Specific
      StrCliente = oItem.Value
      oItem = oForm.Items.Item("29").Specific
      dblImporteTotal = CMonedaToNumber(oItem.Value)
      BuscarFormaPago(StrCliente, dblImporteTotal, StrFormaPago)
      cItem = oForm.Items.Item("47").Specific
   If cItem.Selected.Value <> StrFormaPago And StrFormaPago <> "" Then
       cItem.Select(StrFormaPago, SAPbouiCOM.BoSearchKey.psk_ByValue)
   End If
End If
End If
Protected Sub BuscarFormaPago(ByVal StrCliente As String, ByVal DblImporte As Double, ByRef StrFormaPago As String)
Dim StrDato As String
StrDato = CStr(FNDameValor("[@" & StrPrefijo & "_FPAGO]", "U_" & StrPrefijo & "_OCTG", "U_" & StrPrefijo & "_OCRD='" & StrCliente & "' and U_" & StrPrefijo & "_IMP<=" & FNComPunN(DblImporte) & " ORDER By U_" & StrPrefijo & "_IMP DESC", pCmp))
StrFormaPago = StrDato
End Sub
I´ve used BoSearchKey.psk_ByValue,but with psk_Index or psk_ByDescription .I have the same problem.
Thanks for all
Joaquin Gomez

Hi Joaquin,
Why don´t you use a formatted search instead of coding?
The formatted search should be executed when the total is changed. And the value should be what BuscarFormaPago returns.
Regards,
Ibai Peñ

Similar Messages

  • Business Partner approval when changing payment term

    Hi Expert,
    Is it possible to set up approval process when user changing payment term in existing Business Partner?
    Thank you in advance.

    Hi,
    Try this:
    IF @object_type = '2' AND @transaction_type = 'U'
    BEGIN
         IF EXISTS
         (SELECT T0.CardCode from OCRD T0 INNER JOIN ACRD T1 On T1.CardCode=T0.CardCode
    WHERE CardCode = @list_of_cols_val_tab_del AND T1.GroupNum !=T0.GroupNum)
         BEGIN
               SELECT @error = 2, @error_message = 'Payment Terms should not be changed'
         END
    END
    Thanks,
    Gordon

  • BAPI/FM to Change Payment Terms ZTERM of FI Invoice

    Hi,
    I am trying to chnage Payment Terms(BSEG-ZTERM) using FM FI_DOCUMENT_CHANGE and FM FI_ITEMS_MASS_CHANGE but none of these FM is working.
    For FI_DOCUMENT_CHANGE it is giving error "You cannot change Payment Terms(ZTERM) and inFM FI_ITEMS_MASS_CHANGE it is not providing option to change Payment Terms (I have checked Coding of the FM FI_ITEMS_MASS_CHANGE).
    Can anyone guide me on this? How can I change Payment Terms(ZTERM) of FI Document.?
    Thanks.

    Sapan,
    My requirement is to Develop an Interface, through which you can change payment terms of Customer open line items.
    Manually in FB02 I am able to change the Payment Terms but when I am not able to change it using FM FI_DOCUMENT_CHANGE and FM FI_ITEMS_MASS_CHANGE.

  • How to change Payment Terms in multiple orders at same time?

    How to change Payment Terms in multiple orders at same time?
    I have got 10,000 Order, I need to change the payment terms for all these Orders.
    Can I Know the way out for this.
    Regards,
    Dantham Conpolwedson
    Edited by: Dantham Conpolwedson on Mar 25, 2009 11:18 AM

    Hi
    There are as many options for that
    You can go for
    1)MASS t code
    2) LSMW  (by recording)
    3)BDC (by recording)
    and the most easiest way is by doing the MASS tcode
    goto MASS and enter the object type as BUS2032
    execute now select the sales order haeader data and execute and now enter the sales doc from and to range and execute now all the sales dox will be displayed
    and from the menu click on select fields  and select the terms of payment
    now select the terms of payment row and enter the new values  and click on carry out new changes
    regards

  • Change Payment terms invoices

    Hi
    is it possible to change payment term in transaction VF01 or VF02 with standard SAP??

    Hi,
    Maybe you can try this userexit
    USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data
    Reward points if helpful
    Regards,
    Amrish Purohit

  • How to prevent change payment term in sales order?

    Hi,
    My client not allow sales admin. to change payment term in sales order. How to do this? (by standard SAP functions or authorization)
    Thanks & Regards,
    Jr.SD

    Either you can run T.Code shd0 or apply User exits in the program MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAP to achieve this.
    thanks
    G. Lakshmipathi

  • Payment term not subject to change

    Hi
    All of our users can change payment terms in customer and vendor invoices posted. We want to restrict this authorization for end users and allow credit control and vendor development users to change. How can this be achieved?

    Hi:
             Please note that it is not possible to restrict the change of this field user wise using standard configuration which can be accomplished using OB32 document change rules. However exit RV60AFZC can be used to meet your requirement .You will need ABAP help for it.
    Regards

  • Payment term not allowed to change

    in FB70, payment term is brought from customer master data, but user can change it, is there any way we can block it?(not allow user to change payment term , for example , this field greyed out).
    in F-28, is there any way we can grey out the document date, so user will not be allowed to change document date, so document date is the current system date.

    Hi,
    For your first question:in FB70, payment term is brought from customer master data, but user can change it, is there any way we can block it?(not allow user to change payment term , for example , this field greyed out).
    You can try to create transaction variant in T-cd:SHD0 to contol it
    in F-28, is there any way we can grey out the document date, so user will not be allowed to change document date, so document date is the current system date.
    You can try to create validation in T-cD:OB28 to do further check, if you want to use transaction code as prerequisition, please pay attention the default transaction code for F-28 is FBZ1(you can confirm it in T-cd:SE93). in other words, FBZ1 should be used as prerequsition, not F-28.
    Example: Prerequsite: SYST-TCODE = 'FBZ1'
                            Check: BKPF-BLDAT = SYST-DATUM
                     Otherwise :Message number Z1XXX issued.
    Hope above information can help you!
    Best Regards,
    Gladys xing

  • How to use BAPI_SALESORDER_CHANGE to change payment terms in Orders?

    Can any body give me an idea on how to use BAPI_SALESORDER_CHANGE to change payment terms in Orders?
    Regards,
    Dantham Conpolwedson

    Hi,
    try the link
    Link:[https://forums.sdn.sap.com/click.jspa?searchID=24060901&messageID=7265357]

  • How to allow a user to change Payment terms on A/R documents

    Hi All,
    I want to allow one of my user to change payment terms on A/R documents. I could'nt found it where to authorize a user for this purpose. Can anybody help me out with this?
    BR

    Dear Naveed,
    To enable users to change the Payment Terms in A/R, please give the user Full Authorization for Price Lists (Inventory -> Price Lists -> Price Lists).
    Hope this helps.
    Regards,
    Lorna

  • Change payment terms for customer documents

    Hi Guys,
    Is it possible to change for several customer documents the payment terms?
    I tried to do using FBL5n but I couldn`t do it.
    Thanks
    Daniel Dorta

    Hi,
    You can do the mass change in FBL5N.
    Please select the line items you would like change (Open items). You will see a small check box against each document number.
    Then click on mass change button - Please see mass change button available.
    Give the payment terms that you want change.
    Say OK
    Regards,
    Ravi

  • Change payment terms

    Hi,
    How do i change payment terms for an invoice after few installments have been made.
    ex.Lets say there is an invoice for Rs 500 and the number of installments to pay it is 2 250 for the first installment  and 250 for second installment.The first installment is made,Now the customer wants to change his installments to 3 for the remaining amount.Can this be donw in SBO.
    Thanks in Advance

    Dear Vikas,
    Yes I beleieve this can be done.
    Initially you set up the 2 Installments in the payment Terms Table and carry on with your Transactions like the Sales Order and the Delivery and create the A/R Down Payment invoice for say 50% and then make the payment for this 50% Amount WRT the A/R Down Payment Invoice. Now while you are creating the final A/R Invoice for the remaining amount in the accounting Tab go to the payment terms tab change the Installments to 3 and eneter the other relevant data. After this is done go to the Installmant tab and chane the Installments to 3.
    Hope this is helpful.
    Nagesh

  • How to change payment terms in FV70

    Hi All,
    I am trying to post FV70 Customer invoice park but system defaultly picking paymnet terms from master data, i want to change payment terms in FV70 but it displaying in graed mode, How to chage payment tems
    thanks & regards
    mohiddin

    Hi ,
    Go to T.code OB32 Path: SPRO >FA (New)> Financial Accounting Global Settings (New)> Document> Rules for changing document --> Document Change Rules, Document Header
    Select Document Change Rules, Document Header Execute button go to new entries  select Field name BSEG-ZTERM
    Account Type = A     Assets,D     Customers,K     Vendors,M     Material,S     G/L accounts
    Company Code = xxx
    Field can be change check box
    and  save
    Thanks,
    Raviteja
    Edited by: Ravi Teja.T on Feb 6, 2012 11:57 AM

  • How can we change payment terms in existing billing documents

    Hi all,
    we created a billing document with reference to delivery ,before creating accounting document for that billing someone deleted payment terms which are existing in that billing , so i tried to delete billing document and recreate by changing payment terms in sales order ,but while creating billing system throwing error as "update was terminated'.
    what is the best way to process this.
    Edited by: suresh saketh on Aug 27, 2010 2:54 AM

    Hi,
    It has happened billing index is not properly updated-
    check this snote -12934 - how to correct billing index
    Thanks
    Chidambaram

  • Bapi changing payment terms in purchase order

    hi to all abap gurus
    I want to change the Payment terms in Purchase order using bapi_po_change . can u pls give coding for this bapi with all required int tables declarations . points will berewarded for good ansers

    There is a documentation available for this BAPI and there is an example (although it is a bit confusing). You need to send the folowing parameters:
    Parameter: PURCHASEORDER = <PO number>
    Parameter: POHEADER                          
    PMNTTRMS             =                    <payment term value>
    Parameter: POHEADERX                         
    PMNTTRMS             =                    X  
    Declare your structures/tables using the same type as in BAPI - just copy/paste.

Maybe you are looking for

  • Adobe Flash Media Live Encoder and static image or recorded video?

    Is it possible to put a static image or a recorded video (instead of a live video feed) into Flash Media Live Encoder to air while broadcasting a live radio show online?

  • 1TB WD hard drive issues on my macbook air

    Hi, I bought a new 1 TB WD My Pssport Ultra hard drive to store movies and watch on TV. I cant copy my files to the drive. In disk utilities, the drive format is 'MS-ODS (FAT), then when I change to MAC OS extended (journaled) and select 'Erase' it g

  • Trying to install software like Google+ Voice & Video, Shutterfly Apps, etc..

    I am able to begin the install, but when I submit my password for the installation process (step 4), it takes my password but does not begin the installation. When I input an incorrect password the screen "shakes", so I know my password is correct. I

  • "Use iTunes to restore" then "Error it's still in use"

    Hi there! I haven a problem with my iPod nano (1st). I did the reset and wanted to restore it with iTunes, because of the message that comes up. "Use iTunes to restore". So I tried to do that and everything appeared to be fine.(The password and a pro

  • Note size limit and slight work-around in Lyrics

    I tried to reply to a older post, but since it's archived I wasn't able to so I'll simply reference it. I followed the suggestions from the following post in order to fit more continuous viewable text on my iPod: http://discussions.apple.com/thread.j