UI: Opening Sales Order screen and loading with data

Hi,
I'm currently using the SDK to develop a new screenin SBO.  From my new screen I need to display the sales order screen with an order loaded into it. 
I currently open the screen using the ActivateMenuItem methid, then use the sendKeys method to try and change to find mode, pass in the sales order number and press enter to start the search.
The code is this:
moSBOApp.ActivateMenuItem("2050");
moSBOApp.SendKeys("(^f)");
moSBOApp.SendKeys("123");
moSBOApp.SendKeys("{ENTER}");
But the form doesn't seem to change modes, it just stays in "Add" mode.  Is there a better way of doing it?
I've also tried putting code in the FORM_LOAD event for the sales order screen and try and change mode then, but I just get an "Invalid Form Mode" error
Help!

Ho Jon!
The following snippet works fine for PO searching by number and date:
SAPbouiCOM.Form          frmPurchOrd = null;
int frmPOCount = 0;
SAPbouiCOM.EditText     oOrdNum;
SAPbouiCOM.EditText     oOrdDate;
SAPbouiCOM.Item          oOrdOkButton;
SBOApp.ActivateMenuItem("2305");
// PO even opened
for (int k=0; k<SBOApp.Forms.Count; k++)
     if (SBOApp.Forms.Item(k).Type == 142)
          frmPOCount++;
frmPurchOrd     = SBOApp.Forms.GetFormByTypeAndCount(142, frmPOCount++);
frmPurchOrd.Freeze(true);
frmPurchOrd.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
oOrdNum          = (SAPbouiCOM.EditText)frmPurchOrd.Items.Item("8").Specific;
oOrdNum.String     = OrdNum;
oOrdDate     = (SAPbouiCOM.EditText)frmPurchOrd.Items.Item("10").Specific;
oOrdDate.String     = OrdDate.ToShortDateString();
oOrdOkButton     = (SAPbouiCOM.Item)frmPurchOrd.Items.Item("1");
oOrdOkButton.Click(SAPbouiCOM.BoCellClickType.ct_Regular);
frmPurchOrd.Freeze(false);
it's too easy to implement it for Sales Order

