MIGO G/L Accounts

1. Can you please tell me When I am Doing the MIGO with a standard Item category W/o Account Assignment.
It is Hitting the EIN & EKG transactions
Why is this difference but in my development server it is Hitting the WRX : GR/IR Clearing account and the inventory account BSX.
How can I make IDES system same as Development server.
2. Also in the Pricing schemas:
How is the Prices & dISCOUNTS  PB00 R000 R001 ARE SEPERATELY POSTED IN TO ACCOUNTS.
As in SD, we have the accounting keys for all condition type.
Please explain how is the system calculating the prices and discounts and posting into seperate accounbts or no ?
Edited by: SAP Consultant on Jan 5, 2009 12:48 PM

Hi
In the IDES system , The Purchase account mangement is activated for the Compnay code, due to this the EIN & EKG Postings are happening at the time of GR.
Please deactivate the Same by following the Config path
IMG --> Material Management --> Valuation and Account Assignment ---> Account Determination ---> Account Determination Without Wizard ---> Purchase Account Management ---> Activate Purchase Account in Company Code
Here remove the flag from the Company code
That should solve your problem
Thanks & Regards
Kishore

Similar Messages

  • Fi Document is not generating in MIGO for multiple account assignment in PO

    Hi,
    I have have created  asset po DG set 111 quanity is 4, i have created 4 different assets and assign quanity 1 to each dg sets in account assignment. While doing GRN system is not generating FI document for this po. if  i am giving one quanity or single account assignment for as 4 then it is generating FI quantity.
    PLease help me out why system is not generating FI document for multiple accont assignment in MIGO.
    Thanks in advance
    KISHORE

    Hi
    There is no option if you are not on EhP4... Do MIRO and see if the FI doc is generated
    Only way is to do MIRO immediately after MIGO.. OR Schedule ERS (Evaluated Receipt Settlement) which runs every hour in the background so that MIRO is posted automatically based on MIGO document.... Basically, you have to do MIRO after MIGO.. Whether you do it manually or through ERS is a matter of choice
    Regards
    Ajay M

  • Blocking a particular vendor for doing Migo in his account

    Dear Guru's
    My question is that is it possible to block a vendor so that no transaction can be done in his vendor account number. For example in our senario duplicate vendor number has been created for a particular vendor number and now i want to block one account so as nobody can do MIGO,MIRO or any payment in his account is it possible. I have tried with XK05 total block but it is not working . Problem is that before blocking many PO of that vendor is standing and they are reciving the material from that Po and system is allowing it to do so.
    Therefore i want to block the vendor so that no transaction can be done in his account. Kindly help me out

    Hi.
    I am Basically MM guy. To resolve this issue I would like to suggest a work around.
    You can use the two payment terms.
    1) One payment term in the company code (In vendor master record in the Payment transaction accounting). In this payment term you have set a payment block indicator
    By doing this system will block all the invoices or Down payment which are posted in FI. Against this vendor. Hence system will not allow you to pay to this vendor against down payment.
    2) Another payment terms in the purchasing view of the Vendor master. In this payment terms do not set any block.
    When you post an invoice against a PO your accounting document will not be blocked.
    Hence you can pay to a vendor with reference to PO invoice.
    I am not sure. I hope it will work. If it helps award me.
    Cheers
    Umakanth

  • MIGO error on account of GR/IR accounts(WRX)

    Hi all,
    We have bifurcated GR/IR according to different valuation classes to enable us to capture the entries relating to each valuation class. Valuation Category 0001 for each Valuation Class from 3000 to
    7920 has been assigned to different GL accounts for transaction key WRX in OBYC.  The error displayed during MIGO is for the relative chart of account(1000) transaction Key(WRX) account
    determination has not been done correctly.  The system also displays the definition of the key
    which consists of Chart of Account, Transaction event/Key, Valuation Category, Account Grouping Code, Valuation Class and GL account.  Excepting Account Grouping Code I have assigned all the
    the other parameters in OBYC, Whether is it corrrect to give Account Grouping Code AUA and AUF for these accounts.
    Thanks & regards,
    Sadashivan

    Hi Sadasivan,
    I got your Issue,
    I hope so you could be some thing.
    the WRX can be maintained at three Combinatinations
    *Valuation Class-- Defined in OMSK.*
    and in the same are attached to the Material Tyos and this valution classes need to be attached to the material for that plant(very import which is the key for valution)
    Valuation MOdifier--OMWD.
    here the valuation area(plant) and the company code is attached to a Valuation grouping code ,which is other wise called as valuation modifier.
    And the GL account.
    NOrmaly the WRX is maintianed at the above three only
    But there is another Key called General modification.
    Which is nothing but the Account modifier (in the movement type) and in the account assignment caterory Account modifer.Eg--PRF,AUF,VBR ...etc.
    the above KEy General modifier is normally not user in WRX.
    Hope so it help
    Regards
    Anjanna

  • Migo & Miro Accounting Documents Report

    Hello Abapers,
    I have made the new ALV report as shown below :-
    Report zaccounting no standard page heading line-size 300 line-count 40.
    tables : mkpf, "Header: Material Document
             mseg, "Document Segment: Material
             bkpf, "Accounting Document Header
             ekbe. "PO History Table
    type-pools slis.
    *DATA DECLARATION
    data : pos type i,
           l_layout type slis_layout_alv.
    data  gt_fieldcat type slis_t_fieldcat_alv.
    data  gt_sort type slis_t_sortinfo_alv.
    data  ls_fieldcat type slis_fieldcat_alv.
    data  is_print type slis_print_alv.
    data  it_events type slis_alv_event occurs 5.
    data  gs_variant type disvariant.
    data  t_list_top_of_page type slis_t_listheader.
    data  title like sy-title.
    data : l_title(105) type c,
           l_list(105)  type c,         "Store the Top-of-page headings
           l_date(10)   type c,         "Store date in top-of-page
           l_time(8)    type c,         "Store time in top-of-page
           title1 like sy-title,
           title2 like sy-title,
           title3 like sy-title.
    *-- Data Declaration
    data : repid  like sy-repid.
    constants: x  type c value 'X'.
    data zawkey like bkpf-awkey.
    types : begin of x_mkpf,
    mblnr like mkpf-mblnr,
    mjahr like mkpf-mjahr,
    budat like mkpf-budat,
    ebeln like mseg-ebeln,
    ebelp like mseg-ebelp,
    bwart like mseg-bwart,
    matnr like mseg-matnr,
    gsber like mseg-gsber,
    werks like mseg-werks,
    bukrs like bkpf-bukrs,
    belnr like bkpf-belnr,
    gjahr like bkpf-gjahr,
    bukrs1 like bkpf-bukrs,
    belnr1 like bkpf-belnr,
    gjahr1 like bkpf-gjahr,
    belnr2 like bkpf-belnr,
    gjahr2 like bkpf-gjahr,
    end of x_mkpf.
    data : t_mkpf type standard table of x_mkpf with header line.
    S E L E C T I O N - S C R E E N *
    selection-screen begin of block b1 with frame title text-009.
    select-options:  s_budat for mkpf-budat obligatory.
    select-options:  s_bwart for mseg-bwart.
    select-options:  s_matnr for mseg-matnr.
    select-options:  s_gsber for mseg-gsber.
    select-options:  s_werks for mseg-werks.
    selection-screen end of block b1.
    start-of-selection.
    break abapdev1.
    select msegmblnr msegmjahr mkpf~budat
    msegebeln msegebelp msegbwart msegmatnr mseggsber msegwerks
    into table t_mkpf
    from mkpf inner join mseg
    on mkpfmblnr = msegmblnr
    where budat in s_budat
    and bwart in s_bwart
    and matnr in s_matnr
    and gsber in s_gsber
    and werks in s_werks.
    loop at t_mkpf.
    select single belnr gjahr into (t_mkpf-belnr, t_mkpf-gjahr) from ekbe where ebeln = t_mkpf-ebeln
                                  and ebelp = t_mkpf-ebelp
                                  and lfbnr = t_mkpf-mblnr
                                  and lfgja = t_mkpf-mjahr
                                  and bewtp = 'Q'.
    modify t_mkpf transporting belnr gjahr.
    endloop.
    loop at t_mkpf.
    clear : zawkey.
    concatenate t_mkpf-mblnr t_mkpf-mjahr into zawkey.
    select single belnr gjahr into (t_mkpf-belnr1,t_mkpf-gjahr1) from bkpf
                       where awtyp = 'MKPF'
                       and awkey = zawkey.
    break abapdev1.
    clear : zawkey.
    concatenate t_mkpf-belnr t_mkpf-gjahr into zawkey.
    select single belnr gjahr into (t_mkpf-belnr2,t_mkpf-gjahr2) from bkpf
                       where awtyp = 'RMRP'
                       and awkey = zawkey.
    modify t_mkpf transporting belnr1 gjahr1 belnr2 gjahr2.
    endloop.
    ls_fieldcat-col_pos       =  '1'.
      ls_fieldcat-fieldname     = 'BUDAT'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'BUDAT'.
      ls_fieldcat-ref_tabname   = 'MKPF'.
      ls_fieldcat-seltext_l     = 'PSG DATE'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos       =  '2'.
      ls_fieldcat-fieldname     = 'MBLNR'.
      ls_fieldcat-tabname       = 'X_MSEG'.
      ls_fieldcat-ref_fieldname = 'MBLNR'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MIGO MAT DOCNO.'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '3'.
      ls_fieldcat-fieldname     = 'BELNR1'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'BELNR1'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'FI DocNo.'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '4'.
      ls_fieldcat-fieldname     = 'GJAHR1'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'GJAHR1'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'FI FiscalYr'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '2'.
    ls_fieldcat-fieldname     = 'MJAHR'.
    ls_fieldcat-tabname       = 'X_MKPF'.
    ls_fieldcat-ref_fieldname = 'MJAHR'.
    ls_fieldcat-ref_tabname   = 'MSEG'.
    ls_fieldcat-seltext_l     = 'MIGO MATERIAL DOC. YEAR'.
    append ls_fieldcat to gt_fieldcat.
    clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '5'.
      ls_fieldcat-fieldname     = 'EBELN'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'EBELN'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'PO No.'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '6'.
      ls_fieldcat-fieldname     = 'EBELP'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'EBELP'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'PO ItemNo.'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '7'.
      ls_fieldcat-fieldname     = 'BWART'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'BWART'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'Mvt.Type'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '8'.
      ls_fieldcat-fieldname     = 'BELNR'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'BELNR'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MIRO DocNo.'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '9'.
      ls_fieldcat-fieldname     = 'GJAHR'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'GJAHR'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MIRO FiscalYr'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '10'.
      ls_fieldcat-fieldname     = 'GSBER'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'GSBER'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'BUS.AREA'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '11'.
      ls_fieldcat-fieldname     = 'WERKS'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'WERKS'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'PLANT'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '12'.
      ls_fieldcat-fieldname     = 'MATNR'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'MATNR'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MAT.NO'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '13'.
      ls_fieldcat-fieldname     = 'BELNR2'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'BELNR2'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MIRO FI Doc.No'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    ls_fieldcat-col_pos       =  '14'.
      ls_fieldcat-fieldname     = 'GJAHR2'.
      ls_fieldcat-tabname       = 'T_MSEG'.
      ls_fieldcat-ref_fieldname = 'GJAHR2'.
      ls_fieldcat-ref_tabname   = 'MSEG'.
      ls_fieldcat-seltext_l     = 'MIRO FI FiscalYr'.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
    *&      Form  ALV_GRID_DISPLAY
    form alv_grid_display .
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
          i_callback_program                =  sy-repid   " 'ZRD_DD'
          it_fieldcat                       =  gt_fieldcat  "catalogue field
          i_callback_top_of_page            =  'TOP_PAGE'
          is_layout                         =  l_layout
         it_sort                           =  gt_sort
          i_default                         = 'X'
         i_save                            = 'A'
         is_variant                        = gs_variant
         it_events                         = it_events
         is_print                          = is_print
        tables
          t_outtab                          = t_mkpf
        exceptions
         program_error                      = 1
         others                             = 2
      if sy-subrc <> 0.
        message id sy-msgid type 'I' number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " ALV_GRID_DISPLAY
    **&      Form  ALV_LAYOUT
    *FORM alv_layout USING   ps_layout TYPE slis_layout_alv.
    ps_layout-get_selinfos      = x.
    ps_layout-colwidth_optimize = x.
    ps_layout-detail_popup      = x.
    ps_layout-no_keyfix         = x.
    ps_layout-coltab_fieldname    = 'CLR'.
    ps_layout-key_hotspot       = x.
    ps_layout-group_change_edit = x.
    ps_layout-zebra  = 'X'.
    *ENDFORM.                    " ALV_LAYOUT
    **&      Form  ALV_PRINT
    *FORM alv_print .
    is_print-no_print_selinfos = x. " display no selection infos
    is_print-no_coverpage = x.
    is_print-no_new_page  = x.
    is_print-no_print_listinfos = x. " display no listinfos
    *ENDFORM.                    " ALV_PRINT
    **&      Form  TOP_OF_PAGE
    form top_page.
      data: ls_line type slis_listheader,
            i_top_of_page type slis_t_listheader.
      title = sy-title.
      ls_line-typ  = 'H'.
      ls_line-info = title.
      append ls_line to i_top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = i_top_of_page.
    endform.                    "TOP_OF_PAGE
    In this report , i have faced some problems :-
    1. In MIGO numbers some cases MIRO doc. numbers are not shown against some migo doc. numbers whereas actually MIRO is already done.
    2. The Problem in downloading the report, its not accurate download & the MIGO Document Number not shown when we download the report.
    Thanks,
    Sumit.

    Hi Sumit,
    Im not sure if it will completely support ur needs but check it out
    This is for MIRO.Note here business area is hardcoded.
    REPORT  zmm_miro_track.
    TABLES : rseg, bkpf, bseg, lfa1, ekbe, skat, bsis .
    AlV related data declarations
    Type Pools
    TYPE-POOLS: slis.
    CONSTANTS:
    gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
          Data Declaration file                                         *
    DATA  : BEGIN OF it_rseg OCCURS 0,
             belnr TYPE rseg-belnr,
             gjahr TYPE rseg-gjahr,
             ebeln TYPE rseg-ebeln,
             ebelp TYPE rseg-ebelp,
             bukrs TYPE rseg-bukrs,
             awkey TYPE bkpf-awkey,
             END OF it_rseg.
    DATA :  BEGIN OF it_bkpf OCCURS 0,
             belnr TYPE bkpf-belnr,
             gjahr TYPE bkpf-gjahr,
             xblnr TYPE bkpf-xblnr,
             budat TYPE bkpf-budat,
             awkey TYPE bkpf-awkey,
             bukrs TYPE bkpf-bukrs,
             belnr1 TYPE bkpf-belnr,
             blart TYPE bkpf-blart,
            END OF it_bkpf.
    DATA :  BEGIN OF it_bseg OCCURS 0,
             belnr TYPE bseg-belnr,
             gjahr TYPE bseg-gjahr,
             bupla TYPE bseg-bupla,
             lifnr TYPE bseg-lifnr,
             hkont TYPE bseg-hkont,
             koart TYPE bseg-koart,
             mwskz TYPE bseg-mwskz,
             pswbt TYPE bseg-pswbt,
             ebeln TYPE bseg-ebeln,
             ebelp TYPE bseg-ebelp,
             xref3 TYPE bseg-xref3,
             bschl TYPE bseg-bschl,
             shkzg TYPE bseg-shkzg,
             miro_accnt TYPE bseg-hkont,
             xblnr TYPE bkpf-xblnr,
             budat TYPE bkpf-budat,
             belnr1 TYPE bseg-belnr,
             acdes(50),
             belnr2 TYPE bseg-belnr,
             belnr3 TYPE bseg-belnr,
             gjahr1 TYPE bseg-gjahr,
             hkont1 TYPE bseg-hkont,
             pswbt1 TYPE bseg-pswbt,
             budat1 TYPE ekbe-budat,
             acdes1(50),
            END OF it_bseg.
    DATA :  it_bseg1 LIKE it_bseg OCCURS 0 WITH HEADER LINE.
    DATA :  BEGIN OF it_bsis OCCURS 0,
             belnr TYPE bsis-belnr,
             gjahr TYPE bsis-gjahr,
             bschl TYPE bsis-bschl,
             xref3 TYPE bsis-xref3,
            END OF it_bsis.
    DATA :  BEGIN OF it_lfa1 OCCURS 0,
             lifnr TYPE lfa1-lifnr,
             name1 TYPE lfa1-name1,
             spras TYPE lfa1-spras,
            END OF it_lfa1.
    DATA :  BEGIN OF it_skat OCCURS 0,
             saknr TYPE skat-saknr,
             txt20 TYPE skat-txt20,
             txt50 TYPE skat-txt50,
             spras TYPE skat-spras,
             ktopl TYPE skat-ktopl,
            END OF it_skat.
    DATA :  BEGIN OF it_ekbe OCCURS 0,
             ebeln TYPE ekbe-ebeln,
             ebelp TYPE ekbe-ebelp,
             budat TYPE ekbe-budat,
             bewtp TYPE ekbe-bewtp,
            END OF it_ekbe.
    DATA : fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           gd_repid LIKE sy-repid.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv ,
          gs_print    TYPE slis_print_alv,
          gt_sort     TYPE slis_t_sortinfo_alv ,
          gt_filter   TYPE slis_t_filter_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_alv_graphics TYPE dtc_t_tc,
          gt_excluding  TYPE slis_t_extab ,
          gt_events   TYPE slis_t_event .
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader.
    DATA:       g_boxnam TYPE slis_fieldname VALUE  'BOX',
                p_f2code LIKE sy-ucomm       VALUE  '&ETA',
                p_lignam TYPE slis_fieldname VALUE  'LIGHTS',
                g_save(1) TYPE c,
                g_default(1) TYPE c,
                g_exit(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant.
          USER ENTRY PARAMETERS                                         *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_belnr FOR rseg-belnr OBLIGATORY,
                     s_gjahr FOR rseg-gjahr OBLIGATORY,
                     s_budat FOR bkpf-budat.
    SELECTION-SCREEN END OF BLOCK blk1.
          START-OF-SELECTION                                            *
    START-OF-SELECTION.
      PERFORM data_retrive.
      PERFORM data_call_alv.
      PERFORM build_layout.
    END-OF-SELECTION.
    *&      Form  DATA_CALL_ALV
          text
    -->  p1        text
    <--  p2        text
    FORM data_call_alv .
      g_repid = sy-repid.
      PERFORM e01_fieldcat_init USING gt_fieldcat[].
      PERFORM eventtab_build CHANGING gt_events.
      PERFORM e04_comment_build USING gt_list_top_of_page[].
      PERFORM display_report.
    ENDFORM.                    " DATA_CALL_ALV
    *&      Form  E01_FIELDCAT_INIT
          text
         -->P_GT_FIELDCAT[]  text
    FORM e01_fieldcat_init  USING    e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      DATA: gs_sort TYPE slis_sortinfo_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR'.
      ls_fieldcat-key = 'X'. "SUBTOTAL KEY
      ls_fieldcat-col_pos      = '1'.
      ls_fieldcat-seltext_l    = 'Accounting Doc'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR1'.
      ls_fieldcat-col_pos      = '2'.
      ls_fieldcat-seltext_l    = 'IR Doc'.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'XBLNR'.
      ls_fieldcat-col_pos      = '3'.
      ls_fieldcat-seltext_l    = 'IR Reference'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BUDAT'.
      ls_fieldcat-col_pos      = '4'.
      ls_fieldcat-seltext_l    = 'IR Posting Date'.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BUPLA'.
      ls_fieldcat-col_pos      = '5'.
      ls_fieldcat-seltext_l    = 'Business Place'.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'HKONT'.
      ls_fieldcat-col_pos      = '6'.
      ls_fieldcat-seltext_l    = 'G/L accounts Posted'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ACDES'.
      ls_fieldcat-col_pos      = '7'.
      ls_fieldcat-seltext_l    = 'G/L description'.
      ls_fieldcat-outputlen    = 20.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'MWSKZ'.
      ls_fieldcat-col_pos      = '8'.
      ls_fieldcat-seltext_l    = 'Tax Code'.
      ls_fieldcat-outputlen    = 8.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'PSWBT'.
      ls_fieldcat-col_pos      = '9'.
      ls_fieldcat-seltext_l    = 'G/L Amount'.
      ls_fieldcat-outputlen    = 20.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'EBELN'.
      ls_fieldcat-col_pos      = '10'.
      ls_fieldcat-seltext_l    = 'Purchase Order'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'EBELP'.
      ls_fieldcat-col_pos      = '11'.
      ls_fieldcat-seltext_l    = 'P.O.Line Item'.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR2'.
      ls_fieldcat-col_pos      = '12'.
      ls_fieldcat-seltext_l    = 'GRN Doc '.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR3'.
      ls_fieldcat-col_pos      = '13'.
      ls_fieldcat-seltext_l    = 'GRN FI Doc No.'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BUDAT1'.
      ls_fieldcat-col_pos      = '14'.
      ls_fieldcat-seltext_l    = 'GR Posting Date '.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
    ENDFORM.                    "e01_fieldcat_init
    *&      Form  EVENTTAB_BUILD
          text
         <--P_GT_EVENTS  text
    FORM eventtab_build  CHANGING lt_events TYPE slis_t_event.
      CONSTANTS:
      gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = lt_events.
      READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
      INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  E04_COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM e04_comment_build  USING e04_lt_top_of_page TYPE slis_t_listheader.
      DATA : v_time(5) TYPE c.
      DATA:  ls_line TYPE slis_listheader.
      DATA:  ls_colr TYPE slis_specialcol_alv.
      DATA : v_text(90) TYPE c.
      CONCATENATE ' Report for MIRO track ':' ' INTO v_text SEPARATED BY space.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = v_text.
      APPEND ls_line TO e04_lt_top_of_page.
    ENDFORM.                    " E04_COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    **&      Form  DATA_RETRIVE
          text
    FORM data_retrive.
    fetching Accounting Document Number and Fiscal year from Incoming Invoice table
      SELECT  belnr gjahr ebeln ebelp bukrs
         INTO CORRESPONDING FIELDS OF TABLE it_rseg
           FROM rseg
           WHERE belnr IN s_belnr
            AND  gjahr IN s_gjahr
            AND  bukrs = '1000'.
      LOOP AT it_rseg.
        CONCATENATE it_rseg-belnr it_rseg-gjahr INTO it_rseg-awkey.
        MODIFY it_rseg.
        CLEAR it_rseg.
      ENDLOOP.
      IF it_rseg[] IS NOT INITIAL.
        SELECT belnr gjahr xblnr budat awkey
          INTO CORRESPONDING FIELDS OF TABLE it_bkpf
            FROM bkpf
            FOR ALL ENTRIES IN it_rseg
            WHERE awkey = it_rseg-awkey
              AND budat IN s_budat
              AND bukrs = '1000'
              AND blart <> 'ML'.
      ENDIF.
      IF it_bkpf[] IS NOT INITIAL.
        SELECT belnr gjahr bupla lifnr hkont koart mwskz pswbt ebeln ebelp xref3 bschl shkzg
           INTO CORRESPONDING FIELDS OF TABLE it_bseg
           FROM bseg
           FOR ALL ENTRIES IN it_bkpf
           WHERE belnr = it_bkpf-belnr
             AND gjahr = it_bkpf-gjahr.
      ENDIF.
    fetching G/L account description
      IF it_bseg[] IS NOT INITIAL.
        SELECT lifnr name1
        INTO CORRESPONDING FIELDS OF TABLE it_lfa1
        FROM lfa1
        FOR ALL ENTRIES IN it_bseg
        WHERE lifnr = it_bseg-lifnr
          AND spras = 'EN'.
        SELECT saknr txt20 txt50
        INTO CORRESPONDING FIELDS OF TABLE it_skat
        FROM skat
        FOR ALL ENTRIES IN it_bseg
        WHERE saknr = it_bseg-hkont
          AND spras = 'EN'
          AND ktopl = 'HRJL'.
        SELECT ebeln ebelp budat
        INTO CORRESPONDING FIELDS OF TABLE it_ekbe
        FROM ekbe
        FOR ALL ENTRIES IN it_bseg
        WHERE ebeln = it_bseg-ebeln
          AND ebelp = it_bseg-ebelp
          AND bewtp = 'E'.
      ENDIF.
      LOOP AT it_bseg.
        IF it_bseg-koart = 'K'.
          it_bseg-miro_accnt = it_bseg-lifnr.
        ELSE.
          it_bseg-miro_accnt = it_bseg-hkont.
        ENDIF.
        IF it_bseg-shkzg = 'H'.
          it_bseg-pswbt = it_bseg-pswbt * -1.
        ENDIF.
        it_bseg-belnr2 = it_bseg-xref3+4(10).
        MODIFY it_bseg.
        READ TABLE it_ekbe WITH KEY ebeln = it_bseg-ebeln
                                    ebelp = it_bseg-ebelp.
        IF sy-subrc = 0.
          it_bseg-budat1 = it_ekbe-budat.
        ENDIF.
        READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr
                                    gjahr = it_bseg-gjahr.
        IF sy-subrc = 0.
          it_bseg-belnr = it_bkpf-belnr.
          it_bseg-gjahr = it_bkpf-gjahr.
          it_bseg-xblnr = it_bkpf-xblnr.
          it_bseg-budat = it_bkpf-budat.
          it_bseg-belnr1 = it_bkpf-awkey+0(10).
        ENDIF.
        IF it_bseg-koart = 'K'.
          READ TABLE it_lfa1 WITH KEY lifnr = it_bseg-miro_accnt.
          IF sy-subrc = 0.
            it_bseg-acdes = it_lfa1-name1.
          ENDIF.
        ELSE.
          READ TABLE it_skat WITH KEY saknr = it_bseg-miro_accnt.
          IF sy-subrc = 0.
            IF it_skat-txt20 IS NOT INITIAL.
              it_bseg-acdes = it_skat-txt20.
            ELSE.
              it_bseg-acdes = it_skat-txt50.
            ENDIF.
          ENDIF.
        ENDIF.
        MODIFY it_bseg.
        CLEAR it_bseg.
      ENDLOOP.
      it_bseg1[] = it_bseg[].
      LOOP AT it_bseg1.
        IF it_bseg1-xref3 = ''.
          DELETE it_bseg1.
          CLEAR it_bseg1.
        ENDIF.
      ENDLOOP.
      IF it_bseg1[] IS NOT INITIAL.
        SELECT belnr gjahr bschl xref3
        FROM bsis
        INTO CORRESPONDING FIELDS OF TABLE it_bsis
        FOR ALL ENTRIES IN it_bseg1
        WHERE xref3 = it_bseg1-xref3
          AND gjahr = it_bseg1-gjahr
          AND bschl = '96'.
      ENDIF.
      LOOP AT it_bseg.
        READ TABLE it_bsis WITH KEY xref3 = it_bseg-xref3.
        IF sy-subrc = 0.
          it_bseg-belnr3 = it_bsis-belnr.
          it_bseg-gjahr1 = it_bsis-gjahr.
        ENDIF.
        MODIFY it_bseg.
        CLEAR it_bseg.
      ENDLOOP.
    ENDFORM.                    "data_retrive
    *&      Form  DISPLAY_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM display_report .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_background_id         = ''
          i_callback_program      = g_repid
         i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = gt_fieldcat[]
          it_special_groups       = gt_sp_group[]
          it_sort                 = gt_sort[]
          it_filter               = gt_filter[]
          i_save                  = g_save
          is_variant              = g_variant
          it_events               = gt_events[]
          is_print                = gs_print
          it_alv_graphics         = gt_alv_graphics[]
          it_excluding            = gt_excluding
        TABLES
          t_outtab                = it_bseg.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    FORM build_layout.
      gs_layout-no_input          = 'X'.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-totals_text       = 'Totals'(201).
      gs_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    This is for MIGO.
    REPORT  zmm_migo_track.
    TABLES : bseg, ekbe, skat, bsis.
    AlV related data declarations
    Type Pools
    TYPE-POOLS: slis.
    CONSTANTS:
    gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
          Data Declaration file                                         *
    DATA :  BEGIN OF it_bseg OCCURS 0,
             belnr TYPE bseg-belnr,
             gjahr TYPE bseg-gjahr,
             bukrs TYPE bseg-bukrs,
             hkont TYPE bseg-hkont,
             pswbt TYPE bseg-pswbt,
             ebeln TYPE bseg-ebeln,
             ebelp TYPE bseg-ebelp,
             xref3 TYPE bseg-xref3,
             shkzg TYPE bseg-shkzg,
             budat TYPE ekbe-budat,
             acdes(50),
             belnr1 TYPE bseg-belnr,
            END OF it_bseg.
    DATA :  it_bseg1 LIKE it_bseg OCCURS 0 WITH HEADER LINE.
    DATA :  BEGIN OF it_bsis OCCURS 0,
             belnr TYPE bsis-belnr,
             gjahr TYPE bsis-gjahr,
             bschl TYPE bsis-bschl,
             xref3 TYPE bsis-xref3,
            END OF it_bsis.
    DATA :  BEGIN OF it_skat OCCURS 0,
             saknr TYPE skat-saknr,
             txt20 TYPE skat-txt20,
             txt50 TYPE skat-txt50,
             spras TYPE skat-spras,
             ktopl TYPE skat-ktopl,
            END OF it_skat.
    DATA :  BEGIN OF it_ekbe OCCURS 0,
             ebeln TYPE ekbe-ebeln,
             ebelp TYPE ekbe-ebelp,
             budat TYPE ekbe-budat,
             bewtp TYPE ekbe-bewtp,
            END OF it_ekbe.
    DATA :  fiscal_year_low(4),
            fiscal_year_high(4).
    DATA : fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           gd_repid LIKE sy-repid.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv ,
          gs_print    TYPE slis_print_alv,
          gt_sort     TYPE slis_t_sortinfo_alv ,
          gt_filter   TYPE slis_t_filter_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_alv_graphics TYPE dtc_t_tc,
          gt_excluding  TYPE slis_t_extab ,
          gt_events   TYPE slis_t_event .
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader.
    DATA:       g_boxnam TYPE slis_fieldname VALUE  'BOX',
                p_f2code LIKE sy-ucomm       VALUE  '&ETA',
                p_lignam TYPE slis_fieldname VALUE  'LIGHTS',
                g_save(1) TYPE c,
                g_default(1) TYPE c,
                g_exit(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant.
          USER ENTRY PARAMETERS                                         *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_belnr FOR bseg-belnr OBLIGATORY,
                     s_budat FOR ekbe-budat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    AT SELECTION-SCREEN.
      IF s_budat-low IS NOT INITIAL.
        CALL FUNCTION 'GM_GET_FISCAL_YEAR'
          EXPORTING
            i_date                           = s_budat-low
            i_fyv                            = 'V3'
         IMPORTING
            e_fy                             = fiscal_year_low
    EXCEPTIONS
      FISCAL_YEAR_DOES_NOT_EXIST       = 1
      NOT_DEFINED_FOR_DATE             = 2
      OTHERS                           = 3
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      IF s_budat-high IS NOT INITIAL.
        CALL FUNCTION 'GM_GET_FISCAL_YEAR'
          EXPORTING
            i_date                           = s_budat-high
            i_fyv                            = 'V3'
         IMPORTING
            e_fy                             = fiscal_year_high
    EXCEPTIONS
      FISCAL_YEAR_DOES_NOT_EXIST       = 1
      NOT_DEFINED_FOR_DATE             = 2
      OTHERS                           = 3
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
          START-OF-SELECTION                                            *
    START-OF-SELECTION.
      PERFORM data_retrive.
      PERFORM data_call_alv.
      PERFORM build_layout.
    END-OF-SELECTION.
    *&      Form  DATA_CALL_ALV
          text
    -->  p1        text
    <--  p2        text
    FORM data_call_alv .
      g_repid = sy-repid.
      PERFORM e01_fieldcat_init USING gt_fieldcat[].
      PERFORM eventtab_build CHANGING gt_events.
      PERFORM e04_comment_build USING gt_list_top_of_page[].
      PERFORM display_report.
    ENDFORM.                    " DATA_CALL_ALV
    *&      Form  E01_FIELDCAT_INIT
          text
         -->P_GT_FIELDCAT[]  text
    FORM e01_fieldcat_init  USING    e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      DATA: gs_sort TYPE slis_sortinfo_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR1'.
      ls_fieldcat-col_pos      = '1'.
      ls_fieldcat-seltext_l    = 'GRN Doc '.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BELNR'.
      ls_fieldcat-col_pos      = '2'.
      ls_fieldcat-seltext_l    = 'GRN FI Doc No.'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BUDAT'.
      ls_fieldcat-col_pos      = '3'.
      ls_fieldcat-seltext_l    = 'GR Posting Date '.
      ls_fieldcat-outputlen    = 10.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'HKONT'.
      ls_fieldcat-col_pos      = '4'.
      ls_fieldcat-seltext_l    = 'Account Assignment'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ACDES'.
      ls_fieldcat-col_pos      = '5'.
      ls_fieldcat-seltext_l    = 'Description'.
      ls_fieldcat-outputlen    = 20.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'PSWBT'.
      ls_fieldcat-col_pos      = '6'.
      ls_fieldcat-seltext_l    = 'G/L Amount'.
      ls_fieldcat-outputlen    = 15.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
    ENDFORM.                    "e01_fieldcat_init
    *&      Form  EVENTTAB_BUILD
          text
         <--P_GT_EVENTS  text
    FORM eventtab_build  CHANGING lt_events TYPE slis_t_event.
      CONSTANTS:
      gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = lt_events.
      READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
      INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  E04_COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM e04_comment_build  USING e04_lt_top_of_page TYPE slis_t_listheader.
      DATA : v_time(5) TYPE c.
      DATA:  ls_line TYPE slis_listheader.
      DATA:  ls_colr TYPE slis_specialcol_alv.
      DATA : v_text(90) TYPE c.
      CONCATENATE ' Report for MIGO track ':' ' INTO v_text SEPARATED BY space.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = v_text.
      APPEND ls_line TO e04_lt_top_of_page.
    ENDFORM.                    " E04_COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    **&      Form  DATA_RETRIVE
          text
    FORM data_retrive.
    fetching migo G/L account
      IF fiscal_year_high IS NOT INITIAL.
        SELECT belnr gjahr hkont pswbt ebeln ebelp xref3 shkzg
           FROM bseg
           INTO CORRESPONDING FIELDS OF TABLE it_bseg
           WHERE belnr IN s_belnr
             AND gjahr BETWEEN fiscal_year_low AND fiscal_year_high
             AND bukrs = '1000'.
      ELSE.
        SELECT belnr gjahr hkont pswbt ebeln ebelp xref3 shkzg
           FROM bseg
           INTO CORRESPONDING FIELDS OF TABLE it_bseg
           WHERE belnr IN s_belnr
             AND gjahr = fiscal_year_low
             AND bukrs = '1000'.
      ENDIF.
    fetching G/L account description
      IF it_bseg[] IS NOT INITIAL.
        SELECT saknr txt20 txt50
        INTO CORRESPONDING FIELDS OF TABLE it_skat
        FROM skat
        FOR ALL ENTRIES IN it_bseg
        WHERE saknr = it_bseg-hkont
          AND spras = 'EN'
          AND ktopl = 'HRJL'.
        SELECT ebeln ebelp budat
        INTO CORRESPONDING FIELDS OF TABLE it_ekbe
        FROM ekbe
        FOR ALL ENTRIES IN it_bseg
        WHERE ebeln = it_bseg-ebeln
          AND ebelp = it_bseg-ebelp
          AND bewtp = 'E'.
      ENDIF.
      LOOP AT it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-pswbt = it_bseg-pswbt * -1.
        ENDIF.
        MODIFY it_bseg.
        READ TABLE it_ekbe WITH KEY ebeln = it_bseg-ebeln
                                    ebelp = it_bseg-ebelp.
        IF sy-subrc = 0.
          it_bseg-budat = it_ekbe-budat.
        ENDIF.
        READ TABLE it_skat WITH KEY saknr = it_bseg-hkont.
        IF sy-subrc = 0.
          IF it_skat-txt20 IS NOT INITIAL.
            it_bseg-acdes = it_skat-txt20.
          ELSE.
            it_bseg-acdes = it_skat-txt50.
          ENDIF.
        ENDIF.
        MODIFY it_bseg.
        CLEAR it_bseg.
      ENDLOOP.
      it_bseg1[] = it_bseg[].
      LOOP AT it_bseg1.
        IF it_bseg1-xref3 = ''.
          DELETE it_bseg1.
          CLEAR it_bseg1.
        ENDIF.
      ENDLOOP.
      LOOP AT it_bseg.
        READ TABLE it_bseg1 WITH KEY belnr = it_bseg-belnr.
        IF sy-subrc = 0.
          it_bseg-belnr1 = it_bseg1-xref3+4(10).
          it_bseg-xref3 = it_bseg1-xref3.
        ENDIF.
        MODIFY it_bseg.
        CLEAR it_bseg.
      ENDLOOP.
    ENDFORM.                    "data_retrive
    *&      Form  DISPLAY_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM display_report .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_background_id         = ''
          i_callback_program      = g_repid
         i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = gt_fieldcat[]
          it_special_groups       = gt_sp_group[]
          it_sort                 = gt_sort[]
          it_filter               = gt_filter[]
          i_save                  = g_save
          is_variant              = g_variant
          it_events               = gt_events[]
          is_print                = gs_print
          it_alv_graphics         = gt_alv_graphics[]
          it_excluding            = gt_excluding
        TABLES
          t_outtab                = it_bseg.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    FORM build_layout.
      gs_layout-no_input          = 'X'.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-totals_text       = 'Totals'(201).
      gs_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT

  • Account determination error when i do MIGO transaction

    Hi All,
    When i post MIGO transaction I get this error.
    ACCOUNT DETERMINATION FOR ENTRY INT BSX--3000 NOT POSSIBLE.
    Can anybody help me to resolve this issue.
    Regards,
    Srivatsan

    Hi,
    Transaction Event Key "BSX" is used for inventory posting.At the time of MIGO Stock/Inventory Account is debited.
    Please check your material code. As per the error message the valuation class for your material code should be 3000. Maintain appropriate GL account for Valuation Class 3000 in BSX key.
    Use T Code OBYC to view all the transaction event keys. Scroll down to BSX which might be 11 th in the list, and double click on it. You will find a combination of Valuation modifier, Valuation class and GL Account. Please mantain appropriate GL code against valuation class 3000.
    If you are not confident enough you can take the help of your MM consultant.
    Regards,
    Swapnil

  • How to find out MIGO or MIRO without account document

    hi,can somebody tell he how to find out MIGO / MIRO withou account document,because my client want to check GL of GR/IR with MIGO&MIRO.
    in theory,MIGO - MIRO = GR/IR balance,but if no FI document generated from migo or miro for some reasons,they two do not reconcile,right?

    If no Fi document, then there is no GR/IR account in picture. so there is no question of reconciliation.

  • ERROR IN MIRO POSTING ENTRIES WITH CENVAT CLEARING ACCOUNT

    Hi,
              I'm facing a problem while posting in MIRO, instead of CENVAT clearing account RG23A BED acocount is getting debited, here I'm giving you the screen shots for MIGO and MIRO accounting entries please assist me with some customizing tips.
       MIGO
       MIRO
    material : TEST MAT
    vendor   : LAKSHMI GROUP
    I've assigned 154001 G/L ac for RG23A BED and 191101 G/L for MODVAT clearing ac.
    Thanks and Regards,
    Sairam.

    Hi Shiva,
          thanks for your response as you said in std cenvat ac get debited but as you can see in that above screen shots of my accounting entries RG23ABED ac is getting debited what actually wrong. How can correct the wrong entries please suggest me some solution here I'm sharing the screen shot of Tax on Goods Movements-->Account Determination-->Specify Excise Accounts per Excise Transaction
    please ask me for more information if you don't get my point on this problem
    Thanks in advance,
    Sairam

  • Partner Profit Center in MIGO

    Dear Friends
    I met a problem of partner profit center in MIGO. We have cross company STO transactions.  I checked some STO purchase order and MIGO transactions. For one purchase order, there are two MIGO transactions for one purchase item. However, when I checking accounting document of MIGO, only one accounting document contains partner profit center.  Later on,  only one accounting document of MIRO contains partner profit center. I am confused about the issue.
    Please help and advise.
    Regards,
    Rebe Z.

    Hi Srini,
    In that case, you are not using substitutions in your system. You would be having program RGGBS000 in your system. Also check if you have any entry in table T80D with input as Application area = 'GBLS'.
    Pls ask your functional consultant if you can go ahead substitution or probably you would be using BTE's in your system. Please confirm
    Cheers,
    Vikram

  • MIGO & Valuation Class

    Hi  all,
    We have a dilemma between the accounting department and the purchasing department.
    We create first a material purchase order with tcode ME21N and Account Assignment Category u201CQu201D  .Later when we run the tcode MIGO the following movement is expected :
    (EIN)             60000000 (P&L account)      to 61000000 (P&L account)     (EKG)
    (BSX)     32000000 (G/L account)            to 40090000 (G/L account)     (WRX)
    And later, when we run tcode MB1A (movement 281) the following movement is expected:
      (GBB-VBR)     61000000 (P&L account)      to     32000000 (G/L account)  (EKG)
    On the other hand, the purchasing department wants to be able to see the commitment in the project with tcode S_ALR_87013542 - By Cost Element -> Actual/Commitment/Total/Plan in CO Area Currency. We have created the account 32000000 as Statistical cost element for balance sheet, and when we run the tcode ME21N we can see the commitments
    in the report.
    The problem is that for the purchasing department the accounts that are in the operations EIN and EKG should not appear in the report  S_ALR_87013542 when we run MIGO. We have tried to customize the OBYC like that:
    EIN      60000000 (P&L account)           60000000 (P&L account)   EKG
    BSX      32000000 (G/L account)           40090000 (G/L account)        WRX
    And later, when we do the tcode MB1A (movement 281) in the report S_ALR_87013542 only appears the movement:
    GBB-VBR     61000000 (P&L account)      32000000 (G/L account)     EKG
    That is what de purchase department wants because the account 60000000 does not appear in the S_ALR_87013542
    The problem is that with the second option when we do the MIGO the account 60000000 do not appear in the balance. It appears when we run the the tcode MB1A, but this is not what the accounting department wantsu2026.
    Has anyone an idea about how to solve thisu2026
    Thanks a lot to any clue can help us

    >
    J.Esteve wrote:
    > EIN      60000000 (P&L account)           
    ...when we do the MIGO the account 60000000 do not appear in the balance. It appears when we run the the tcode MB1A, but this is not what the accounting department wantsu2026.
    Hi,
    "Q" stock also part of your inventory, only difference is it is a special stock for a particular WBSE. As you are aware inventory account is part of Balance sheet so it wont appear in P&L.
    P&L will hit only during consumption.
    If you want to hit P&L while doing MIGO then use account assignment "P". But you can not trace the stock with account assignment "P".
    Tnx.
    Abdul

  • MIGO Err.

    Dear Friends,
    I'm doing MIGO with 521 for FERT. Err: Account determination for entry RASA GBB ____ ZOF 7920 not possible. To remove this err I did OMWD & assigned 0001 as Valuation Grouping Code to my Valuation Area XXXX. Again I did MIGO. Err: Account determination for entry RASA GBB 0001 ZOF 7920 not possible. The difference between the 2 errors implies that Valuation Grouping Code 0001  requires assignment some where else also? Is it so or is there some thing else to be done? Plz help.
    Rgds

    The error M8 147(Account determination for entry XXX XXX              
    XXXXX  not possible)is because of the corresponding entry        
    mismatch in T030 table .For resolving this we need to make a            
    corresponding entry in transaction OBYC (the menu path in               
    SPRO is as follows)                                                                               
    Materials Management                                                    
    -> Valuation and Account Assignment                                     
       -> Account Determination                                             
          -> Account Determination Without Wizard                           
             -> Configure Automatic Postings

  • Changes in Purchasing Document Account Assignment during Goods Receipt

    Hi MM Gurus,
    Good day!
    I just wanted to check with you on something that I came up while tinkering with SAP. Say, I have a PO with account assignment F for Order 1. Then during GR, I realized that I placed the wrong account assignment object, which should be Order 2. Can I execute this change during GR or do I have to do it either at the PO or IV level? In the standard MIGO setup, the Account Assignment tab is set to display. I tried checking the details for F in OME9 and found the Account Assignment changeable field. I tried enabling it but I still came up with the same result. I understand the logic behind why is it setup that way, but I want to make sure if there is any workaround for this
    Hope you can respond the soonest.
    Regards,

    I our company (and many others I had contact to) the goods receipt is made by the porter or the warehouse people, in general from people different from the requestor. I mean the receipt is done at the central place where the goods arrive at the plant.
    the internal distribution is made based on the GR slip which has all necessary information.
    A warehouse guy, or even a porter (often from a external security service  provider) should not be able to correct any financially relevant information.
    A change of account assignment data may even be a conflict to existing approval strategies.
    LIV is done by accountants, a totally different skill level compared with warehouse workers.

  • Account determination for entry C002 ZF2 X001 not possible while doing GR

    Hi,
    I am facing problem while GR (MIGO) and error: Account determination for entry C002 ZF2 X001 not possible
    Scenario: Client wants to capture for transport cost while doing the GR by using material group (without material).
    Steps:
    1. Purchase order (ME21N):
    By using account assignment category K u2013 Cost centre, material group (without material) and fright condition
    (Account determination: Account key FRE and Accruals ZF2)
    2. GR (MIGO):  error: Account determination for entry C002 ZF2 X001 not possible
    Configuration made:
    1. Assing material group to valuation class (OMQW)
    Material group - 600000020 Office BOOKS   to Valuation class Y170 BOOKS
    2. Account determination for valuation class (OMWD):
    Valuation area X001 - VGCd X001
    3. Automatic account determination (OBYC):
    FRE u2013 X001(VGCd) - Y170 (VC) u2013 606400000 (GL)
    ZF2 - X001(VGCd) - Y170 (VC) u2013 408300000 (GL) (This is Z transaction key to capture transport cost).
    For ZF2 transaction key above configuration was attached and still I am getting error.
    Did I miss any other configuration?
    Thanks in advance for suggestion.

    Based on the Error message, i think account determination is not looking for valuation class Y170. This is normally included in the error message, so i think you should maintain FRE and ZF2 with valuation class as 'blank'.
    Regards,
    Ganesh

  • Posting MIRO before MIGO

    Dear Experts,
    When a PO is raised for 100no's with each piece costing 10. Before posting a MIGO a MIRO is posted for 50 no's for 600.
    Then the MIGO is posted for 100 no's.
    what price will be taken at the time of MIGO?
    what account get generated when the material is maintained in Standard Price as well MVP.
    Regards,
    Nani.

    hi
    >Is the value taken from MIRO for MVP or Standard Price.
    it will take from MIRO only
    >In this two cases what will be the accounting entries and G/L account hits?
    with MAP
    At the time of LIV (MIRO);
    Vendor A/c - Cr
    GR/IR Clearing A/c - Dr
    At the time of GR (MIGO);
    Stock A/c - Dr
    GR/IR Clearing A/c - Cr
    WITH STD
    At the time of LIV (MIRO);
    Vendor A/c - Cr
    GR/IR Clearing A/c - Dr
    PRD -Dr
    At the time of GR (MIGO);
    Stock A/c - Dr
    GR/IR Clearing A/c - Cr
    PRD-Cr
    regards
    kunal

  • Delivery cost should upload on stock account

    Hi Gurus,
    My requirement is that delivery cost which i am putting at the time of raising PO should add to stock account. Suppose my PO value is of 100 rs
    Total PO Value -- 100
    Assesable value for excise --            100    (It is required 100 not inclusive of labour cost)
    Excise  16%--                                  16.00
    Educess on 2% --                              0.32
    Value inclusive of ED and edu cess -- 116.32
    Labour cost                                    -- 10.00
    Total value of PO                          -- 126.32
    If i go like this then FI enteries at the time of doing MIGO are
    Stock account Dr      100
    Fright account Dr       10
    GR/IR             Cr       110.00
    whereas frieght value is not uploading to stock account.
    How can i cope with this situtation
    Regards
    VS

    Hi,
    Look at M/08 for the pricing procedure that your PO is picking up.  Then, for the freight condition that you are worried about, look at the account key.  Then go to OBYC and verify to which account it is assigned.  If your FI wants that freight amount to be posted to stock account, change the account in OBYC for this key to stock account.  It will post to stock account.  From the details you provided it appears that you are using moving average price.  So, you will have freight loaded to your material once you do the above config. 
    Reward if it works!
    Regards

Maybe you are looking for