Tables identification for sales order fields

experts
1)I am having an order and it may have multiple deliveries.
in what way i need to fetch all the deliveries for that order?
lips-vgbel = vbap-vbeln , lips-vgpos- posnr will this work ?  or something else i need to use to get all the deliveries for that order?
2)and for that deliveries i will be having shippiments and how to get that?
3) from which table i can see whether return order exists for the sales order ?
4) how can we identity whether credit memo there for the sales order or not?
5)where(table) can we find the atp qunatity field which is there in sales order scheduline line data tab?
thank you for all the help

Hi
1)I am having an order and it may have multiple deliveries.
in what way i need to fetch all the deliveries for that order?
lips-vgbel = vbap-vbeln , lips-vgpos- posnr will this work ? or something else i need to use to get all the deliveries for that order?
Goto VBFA table, give your sales order number as VBFA-VBELV and fetch VBFA-VBELN where VBTYP_N = J
2)and for that deliveries i will be having shippiments and how to get that?
Goto VBFA table, give your Delivery number as VBFA-VBELV and fetch VBFA-VBELN where VBTYP_N = 8.
3) from which table i can see whether return order exists for the sales order ?
Goto VBFA table, give your sales order number as VBFA-VBELV and fetch VBFA-VBELN where VBTYP_N = H.
If sy-subrc = 0
  return order exists
else not.
4) how can we identity whether credit memo there for the sales order or not?
Goto VBFA table, give your sales order number as VBFA-VBELV and fetch VBFA-VBELN where VBTYP_N = K.
If sy-subrc = 0
   credit memo exists
else not.
Hope this is sufficient for your. Rest you can do R&D.