Similar Messages

  • Reg Open sales order item and the quantity

    Hi experts:
    I am getting open sales order item based on inner join of tables(vbak, vbap, vbep). Not using vbbe table in inner join as it doesnt carry all pending open records.
    can any one say how open sales order items  and their quantity can be retrieved?
    I searched forum and saw usage of vbuk and vbup tables, but it does not accomplish our scenario.
    Thanks in advance,
    Sashti.

    Hi,
    1) fetch the header information from VBAK table.
    2) Based on VBAK table fetch all the line items from VBAP table.
    3) Now fetch from VBFA table.
    *-Fetch from VBFA to get the delivered qty
      SELECT vbelv               " Preceding sales and distribution document
             posnv               " Preceding item of an SD document
             rfmng               " Referenced quantity in base UOM
        FROM vbfa
        INTO TABLE lt_vbfa
         WHERE vbelv   = gv_vbeln
           and vbtyp_n = 'J'.
    4) By comparing VBFA-POSNR just filter the records from the VBAP internal table. Remained lines are open lines of the sales order.
    Regards,
    ~Satya

  • Can not open sales order balance from BP master data

    Hello All,
    for a particular customer i am not able to open the sales order balance field in BP master data.
    It is showing the amount but the orange arrow does not appear.
    can any one please tell me why i am not able to drill down into Sales order field in BP master data?
    Thanks in advance.
    Prachi Kulkarni.

    HI Gordon,
    All the users are getting this issue for the particular customer.
    even my self (super user) also not able to drill down into the sales order field.
    we have assigned Professional Licenses to all the users.
    Thanks,
    Prachi.

  • Queries for Open Sales Order Lines and Open Purchase Order Lines

    Experts,
    Forgive me if these have been addressed elsewhere but I can't find them.  I'd like to create two queries to use as Alerts as follows:
    1.  Query of open lines in Sales Orders that are more than two weeks old
    2.  Query of open lines in Purchase Orders that are more than 2 days old
    Thanks in advance for your help.
    Steve

    Hi Steve,
    A couple of query templates you can use for your alerts are as follows:
    Purchase Orders
    SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -2) AND  T1.\[LineStatus\] = 'O'
    Sales Orders
    SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -14) AND  T1.\[LineStatus\] = 'O'
    You can change the SELECT section to remove some of the columns or add extra columns if need be.  Once your happy with the query you can attach it to an alert and set the frequency.
    Regards,
    Adrian

  • SQL Open Sales Orders Value using today's currency rates

    Hi experts,
    I am creating a report for displaying the open sales order values (and other fields) using current currency rate (where applicable). I developed the below query. The only problem with this query is that it ignores the order rows in which the currency field is blank (Don't understand why this happens in SAP). Do you have other ideas?
    Thanks & Regards,
    IC
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name",  T1.ItemCode, 
    T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM',  T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)", T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod, ORTT T4 WHERE T0.DocCur <> 'GBP' AND T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T1.OpenQty > 0
    UNION ALL
    SELECT
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date", T0.CardCode as "Cust Code", T0.CardName as "Customer Name", T1.ItemCode, T1.Dscription, T3.ItmsGrpNam, T1.U_SU, T1.U_SULEN, T1.U_SUQTY, T2.InvntryUom as 'Stock UOM', T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.LineTotal AS "Ord Value (GBP)", T1.LineTotal/T1.Quantity*T1.OpenQty AS "Open Qty Val (GBP)", T1.LineTotal/T1.Quantity AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)",T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T1.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date", T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod WHERE T0.DocCur = 'GBP'  AND T1.OpenQty > 0 ORDER BY 2,1

    Hi,
    Try:
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name", 
    T1.ItemCode,  T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM', 
    T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered",
    T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)",
    T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)",
    T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)',
    T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    LEFT JOIN ORTT T4 ON T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T4.Rate != 0
    WHERE T0.DocCur != 'GBP' AND AND T1.OpenQty > 0
    Thanks,
    Gordon

  • How to show Open Sales Orders only in a report?

    Hi,
    I am working on a Business Objects report to show open sales orders. Here i pull data from a RapidMart universe for which data comes from SAP.
    I just wanted to know which object or field in SAP can/will differentiate whether a particular sales order is delivered or not.
    Is MRP anyway related to this?
    Plz. help!
    Many Thanks,
    Arun KK

    Gattu,
    Thanks for your reply.
    However, the problem goes like this.
    I am working on an existing BO report. This report works perfectly(shows only the open sales orders) except for some leakage(some delivered items too get it).
    The existing report's query have filters only one MRP Element and Order Category.
    Could there be anything that can be done with these objects?
    Thanks,
    Arun KK

  • Current month open sales orders

    Hello Experts,
    I have requirement to build a custom report to calculate open sales order quantity and its count for current month. I know we can use VBBE for open quantity and VBUP for the status to capture the count, however how can i add the logic to get the required information for the current month. Is there a function module or BAPI available which can be of any help, i have to consider the performance issue too, if i were to use multiple tables. Please advise
    Thanks
    Rahul

    HI Rahul,
    There is a standard BAPI available for listing Sales Orders.
    <b>BAPI_SALESORDER_GETLIST</b>
    However to meet your requirement of <b>OPEN sales orders</b>, you will have to modify this BAPI to suit your purpose. You can give appropriate logic to you ABAPer with reference to tables VBUK,VBUP, etc. This means that you will have to create a new Z-BAPI, keeping the above BAPI as the core.
    Once this is done you can wrap Z-BAPI in a transaction code or a program/ report, so that it is ready to use by business.
    Selection Variants can be used to default the date range as 01/MM/XXXXX to 31/MM/XXXX.
    Hope this will prove of some help to you..
    if yes then ..pls reward liberally
    Sachin Bhonsle

  • Table Name to take report of Open Sales Order items&its relevant GL Number.

    Hi,
    I wanted to take a report with Output as Open Sales Order Items and its relevant GL account numbers. is there any T Code in the Standard or atleast the table name.
    I have already fetched the Open Sales Order Items from T code VA05, but i need the relevant GL account numbers also.
    Any pointers on this will be appreciable.
    Rgds,

    Hi
    There are no standard reports where in you can fetch the data of the open sales order items and its G/L accounts with the output. But  by creating your own report using LIS then it is possible
    Regards
    Srinath

  • Open Sales order, Delivery docuement, Billing document, Item

    Hi Gurus,
    Kindly help to view the following items for a particular customer.
    1) Open sales order value
    2) Open Delivery docuement value
    3) Open Billing document value
    4) Open item.
    I presume for viewing open sales order VA05N and to view Open item FBL5N would suffice. Please correct me if i am wrong and let me know about points 2 and 3.
    This is required because, my client is facing some figure mismatch while executing F.35 tcode. I am trying to analyze the differnce of figures while doing a Static and dynamic credit check.
    Thanking you in advance
    ficoguy.

    Dear ficoguy,
    1) Open sales order value
    Tcode: VA05 (select OPEN SALES ORDERS)
    optional method: SE11/ TABLE VBAK/ INPUT customer code as KUNNR, fetch the list.
    Input the VBELN in VBUK and filter with RFSTK='A'
    2) Open Delivery document value
    Tcode: VF04 (OUTPUT DATA FOR BATCH PROCESSING-->CHECK LIST DISPLAY)
    DOCUMENT TO BE SELECTED = DELIVERY RELATED
    optional method:(same as above except the FIRST TABLE)
    SE11/ TABLE LIKP/ INPUT customer code as KUNNR, fetch the list.
    Input the VBELN in VBUK and filter with RFSTK='A'
    3) Open Billing document value
    TCode: VF05
    Selection criteria : OPEN BILLING DOCUMENTS
    4) Open item.
    Tcode : FBL5N
    Check and revert back.
    Thanks & Regards,
    Hegal K Charles

  • How to add a button in Sales Order screen?

    Hi,
    Basically I want to add a new button "Show My lookup" in sales order screen and when clicking the button I want to show a form.
    Please anyone tell me how to do this?.
    thanks in advance
    Mina

    Here is a sample ItemEvent that adds a custom button to Sales Order Entry, and loads a form from XML when it is clicked.  Make sure you give the forms unique identifiers when you create them - the sample just uses a hardcoded value.
    Hope it helps,
    John
    Private Sub sboApp_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
        On Error GoTo ErrorHandler
        Dim sboForm                 As SAPbouiCOM.Form
        Dim sboItem                 As SAPbouiCOM.Item
        Dim sboBtn                  As SAPbouiCOM.Button
        Dim objXMLDoc               As MSXML2.DOMDocument
        Dim objXMLErr               As IXMLDOMParseError
        Dim objXMLElem              As MSXML2.IXMLDOMElement
        Dim strIdentifier           As String
        If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False And pVal.FormType = 139 Then
            'Add Custom Button
            Set sboForm = sboApp.Forms(FormUID)
            Set sboItem = sboForm.Items.Add("AZU_BTN", it_BUTTON)
            sboItem.Top = sboForm.Items("1").Top
            sboItem.Width = "80"
            sboItem.Left = sboForm.Width - 105
            Set sboBtn = sboItem.Specific
            sboBtn.Caption = "Custom Button"
        End If
        If pVal.EventType = et_ITEM_PRESSED And pVal.Before_Action = False And pVal.ItemUID = "AZU_BTN" And pVal.FormType = 139 Then
            strIdentifier = "AZU_XXX" 'You should set this to a unique value each time
            Set objXMLDoc = New MSXML2.DOMDocument
            objXMLDoc.async = False
            objXMLDoc.validateOnParse = True
            objXMLDoc.Load (App.Path & "\Config\AZU_CUSTOM.srf")
            Set objXMLErr = objXMLDoc.parseError
            If (objXMLErr <> 0) Then
                MsgBox "Failed to load XML screen definition."
                Exit Sub
            Else
                For Each objXMLElem In objXMLDoc.getElementsByTagName("form")
                    objXMLElem.setAttribute "uid", strIdentifier
                Next
                sboApp.LoadBatchActions objXMLDoc.xml
            End If
        End If
        Exit Sub
    ErrorHandler:
        MsgBox Err.Number & " " & Err.Description
    End Sub

  • Discount Condition type in sales order screen

    Hi Experts,
    I have a requirement like ,While the creation of Sales order ,we need to add discount for each line item on the main sales order screen ,for that i need an extra field near  to order quantity field,and it must be updated at the pricing procedure too for the corresponding line item.Please show me some light on how  i can accomplish this.
    Thank you all in advance

    Hanumant,
    In the sales order screen and in at the top - right corner of item details screen there is "Configuration" tab click it, it is using standard settings we can create customised setting too. Similarly we have under the conditions tab you can ask your ABAPer to check through th screen and create new one.
    The price condiion type is picking from structure KOMV - KSCHL for condition type you can add fields just check with your Abaper.
    Regards
    Sathya

  • Cube loaded with data, but unavailable in the query

    Hello everyone,
    Someone can help me?
    I created a new Cube CO-PA for the year 2010, and loaded with data this year. To make sure that the data were correct did a ListCube, with all the filter equal to the query, and indeed the data is loaded properly for this year. And when i run the query with data from the years 2008 and 2009 show me  data in my report, but when I run the query for 2010, the query displays an error message saying that "no data".
    How is it possible to have the correct data in the Cube, and i can not view the data in the query?
    Note: The request in the cube is available to report
    Thank you all,
    Greetings,
    Maria João
    30-Março 2010

    Hello,
    I was in trouble because I had not selected the key figures in the multicube : S
    After selecting the key figures, I ran the query and it had data.
    Thank you for your help.
    Sincerely,
    Maria Joã

  • Refreshing Sales Order Screens with new BP data

    My customer service department is entering sales orders and have to create new "ship to" addresses on a regular basis.  They open a new sales order, enter the BP Code for the bill to customer and then use teh golden arrow to enter BP Master data and enter a new ship to address.  After they save and close the new information, it is not available for them on the old sales order screen until they close and start a new sales order.
    Is there a way to refresh a screen that you are currently in in order to import the new information that has been entered into the BP Master Data?

    I appreciate the information, but the sarcasm is not necessary.
    It is not hard to add the data beforehand but these orders are for a sales agency we contract with.  One bill to customer and unlimited ship to addresses.  Some are repeat shipments, some are not.  So when the order is taken, they open the bill to customer account and if the ship to address is not there, they must then add it and cancel out the order and start over.  For one transaction it is not a significant amount of time but over the course of 1000 a day, it becomes significant.
    I was looking for a way to facilitate the process.

  • Change open sales order with new condition schema

    Hi SD Experts,
    I have to change condition type on condition schema. For example, now we have ZPVI (Discount %). I have to change with ZPFI (Discount %). But we have some open sales orders with old schema. Can I correct old sales orders with new condition schema? Is it possible?
    Thank you.
    Gulay Celik

    >
    Shai Sinai wrote:
    > 3) The item categories of document items are assigned to billing plan types. This customization does create separate billing plan for each item, but the billing plans of item are refrenced to the header billing plan (according database field FPLA-RFPLN and screen field RV60F-KFREL), what  means that item's values are not taken into consideration.
    >
    In this case it is obvious that it's not possible to have an item on the same document, which would have a billing plan different from the header. Unless, of course, you are ready to change the existing configuration or create a new item category, which would be independent from the header billing plan.
    If, despite configuration, such entry is possible in VA41/VA42, then you'll have to use BDC instead of BAPI. Unfortunately, BAPIs do not have all the same functionality that might be available in the transaction.

  • SD report for the open sales orders with items

    Hi,
    Is there any standard SAP report which display open sales order togeather with the open items. I want to have columns target quantity, delivered quantity and open quantity.
    Any tip?
    BR
    Saso

    Dear Saso,
    I think, instead using Report: VA05/ VA05N; its better to use Report: VL10C
    In this report, you will get all the Sales Orders along with Materials - relevant for open delivery, along with Open Qty. and various other options can be selected from "Change Layout - (Ctrlt+F8)".
    Best Regards,
    Amit
    Note: Don't maintain any Field-Entry (while executing the Report: VL10N; in order to list all Sales Orders. But, if you want to list Sales Orders based upon some criterias, maintain the Field-entries, as reqd.

