How do I get the line number of the sales order and how do I save info?

I am trying to create a form that is able to be called from a right click on the sales order matrix and will display some of the user defined fields associated with the line.
I've managed to create a form and add a menu option to the right click but I'm now stuck because of the following:
1. How to I know which line the user selected? I need the REAL Line Number from the RDR1 table because I need to use it on the data filter of the form.
2. I hard coded a line to just to see if I can load a form and it appears to load and bind the data to the controls, but how do I save changes made? There are several text fields, combo boxes, and a picture control.

Hi Coleman,
1. The pVal returned form a menu event does no provide the LineId, but a pVal from a Item Event does. I suggest you use a DoubleClick or Control + Click on the Line to trigger an event that you can catch and use to launch your form.
2. Please note that if the Sales Order line is closed you'll not be able to update the values. If it's not, then you need to instantiate a Sales Order document, get the correct document with the GetByKey method and update whatever fields you need.
                Dim oSalesOrder As SAPbobsCOM.Documents = oCompany.GetBusinessObject(BoObjectTypes.oOrders)
                If oSalesOrder.GetByKey(docentry) = True Then
                    oSalesOrder.Lines.SetCurrentLine(pVal.Row - 1)
                    oSalesOrder.Lines.UserFields.Fields.Item("U_MyUDF").Value = ""
                    oSalesOrder.Update()
                End If
Regards,
Vítor Vieira

