To link MKPF and BKPF Tables.

Hi Experts,
I basically need to retieve all the accounting documents posted for a particular material document. How is this possible ?
Regards,
Sunitha

Step 1
GET KEY FIELDS FROM MKPF namely
MKPF-MBLNR
MKPF-MJAHR
Now CONCATENATE these fields into say STR1
SELECT all records from BKPF where
BKPF-AWKEY = STR1
You get the corresponding FI record

Similar Messages

  • Link between AUFK and BKPF table

    Hi all,
    Can anyone tell me the link between AUFK and BKPF table.
    Thanks in advance
    Regards
    Neha Kapoor

    hi neha ,
    1.first u have to get MBLNR from AUFM for that order
    2.Next u have to call FM
    <b>AC_DOCUMENT_RECORD</b>
    I_AWTYP                         MKPF--->Constant
    I_AWREF                         4900003215--->MBLNR
    I_AWORG                         2004--->Year
    I_AWSYS
    I_AWTYP_INCL
    I_AWTYP_EXCL
    I_BUKRS
    I_VALUTYP                       0
    X_DIALOG                           X
    then u will get the Accounting Documents.
    regards
    prabhu

  • Vital: linking mkpf and j_1iexcdtl

    how do i link mkpf and j_1iexcdtl as i want to display Grn no with exbed(basic excise duty)

    Hi
    The two tables have a join between the below mentioned fields
    MKPF-MJAHR  to J_1IEXCDT -EXYEAR
    Regards
    pavan

  • Linking PO and AP tables

    Hi Gurus,
    Please help me in linking PO and AP tables for scenarios like to get the fully/ partially invoiced PO receipts.
    Thanks in advance
    Avinash

    Hi, you can link AP and PO tables in this way: please consider for the AP side table AP_INVOICE_DISTRIBUTIONS_ALL, where you will find all Invoices' distributions. In this table there is a field called PO_DISTRIBUTION_ID that is the right link to PO.
    Hope this helps
    Regards
    Riccardo

  • Any problem using bseg and bkpf tables

    For fico details i using  bseg  and bkpf  tables.
    I noted that programming is very difficult because of these tables are cluster table.
    plz give me other tables
    if i using these tables any problem will come?

    >
    mysvijai197715 wrote:
    > Hi Aniesh,
    >
    >            BSEG and BKPF are cluster tables. It contains transperant tables like BSIS, BSIK etc. For example to take vendor details usr the BSIK.If you use BSEG and BKPF it will take long time search. suppose your concern having lot of data means may be your server will get shutdown. So use only trasnperant tables like BSIS, BSIK etc.
    >
    >
    > Regards
    > R.Vijai
    Incorrect.  BKPF is a transparent table and not a cluster table and you can use it just like any other transparent table.  BSEG is a cluster table but there is no problem selecting from it so long as you use the key of BUKRS, BELNR, GJAHR - unless you are selecting a very large amount of data, but then this can cause problems when selecting from any type of table.
    The advantage of using BSEG over the other FI line item tables such as BSIS and BSIK is that it holds all the lines of an FI document while the others will hold only a subset eg BSIK will only hold lines that contain a vendor reference and BSAS holds only cleared GL account lines.  Though you can only use it when you have the key.  If you need to search on vendor, you can use BSIK as a starting point, but since I usually need to get hold of all the lines on an FI document, I then have to select from BSEG anyway.

  • MKPF and MSEG table

    What is diff between MKPF and MSEG table ?

    Dear Balaji,
    In MKPF you will get to know the transaction code which was used for posting the material document.
    In MSEG,you will get to know the the item details from which it was posted along with the quantity and amount in LC.
    Regards
    Mangalraj.S

  • Link B/w MKPF and BKPF

    is there any link B/W  tables MKPF and BKPF

    hii
    refer link
    Link between Accounting Header (BKPF) amd Goods Reciepts Header (MKPF)
    you can do following way too
    select MJAHR & MBLNR fields from MKPF table
    CONCATENATE these fields into one variable like wa_val.
    now use
    SELECT * from BKPF where BKPF-AWKEY = wa_val
    regards
    twinkal

  • Urgent : Link b/w MKPF and BKPF and BSIS

    Hi,
    I am making a report in which i have to display the vendor payment status.
    In table BKPF there is a field called AWKEY and AWTYP and i want to reterive data form it and after that in BSIS table there is a field called XREF3 which is similar to the AWKEY in the BKPF table.
    plzz tel me how to make the realtion b/w these tables as help will be deifnately rewarded.

    hi,
    i am able to reterive data from now but i want to have this method also which u had told.
    i am doing inner join concept but accorind to tyou :-
    pass the first 10 characters of AWKEY to MBLNR of MKPF.
    how should i use this concept?
    Edited by: abaper2008 on May 24, 2008 8:48 AM

  • Awkey for awtyp = 'BKPF'  and awtyp = 'MKPF' in BKPF table

    At my current client, there is the following situation in the BKPF table:
    When the awtyp is 'BKPF' in the bkpf table, the awkey is number/company/year, as expected.
    But when the awtyp is 'MKPF' in the bkpf table, the awkey is just number/year, with no intervening company code.
    Is this standard practice for awkey in bkpf when awtyp = 'MKPF' ???
    Or is this due to a configuration error that should be corrected ????

    Hi,
    Good morning and greetings,
    That is standard SAP...If AWTYP is BKPF in the Object Key would be Document Number/Company Code/Year and in the case of MKPF it would be Document Number/Year as it pertains more to WA document type transaction which is from MM module and that is the reason the system will not be in a position to place the company code in the transaction.
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • RBKP and BKPF table update from MIRO

    Hi All,
    I am using the BADI BADI_FDCB_SUBBAS01 to add a custom field in MIRO transaction. The added custom field is getting updated in RBKP transaction.
    I also want to update the custom field data in BKPF table, but i dont know when the BKPF table gets updated in MIRO transaction.
    Can you help me where the BKPF table will get updated. Is there any BADI for updating the custom fields in table BKPF via MIRO?
    Thanks and Regards,
    Vijay

    Hi Baskar,
    I have done this thing from MIRO transaction to update BKPF table. Please check the below code.
    METHOD if_ex_badi_fdcb_subbas01~put_data_to_screen_object.
      CONSTANTS:
      c_bkpf_xref1(25) TYPE c VALUE '(SAPLFDCB)BKPF-XREF1_HD'.
      FIELD-SYMBOLS: <fs_bkpf_xref1> TYPE ANY.
    fill interface attributes from importing paramters
      me->if_ex_badi_fdcb_subbas01~invfo  = im_invfo.
      ASSIGN (c_bkpf_xref1) TO <fs_bkpf_xref1>.
      IF sy-subrc = 0.
        <fs_bkpf_xref1> = me->if_ex_badi_fdcb_subbas01~invfo-zlet_number.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_badi_fdcb_subbas01~get_data_from_screen_object.
    CONSTANTS:
    c_bkpf_xref1(25) TYPE c VALUE '(SAPLFDCB)BKPF-XREF1_HD'.
    FIELD-SYMBOLS: <fs_bkpf_xref1> TYPE ANY.
    fill export parameters from interface attributes
      ex_invfo  = me->if_ex_badi_fdcb_subbas01~invfo.
    ASSIGN (c_bkpf_xref1) TO <fs_bkpf_xref1>.
    if sy-subrc = 0.
    <fs_bkpf_xref1> = ex_invfo-zlet_number.
    endif.
    ENDMETHOD.
    After passing the data through field symbols, then you need to update the BKPF table using the BADI AC_DOCUMENT. Refer the below code.
    METHOD if_ex_ac_document~change_after_check.
    variable declaration
      DATA: lv_let_number  TYPE zisr_let_number,
            lv_field TYPE char18 VALUE '(SAPLMRMP)xaccit[]',
            lv_let_field TYPE char27 VALUE '(SAPLMR1M)RBKPV-ZLET_NUMBER'.
    Field symbol declaration
      FIELD-SYMBOLS : <ft_accit> TYPE accit_t,
                      <fs_accit> TYPE accit,
                      <fv_let_number> TYPE ANY.
    Constant declaration
      CONSTANTS : lc_miro TYPE sytcode VALUE 'MIRO'.
    Check for transaction code MIRO
      IF sy-tcode EQ lc_miro.
        ASSIGN (lv_field) TO <ft_accit>.
        CHECK sy-subrc EQ 0.
        ASSIGN (lv_let_field) TO <fv_let_number>.
        CHECK sy-subrc EQ 0.
    Assign the letter number to BKPF table field XREF1_HD
        LOOP AT <ft_accit> ASSIGNING <fs_accit>.
          lv_let_number = <fv_let_number>.
          <fs_accit>-xref1_hd = lv_let_number.
        ENDLOOP.
      ENDIF.
    ENDMETHOD.

  • Adding Custom Fields to BSEG and BKPF Tables

    Hi All,
    My customer would like to add around 5 fields to BKPF table and 6-7 fields to BSEG table. Can you all suggest me whether it would be a good idea to add any custom field to these tables ? I would like to mention that standard fields available in these tables will not be used for the requirements of the customer and he is insisting on adding custom fields. I need your expert advice on this matter.
    Regards,
    Rohit

    Hi Friend,
    Please do not add any custom fields in those tables.
    These two tables are pillar of accounting entries in SAP, if you want to push them then it is OK, otherwise find some other way.
    Regards
    Krishnendu

  • Idoc for bsid ,bseg and bkpf tables

    hi ,
    i have extrated the data from 4.7 and uploading into ecc 6.0.
    is there any IDOC for uploading data coming from BSID , BSEG AND BKPF tabels?
    i checked bapi , i could not find some fields in bapi .pls.advise if any IDOC
    As it is very urgent , pls.help me in this regard .
    Regards ,
    Kiran.

    Hi,
    There is some IDOCs which related to the bseg, bkpf etc table
    FIDCC1,FIDCC2.
    <b>Reward with points if helpful.</b>
    Regards,
    Vijay

  • Urgent:  Problem in making Link b/w MKPF and BKPF

    Hi,
    I am making a report in which i have to make a relationship b/w BKPF and MKPF through AWKEY present in the BKPF with the MBLNR field in MKPF.
    Plzzz help me how to do dis as i am having the select statement like dis: -
    SELECT AMBLNR AXBLNR BBELNR BBUDAT BGJAHR BAWKEY FROM MKPF AS A  INNER JOIN BKPF AS B ON BXBLNR = AXBLNR INTO TABLE ITBSAK WHERE AXBLNR > 0 AND BBELNR IN P_BELNR.
    plzz help me out how to reterive data as in dis statement i am not using the AWKEY concept .plzz help me how do i do this as help will be definately rewarded.

    Hi check this sample code:
    form get_data.
    *************----------- VARIABLES ---------------**************
    data: vl_addrnum type t499s-addrnum,
    vl_city1 type adrc-city1.
    *************----------- Constants ---------------------**************
    constants:cl_ca01(4) value 'CA01'.
    ***********---------Field symbols ----------------------************
    field-symbols: <fs_mseg> type t_mseg.
    select a~mblnr a~mjahr a~zeile a~werks a~matnr a~bwart
    a~lifnr a~menge a~meins a~lgort a~grund a~sakto
    a~ps_psp_pnr a~ablad a~rsnum a~rspos a~kostl
    a~umlgo a~wempf a~ebeln a~ebelp a~bukrs a~belnr
    a~buzei a~sobkz
    b~budat b~xblnr b~bktxt b~xabln b~frbnr b~cputm
    c~matkl a~kzvbr a~shkzg
    from mseg as a
    join mkpf as b
    on a~mblnr = b~mblnr and
    a~mjahr = b~mjahr
    join mara as c
    on c~matnr = a~matnr
    into table i_mseg
    where a~werks in s_werks and
    a~bwart in s_bwart and
    a~lifnr in s_lifnr and
    a~umwrk in s_umwrk and
    a~wempf in s_scar and
    a~ablad in s_ablad and
    a~ebeln in s_ebeln and
    a~sjahr in s_yyyy and
    b~budat in s_date and
    b~cputm in s_time and
    b~mjahr in s_yyyy.
    if not i_mseg[] is initial.
    select pspnr fkokr fkstl posid stort
    from prps
    into table i_prps
    for all entries in i_mseg
    where pspnr eq i_mseg-ps_psp_pnr.
    select bwart sobkz btext from t156t
    into table i_text
    for all entries in i_mseg
    where bwart eq i_mseg-bwart
    and spras eq v_lan
    and sobkz eq i_mseg-sobkz
    and kzvbr eq i_mseg-kzvbr.
    select lifnr name1 from lfa1
    into table i_lfa1
    for all entries in i_mseg
    where lifnr eq i_mseg-lifnr.
    endif.
    *Awkey is the combination of MBLNR and MJAHR
    loop at i_mseg assigning <fs_mseg>.
    concatenate <fs_mseg>-mblnr <fs_mseg>-mjahr into <fs_mseg>-awkey.
    *To get the Vertex Catagory
    move <fs_mseg>-matnr to w_ztfi_product-matnr.
    move <fs_mseg>-matkl to w_ztfi_product-matkl.
    select single prdtc
    from ztfi_product
    into w_ztfi_product-prdtc
    where matkl eq w_ztfi_product-matkl.
    append w_ztfi_product to i_ztfi_product.
    endloop.
    if not i_mseg[] is initial.
    select bukrs belnr gjahr awkey waers
    from bkpf
    into table i_bkpf
    for all entries in i_mseg
    where gjahr = i_mseg-mjahr
    and bukrs = i_mseg-bukrs
    and budat = i_mseg-budat
    and awkey = i_mseg-awkey.
    select matnr maktx from makt
    into table i_makt
    for all entries in i_mseg
    where matnr = i_mseg-matnr
    and spras = v_lan.
    endif.
    if not i_bkpf[] is initial.
    select bukrs " Company Code
    belnr " Document Number
    gjahr " Fiscal Year
    buzei " Line Item
    shkzg " Debit / Credit indicator
    wrbtr " Amount
    sgtxt " Line Item Text
    vbund " Trading Partner
    kostl " Cost Center
    hkont " Account
    matnr " Material Number
    werks " Plants
    txjcd " Tax Jurisdiction
    projk " WBS Element
    into table i_bseg
    from bseg
    for all entries in i_bkpf
    where bukrs eq i_bkpf-bukrs and
    belnr eq i_bkpf-belnr and
    gjahr eq i_bkpf-gjahr.
    endif.
    sort: i_prps by pspnr,
    i_bkpf by bukrs awkey gjahr,
    i_makt by matnr,
    i_bseg by bukrs belnr gjahr,
    i_text by bwart sobkz.
    *Move to output table
    loop at i_mseg into w_mseg.
    move-corresponding w_mseg to w_output.
    if not w_mseg-lifnr is initial.
    select single name1 from lfa1
    into w_output-name1
    where lifnr = w_mseg-lifnr.
    endif.
    read table i_prps into w_prps with key pspnr = w_mseg-ps_psp_pnr
    binary search.
    if sy-subrc eq 0.
    move-corresponding w_prps to w_output.
    if not w_prps-fkstl is initial and not w_prps-fkokr is initial.
    select single ktext from cskt
    into w_output-ktext
    where spras = sy-langu
    and kokrs = w_prps-fkokr
    and kostl = w_prps-fkstl
    and datbi ge sy-datum.
    endif.
    select single addrnum from t499s into vl_addrnum
    where stand = w_prps-stort.
    select single city1 from adrc into vl_city1
    where addrnumber = vl_addrnum
    and addr_group = cl_ca01.
    w_output-city1 = vl_city1.
    endif.
    read table i_text into w_text with key bwart = w_mseg-bwart
    sobkz = w_mseg-sobkz
    binary search.
    if sy-subrc eq 0.
    w_output-btext = w_text-btext.
    endif.
    read table i_makt into w_makt with key matnr = w_mseg-matnr
    binary search.
    if sy-subrc eq 0.
    w_output-maktx = w_makt-maktx.
    endif.
    read table i_bkpf into w_bkpf with key bukrs = w_mseg-bukrs
    awkey = w_mseg-awkey
    gjahr = w_mseg-mjahr
    binary search.
    if sy-subrc eq 0.
    move-corresponding w_bkpf to w_output.
    read table i_bseg into w_bseg with key bukrs = w_bkpf-bukrs
    belnr = w_bkpf-belnr
    gjahr = w_bkpf-gjahr
    binary search.
    if sy-subrc eq 0.
    move-corresponding w_bseg to w_output.
    w_output-matnr = w_mseg-matnr.
    w_output-werks = w_mseg-werks.
    if w_mseg-shkzg = 'H'. " checking the mseg value.
    w_output-wrbtr = - w_bseg-wrbtr.
    w_output-menge = - w_output-menge.
    endif.
    perform cal_vertex_tax using w_bseg changing w_output-wmwst.
    endif.
    endif.
    perform format_output using w_output-matnr
    w_output-wrbtr w_output-budat
    w_output-rsnum w_output-rspos.
    append w_output to i_output.
    clear: w_output, vl_city1, w_prps,vl_addrnum, w_text, w_makt,
    w_bkpf, w_bseg.
    endloop.
    endform. " get_data

  • Place the links(Pictures and Excel table) to Indesign

    Dear All,
    We need place some Microsoft Word files into Indesign. and in the word files, contain some link for pictures, Microsoft excel tables. and we need use the C++ to build a InDesign add-in to do the following things( Indesign CS5, Windows 7, VS2008):
    Place the word files into InDesign
    Find and automatically insert the pictures link files into Indesign
    Find and automatically insert the Microsoft Excel table into Indesign.
    My Questions are:
    Does Indesign CS5 SDK provide those APIs?
    Can we build a standalone application to do those jobs?
    if C++ can't do this, what kinds of Development tools can do those jobs.
    Great thanks for any inputs.
    My Best Regards,
    Jerome

    Hi Pudgesan,
    You can paste data from an Excel spreadsheet into an InDesign or document. The Clipboard Handling preference settings determine how text pasted from another application is formatted.
    If Text Only is selected, the information appears as unformatted tabbed text, which you can then convert to a table.
    If All Information is selected, the pasted text appears in a formatted table.
    If you want more control over formatting the imported table, or if you want to maintain spreadsheet formatting, use the Place command to import the table. If you want to maintain a link to the spreadsheet, select the Create Links When Placing Text And Spreadsheet Files option in File Handling preference settings.
    Hope this helps.
    Regards,
    Sumit Singh

  • How to link vbak and vbrp tables

    hi friends,
    i want to display lips table values based on lips-vbeln = it_vbrp-vgbel
    here i want a filed thru which i can link vbrp-<fieldname> to vbak/vbap-vbeln
    so that i can get values into it_vbrp.
    here is equation.
      it_vbrp =>   vbak-vbeln = vbrp-< ? >
      it_lips =>   vbrp-vgbel = lips-vbeln.
    thanks in advance for your co operation
    regards,
    Anil kumar p

    u can reach vbrp vbeln from vbrk vbeln
    and to get vbrk vbeln from vbak vbeln
    goto table VBFA
    1.
    GIVE VBFA-VBELV = VBAK-VBELN
    and
    VBFA-VBTYP_N = 'M'.   "INVOICE  IN CAPS
    AND F8
    THIS WILL GIVE U VBRK-VBELN .
    NOW U CAN USE VBRK-VBELN TO FETCH VBRP
    SIMILARLY
    2.
    IF U WANT TO PICK DELIVERY NUMBER FROM LIKP USING VBAK-VBELN.
    SAME PPROCEDURE
    PUT VBFA -VBELV = VBAK-VBELN
          VBFA-VBTYP_N = ' J'.   "IN CAPS 
    WILL FETCH U LIKP-VBELN "DELIVERY
    USE THIS TO GET LIPS ENTRIES
    hope this helps
    regards,
    vijay

