Skip to Content
avatar image
Former Member

Map MSEG to BSEG

Hi,

Can you please help me in linking the MM document to the corresponding

Accounting document line item wise.

We can find the corresponding Accounting documents (BKPF) for a MM document (MKPF)

using the Function module: AC_DOCUMENT_RECORD.

But is it possible to Find this line item of an MM doc. (MSEG) corresponds to these many lines

of an Accounting document (BSEG).

Is there any function module or can you help me with the table mappings for this.

Regards,

Midhun.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 10, 2007 at 09:34 AM

    Hi

    The link can be done for whole document only:

    MKPF_KEY-MBLNR = MKPF-MBLNR.
    MKPF_KEY-MJAHR = MKPF-MJAHR.
    
    SELECT * FROM BKPF WHERE AWTYP = 'MKPF'
                         AND AWKEY = MKPF_KEY.
      EXIT.
    ENDSELECT.
    
    SELECT * FROM BSEG INTO TABLE T_BSEG 
                        WHERE BUKRS = BKPF-BUKRS
                          AND BELNR = BKPF-BELNR
                          AND GJAHR = BKPF-GJAHR.

    The MM items are collected in the same FI item, if they have the same G/L accounting, I believe there's no function module, but it depends on your customizing (T030 table): here you can find out the rules to determine the account for every MM item.

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 10, 2007 at 09:29 AM

    hi

    try with this

    use bkpf-awkey,referance object

    it will give referance material doc no.

    it is used as FI to MM link.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 10, 2007 at 09:30 AM

    i think it is not possible but if you can join bkpf and mkpf then through this you can join mseg and bseg.

    i mean

    mkpf and mseg.

    bkpf and bseg.

    regards

    shiba dutta

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2007 at 10:35 AM

    There is no direct link between MSEG & BSEG. The link happens through PO Documents. This can be determined by the fields EBELN & EBELP in the tables MSEG & BSEG. Another field which can help is MATNR in BSEG table.

    Hope the above helps.

    Add comment
    10|10000 characters needed characters exceeded