VBKD singnificance

Hi,
may i know what exactly is the significance of this table VBKD in sales documents??/
As i see there are tables like VBAK and VBAP which are having Header and Items data respectively i wonder what does the table VBKD contains???
ofcourse Sales mean Business so why seperate table like sales.doc business data???
Raj

Thanks for the answer!
My question was why business data in seperate table???
You were saying this is item level right? we have VBAP which has all the sales document items !!!!!!
can you calrify pls???
Raj

Similar Messages

  • How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi

    Hi Experts,
    Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
    i/p for my report is am excel.
    excel is having  below formatt.
    To create salesdoc we are using SD_SALESDOC_CREATE bapi.
    but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom  field) in VBKD w.r.t salesdocument.
    Need your help what we need to do to reflect the value in vbkd table.
    Here temp will contains the data from excel
    1)
    FORM f_move_header_data .
       wg_header-doc_type            = wg_temp-auart .                   "Order type
       wg_header-sales_org           = wg_temp-vkorg .                   "Sales Organization
       wg_header-distr_chan          = wg_temp-vtweg .                   "Distribution Channel
       wg_header-division            = wg_temp-spart.                    "Division
       wg_header-sales_off           = wg_temp-vkbur .                   "Sales Office
       wg_header-sales_grp           = wg_temp-vkgrp .                   "Sales Group
       wg_header-purch_no_c          = wg_temp-bstnk .                   "Customer purchase order number
       wg_header-pymt_meth           = wg_temp-zlsch  .                  "Payment Method
       wg_header-zzychan_role        = wg_temp-zzychan_role_i.           "Channel Role
       wg_header-zzysub_role         = wg_temp-zzysub_role  .            "Submitter Role
       wg_header-zzy_inv_for_opt     = wg_temp-zzinv_format  .           "Invoice Format Optio
       wg_header-ord_reason          = wg_temp-augru  .                  "Order Reason Code
       wg_header-bill_block          = wg_temp-faksp.                    "Billing Block
       wg_headerx-doc_type            = c_set .                   "Order type
       wg_headerx-sales_org           = c_set .                   "Sales Organization
       wg_headerx-distr_chan          = c_set .                   "Distribution Channel
       wg_headerx-division            = c_set.                    "Division
       wg_headerx-sales_off           = c_set .                   "Sales Office
       wg_headerx-sales_grp           = c_set .                   "Sales Group
       wg_headerx-purch_no_c          = c_set .                   "Customer purchase order number
       wg_headerx-pymt_meth           = c_set  .                  "Payment Method
       wg_headerx-zzychan_role        = c_set.                    "Channel Role
       wg_headerx-zzysub_role         = c_set .                   "Submitter Role
       wg_headerx-zzy_inv_for_opt     = c_set .                   "Invoice Format Option
       wg_headerx-ord_reason          = c_set .                   "Order Reason Code
       wg_headerx-bill_block           = c_set.                    "Billing Block
    ENDFORM.                    " F_MOVE_HEADER_DATA
    2)
    FORM f_move_item_data .
       wg_item-itm_number          =   g_itmnumber.                              "Item number
       wg_item-material            =   wg_process-matnr .                        "Material
       wg_item-target_qty          =   wg_process-target_qty.                    "Targeted Qty
       wg_item-item_categ          =   wg_process-pstyv.                         "Sales document item category
       wg_item-zzylegal_i          =   wg_process-zzlegal.                       "Legal Contract
    **********Added this line for vbkd-ZZFV_SBCNT****************************
       wg_item-zzfv_sbcnt          = wg_process-zzfv_sbcnt.      
    APPEND wg_item TO i_item.
    wg_itemx-material            =   c_set .                        "Material
       wg_itemx-target_qty          =   c_set.                         "Targeted Qty
       wg_itemx-item_categ          =   c_set.                         "Sales document item category
       wg_itemx-zzylegal_i          =   c_set.                         "Legal Contract
       wg_itemx-zzsteady_date       =   c_set .                        "Amortization Start Date
       wg_itemx-zzsteady_end_dat    =   c_set.                         "Amortization Stop Date
    **********Added this line for vbkd-ZZFV_SBCNT****************************
       wg_itemx-ZZFV_SBCNt     =   c_set.   "
       APPEND wg_itemx TO i_itemx.
       CLEAR : wg_itemx. 
    endform. 
    3)           
    FORM f_move_head_ext
    wg_extension-structure   = c_ext_vbak.
       wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
    wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
       wg_ext_vbak-zzysub_role  = wg_temp-zzysub_role.
       wg_extension+30 = wg_ext_vbak.
    APPEND wg_extension to i_extension.
    CLEAR wg_extension.
       wg_extensionx-structure =  c_ext_vbakx.
       wg_ext_vbakx-zzinv_format = c_set.
      wg_ext_vbakx-zzlegal      = c_set.
       wg_ext_vbakx-zzychan_role = c_set.
       wg_ext_vbakx-zzysub_role  = c_set.
       wg_extensionx+30 = wg_ext_vbakx.
       APPEND wg_extensionx TO i_extensionx.
       CLEAR wg_extensionx.
    ENDFORM.                    " F_MOVE_HEAD_EXT
    *&      Form  F_MOVE_ITEM_EXT
    *       Item Extension
    4)
    FORM f_move_item_ext .
    * Structure for BAPI parameter Extension
       wg_extension-structure = c_ext_vbap.
       wg_ext_vbap-posnr      = g_itmnumber.
       wg_ext_vbap-zzsteady_date       =   wg_process-zzsteady_date .                 "Amortization Start Date
       wg_ext_vbap-zzsteady_end_dat    =   wg_process-zzsteady_end_dat.               "Amortization Stop Date
       wg_ext_vbap-zzlegal             =   wg_process-zzlegal.                        "Legal Contract
       wg_extension+30 = wg_ext_vbap.
    APPEND wg_extension to i_extension.
    * Structure for BAPI parameter Extension - Update Indicator Fields
       wg_extensionx-structure =  c_ext_vbapx.
       wg_ext_vbapx-posnr = g_itmnumber.
       wg_ext_vbapx-zzsteady_date       =   c_set .
       wg_ext_vbapx-zzsteady_end_dat    =   c_set.
    *  wg_ext_vbapx-zzlegal             =   c_set.
    *wg_process-zzfv_sbcnt = c_set.
       wg_extensionx+30 = wg_ext_vbapx.
       APPEND wg_extensionx TO i_extensionx.
       CLEAR wg_extensionx.
    and bapi calling is like below.
    CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
         EXPORTING
           sales_header_in       = wg_header
           sales_header_inx      = wg_headerx
           logic_switch          = wg_logic_switch
           business_object       = fp_bus_obj
           status_buffer_refresh = 'X'
         IMPORTING
           salesdocument_ex      = g_sorder
         TABLES
          return                = i_return
           sales_items_in        = i_item
           sales_items_inx       = i_itemx
           sales_partners        = i_partner
           sales_conditions_in   = i_cond
           sales_conditions_inx  = i_condx
           sales_text            = i_text
           extensionin           = i_extension
         extensionex           = i_extensionx.
    still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
    Please help me from this issue.
    Thank You..

    Hi,
    Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
    Please tell me how to solve it..
    Thanks & Regards,
    Reena..

  • Transfer text of VBKD-BSTKD_E into a item text category when creating order

    Hi,
    when creating an order a text should be entered manually in the field 'VBKD-BSTKD_E' . Because the order is a third-party-order and we want to have this information of field 'VBKD-BSTKD_E'  also in the MM-purchase requisition to this order, the manual entered text of 'VBKD-BSTKD_E' should be transfered into a special item-text-category in the sales order (We made already the customizing that this special item-text-category goes automatically into the MM-purchase requisition when saving the SD-order). Now we have tried already to solve this issue with the function module 'change_text' and 'create_text' in the SD-user-Exits (1. Try: userexit_move_field_to_vbap and 2.Try: ZXVVAU05). We were able to change or create the text with these function modules but, although we used afterwards additionaly function module 'Save_text' to save the text, the text wasn't saved by the system.
    Has anybody an idea how this could work?
    Regards
    Stephan

    Read the header lever text using READ_TEXT, and use the SAVE_TEXT to save the text at the item level.  Obviously you have to change the TDOBJECT field before saving it.
    Albert

  • Updating VBKD at item level in User_exit_move_field_to_vbkd.

    Dear All,
    I saw several posts on the table VBKD and understand that business data is stored at header level normally with
    posnr = 00000  , until unless atleast once a change is made at item level in atleast one of its field.
    So Can we use Form User_exit_move_field_to_vbkd to update a field say shipping type (VSART) at item level ?
    As far as I've seen we don't get the item no in XVBKD and once i was  trying to update one such field at item level, it updated VBKD table but then I started getting weird messages when I used to open Sales order that Business header & Item Data not match.
    Please suggest, if this is a appropriate user exit if i want to update shipping type (VSART) at SO item level .
    Thanks in advance for help,
    Manu Parihar

    Use userexit save_document_prepare in MV45AFZZ .
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:51 PM

  • Updating Purchase Order data in VBKD table

    Hello,
    We are trying to update Purchase order data in VBKD table for Sales Order at Item level. When sales Order is created, VBKD has a default record with VBELN = 'sales order number' and Item = '00000'. We want to update BSTKD_E field with Purchase order number for VBELN= 'sales order number' and Item = '00010'.
    We wrote our logic in USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_MOVE_FIELDS_TO_VBKD in MV50AFZZ to append new entries in XVBKD with VBELN= 'sales order number' and Item = '00010'. But in this case Sales order is not created with UPDATE TERMINATED message. We are not sure if we can append a new record in XVBKD.
            wa_xvbkd = xvbkd.
            wa_xvbkd-posnr = wa_xvbap-posnr.  "00010
            wa_xvbkd-bstkd_e = vbkd-bstkd.   "PO no
            wa_xvbkd-posex_e = wa_xvbap-posnr. "Purch. order item no
            wa_xvbkd-updkz = C_I.
            APPEND wa_xvbkd TO xvbkd.
            CLEAR wa_xvbkd.
    Please advice the suitable way to have a Purchase Order item level data in Sales Order.
    Thanks
    Rohit

    Hi,
    You can try these FM to update info record.
    ME_DB_UPDATE_INFORECORDS
    ME_UPDATE_INFORECORD
    ME_UPDATE_INFORECORD_COND
    ME_UPDATE_INFORECORD_PD
    Check the sample code on BAPI_PO_CHANGE
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    Regards,
    Shiva Kumar

  • Table VBKD update

    Hi Experts,
    I am useing VBKD-INCO1 - Incoterms (part 1)
                       VBKD-INCO2 - Incoterms (part 2)
                        VBKD-ZTERM - Terms of payment key
    for some of my report.In VBAP there are suppose 4 line item but in VBKD there is only one entry with line item no 000000 .
    so I am not able to utilize this above mentioned fields.
    can anyone guid me why there is no entry in VBKD and is there any other table from where I can take this above metioned field?
    Thanks in advance
    Thanks
    Sanujeet

    Hi
    The record with item 0 means header data:
    The data stored in VBKD are valid for all items of sales document, so the system inserts one record only with the item equal to 0.
    Only if the user changes some data of VBKD for a certain item, the system'll insert a new record for VBKD with item equal to the item where the modification was done.
    So if you need to extract data from VBKD u should run the select twice:
    DATA: POSNR TYPE VBAP-POSNR.
    DATA: VBKD_H TYPE VBKD.
    DATA: VBKD_P TYPE VBKD.
    SELECT * FROM VBAP WHERE VBELN = .......
       IF VBKD_H IS INITIAL.
          SELECT SINGLE * FROM VBKD INTO VBKD_H
                WHERE VBELN = VBAP-VBELN
                     AND POSNR = '000000'.
       ENDIF.
       SELECT SINGLE * FROM VBKD INTO VBKD_P
             WHERE VBELN = VBAP-VBELN
                  AND POSNR = VBAP-POSNR.
      IF SY-SUBRC <> 0.
        VBKD_P = VBKD_H.
      ENDIF.
    ENDSELECT.
    Anyway just as I said, the Sales Document: Business Data are generally the same for all items, so I think it''s rare u can find another record there except the header one.
    Max

  • "Payment Terms(VBKD-ZTERM)"  Modification at Order item Level

    Hi,
    I want to modify Payment terms(VBKD-ZTERM) at Order Item Level when user hit "SAVE" button while creating(VA01) OR changing(VA02) the Order.
    I am using User Exit "MOVE_FIELD_TO_VBKD" for the same.
    Has anybody worked on the same requirement before.
    can anybody help me out in this regard.
    thanks in advance.
    Nitin

    Hi Anji Reddy,
    I had similar problem and i coded like below but it is not working ...so can u provide any sample code related to this or please correct me in the below code ..where exactly i am doing mistake...
    The requirements is as like below and please guide me where i am doing mistake in below coiding.
    If sales order required delivery date (VBAK-VDATU) is LT Document create date7days(SY-DATUM7) and next condition is
    item required delivery date (VBEP-EDATU) is LT the Document create date 7days(SY-DATUM7)
    then we need to move '0001' TO VBKD-ZTERM(Payment terms)
    ELSE move the payments terms as in the customer master (kurgv-zterm).
    now i am getting the error as :
    Header business data does not apply ti item 000020.
    Please find the code below and guide me where i am doing mistake.
    Ihad coded in program : MV45AFZZ ---> FORM USEREXIT_MOVE_FIELD_TO_VBKD.
    DATA: chk_date  TYPE vbep-edatu.
        CLEAR chk_date.
        chk_date = sy-datum + 7.
        CHECK : NOT vbak-vdatu IS INITIAL.
        IF vbak-vdatu < chk_date.
           CHECK : NOT vbap-posnr IS INITIAL.
           CHECK : NOT vbep-edatu IS INITIAL.
           IF vbep-edatu < chk_date.
              vbkd-zterm = '0001'.
           ELSE.
              vbkd-zterm = kurgv-zterm.
           ENDIF.
        ENDIF.
    Thanks in advance
    Srinivas
    Edited by: Srinivas on Aug 21, 2008 12:57 AM

  • VBKD-TRATY in BAPI_SALESORDER_CREATEFROMDAT2

    Hi Experts,
    Please confirm how to pass the value of Means of Transport(VBKD-TRATY) to the BAPI BAPI_SALESORDER_CREATEFROMDAT2?
    Thanks in Advance,
    Ajith

    Hi
    I think u need to use the EXTENSIONIN table: if it's an header data u can assign it to header structure else to the item structure.
    Then u need to develop the user-exit USEREXIT_MOVE_FIELD_TO_VBKD (MV45AFZZ) in order to transfer it to VBKD
    Max

  • SELECT statement for VBKD - FAE in FPLT

    HI,
    For CS Report - Need to find the Conform Business (AMC is there But Invoice is Pending ).
    For This -->
    I need to take the table flow as - FPLT --> VBKD --> All (like VBAK, VBAP etc..)
    Problem is -->
    SELECT statement
    INTO IT_VBKD
    FOR ALL ENTRIES IN IT_FPLT
    WHERE fplnr = gwa_fplt-fplnr
    is taking too much time to execute.
    1. All Entries are Pending for Invoice ( FPLT- FKSAF = 'A' )
    2. No entry in VBFA table for this criteria.

    Thanks Vinod,
    Yes, I check it.
    But, In Client's system VBAK-rplnr is always Initial.
    Actually, I have data like -->
    AMC for duration - 01.07.2010 to 30.06.2011
    For which I am taking Four Billing Cycles -
    1. 01.07.2010 to 30.09.2010 - billed on 01.09.2010
    2. 01.10.2010 to 31.12.2010 - billed on 01.12.2010
    3. 01.01.2011 to 31.03.2011 - Unbilled - Projected billing date 01.03.2011       "
    4. 01.04.2011 to 30.06.2011 - Unbilled - Projected billing date 01.06.2011       "
    I have to consider Case 3 & 4 (unbilled). How can I calculate details for it?
    Report is working Fine - if I select - Selection options from FPLT - But while taking it from Sales Order - It's going to TIME OUT at SELECT statement itself.
    (Because table FPLT has more than 10Lac entries - and all are fetched )
    Edited by: Priya.ABAP on Dec 6, 2010 11:47 AM

  • Records in VBKD

    Hi,
    I want to know how records are stored in the table VBKD ?
    Are the records stored per line item or are the records stored per header data?  This confusion arose because when I create orders in our scenario, so for some orders, VBKD  stored records line item wise and for some orders it stored just a header  record (for POSNR = 0000).
    So can anyone explain, why is it so ?
    Regards,
    ss

    Table Lookup in Table VBKD
    When you define a table lookup for the table VBKD (Sales
    document: Business data), data does not have to be present
    for every item in the sales document. If the item data is no
    different than the header data, the system does not store it in
    the item as well. In this case, you can find the valid values in
    the header data, which is stored in table VBKD under the item
    number "000000".
    Thus, if you want to read characteristic values from VBKD, you
    always need to define two table lookups.
    1. First look up against VBKD table using the corresponding
        sales document number and item number.
    2. If such an entry does not exist, look up using the
        corresponding sales document number and item number
        as '000000'.
    This rule causes the system to first try to read the item data. If
    this information is not stored explicitly in VBKD table step 2 is
    carried out, which reads the header data.
    For more information, check the below link.
    [http://help.sap.com/saphelp_47x200/helpdata/en/7a/4c39084a0111d1894c0000e829fbbd/frameset.htm|http://help.sap.com/saphelp_47x200/helpdata/en/7a/4c39084a0111d1894c0000e829fbbd/frameset.htm]
    Hope this helps.
    Thanks,
    Balaji

  • Reg table VBKD

    Hi,
    I want to know on what basis entries are made in the table VBKD.
    Even if a sales order has multiple line items, it is not having the data for those sale order and line items.
    This is not the case with all the sale orders, but only some sale orders.
    Why is it so.??
    Regards.

    As per SAP documentation,
    Table Lookup in Table VBKD
    When you define a table lookup for the table VBKD (Sales
    document: Business data), data does not have to be present
    for every item in the sales document. If the item data is no
    different than the header data, the system does not store it in
    the item as well. In this case, you can find the valid values in
    the header data, which is stored in table VBKD under the item
    number "000000".
    Thus, if you want to read characteristic values from VBKD, you
    always need to define two table lookups.
    1. First look up against VBKD table using the corresponding
        sales document number and item number.
    2. If such an entry does not exist, look up using the
        corresponding sales document number and item number
        as '000000'.
    This rule causes the system to first try to read the item data. If
    this information is not stored explicitly in VBKD table step 2 is
    carried out, which reads the header data.
    Hope this helps.
    Thanks,
    Balaji

  • Table VBKD Urgent Query

    Hi All
    There is a field in VBKD table AKKUR - LettOfCredRate. This is not visible in the sales order. How this field is populated and whats the significance of this field? i could not get much information in F1 help as well.
    This is affecting to create collective billing.
    Regards
    Murali

    I will explain you the problem fully...this is not in development..this is in production..
    Initially there are 3 line items with one LC # at the header which got applied to item as well. Then added 2 more items and for this also LC # updated automatically.
    Later in the last 2 items, LC # was removed. After some time, LC# was changed to a different #. This change didnt get applied to last 2 items.
    Then later this new number was entered manually in 2 items.
    Now the field AKKUR is having different rate for first 3 items and different rate for last 2 items.
    Because of this i am not able to do collective billing.
    Regards
    Murali

  • Table VBKD

    In table VBKD you have a POSNR 000000 for header data and then POSNR e.g. 000001 for item 1 on the sales order. According to me a POSNR not equal to 000000 will only be created when you have different purchase order data per item. When does the system update field IHREZ_E in table VBKD?  And what is the meaning of the values in the field?  We now get different entries in VBKD an this has something to do with field IHREZ_E

    Hi,
    "According to me a POSNR not equal to 000000 will only be created when you have different purchase order data per item."
    No, it will be created when you made the first change to item purchase order data, equal or not to the header data.
    Initialy, the header information will be visible in the item view (but in vbkd it will only exists for posnr = 00000), but only if you made a change (you can even put the same value again) to the purchase order data per item, the vbkd for posnr = 00001 will be inserted.
    "When does the system update field IHREZ_E in table VBKD?"
    The system will update IHREZ_E for posnr = 0000 every time you change IHREZ_E in the Header purchase order data (GoTo-header-purchaseData).
    The system will update IHREZ_E for posnr = 0001 every time you change IHREZ_E in the Item purchase order data (GoTo-item-purchaseData).
    "And what is the meaning of the values in the field?"
    According to SAP "The reference number generally identifies the person who is responsible for the document at the end customer. (The reference number can, for example, be taken from the employee's initials.)
    but it's not a very important field, in my case, we used to hold a value for external system identification.
    Hope it helps.
    Thanks & Regards
    Sadhu Kishore

  • VBKD update

    Hi Experts,
    Could you please conform me when the VBKD table is update.I can see all the sales doc in this table with 000 line item and some with line item as 10 so can any one guid me why is it so?
    Thansk in advance .
    Thanks & Regards
    Sanujeet

    Hi Sanujeet
    VBKD table is the business data table and the same is updated as soon as VBAK is populated. When the order is first created VBKD has only one entry. The other entries that you see with the same sales document is related to any item level changes that may have been carried out after the sales order was saved. So suppose while first creating the order at the item level the PO number at header level is given, the same PO is captured at the item level. While saving this order VBAK and VBKD are both updated with one record. Now after saving the order if you change the PO number at the item level for one of the items, the business data related to the order (namely PO number) changes and as a result VBKD gets updated with item details. Hope this clarifies the issue. So whenever there is a difference in business data at header and item level VBKD gets updated with item level data.
    Regards
    Indranil

  • UPDATE TABLE VBKD

    hello.
    The table VBKD is  not updated in quality, the table with the same data is however updated in devlopment.
    The item with billing plan is updated in teh VBKD table. The rest of the items with "TAN" item categories are not updated in the table in quality server.
    Please advice me on the same.

    Hello,
    The logic of entries in VBKD is as follows:
    The header entry of the business data (VBKD) is valid for all
    items until a change on item level is done to the business data.
    Then the item receives a separate entry on the database.
    For example an order with 3 line items is created. The business data
    is the same for header and all items. Therefore only 1 entry
    in table VBKD (for the header) is necessary and all items
    use this business data.
    If now a change to the first items business data is done (e.g.
    different incoterms are entered) the item receives its own
    entry in VBKD. The other items still refer to the header.
    This is the general logic, which also has exceptions, but should
    hopefully explain the system behaviour. It is correct that some
    orders do only have entries for the header and some also for
    items, this does not affect the system behaviour.
    Best regards,
    Ian Kehoe

Maybe you are looking for