Getting missed sales order no. Urgent

Hi,
I have a requirement like: in one internal table has all sale order numbers with some other fields around 10.and the other internal table has some sale order numbers with customer name,address(3 fields). I have to get all the missing sales order numbers into the internal table which has three fields.
Iam trying this with loop at and read but iam not getting all records.
Please help me how to write the code for this.
Thanks in Advance.
Regards,
Sri.

Hi,
Check this code.
Move corresponding itab1 to itab2.
delete adjacent duplicates from itab2 comparing sale_order.
itab2 is the one which has 3 fields.
Reward if helpful.
Regards.

Similar Messages

  • BAPI or FM to get open sales orders to material like TC VA05N

    Hi,
    i'm searching for a bapi or fm to get a list with all open sales orders to a material like the tc va05n this do. Maybe some of you know such a bapi or fm.
    I tried the fm SD_SELECT_SALES_DOCUMENTS but i don't get the result i hoped.
    Would be happy if someone could help me.

    Hello Alexander,
    To get Open Sales order has VA05N use the Function Module
    RV_SALES_DOCUMENT_VIEW_3
    We need to pass value to the Importing parameters VBCOM
    To get the open sales order
    VBCOM-VKORG = sales organisation
    VBCOM-ZUART  = 'A'
    VBCOM-TRVOG = '0'
    VBCOM-STAT_DAZU = 'X'
    VBCOM-NAME_DAZU = 'X'
    VBCOM-KOPF_DAZU = 'X'
    VBCOM-VBOFF = 'X'
    VBCOM-AUDAT = Begin Date
    VBCOM-AUDAT_BIS = end date
    By passing this variable you will get the all open sales for given sales organisation and given date.

  • How to get master sales order number from delivery number

    Hi All,
    I need logic for getting master sales order number from available Delivery number.
    Note: There can be many SO's in diffrent levels.
    Finally i need to pick up master sales order no.
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have a outbound delivery[VL03N] 'X' in my system .
    Then for getting sales order no i am writing below code:
      SELECT single vbelv vbeln
             from vbfa
             INTO (vbelv, vbeln)
             where vbeln   EQ p_vbeln AND
                   vbtyp_n EQ 'J'.
    Then vbelv i need to pick up master sales order no.
        SELECT vbelv vbeln
               from vbfa
               INTO TABLE i_so
               where vbeln   EQ l_vbelv AND
                     vbtyp_n EQ 'C'.
    If i write code as above it is giving four sales orders which one of them is master sales order no!
    Thanks,
    Deep.

  • How to get display sale order in MB51

    Hi,
    How we can get display sale order in mb51 , at present only sale order with special stock "E" is been display .
    Thanks..

    HI,
    if you just want last / latest SALES ORDER for material then check table VBAP
    if last billing document then check table VBRP
    check MCBE
    Prese F6
    there you can select the columns
    Last consumptn.
    Last gds issue
    Last gds mvmt.
    Last Receipt
    VA05- Report for the sale with Material Vs Customer. or
    You can easily get that in VBAP by putting the material number for MATNR
    for more clarity please refer the below link...
    How to findout last sale transction date of perticular material
    Regards,
    Udaya.

  • Function module or BAPI to get the sales order details.

    Hi,
    Can any one revert back with the FM or BAPI to get the sales order details.
    I tried using BS01_SALESORDER_GETDETAIL, in my driver program of smartform but when i execute the form using VA03 -> Sales Document -> Issue output to -> Print preview, I am getting the required output.
    if i see the print preview in the overview of the sales order (enter sales order and press enter), the above specified FM is not populating any data.
    Thanks,
    Prathap

    Hi Prathap,
    The above specified FM BAPISDORDER_GETDETAILEDLIST should work. As you need the item conditions,
    Fill the I_BAPI_VIEW with header = 'X', item = 'X' and sdcond = 'X'.
    Fill the SALES_DOCUMENTS-vbeln = sales order number.
    Regards,
    Shylaja

  • Calling VA01 from Report,how to get the Sales Order  No when Back.

    Hi all,
    I have a requirement of calling va01 from the report and have done that using
    did recording ...&
    call transaction va01 using bdcdata.
    but my problem is when back from that trasaction i have to get the sales order that is created . Is it possible to retrieve that value from va01 .i am unable to get . anyone pls share

    Use the addition MESSAGES INTO itab with call transaction va01 using bdcdata.
    Effect of MESSAGES INTO itab:
    Using this addition, all the messages sent during batch input processing are stored in an internal table itab of the type BDCMSGCOLL from the ABAP Dictionary.
    If the call transaction is successful then retrieve the last message from itab and then in any field among MSGV1,MSGV2,MSGV3,MSGV4 of itab u will get the document no.
    And when doing the call transaction pl. choose update mode as 'S' or 'L'.
    Regards,
    Joy.

  • Get the sales order number based on customer number

    HI all,
    how can i get the sales order numbers based on the customer number?
    plz tell me the table names.
    thanks,
    Srini

    hiiiii..
    go to database table VBAK
    where you can find customer id and sales order
    use a select statement in your report program
    and key as kunnr ...
    i hope it does ...the job

  • Get a Sales order based on delivery

    Hi,
    Is this the way to get a Sales order based on a delivery ?
    if(Delivery.GetByKey(DeliveryDocEntry))
        Delivery.Lines.SetCurrentLine(1);
        if (SalesOrder.GetByKey(Delivery.Lines.BaseEntry))
            //TODO: Do your job here !

    If you want to see how the multiple so's connected to one DN works,  go into test and create 2 sales orders for the same customer.  Then go into Delivery notes, key in that customer code & hit copy from, then select sales order.  Both those orders will pop up in a matrix & you can select them both at once.  After that the line items from both orders will be in your dn.  If you select a line from the first order & hit the source document icon on the tool bar (even in add mode) it will take you to that order and selecting a line item from the second order & clicking the source button will take you to it's based-on document.
    If you're lucky, your organization never does that, (but "never say never", right?

  • Get the Sales Order number from Service Notification

    Hi Experts,
                       Please let me know if there are any BAPI's or standard Function modules to get the Sales order for a given Service Notification number.
    Thanks a lot

    Hi Ashish,
    Hope the listed BAPI's let you solve the issue:
    BAPI_SERVNOT_CLOSE Complete service notification
    BAPI_SERVNOT_CREATE Create service notification
    BAPI_SERVNOT_DEL_DATA Delete Items, Causes, Activities, Tasks, Partners of the service notif.
    BAPI_SERVNOT_GET_DETAIL Get details about a service notification
    BAPI_SERVNOT_MODIFY_DATA Modify a service notification or associated subdata
    BAPI_SERVNOT_POSTPONE Postpone service notification
    BAPI_SERVNOT_PUTINPROGRESS Put in process a service notification
    BAPI_SERVNOT_SAVE Save service notification
    BAPI_SERVICENOTIFICAT_CREATE Create service notification
    BAPI_SERVICENOTIFICAT_GETLIST Select service notifications according to customer or contact person
    BAPI_SERVNOT_CHANGEUSRSTAT Change the user status of a service notification
    Regards,
    Soundarya.

  • I am not able to get in sales order and delivery  24 hours

    Hi Frinds,
    i am not able to get in sales order and delivery  24 hours even i have defined pick pack time wrkdays 24hrs in
    CONFIG PATH:-Implementation Guide for R/3 Customizing (IMG) -> Logistics ->Execution->basic shipping Functions-> scheduling-> Delivery Scheduling and transporting Scheduling -> Define Scheduling by Shipping Point Or Transaction code:-OVLZ.
    Expected  Results:-Create sales order and delivery and check that the delivery The order has 24 hours after the transfer order is confirmed to allow time to pack order
    *can you help any body  to get in sales order and delivery  24 hours .
    Regards
    Madhu

    Dear Madhu
    Apart from OVLZ, you can also check in VOV8 where for your sale document type, check whether any value is maintained in the field "Lead time in days" at the bottom screen.
    thanks
    G. Lakshmipathi

  • Get the sales order text from ITS and save it in SAP.

    Hi,
    I have created an application to create sales order from ITS. In this app i'm having a text field to fet the header text for the order. & after that I'm calling an RFC which has a BAPI to create the sales order.
    Now, when i enter the text for header texts in frontend (separated by ENTER), then it saves only the first line of the text.
    I've tried using :
    SPLIT ordernotes AT cl_abap_char_utilities=>cr_lf INTO TABLE t_ordnotes.
    and using FM: CREATE_TEXT,
    but still, it is saving only the first line.
    Can anyone please help me with this ?????
    Its urgent.
    Thanks in advance,
    Hemant.

    Hi
    See the sample BDC program that is used to upload the Material LONG Texts into SAP using MM01 Tcode
    check this may be helpful
    REPORT zmm_longtext
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab1 OCCURS 0,
            matnr    LIKE mara-matnr,    " Material
            text     LIKE tline-tdline,  " Long Text
          END OF itab1.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,    " Material
            text  LIKE tline-tdline,  " Long Text
          END OF itab.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline.   " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname,   " Object Name
           dl_lan TYPE thead-tdspras,   " Language
           gv_matnr TYPE matnr.
    Constants
    CONSTANTS:
    Object ID for Long Text of Material Basic Data 1
      c_best     TYPE thead-tdid VALUE 'GRUN',
      c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
    Parameters
    PARAMETERS p_file LIKE rlgrap-filename.
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab1
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      SORT itab1 BY matnr.
      LOOP AT itab1.
        CLEAR gv_matnr.
        SELECT SINGLE matnr INTO gv_matnr
           FROM mara WHERE bismt = itab1-matnr.
        IF itab1-text NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text.
          APPEND itab.
        ENDIF.
        CLEAR itab.
      ENDLOOP.
      DELETE itab WHERE matnr EQ ' '.
    Upload the Texts
      SORT itab BY matnr.
      LOOP AT itab.
        dt_lines-tdformat = 'ST'.
        dt_lines-tdline = itab-text.
        APPEND dt_lines.
        dl_lan = sy-langu.
        dl_name = itab-matnr.
    Call the Function Module to Create Text
        CALL FUNCTION 'CREATE_TEXT'
          EXPORTING
            fid         = c_best
            flanguage   = dl_lan
            fname       = dl_name
            fobject     = c_material
            save_direct = 'X'
            fformat     = '*'
          TABLES
            flines      = dt_lines
          EXCEPTIONS
            no_init     = 1
            no_save     = 2
            OTHERS      = 3.
        IF sy-subrc <> 0.
          WRITE:/ 'Long Text Creation failed for Material'(001),
                 itab-matnr.
        ELSE.
          WRITE:/ 'Long Text Created Successfully for Material'(002),
                 itab-matnr.
        ENDIF.
        AT END OF matnr.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • BOP Monitor missing Sales Orders, Displays only STOs

    Hi,
    We have an issue with a back order processing monitor screen.  BOP Monitor displays both SO and STO immediately after the BOP run but wipes out the SO from display after few hours. I guess the SOs have been deleted from buffer and so we don't see them on monitor screen.
    We have no functional issues as SO have been processed and confirmed but only the monitor screen misses SO. How does the buffer removes only SO?  Do we have any programs to change the buffer? Much appreciate your clues here.
    Thanks

    Hi Asokan,
    BOP Monitor is a dymanic display unlike SM37 background jobs log. So, if you see the Monitor immediately after BOP run, it would show you the results of BOP. However, if you see after some hours, the display will show you dynamic situation of your BOP result elements i.e. situation of schedule lines at that moment.
    If you have any program in R3 that updates sales orders, then there is possibility that the sales order schedule lines are updated and no longer available for display.
    Please check whether you get any messages in BOP Monitor. Also, for reference to BOP runs, please refer BOP_RESULT instead of Monitor. This report is static and will show you situation before BOP and after BOP.
    Regards,
    Bipin

  • MC-q report is not updating the missing Sales Orders, Deliveries andInvoice

    Hi Friends,
    Before setting the configuration of MC-q report I have created some Sales orders, deliveries and Invoices
    But I want to update the missing above documents  in MC-q report sales report.
    Could you please suggest me how can I update all the missing details in MC-q report report (Sales Orders, Deliveries and Invoices)
    Thank you for your support
    Best Regards
    Amjathpasha

    Hello Amjathpasha,
    You will need to perform a rebuild of statistics with transactions OLI7, OLI8, OLI9.
    I hope this helps.
    Best regards,
    Ian Kehoe

  • How to get customer / sales order details for VBBS table?

    Hi Friends,
    I have a requirement to create a report that will give the details of sales order ( VBELN ) and customer ( KUNNR) details from the sales requirement totals record table ( VBBS )
    Currently we have a report that just gives out the VBBS table entries for plant and material combination. As you are aware, the VBBS table contains the sales / deliveries requirements as displayed in MD04 transaction.
    Now there is a requirement to have the customer ( KUNNR ) and sales order (VBELN )  detail for each individual requirement totals.
    I checked the VBBE table ( sales requrirement : individual records ) but I cannot find any relationship between VBBS and VBBE. If there is a material / plant in VBBS , the same entry does not exist in VBBE.
    Please suggest if there is any other table to get this detail.
    Thanks
    Satya

    Tables are related.
    MATNR
    WERKS
    MBDAT
    LGORT
    CHARG
    etc fields are common in both VBBS and VBBE.
    May be you can generate a condition a fetch data using this.
    I hope it helps.
    thanks

  • How do I get the Sales Orders Statuses? Is there any API for that?

    Hi!
    I'm trying to track all the statuses of a sales order. I want to get the header status, lines status, holds status, shipping status and the invoiced status.
    Does anyone knows if there is an API for that? Or I'll have to make lots of querys for that?
    I found out the following APIs, but it only returned me Y or N:
    -oe_header_status_pub.get_booked_status;
    -oe_header_status_pub.get_cancelled_status;
    -oe_header_status_pub.get_closed_status;
    -oe_holds_pub.check_holds;
    -oe_line_status_pub.get_pick_status;
    -oe_line_status_pub.get_ship_status;
    -oe_line_status_pub.get_invoiced_status;
    Thanks for the help!

    Hi,
    You can find the status of both SO Headers ahd Lines from the FLOW_STATUS_CODE column in oe_order_headers_all and oe_order_lines_all tables.
    Thanks
    Gowrishankar

