Read in Quotation document total

Hi fellow developers,
Scenario : I want to open the Sales Opportunity window when someone tries to add a Sales Quotation and the document's total exceeds some amount (1000 lets say).
Problem : I cannot even for starters read in the total from the sales document for some reason under God's blue sky.
I've checked for the following and this is what i thought i had to do but its not working :
(this is my code in VB)
'add an Sales opportunity button to the sale quotation
'form (ID =149 for a quote)
Private Sub oApp_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApp.ItemEvent
'For the sales order opening event
If pVal.FormTypeEx = "149" Then
'Check for the load form event and
'check for Add mode
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "1" Then
If pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
'do something whenever quotation is added to the company
if pVal.Items.Item("29").Specific() > 1000
oApp.MessageBox("Please add this Customer as a Sales  Opportunity")
End If
Dim creationpackage As SAPbouiCOM.FormCreationParams
'Create the FormCreationParams object
creationpackage = oApp.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
'Specify the parametes in the object
creationpackage.UniqueID = "CV_MyFormID"
creationpackage.FormType = "149"
creationpackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
'add the form to the SBO application
'on error GoTo ErrHandle
Try
oForm = oApp.Forms.AddEx(creationpackage)
Catch ex As Exception
End Try
oForm.Visible = True
oForm.Freeze(True)
End If
End If
End If
End Sub
I know there is something small here i'm missing out on..please some one help me
Anything is greately appreciated.
Kind regards,
Greeshma

Hi Ian,
Thanks for your help. Much appreciated I think the only problem I am having now is how to make the Sales Opportunity open when the quotation total is over a certain amount. My code looks like this :
'For the sales quotation opening event
If pVal.FormTypeEx = "149" Then
'check for Add mode of Update Mode UPDATEMODE
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "1" Then
If pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE And Not pVal.Before_Action Then
oApp.MessageBox("Add mode")
Dim oForm As SAPbouiCOM.Form
Dim oEdit As SAPbouiCOM.EditText
oEdit = pVal.Items.Item("29").Specific()
oApp.MessageBox("total : " & oEdit.String)
If oEdit.String > 10 Then
oApp.ActivateMenuItem("2566")
End If
Please advise why its not working?
Thanks !
Greeshma