Maybe you are looking for

  • Garage Band is recognizing ".aif" format loops but not ".aiff" format loops

    All of the ".aif"-formatted loops (from Jam Packs, etc.) are showing up fine in the Loop Browser, but other loops I bought from third-party vendors that are in the ".aiff" format are not showing up at all in the loop browser. They are all in the same

  • Current Month, Current Year Variable on Posting Date

    Hi, I need to construct a BEx variable that will return the Current Month of the Current Year based on Posting Date. I want to be able to compare Current Month of the Current Year with Current Month of the Prior Year. I know SAP delivers variables fo

  • Creating a button to print a file in a flash exe menu

    What is the actionscript to assign to a button in order to open a file/document that will be included on the same cd rom as my flash EXE interface? Any help would be appreciated. Not looking for third party solutions just the scripting required for t

  • Conky font differences under Arch compared to Ubuntu [SOLVED]

    I'm using the same basic .conkyrc when I'm booted into Arch as I do when I'm booted Ubuntu.  For some reason, the one under Ubuntu looks different font-wise.  In the screenshot below, Arch has the light blue background while Ubuntu has the slate colo

  • My iPad is eating up all my wifi usage

    The data usage on my iPad is continually and rapidly causing me to go over my limit whether I use wifi or cellular    Just having it turned on just makes it run way too fast!!!  I have only had it for a little over a year.  It just started happening