Similar Messages

  • Table Name for Sales Order Header Text.

    Hi.
    Whats the Table name for Sales Order Header Text???
    Reg,
    Amol

    Hi Amol,
    please Try to check the below link
    http://scn.sap.com/thread/1361272
    http://scn.sap.com/thread/416757
    https://scn.sap.com/thread/1909247
    https://scn.sap.com/thread/811915
    Regards,
    Gurunath

  • Table name for sales order with Customer info

    Hi Gurus,
    Could you please provide me table name for  sales order with customer no and customer name.
    I have list of sales order number (more than 1000 no's ) i need to identify customer number and customer name (ship to party and sold to party information). I am running this report every week. so i plan to create sqvi for this report.
    Thanks and regards,
    B.Deethya.

    Hello,
    Access Tables VBAK & VBAP.
    From the above tables you will get Solt to Party & Ship to Party Codes.
    For Customer names you have to pass the Customer Codes to Table - KNA1
    Hope this clarifies.
    Thanks,
    Jignesh Mehta

  • Table name for sales order history

    hi guys,
                   I want to know the name of table which contains sales order history.
    regards
    neelesh

    Hi
    Use this code it will get all the details
    Sales Order Changed History Display
    Sales Order Changed History Display
    You can execute the report by :
    1.  Change Date
    2.  User Name
    3.  Sales Order Number
    Submitted by : SAP Basis, ABAP Programming and Other IMG Stuff
                   http://www.sap-img.com
    REPORT ZSDCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
                     LINE-COUNT 065(001)
                     MESSAGE-ID VR.
    TABLES: DD04T,
            CDHDR,
            CDPOS,
            DD03L,
            DD41V,
            T685T,
            VBPA,
            TPART,
            KONVC,
            VBUK.
    DATA: BEGIN OF ICDHDR OCCURS 50.
            INCLUDE STRUCTURE CDHDR.
    DATA: END OF ICDHDR.
    SELECT-OPTIONS: XUDATE FOR ICDHDR-UDATE,
                    XNAME  FOR ICDHDR-USERNAME,
                    XVBELN FOR VBUK-VBELN.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: SUDATE RADIOBUTTON GROUP R1,
                SNAME  RADIOBUTTON GROUP R1,
                SOBID  RADIOBUTTON GROUP R1.
    SELECTION-SCREEN END OF BLOCK BLK1.
    DATA: WFLAG,
          WCHANGENR LIKE CDHDR-CHANGENR,
          WUDATE LIKE CDHDR-UDATE,
          WNAME  LIKE CDHDR-USERNAME,
          WVBELN LIKE VBUK-VBELN,
          WDEC1 TYPE P DECIMALS 3,
          WDEC2 TYPE P DECIMALS 3,
          WDEC3 TYPE P DECIMALS 3,
          WDEC4 TYPE P DECIMALS 3.
    DATA: UTEXT(16) VALUE 'has been changed',
          ITEXT(16) VALUE 'has been created',
          DTEXT(16) VALUE 'has been deleted'.
    DATA: BEGIN OF ICDSHW OCCURS 50.
            INCLUDE STRUCTURE CDSHW.
    DATA: END OF ICDSHW.
    DATA: BEGIN OF ITAB OCCURS 10.
            INCLUDE STRUCTURE CDSHW.
    DATA:   UDATE LIKE CDHDR-UDATE,
            USERNAME LIKE CDHDR-USERNAME,
            CHANGENR LIKE CDHDR-CHANGENR,
            VBELN(10),
            POSNR(6),
            ETENR(4),
            INDTEXT(200),
      END OF ITAB.
    SELECT * FROM VBUK WHERE VBELN IN XVBELN.
      CLEAR CDHDR.
      CLEAR CDPOS.
      CDHDR-OBJECTCLAS = 'VERKBELEG'.
      CDHDR-OBJECTID   = VBUK-VBELN.
      PERFORM READHEADER.
      PERFORM READPOS.
      LOOP AT ITAB.
        CASE ITAB-TABNAME.
          WHEN 'VBPA'.
            IF ITAB-FNAME = 'KUNNR' OR
               ITAB-FNAME = 'LIFNR' OR
               ITAB-FNAME = 'PARNR' OR
               ITAB-FNAME = 'PERNR' OR
               ITAB-FNAME IS INITIAL.
             MOVE ITAB-TABKEY TO VBPA.
             SELECT SINGLE * FROM TPART WHERE SPRAS = SY-LANGU
                                       AND   PARVW = VBPA-PARVW.
             IF SY-SUBRC = 0.
               REPLACE '&' WITH TPART-VTEXT INTO ITAB-INDTEXT.
             ENDIF.
           ENDIF.
         WHEN 'VBAP'.
           IF ITAB-FNAME IS INITIAL.
             REPLACE '&' WITH 'Item' INTO ITAB-INDTEXT.
           ENDIF.
         WHEN 'KONVC'.
           MOVE ITAB-TABKEY TO KONVC.
           SELECT SINGLE * FROM T685T WHERE SPRAS = SY-LANGU
                                     AND   KVEWE = 'A'
                                     AND   KAPPL = 'V'
                                     AND   KSCHL = KONVC-KSCHL.
           IF SY-SUBRC = 0.
             REPLACE '&' WITH T685T-VTEXT INTO ITAB-INDTEXT.
           ENDIF.
         ENDCASE.
         IF ITAB-INDTEXT(1) EQ '&'.
           REPLACE '&' WITH ITAB-FTEXT(40) INTO ITAB-INDTEXT.
         ENDIF.
         IF ITAB-CHNGIND = 'I'.
           REPLACE '%' WITH ITEXT INTO ITAB-INDTEXT.
         ELSEIF ITAB-CHNGIND = 'U'.
           REPLACE '%' WITH UTEXT INTO ITAB-INDTEXT.
         ELSE.
           REPLACE '%' WITH DTEXT INTO ITAB-INDTEXT.
         ENDIF.
         CONDENSE ITAB-INDTEXT.
         MODIFY ITAB.
       ENDLOOP.
    ENDSELECT.
    IF SUDATE = 'X'.
      SORT ITAB BY UDATE VBELN POSNR ETENR.
    ELSEIF SOBID = 'X'.
      SORT ITAB BY VBELN POSNR ETENR UDATE.
    ELSE.
      SORT ITAB BY USERNAME VBELN POSNR ETENR UDATE.
    ENDIF.
    LOOP AT ITAB.
      CLEAR WFLAG.
      IF SUDATE = 'X'.
        IF WUDATE NE ITAB-UDATE.
          SKIP.
          WRITE:/001 ITAB-UDATE,
                 023 ITAB-USERNAME,
                 037(10) ITAB-VBELN.
          WFLAG = 'X'.
          WUDATE = ITAB-UDATE.
          WCHANGENR = ITAB-CHANGENR.
        ENDIF.
      ELSEIF SOBID NE 'X'.
        IF WVBELN NE ITAB-VBELN.
          SKIP.
          WRITE:/001 ITAB-VBELN.
          WVBELN = ITAB-VBELN.
        ENDIF.
      ELSE.
        IF WNAME NE ITAB-USERNAME.
          SKIP.
          WRITE:/001 ITAB-USERNAME.
          WNAME = ITAB-USERNAME.
        ENDIF.
      ENDIF.
      IF WCHANGENR NE ITAB-CHANGENR.
        WRITE:/023 ITAB-USERNAME,
               037(10) ITAB-VBELN.
           WFLAG = 'X'.
           WCHANGENR = ITAB-CHANGENR.
        ENDIF.
        IF WFLAG = 'X'.
          WRITE: 013 ITAB-CHNGIND,
                 049 ITAB-POSNR,
                 057 ITAB-ETENR,
                 065 ITAB-INDTEXT(60).
        ELSE.
          WRITE: /013 ITAB-CHNGIND,
                  049 ITAB-POSNR,
                  057 ITAB-ETENR,
                  065 ITAB-INDTEXT(60).
        ENDIF.
      WRITE:/065 ITAB-F_OLD.
      WRITE:/065 ITAB-F_NEW.
    ENDLOOP.
    FORM READHEADER.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
           EXPORTING
                DATE_OF_CHANGE    = CDHDR-UDATE
                OBJECTCLASS       = CDHDR-OBJECTCLAS
                OBJECTID          = CDHDR-OBJECTID
                TIME_OF_CHANGE    = CDHDR-UTIME
                USERNAME          = CDHDR-USERNAME
           TABLES
                I_CDHDR           = ICDHDR
           EXCEPTIONS
                NO_POSITION_FOUND = 1
                OTHERS            = 2.
      CASE SY-SUBRC.
        WHEN '0000'.
        WHEN '0001'.
          MESSAGE S311.
          LEAVE.
        WHEN '0002'.
          MESSAGE S311.
          LEAVE.
      ENDCASE.
    ENDFORM.
    FORM READPOS.
      LOOP AT ICDHDR.
        CHECK ICDHDR-UDATE
                            IN XUDATE.
        CHECK ICDHDR-USERNAME
                              IN XNAME.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
             EXPORTING
                  CHANGENUMBER      = ICDHDR-CHANGENR
                  TABLEKEY          = CDPOS-TABKEY
                  TABLENAME         = CDPOS-TABNAME
             IMPORTING
                  HEADER            = CDHDR
             TABLES
                  EDITPOS           = ICDSHW
             EXCEPTIONS
                  NO_POSITION_FOUND = 1
                  OTHERS            = 2.
        CASE SY-SUBRC.
          WHEN '0000'.
            LOOP AT ICDSHW.
              CHECK ICDSHW-CHNGIND NE 'E'.
              CLEAR ITAB.
              MOVE-CORRESPONDING ICDHDR TO ITAB.
              MOVE-CORRESPONDING ICDSHW TO ITAB.
              CASE ITAB-TABNAME.
                WHEN 'KONVC'.
                  MOVE ICDHDR-OBJECTID TO ITAB-VBELN.
                  MOVE ICDSHW-TABKEY(6) TO ITAB-POSNR.
                WHEN OTHERS.
                  MOVE ICDSHW-TABKEY+3(10)  TO ITAB-VBELN.
                  MOVE ICDSHW-TABKEY+13(6)  TO ITAB-POSNR.
                  MOVE ICDSHW-TABKEY+19(4)  TO ITAB-ETENR.
              ENDCASE.
              MOVE '& %' TO ITAB-INDTEXT.
              APPEND ITAB.
              CLEAR ITAB.
            ENDLOOP.
          WHEN OTHERS.
            MESSAGE S311.
            LEAVE.
        ENDCASE.
      ENDLOOP.
    ENDFORM.
    TOP-OF-PAGE.
    WRITE:/ SY-DATUM,SY-UZEIT,
           50 'SALES ORDER CHANGE HISTORY',
          120 'Page', SY-PAGNO.
    WRITE: / SY-REPID,
             60 'SALES ORDERS STATISTICS'.
    SKIP.
    ULINE.
    IF SUDATE = 'X'.
      WRITE:/001 'Change Date',
             013 'Time',
             023 'User Name',
             037 'Sale Order',
             049 'Line',
             057 'Sch No',
             065 'Changes'.
    ELSEIF SOBID = 'X'.
      WRITE:/001 'Sale Order',
             013 'Line',
             021 'Sch No',
             029 'Change Date',
             041 'Time',
             051 'User Name',
             065 'Comment'.
    ELSE.
      WRITE:/001 'User Name',
             015 'Time',
             025 'Change Date',
             037 'Sale Order',
             049 'Line',
             057 'Sch No',
             065 'Changes'.
    ENDIF.
    ULINE.
    *--- End of Program
    Regards
    Shiva

  • VBBE and VBBS tables entries for Sales order

    Hi,
    I am trying to do an enhancement. I want to understand when does sales order entries hit tables vbbe and vbbs. on which values is it dependent.

    Hi,
    Let me explain you wahat i exactly wana do. May be that will help you to provide me with solution. When I create a new sales order irrespective of referring, in vbbe table i want to insert business document and item no as the sales order no and item no. which is bring created. so i need to change the values of the field values of vbbe table while sales order is generated but after sales order no is generated in the code.

  • Lookup Table Name for Sale Order Types

    Hello,
    What's the Lookup table name that contains the "meaning" for the column ORDER_TYPE_ID in the OE_ORDER_HEADERS_ALL table?
    Thanks,
    Smita

    Thank you Srikanth!
    I was just checking into the OE_TRANSACTION_TYPES table and it was empty!?
    But OE_TRANSACTION_TYPES_TL did the trick!
    Thanks again!
    Smita:)

  • Table for sales order change by field

    Dear Friends,
    I want to get the data @ table level for the list of sales orders with changed by field. Can you please tell which table/s for sales order change by field can be used?
    Thanks,
    pinky

    Hi
    You can get the changes for SALES ORDER item in CDPOS table
    Goto SE16 and find the changes.
    hope it will serve your purpose.
    thanks,
    santosh

  • TABLE/FIELD FOR SALES ORDER'S SHIP TO LOCATION

    Hi everyone,
    Does anyone tell me what is the related tables/fields for Sales Order's Ship To Location? Since I want to display the Ship To Location information in the Oracle Report in Oracle Apps R11i.
    I tried to use the following SQL select statement to retrieve the Ship to address:-
    -- SHIP TO LOCATION
    select a.address_id, c.customer_name, C.CUSTOMER_ID, A.SITE_USE_ID from ra_Site_uses_all a, ra_addresses_all b, ra_customers c
    where a.site_use_code = 'SHIP_TO' and
    a.status = 'A' and
         b.address_id = a.address_id and
         c.CUSTOMER_ID = b.CUSTOMER_ID and
         b.status = 'A' and
         c.customer_id in (select customer_id from ra_customers) and
         c.status = 'A' and
         c.customer_name like 'CLARION (H.K.)%'
    But I found that the data is BILL TO address. Can anyone help me? Thanks.

    Hi all, I managed to solve my problem. Here's the query in case someone need it. Thanks
    SELECT party.party_name "Send to" (SELECT party.party_name
    FROM hz_cust_site_uses_all bill_su,
    hz_cust_acct_sites_all bill_cas,
    hz_party_sites bill_ps,
    hz_locations bill_loc,
    hz_parties party,
    oe_order_headers_all h
    WHERE h.invoice_to_org_id = bill_su.site_use_id
    AND bill_su.cust_acct_site_id = bill_cas.cust_acct_site_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_loc.location_id = bill_ps.location_id
    AND bill_cas.party_site_id = bill_ps.party_site_id
    AND bill_ps.party_id = party.party_id
    AND h.order_number = 'your_order_number') "Invoice to"
    FROM oe_order_headers_all h,
    hz_cust_site_uses_all ship_su,
    hz_cust_acct_sites_all ship_cas,
    hz_party_sites ship_ps,
    hz_locations ship_loc,
    hz_parties party
    WHERE h.ship_to_org_id = ship_su.site_use_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_su.cust_acct_site_id = ship_cas.cust_acct_site_id
    AND ship_cas.party_site_id = ship_ps.party_site_id
    AND ship_ps.party_id = party.party_id
    AND ship_loc.location_id = ship_ps.location_id
    AND h.order_number = 'your_order_number';

  • Custom field for sales order - Urgent.

    Hi all,
    I am novice at SD, want to append a custom field to header level tables - VBAK, LIKP, VBRK. for sales order.
    - Will append structure work for this requirement ?
    - Will this field automatically apears in VA01, VA02, VA03 screen ?
    Thanks in Advance.
    Regards,
    Mohan.

    Hi,
    Implementation Guide.
    This is the place where we do the configuaration settings for sap.
    This is the place where the core users or super users do the configuration changes if they want after the project is implemented.
    Mohan
    Award points if it helps

  • New Input fields for Sales Order Screen

    Hi all
    I have to modify the existing Sales Order Screen for transactions VA01, VA02 and VA03 using user exits. I have to add two input fields (of order quantity for tow different sales units CS and BT) in existing table control of Sales order and later I want to convert these UOMs to basic UOMs.
    As its a screen exit part, I had done some R&D for the same. I had never faced such requirement in past.According to my knowledge "User exits are only to put additional information in existing SAP programs and not to modify main screens." 
    BADI is new to me but I still tried to search BADI for the same but didn't able to find it.
    Basically I am not able to find Screen Exit for this.
    Can anybody help me in this regard?
    If you are suggesting BADI then please try to explain in detial.
    Thanks in advance
    Amol

    Hi Amol,
    VA01, VA02 are fine. Since VA03 is display, you cannot edit the fields you add.
    To add fields to this display you need to edit the following screens :
    Program : SAPMV45A
    Screen :  8309
    It is the Additional Data B tab provided by SAP to add custom fields .
    You may need an access key to edit this screen.
    Putting your fields there and running VA01/02 will solve half your problem.
    The second half is how to capture the data entered in those fields to the database.
    In order to capture the data from these custom fields you can use
    the user exit
    MV45AFZZ
    USEREXIT_SAVE_DOCUMENT_PREPARE
    USEREXIT_SAVE_DOCUMENT depening on what you want to do.
    Hope this helps.

  • What is the field for sales order type?

    pls tell me what is the field for sales order type??
    and from which table........urgent

    Hi,
    Field for sales order type is AUART in table TVAK
    the Parent table for Sales order type is TVAK.
    Best regards,
    raam

  • In which table,i could find order quantity for sales order..??

    In which table, i could find order quantity for sales order..??
    and also in which table i could find delivery for sales order..
    need help..??
    Moderator message: please search.
    Edited by: Thomas Zloch on Feb 23, 2012

    Check the table AUFM.
    Give the order number in AUFNR.
    For movement type 261 (GI) & 101 (GR), you can get the material document number (MBLNR), Material (MATNR), Qty (MENGE) & UoM (MEINS).

  • VBBE Table for Sales Order Open Quantity......

    Hi Experts,
    In VBBE Table I found sales Order Open Quantity but Some of the Materials are not showing in this VBBE table which are still pending (Open).
    What may the reason.
    Yusuf

    Hi CHR,
    In S001 table i found related material open qty. but there is no link with vbeln posnr and etenr (schedule date). Only Customer Code (Kunr) is available.
    This is no use for me for making report.
    Yusuf

  • Update KOMV-KBETR field for sales order and billing

    I would like to update the KOMV-KBETR (condition amount or percentage) under condition tab for both Sales order and billing.
    example:There are two condition types ZA00 and ZB00 and need to get the KBETR value from ZA00 and add it to KBETR value of ZB00 and update the sum in KBER value of ZB00.
    1. creation of sales order & billing.
    2. Change of sales order & billing.
    3. For single & multiple line items in both sales order & billing.
    4. during updation of price in the change mode of sales order & billing.
    5.When user click on Update button in the condition tab(i.e., when clicked on Carryout new pricing)
    I tried with the VOFM routine but as the routine is triggering multiple times the sum is calculated again and again.For that I set flags also.It is working for sales orders but for billing creation the field XKOMV-KBETR is cleared after this routine.
    So I would like to know are there any EXITS for this scenario or any one entountered the similiar issue which I am facing.

    Hi Brad,
       It is an Client requirement.So need to do the addition of that condition types.
    Can you please let me know the configuration point where we can do it and the condition type which we need to update the Rate/Amount value.ie., KOMV-KBETR is and Price list value and not the subtotal one.
    Thanks,
    Srilakshmi Lagisetty.

  • Tables for Sales Order,Delivery Doc, Billing Doc

    Hello All,
    Can anyone list the tables that are relevant for Sales Order,Delivery, Billing-Header,Item,Schedule line level as applicable.
    Regards,
    Raj

    Hi Raja Sekhar,
    Customers
             KNA1   General Data
                      KNB1   Customer Master – Co. Code Data (payment method, reconciliation acct)
                      KNB4   Customer Payment History
                      KNB5   Customer Master – Dunning info
                      KNBK   Customer Master Bank Data
                      KNKA   Customer Master Credit Mgmt.
                      KNKK   Customer Master Credit Control Area Data (credit limits)
                      KNVV   Sales Area Data (terms, order probability)
                      KNVI   Customer Master Tax Indicator
                      KNVP   Partner Function key
                      KNVD   Output type
                      KNVS   Customer Master Ship Data
                      KLPA   Customer/Vendor Link
    Sales Documents  
    VBAKUK VBAK + VBUK
                      VBUK   Header Status and Administrative Data
                      VBAK   Sales Document - Header Data
                      VBKD   Sales Document - Business Data
                      VBUP   Item Status
                      VBAP   Sales Document - Item Data
                      VBPA   Partners
                      VBFA   Document Flow
                      VBEP   Sales Document Schedule Line
                      VBBE   Sales Requirements: Individual Records
    SD Delivery Documets
    LIPS   Delivery Document item data, includes referencing PO
                      LIKP   Delivery Document Header data
    Billing Document 
    VBRK   Billing Document Header
                      VBRP   Billing Document Item
    SD Shipping Unit 
    VEKP   Shipping Unit Item (Content)
                      VEPO   Shipping Unit Header
    REWARD POINTS IF HELPFUL
    Regards
    Sai

Maybe you are looking for

  • Why won't the raw files from my new Nikon D810 open in ACR?

    I just shot a newborn session on my brand new Nikon D810 and my RAW files will not open in ACR or CC or PSE. Everything is up to date. This is my first time using the new camera and the photos are for a paying client. Am I screwed until the new ACR u

  • Download BFILE Procedure

    I have a problem with a procedure for downloading BFILE. This procedure was working before (I swear):    PROCEDURE download_bfile (       file_in        IN   VARCHAR2,       directory_in   IN   VARCHAR2 DEFAULT 'DATA_PUMP'    AS       lob_loc    BFIL

  • All my photo's are the same

    I recieve emails from a IP Webcam. When I look at them via the iPhone all the pics are the same across emails. If I delete all of them then receive a new one I get then new pic. But thats the only one I can see in every new email. If I use a third pa

  • New on Game Develop - I need a Start Point :)

    Hi, I know that this must be the topic most common, I develop applications to client/Server and I want to venture me in the development of a game (RPG). The problem is that I do not know where to start! Which are the class that I must use? Already ex

  • Opening files in adobe

    How to open file in adobe from safari