Similar Messages

  • DTW Error when Importing A/R Quotation - document total value must be zero

    Hey all,
    I am facing the error document total value must be zero or greater than zero when trying to import the Sales Quotation in Item type.
    This is my sample source file:
    1. Document
    DocNum     DocType          DocDate     CardCode     DocCurrency     DocRate     Series
    DocNum     DocType          DocDate     CardCode     DocCur          DocRate     Series
    1     dDocument_Items     20111015     C0003     MYR          1     11
    1     dDocument_Items     20111015     C0003     MYR          1     11
    1     dDocument_Items     20111015     C0003     MYR          1     11
    1     dDocument_Items     20111015     C0003     MYR          1     11
    1     dDocument_Items     20111015     C0003     MYR          1     11
    1     dDocument_Items     20111015     C0003     MYR          1     11
    2. Document Line
    ParentKey     LineNum     ItemCode     ItemDescription     Quantity     Price
    DocNum     LineNum     ItemCode     Dscription          Quantity     Price
    1     0     A0001     from legacy Record     1     24.00
    1     1     A0002     from legacy Record     1     12.00
    1     2     A0003     from legacy Record     1     2.50
    1     3     A0004     from legacy Record     1     9.90
    1     4     A0005     from legacy Record     1     2.00
    1     5     A0006     from legacy Record     1     1.50
    Kindly look for your advises.
    Thank you.
    Regards,
    Wai Leng

    Hi Wai Leng Tan,
    Enter Data as per following details
    Document Header level
    DocNum     DocType                     DocDate         CardCode     DocCurrency     DocRate       DocTotal     Series
    DocNum     DocType                     DocDate         CardCode     DocCur             DocRate       DocTotal     Series
    248            dDocument_Items     20111221        C42000              INR                      1                100         11
    Document Line level
    ParentKey     LineNum     ItemCode          ItemDescription                     Quantity     Price
    DocNum             LineNum     ItemCode          Dscription                              Quantity     Price
    248                    0              I00007          HP Printer 95 Inkjet Cartridge     1     100
    Not Enter Document Total ZERO
    Thanks,
    Srujal Patel

  • DTW error 10000100 Document total value must be zero or greater than zero

    I am trying to import AR service invoices and I am getting an error.
    I am using the Document and Document line files and I have tried several different ways but still get the same error.
    On the main document file I have
    DocNum,DocType,DocDate,DocDueDate,CardCode,NumAtCard,TaxDate,Doctotal
    123              S (tried the ddocuemnt_Service)  20111130    20111130     1111      TEST        20111130       1.00
    Document lines
    ParentKey,LineNum,ItemDescription,TaxCode,FormatCode,Location,LineTotal
    123                (blank)      decription          EX            418000       1            1.00
    Now I have tried removing the total columns on 1 file, then alternating it...leaving it on both.
    What am I missing here?
    Thanks

    Hi,
    You may check this first: DTW Error when Importing A/R Quotation - document total value must be zero
    Thanks,
    Gordon

  • Can't read on-screen documents in Pages or Numbers, but they print correctly.  Any suggestions?

    Shortly after installing Yosemite on my iMac I had a system malfunction which meant the OS had to be re-installed.  Since then I have not been able to read any iWorks documents, Pages or Numbers, on the screen, nor produce any new documents.  The font colour is set to black and it doesn't make any difference if I enlarge the font or change the colour; I am still left with a blank screen.  The same goes for Pages and Numbers documents downloaded from my external hard disc.  Bizarrely, the documents print out perfectly.  Has anyone any idea how I can get round this problem?  Ted Cox

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

  • Difference between the document total and its components in inventory transfer

    Hi Everyone!
    When I make Inventory Transfer, SAP notice error "There is difference between the document total and its components.".Everyone that knows this problem, Pls help to find way to solve it.
    Thanks & Best regards
    Ngoc Loan

    Hi,
    Please refer to the thread.
    There is a difference between the document total and its components
    Hope Helps!
    Regards,

  • Report at line item level but also for document total for once only

    Dear all,
    seek for your help for the following issue
    There is a A/R invoice with 3 items
    There is a report for retrieving the line item level data from inv1, user would also like to add a column to display the Document total , but the problem is, each line item will also display the Document total, any method to only display the corresponding Document total for once only?
    Example, for AR invoice number 1234567:
    Currently:
    No.                ItemCode        Price      Qty    LineItemTotal      DocumentTotal
    1234567       Item-A            10           1       10                       100
    1234567       Item-B             50          1       50                       100
    1234567       Item-B             20          2       40                       100
    Requested to be presented as:
    No.                ItemCode        Price      Qty    LineItemTotal      DocumentTotal
    1234567       Item-A            10           1       10                       100
    1234567       Item-B             50          1       50                      
    1234567       Item-B             20          2       40                      
    Thank you very much!!!

    Hi,
    Try This.....
    select T0.DocNum ,T1.ItemCode ,T1.Price ,T1.Quantity ,T1.LineNum ,case  when T1.LineNum ='0' then T0.DocTotal else 0 end    from oinv T0 inner join INV1 T1 on T0.DocEntry =T1.DocEntry where T0.DocNum=[%0]
    Thanks
    Shafi
    Edited by: shafi_sunshine on Oct 19, 2011 12:50 PM

  • Does anyone know of an e-reader app for the iphone that has text to speech capability? I have a Kindle 3G that can read whole pdf documents and books but I cannot figure out how to do it on my iphone 4.

    Does anyone know of an e-reader app for the iphone that has text to speech capability? I have a Kindle 3G that can read whole pdf documents and books but I cannot figure out how to do it on my iphone 4.
    All of the apps I have found on the App store either do not have the text to speech capability or if they have it they will only read a page at a time or simply read the text you paste into their window. I really do not understand what is so difficult about having this feature as Kindle provides it--though Amazon does not make the feature available on its iPhone 4 app.
    Please help.

    thanks. yes i am aware of the VoiceOver feature but it is NOT the solution to my problem. as you said, it is a solution to a different set of issues. i want the text to speech ability because i there are books i need to read but do not have the time to sit down and read them and have become used to listening to them read to me either by a professional human reader or with the text to speech software on the Kindle.
    I think Apple makes the best audio devices but i am really disappointed in this inexplainable shortcoming. if apple can give us siri they ought to be able to design a nice little button that i can push to turn on text to speech while i am in a document, book, magazine or webpage. clearly it is possible as apple has added the "reader" button in safari to have web pages dropped into the reader format.
    thanks for your suggestion though, it is what everyone suggests but it does not address the issue.

  • Applying Tax code on document total as a whole.

    will it be possible to apply tax on a document total as a whole?
    for eg.
    I want to generate a purchase order for 3 items and doesn't want to apply tax code on line level.
    The document total will be say 5000 now i want to put tax code on this value.
    will it be possible.

    Hi,
    In SAP B1, You should link the Tax codes in row level (ie., for every item it's tax code should be defined in that row itself). We cannot define or calculate the tax amount for overall amount.
    Raja.S

  • PO document total validation with approved PR used while creating PO

    Hi,
    Requirement :
    Need a validation over document total in refeerence to approved PR used to create purchase order. so that NO PURCHASE ORDER would be created in system for more than approved value of purchase requistion.
    Any ceeded control to achieve this ?? or any workaround suggestion.
    Regards,
    Ravi Malhotra

    For information:
    We are not using incumbrance ; so please consider this while replying.
    Thanks, Ravi Malhotra

  • Just updated to Lion.  Didn't realize things like reading a Word document would not be supported.  How do I get these files back and how I do read them going forward?  When a PC user sends me a word document won't I be able to open it and read it?

    Just updated to Lion today, 11/22/11.  I did not realize things likes reading a Word document would not be supported.  "You cannot open this because PowerPC applications are no longer supported."  How am I supposed to read and open Word documents from PC users?  Any insight is helpful, thanks!

    You have Word 2004 which is PPC based. Lion is not able to execute PPC code. You have to upgrade. Or you can do as I do an open them in Pages, since I refuse to allow anything from Microsloth on my Mac.
    Allan

  • Rounding of document total in draft A/R Invoice

    Hi All,
    I am creating document draft of A/R invoice through user defined screen (DI API). after creating the draft document, when I see the actual draft document through document draft report in SAP, the document total has the difference of 0.1. where should the rounding be changed in system? document and system currency is INR. there is no rounding given in currency setup. i have not given any rounding in document also.
    the values in user defined draft are :
    total before discount : 19144.8
    discount % = 40
    total after discount : 11486.88
    tax (12.5 % for all items in the document )
    tax = 1435.86  (12.5% of total after discount)
    rounding = 0.00
    doctotal : 12922.74
    when it is saved, the system draft document shows following value:
    total before discount : 19144.8
    discount % = 40
    total after discount : 11486.88
    tax = 1435.85  (12.5% of total after discount)
    rounding = 0.00
    doctotal : 12922.73
    if you check, the value is different in tax field. system has calculated tax on 11486.8. whereas, I have calculated tax on 11486.88. and this only gives the difference of 0.1 in doctotal. now, anybody can guide on why this is so?
    thanks and regards,
    Binita
    Edited by: Binita  Joshi on Oct 8, 2009 11:05 AM

    Hi Dwarak.....
    Run time total sum is not possible throgh FMS else you would have to to SDK work. But if you want it to be displayed then you can display it into the simple PLD. Whenever your client requires he will fill the AR invoice details and just click on the print preview. This way you can solve the purpose.......
    Regards,
    Rahul

  • I would like to read my pdf document

    I have a trial version of acrobat XI on my mac os 10.9.
    The trail version expired today and is not allowing me to read my pdf documents
    i went to get another trail version of adobe reader just to be able to read my pdf documents but i am not able to download the adobe reader cause it is already installed on my computer.
    please what can i do
    i  would like to talk to the customer service on the phone, please provide me the right phone number
    it is so frustrating especially when you are in a harry

    The free Reader does not need any trial version.
    Open the Applications folder and see if  Adobe Reader is there. If it is, try to open it by double clicking on its icon. If it opens, try opening a known PDF file from within it. If it opens, then all is well, and all you need to do is to change your files associations for PDF from Acrobat to Reader.
    If one of the "ifs" above gives a negative response, please let us know what fails, including eventual error messages.

  • Adding the Document Total to Detailed Liabilities Aging Report

    Hi,
    On the Detailed Liabilities Aging Report(Vendor Aging), I would like to add the Document Total from AP Invoice. How can I link to the AP invoice table(OPCH).
    Thanks
    Krishnan

    Hi Krishnan,
    This PLD is hard coded report.  You don't have any options to link to other fields in the report.  If you need that info on the report, you need to create your own.
    Thanks,
    Gordon

  • This document enabled extended features in Adobe Reader. The document has been changed...

    I am trying to distribute an interactive order form to approx. 50 recipients with Acrobat X Standard which I purchased recently.  Computer is Windows 7.
    I can go through the form editing and distribution as usual, but when I (or a recipient) opens up the distributed form with Adobe Reader, they get the message: “This document enabled extended features in Adobe Reader. The document has been changed and use of extended features is no longer available. Please contact the author for the original version of this document.”
    Oddly enough, sometimes is does work, but 90% of the time it doesn’t.
    And I have another, older XP computer with Acrobat X installed, and it works fine 100% of the time – weird....can anyone help?

    Hi Ken
    We have so many people who have not updated they are trying on 9. I might just have to tell them we can’t support under reader 10.
    Thanks
    Tania
    Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. -General George S. Patton
    Tania Lindenmayer \ Manager Organisational Shared Services \ Jabiru Community Youth & Children’s Services Assoc (Inc) \ Ph: (07) 3269 0044  Fax: (07) 3869 0675 \ [email protected]<mailto:[email protected]> \

  • Need Javascript to force reading mode on document open...

    Need Javascript to force reading mode on document open... Does anyone know how to do this? Acrobat 8 does not come with a custom action for opening a page in reading mode...
    Would also like the remove the page scroll bar from the document window. Can this also be applied using Javascript?

    This code will embed a script that will open the doc in Reading Mode:
    this.addScript("OpenInReadingMode","app.execMenuItem('ReadingMode');");
    You can't remove the toolbar from the document window, only in full screen mode it's invisible.

Maybe you are looking for

  • Problem Printing in Illus CS3 on Snow Leopard

    I'm running CS3 with SL and have done all I can to try and make the Epson R1800 printer I have run with it. Are there any known issues? I've re-installed Illus, updated all the printer drivers (including the Gutenprint 5.2.4 advised to me by another

  • Info about prescott hangs reboot WinXP Sp2

    Some Microsoft info about Prescott and Celeron D cpu bootproblem after installing WinXP SP2 http://support.microsoft.com/default.aspx?kbid=885626&product=windowsxpsp2

  • New Task changes date to 12/31/2031

    When entering a new task on my Palm Desktop software (Ver 4.2 installed with Sprint Treo 755p), the software automatically puts the "due date" as 12/31/2031, even when the it's checked as "no due date".  Is there a fix?  Quite annoying. thx for the h

  • Lower volume on right side of headset

    hey i have a problem.. i just got the iphone 4 and when i am listening to music i recognize that the right side of the headset is kind of flannelly. hard to describe... it is something i did not even realize when i used it the first time but when i a

  • Safari won't run in 32-bit mode?

    Hi, until yesterday I was able to run Safari in 32-bit and some applications/utilities such as LiveDictionary and WebSnapper could run in this manner. Suddenly this morning the above mentioned applications don't work any more and I think the problem