Maybe you are looking for

  • How can i open my iBook on my Mac, not just on my iPhone

    Hi, how can i open my iBook on my Mac, not just on my iPhone?  I ask this questions in hopes that I can eventually find a way to have the iPhone read a non "Enhanced" iBook to me. I used the Accessibility reader for a brief time but it's very persini

  • How to avoid the presence of element in the Destination file if the value is empty

    Hi, I am using a map, in which Source is an XML File, Destination is a FlatFile For Eg: Input File <Name> FirstName>aaa</FirstName> <LastName>bbb</LastName> </Name> Output File FirstName     LastName aaa                bbb Destination Schema is also

  • Macbook pro "Desktop and screensaver" missing

    I don't know how this actually happened. But one day I was tired of my screensaver and went to go change it. So when I clicked on system preferences I noticed the "Desktop and screensaver" pane missing. I don't even know how long it's been like this.

  • Inter company project billing

    Hi I have 2 companies with seperate company codes in the same Organisation. One 1000 company manufactures the Fin product in plant 1.The fin.product is sold to outside customers & handled as a project in the 2nd company 2000 . During SO creation in t

  • Activation Server Error ADE

    Good day When I try to Authorise my ADE I'm getting the following error. I've tried installing both versions of ADE same ERROR OS Windows 8 Please advice on steps to follow I