Maybe you are looking for

  • RMAN - Using fileperset = 1 and want datafile name to appear in piece name

    Environment: 10.2.0.4 on HP-UX Hi guys, One of my many problems with Netbackup is the inablity to trace backups as they get duplicated around the environment For our FULL backups, our backup script uses filesperset = 1 which means every datafile is b

  • How do I modify the Project Central page?

    It seems that I cannot modify the Project Central page on my Project Server Sharepoint site. I want to add additional fields (ie, KPIs for cost, scope, budget, etc.) to the view as well as create new views but I do not see the option to do that anywh

  • When Migration Assistant won't work, what should be done?

    I had to zero a hard drive, fortunately all of my data was accessible, and I backed it up on another drive. Obviously did a fresh 10.4 install, and all of the updates so the computer is now up to date. How can I migrate everything to my new system fo

  • Loading the pre-built Oracle_BI_DW_Base repository

    Hello everyone: One step in the OBIEE Applications installations guide is to load the pre-built Oracle_BI_DW_Base. I don´t understand why do i have to do this? I´m kind of newbie with OBIEE App, i ´d really appreciate the help Cheers.

  • Slow down speed for testing purpose between virtual machine in hosted in Hyper-v

    Hello All, I have searched and could not find thread related to this . There is a scenario to test:  the network speed between virtual machine [client and server ]  must be really slow to check the application behavior on connecting to server. Please