Similar Messages

  • How to read a file and save the line number of  the last line read?

    Hi,
    I am using RandomAccessFile and file as my class. I am trying to read a log file as it gets updated and print it out to a java window. i so far have the framework setup but dont know how to save the last line number so.
    i need this variable so i dont reprint out the same line numbers to the java window. please advise.
    thanks!

    hi,
    i now have the line number of the last line read, but now when i reopen the file, how can i skip that number of lines?
    thanks,

  • I downloaded a Trial version of Adobe Acrobat XI.  Now the trial has runout and I've signed up for a subscription.  However, my software still needs a serial number.  How can I get a serial number for the installed software?

    I downloaded a Trial version of Adobe Acrobat XI.  Now the trial has runout and I've signed up for a subscription.  However, my software still needs a serial number.  How can I get a serial number for the installed software?

    There is no serial number and you don't need one. What you need for a subscription is to SIGN IN within Acrobat, so it knows the subscriptions you own.

  • OracleSOA - File Adapter - Correct mechanism to get the line number from the file

    We are using Oracle SOA process to read data from a file, process the data and write it to the database. SOA process is created using Oracle File Adapter to read the data, Oracle BPEL to transform & process the data and Oracle DB Adapter to write the data into the database.
    Oracle File Adapter uses native schema to process the fixed length data in the file. The number of rows in the file may exceed more than 500,000, to support processing of large files we use chunk size in the file adapter as 4000 rows. In each read operation, file adapter reads the data that matches to the schema, there might be few rejected rows as well.
    Oracle File Adapter property - jca.file.LineNumber gives me only the line number till what line the data is read. Is there any way to get the line number in the xml message, which exactly matches to the line number in the file.?
    Flat File Format: (Every file has one header, trailer and multiple data lines),
    HEADER02 -
    L01
    L01
    L01
    TRAILER02
    Line number is one of the crucial requirement in the development of the SOA service, this is used to back trace the information from which source and line the data has come.

    Hi Anshul,
    Thanks for sharing your thoughts.
    I am using DB adapter to insert the data into db.
    While doing the xsl transformation I can get the index of the message using position(), but that is not the correct way as there can be rejected lines by the file adapter.
    Even if I maintain a local counter variable, it will not consider rejected lines and increment that, which is not correct.
    Thanks,
    Ravindra

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • HT201068 In the Ap Store "Updates" window, it says that "Remote Desktop Client Update" was installed today.  I never intentionally installed "Remote Desktop".  How did it get there, Where is it on my computer, and How can I remove it?  Thank You!

    In the Ap Store "Updates" window, it says that "Remote Desktop Client Update" was installed today.  I never intentionally installed "Remote Desktop".  How did it get there, Where is it on my computer, and How can I remove it?  Thank You!

    I don't know if you have been there, but a very suspicious icon!  (Like this one on a NSA satellite: http://b-i.forbesimg.com/kashmirhill/files/2013/12/Satellite-logo-for-spying.jpg)  Yikes!
    Are they after the French too?!?  I thought we were allies?!?  Wait a minute . . . I'm an American citizen with the Constitutional Right (which they vowed to uphold when they took their job!) of privacy!!!
    What do you think of all this?
    How did you find it in the OS?
    Do I just trash it with "Secure Empty"?

  • Dose the serial number need to be changed and how when selling Adobe Photoshop Elements 9

    Dose the serial number need to be changed and how when selling Adobe Photoshop Elements 9

    No, the serial number goes with the product. You should deactivate all your installed copies before selling it. Also, if you've used it qualify for upgrade pricing on a later version you can't sell it. Well, you could but the new owner won't be able to install it.
    Adobe does have a license transfer document, but not many people bother with it:
    Transfer an Adobe product license

  • Get the Ship-to-Party from Sales Order and Line item

    Hi all,
    I am developing one report in which I want to get the Ship-to-Party for a particular Sales Order and Sales Order Line item number.
    I can see table VBPA from I can get value of KUNNAR and so on. But my concern is that can the Ship-to-Party differ for different line items for sales Order, if yes how to get that one, any table or any function module?
    In my scenario i found out that ship-to-party only depend upon sales order and partner function not line item.
    please help me..
    regards,
    vikas.

    Hi,
    First step: Customer Creation (T. Code: XD01)
    i) Create Sold to Party (Ordering Party) with Account Group: Sold-to-Party
    ii) Create as many Ship-to-Party and Bill-to Party, if reqd, with Account appropriate Account Groups.
    iii) Match all the Ship-to-party/ Bill-to-Party/ Payer for the respective Sold-to-Party under Tab: Sales Area data, Sub-tab: Partners.
    Second Step: Sales Order Creation (T.Code: VA01)
    i) Enter Sold-to-Party at Header Level.
    ii) Enter Materials (at Line-item level).
    iii) Now, System will pop-up all the Ship-to-Party/ Bill-to Party/ Payer, Matched for the particular Sold-to-Party. Click on appropriate selection.
    OR
    Now, (if option doesn't pops-up) select the line and Double Click on to the same line. it will lead to the next page. Here, Click Tab: Partners
    Now, in Column: Partner Function, search for appropriate Partner: Ship-to-Party or Bill-to-Party or Payer.
    Remember: Sold-to-Party will be non-editable as entered at Header level.
    Repeat the same for Each Line-item.
    Regs,
    Amit K. Yadav

  • Show the object and the line number, where the error happens in Forms

    Hi!
    Al lot of our programmer use the ugly when others clause to raise messages like "error <sqlcode> happens in ....". Often this hides the really error in some underlying procedures. Is it possible to call the error stack from forms like in 10g database dbms_utility.format_error_backtrace? Actually FRM-40735 hides all this information. This should be work for client and database pl/sql errors!
    With kind regards

    First of all, send every programmer in your organization a message to STOP doing that. I am afraid there is nothing you can do when you have to call some stupid code from your form that contains the when others then... sequence.
    Below is an email I sent out just two months ago. I'll share it with you:
    Hi _______,
    I looked over the _________ package to try to determine why it was so difficult to find the source of the problem. The problem was that the line number reported when the job failed was line 326, which is the Raise command at the end of the __xyz__ procedure.
    When someone writes:
          exception when others then raise;it causes line number reporting to fail when an unexpected Oracle error is encountered. Furthermore, the line does absolutely no good, because Oracle will automatically raise unhandled errors without that code.
    The only thing that code does is cause problems when someone looks for the source of a failure. Without that code, job failures can be located in just a few minutes.
    That same code sequence is repeated three times in the _________ package. The problem may also exist in the __abc___... functions that the _______.lookup_xxxl function calls, since no line numbers were reported from there, either. It would be very helpful if you would remove the problem code, and PLEASE instruct everyone on your staff to never use that sequence anywhere.
    - - - - - - - - - - - - - - - - - - - - - - end of email - - - - - - - - - - - - - - - - - - - - - -
    Now, in addition, you can trap FRM-40735 in your on-error trigger and then display the message found in DBMS_ERROR_TEXT. In fact, you might try the format_error_backtrace from there, too.

  • How to display Header Texts that you find in Sales Order and Billing Doc..

    Hi,
    I am having some problems accessing the text that is typed in the Header Texts area of the Sales Order and Billing. To access the Header Text you should first trigger the Sales Order (VA02) then once in the Sales Order Click Goto -> Header -> Texts. The same follows to the Billing.
    I need to extract what is typed here on to a report. First of all I can’t figure out which table is used to save this information. I am suspecting that this information is encoded and stored in a table. To display this I may need to decode it.
    Is there some one who could help me to archive this please!!!
    Many Thanks,
    Kishan

    Hi Kishan,
    The texts you find in all SAP Object, like orders, invoice, materials, ... can be extract with FM 'READ_TEXT'.
    To know the parameters of the FM, you 'll have to go to the text ( in plain page mode ), then you do "GOTO" -> "HEADER", and a pop-up window opens with the parameters you need ( Text name, language, text id, text object ).
    The table "t_tdline" contains the entire text .
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        id                            = w_id
        language                      = sy-langu
        name                          = w_name
        object                        = w_object
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
      tables
        lines                         = t_tdlines
    hope this helps.
    Erwan.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • Defaulting the Sotrage location for all the line items in my sales order

    Hi,
    I have a scenario to default the storage location automatically in my sales order for all the line items. It is not going to change for a particular sales org. Dist. channel & Division combination. Can you pls. suggest me a solution for this.
    Thanks
    Ghanesh.

    Hi,
       You can default the storage location by using the below user exit
    Storage location
    Auto determination of storage location as u2018XXXXu2019 for sales order
    Include - MV45AFZB
    Form - USEREXIT_SOURCE_DETERMINATION
    IF (VBAK-AUART = 'XXXX' and VBAK-VKORG = 'XXXX' and VBAK-VTWEG = 'XX').
    VBAP-LGORT   = 'ABCD'.
    Regards,
    Gopal.
    Edited by: Gopalakrishnan S on Feb 25, 2010 7:35 AM

  • How do I get my Music library songs in alphabetical order and not sorted by artist?

    Curious how you can sort your songs by alphabetical order without them being grouped by artist? Having this problem on ipad and iPhone

    Well as far as I can recall, I did nothing special at all when I synced my music to the iPad. I have very few downloaded/purchased songs on the device, but even the very few purchased songs that I have in the Music App are in alphabetical order. The only settings that can be changed on the iPad are in Settings>Music and I don't see anything in there that has any bearing in this. I have Group by Album Artist selected, but that doesn't change the alphabetical order if I toggle it off and on.

  • How do I get an iPhone 4S for t-mobile ? And how much would it cost ?

    Help me please

    Contact T-Mobile and ask them.
    If you're referring to T-Mobile in the US, they are not an authorized or supported carrier.
    If you're referring to T-Mobiel in another country, again, contact them and ask.

  • How to retrieve a particular CST number of a sales order(vbeln

    hi!
    suggest me

    Hi
    you can give command line as follows
    /: <S>CST.NO:</>
    /: &J_1IMOCUST-J_1ICSTNO&
    Reward points if useful.

Maybe you are looking for