Link b/w  BSAK &  AUSP

Hi gurus,
is their a link b/w BSAK - Accounting: Secondary Index for Vendors (Cleared Items)
                            AUSP - Characteristic Values ?
Can i have some info pls..
thank you,
pasala.

Hello,
One way is you can get the EBELN & EBELP from the BSAK table, put them in EKPO table to get the material (MATNR) & for the same MATNR, you can get the Object ID from MARA.
Regards,
Venkata Phani Prasad K

Similar Messages

  • How to find out the batch class link of the batch record in the MSC3N

    Hi,
    I would like to know how to pull out the class type and the characteristic value for a batch which is found in MSC3N.
    For example, the following is MSC3N screen showing material (INM000000001724945) and batch (A000001117) tie to batch class “XXXXXXXX”.
    Hence, I would like to know:
    How to pull out the class type and the characteristic value for a batch record which is found in MSC3N? What are the table? The table show in the F1 key is not a table.
    There are two batch classes setup in the system “XXXXXXX” and “YYYYYYY”, my question is why system decides to use the batch class “XXXXXXX”? Where is the system setup to determine this?
    Thanks
    Tuff

    Hi
    The table MCH1 keeps the information about Material, Batch and Internal object no.: Batch classification (CUOBJ_BM).
    The field CUOBJ_BM in MCHA represent the 'Key of object to be classified' (AUSP-OBJEK). The first 18 characters of AUSP-OBJEK.
    In CABN (Characteristic) the field ATINN and ATNAM is important. The link between CABN and AUSP is through ATINN.

  • Need table name to link with mseg or ekko ekpo

    hi ppl,
            As i need to display mat charasteristics value,class,material id,vendor..etc..
         i got mat char values,class,material id..but furthur i need to link with mseg table..so is there any table which links between mseg to ausp,kssk,ksml,susp..etc..

    HI.
    mseg to ausp by field ATZHL,
    kssk and  ksml no link with MSEG.and susp is not a table ,check it out.
    REgards.
    jay

  • Help with Query

    Hi All,
    our auditors wanted a report, basically FBL3N + the vendor name, i tried using
    tcode O758 to just add the vendor number there but looks like i have to add
    in BSEG inorder for it to appear in O758.
    so i created a query which does this.
    I was able to link BSIS to BSISK with BELNR and BSIK to LFA1 with LIFNR
    to get the open items
    to get the cleared items i linked BSIS to BSAK with BELRN and BSAK to
    LFA1 with LIFNR. This works fine but i want to combinbe these reports
    so that we get the open and cleared items both in the same report.
    BELNR first sits in BSIK and once its cleared it goes to BSAK and theres no
    AUGBL in BSIK but its there in BSAK so not sure how to link these tables.
    Linking BELNR from BSIS to BSAK and BSIK doesnt work .
    please advice........

    looks like i havent figured it out fully, i am not getting the vendor name to show
    only the vendor number, have to test it fully . will let you know Ravi

  • Standart GR/IR report with the following fields?

    Hi All,
    Transaction FBL3N gives a list of open GR/IR items at a keydate. However, I'm looking for the following fields to appear in the output
    Purchasing doc#, line item, Vendor number, vendor name, Material, Quantity, Accounting document no., Document date and Amount.
    I've tried adding certain fields using the Layout option but still havent got all these fields together. Is there any standard SAP report which would give me this output or would I need to develop a custom report?
    I also tried ABAP query but there;s no link between an accounting document and Purchase order apart from the "Assignment" field in the BSEG table which has purchase orderno. and line item combined into a single text field.
    Thanks
    Tejas

    Hi
    There is no specific standard report for getting the details required by you.
    In FBL3N you will get only the FI vendor line items but all the details required by you is not possible.
    BUT you can go for the ABAP Report.
    TABLES: RSEG,EKKO, EKPO, EKBE, BSAK
    Use the "Object key"  = (MM invoice number along with fiscal year it comes10+4 is length of the field take the invoice number use the same in RSEG and you will get the the PO details and material details)field in the BSAK for linking both the BSAK and RSEG
    VVR

  • PO to Payment Report

    Hi experts,
    we want to devlop PO to payment report.
    From Table EKPO - EBELN-Purchasing Document Number
    From Table EKBE-BELNR-Number of Material Document
    From Table MSEG- BELNR-Number of Material Document Number from EKBE
    how can i link  MSEG , BKPF & BSAK . please guide me .

    Hi,
    Pass PO number in BSAK-EBELN you will get Accounting document of Invoice in BELNR field, in AUGBL you will get the Payment document numner,
    Now to get the Invoice number pass the BELNR from BSAK to BKPF and pick AWKEY from there, please remember to to exclude last four numbers because they represent Fiscal Year.
    Hope this helps!!!
    Br,Vivek

  • BSAK link to BSIS and BSAS...

    Hello Experts,
    I am doing 2 FOR ALL ENTRIES to get records from BSIS and BSAS based on the records
    that I got in BSAK. Currently, I only know of 3 fields to link which is BUKRS, BELNR, AND GJAHR
    but I is still any more fields that I can link to BSAK from BSIS and BSAS? Because we are
    experiencing performance issues in my program. I am using index for the 3 tables but still it gives us
    performance issues. Below is my code:
    *   Get previous year
        lv_year = p_gjahr - 1.
    *   Get records from PAYR
        SELECT zbukr vblnr gjahr lifnr zaldt
          FROM payr
          INTO TABLE gt_payr
         WHERE zbukr = p_bukrs
           AND gjahr IN (lv_year, p_gjahr).
        DELETE gt_payr WHERE zaldt+4(2) > p_monat.
        SORT gt_payr BY zbukr vblnr gjahr lifnr zaldt.
        DELETE ADJACENT DUPLICATES FROM gt_payr COMPARING zbukr vblnr gjahr lifnr zaldt.
        IF NOT gt_payr[] IS INITIAL.
    *     Get records from BSAK
          SELECT bukrs blart gjahr monat belnr lifnr dmbtr shkzg
            FROM bsak
            INTO TABLE gt_bsak
             FOR ALL ENTRIES IN gt_payr
            WHERE lifnr = gt_payr-lifnr
              AND bukrs = gt_payr-zbukr
              AND augdt = gt_payr-zaldt
              AND augbl = gt_payr-vblnr
              AND gjahr = gt_payr-gjahr.
        ENDIF.
        DELETE gt_bsak WHERE monat > p_monat.
        DELETE gt_bsak WHERE shkzg <> 'H'.
        gt_payments[] = gt_bsak[].
        IF NOT gt_payments[] IS INITIAL.
    *   Get records from BSIS(Open items)
        SELECT bukrs blart gjahr monat dmbtr hkont
          FROM bsis
          INTO TABLE gt_bsis
           FOR ALL ENTRIES IN gt_payments
         WHERE bukrs = gt_payments-bukrs
           AND belnr = gt_payments-belnr
           AND gjahr = gt_payments-gjahr
           AND blart IN (lc_su, lc_px).
    *   Get records from BSAS(Cleared items)
        SELECT bukrs blart gjahr monat dmbtr hkont
          FROM bsas
          INTO TABLE gt_bsas
           FOR ALL ENTRIES IN gt_payments
         WHERE bukrs = gt_payments-bukrs
           AND belnr = gt_payments-belnr
           AND gjahr = gt_payments-gjahr
           AND blart IN (lc_su, lc_px).
        ENDIF.
    Hope you can help me guys. Thank you and take care!

    In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY
    bsis
    select MANDT
    BUKRS
    HKONT
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    bsak
    select MANDT
    BUKRS
    LIFNR
    UMSKS
    UMSKZ
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    bsas
    select MANDT
    BUKRS
    HKONT
    AUGDT
    AUGBL
    ZUONR
    GJAHR
    BELNR
    BUZEI
    Message was edited by:
            Karthikeyan Pandurangan

  • How to get the link between mara, ausp, cawn and cawnt tables

    hello ABAPERS
    i have got a requiremet in that i have to get the relation .
    how to get the link between mara, ausp, cawn and cawnt tables and also type how can we get link between  char value and char description in cawn and cawnt tables through ausp and mara tables.
    I would be very thankful  for ur help in advance.
    Thanks & Regards.
    soni

    Hi,
    Sample report using the linkage between tables;
    report batch_char no standard page heading
                              line-size  132
                              line-count 58(1)
                              message-id mm.
           Report by Batch Characteristic                                *
    Description          : Report by Batch Characteristic                *
    Declaration for Tables
    tables: mara,    " Material Master
            mard,    " Storage Location Data for Material
            t001w,   " Plants/Branches
            t001l,   " Storage Locations
            cabn,    " Characteristics
            inob.    " Link between Internal Number and Object
    Declaration for Constants
    constants : c_klart like ausp-klart value '023',     " Class Type
                c_obtab like inob-obtab value 'MCH1',    " Database Table
                c_flag  type c          value 'X',       " Flag
                c_c23   type i          value '23',      " Ratio
    Constants for Ratio Categories
                c_13    type p decimals 2 value '13.00', " For Ratio 13
                c_1499  type p decimals 2 value '14.99', " For Ratio 14.99
                c_15    type p decimals 2 value '15.00', " For Ratio 15
                c_1699  type p decimals 2 value '16.99', " For Ratio  16.99
                c_17    type p decimals 2 value '17.00', " For Ratio 17
                c_1899  type p decimals 2 value '18.99', " For Ratio 18.99
                c_19    type p decimals 2 value '19.00', " For Ratio 19
                c_2099  type p decimals 2 value '20.99', " For Ratio 20.99
                c_21    type p decimals 2 value '21.00', " For Ratio 21
                c_2299  type p decimals 2 value '22.99', " For Ratio 22.99
                c_23    type p decimals 2 value '23.00', " For Ratio 23
                c_g23(4) type c value '>=23',            " For Ratio >=23
                c_ratio(5) value 'RATIO',                  " For Ratio
    Constants for Storing Selected item field information
                c_cursor1(15) value 'I_OUTPUT1-MEINS',   " For Selected Base
                                                         " Unit of Measure
                c_cursor2(15) value 'I_OUTPUT1-MATNR',   " For Selected Base
                                                         " Material Number
                c_cursor3(15) value 'I_OUTPUT1-MAKTX',   " For Selected Base
                                                         " Material Des.
                c_cursor4(15) value 'I_OUTPUT1-CLABS',   "For Selected Base
                                                         " Stock Value
                c_cursor5(15) value 'I_OUTPUT1-ATFLV',   " For Selected Base
                                                        " Char.Value (Ratio)
                c_cursor6(5) value 'C_G23'.
    Declaration for Global Variables
    data : g_exit  type c,                            " Flag
           g_clabs1(16) type c,                       " Quantity
           g_clabs(18)  type c,                       " Quantity
           g_cursor(15) type c,                       " Cursor field name
           g_matnr     type mara-matnr,               " Material Number
           g_werks     type mchb-werks,               " Plant
           g_atinn(30) type c.                        " Character.
    Declaration for Internal tables
    Internal table to hold Batch Stock data
    data : begin of i_mchb occurs 0,
             matnr like mchb-matnr,      " Material Number
             werks like mchb-werks,      " Plant
             lgort like mchb-lgort,      " Storage Location
             charg like mchb-charg,      " Batch Number
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Unit of measure
             atflo like ausp-atflv,      " Char.Value (Ratio)
             atflv like ausp-atflv,      " Char.Value (Ratio)
           end of i_mchb.
    Internal table to hold Secondary List data
    data : begin of i_mchb1 occurs 0,
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             lgort like mchb-lgort,      " Storage Location
             charg like mchb-charg,      " Batch Number
             atinn like ausp-atinn,      " Char.Value
             clabs like mchb-clabs,      " Stock Value
             atflo like ausp-atflv,      " Char.Value (Ratio)
             atflv like ausp-atflv,      " Char.Value (Ratio)
           end of i_mchb1.
    Internal table to get the Plant Name
    data : begin of i_plant occurs 0,
             werks like t001w-werks,     " Plant
             name1 like t001w-name1,     " Name
           end of i_plant.
    Internal table to get the Material Description
    data : begin of i_makt occurs 0,
             matnr like makt-matnr,      " Material
             maktx like makt-maktx,     " Description
           end of i_makt.
    Internal table to hold AUSP data
    data : begin of i_ausp occurs 0,
             objek like ausp-objek,      " Object No
             atinn like cabn-atinn,      " Characteric value
             atflv like ausp-atflv,      " Characteristic Value
           end of i_ausp.
    Internal table to hold output data
    data : begin of i_output occurs 0,
             atinn like cabn-atinn,      " Characteric value
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             atnam like cabn-atnam,      " Characteristic
             atflv like ausp-atflv,      " Char.Value (Ratio)
             name1 like t001w-name1,     " Plant Description
             maktx like makt-maktx,      " Material Description
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Base Unit of Measure
           end of i_output.
    Internal table to hold final Output data
    data : begin of i_output1 occurs 0,
             atinn like cabn-atinn,      " Characteric value
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             atnam like cabn-atnam,      " Characteristic
             atflv(32) type c,           " Char.Value (Ratio)
             name1 like t001w-name1,     " Plant Description
             maktx like makt-maktx,      " Material Description
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Base Unit of Measure
           end of i_output1.
           Selection screen
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_werks for t001w-werks obligatory,  " Plant
                    s_lgort for t001l-lgort,             " Stor.Location
                    s_matnr for mara-matnr  obligatory,  " Material No
                    s_atinn for cabn-atinn.              " Character.
    selection-screen end of block b1.
    At selection screen
    at selection-screen.
    Validation of Selection Screen Fields
      perform validate_screen.
    Start of selection
    start-of-selection.
    Get the Material and Batch Stock data from MARA and MCHB Tables
      perform get_mat_stock_data.
    Get the Material Group Text and Plant Name from T023T and T001W Tables
      perform get_plant_grp_data.
    Append the data into final Output Internal Table after getting the
    Characteristic Values data from INOB and AUSP Tables
      perform append_final_data.
    Processing if the Characteristics contain 'RATIO'
      perform collect_ratio.
    End-of-Page
    end-of-page.
      write /1(125) sy-uline.
    End of selection
    end-of-selection.
      if g_exit <> c_flag.
    Display the Report Output data
        perform display_report.
      endif.
    Top-of-Page
    top-of-page.
    Write the Report and Column Headings
      perform get_headings.
    at line-selection
    at line-selection.
      if sy-lsind = 1.
        perform display_batch.
      endif.
    Top of page during line-selection
    top-of-page during line-selection.
      perform heading_seclist.
          Form validate_screen
    Validation of Selection Screen fields
    form validate_screen.
    Validation of Plant
      clear t001w.
      if not s_werks[] is initial.
        select werks
          into t001w-werks
          from t001w
          up to 1 rows
          where werks in s_werks.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Plant'(002).
        endif.
      endif.
    Validation of Material Number
      clear mara.
      if not s_matnr[] is initial.
        select matnr
          into mara-matnr
          from mara
          up to 1 rows
          where matnr in s_matnr.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Material'(003).
        endif.
      endif.
    Validation of Storage Location
      clear t001l.
      if not s_lgort[] is initial.
        select lgort
          into t001l-lgort
          from t001l
          up to 1 rows
          where lgort in s_lgort.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Storage Location'(004).
        endif.
      endif.
    Validation of Characteristic Value
      clear cabn.
      if not s_atinn[] is initial.
        select atinn
          into cabn-atinn
          from cabn
          up to 1 rows
          where atinn in s_atinn.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Characteristic Value'(005).
        endif.
      endif.
    Validation of Plant, Material and Storage Location
      clear mard.
      select matnr werks lgort
        into (mard-matnr, mard-werks, mard-lgort)
        from mard
        up to 1 rows
        where matnr in s_matnr and
              werks in s_werks and
              lgort in s_lgort.
      endselect.
      if sy-subrc <> 0.
        message e899 with 'No Data found for the Selection Criteria'(006).
      endif.
    endform.                          "validate_screen
    *&      Form  get_headings
    Write the Report and Column Headings
    form get_headings.
      data: l_repid type sy-repid.
      l_repid =  sy-repid.
      call function 'Y_STANDARD_HEADING'
           exporting
                repid    = l_repid
                heading1 = sy-title.
      write:/1(125) sy-uline.
      format color col_heading on.
      write : /1  sy-vline,  2(18)   'Material Number'(008) centered,
              20  sy-vline,  21(40)  'Material Description'(011) centered,
              61  sy-vline,  62(22)  'Ratio'(009) centered,
              84  sy-vline,  85(18)  'Quantity'(010) centered,
             103  sy-vline, 104(20)  'Base Unit of Measure'(015) centered,
             125  sy-vline.
      write:/1(125) sy-uline.
      format color off.
    endform.                    "get_headings
    *&      Form  get_mat_stock_data
    Get the Material and Batch Stock data from MARA and MCHB Tables
    form get_mat_stock_data.
      clear: i_mchb,i_output, i_output1.
      refresh: i_mchb,i_output, i_output1.
      select a~matnr       " Material Number
             b~werks       " Plant
             b~lgort       " Storage Location
             b~charg       " Batch Number
             b~clabs       " Stock Value
             a~meins       " Base Unit of Measure
          into table i_mchb
          from mara as a inner join mchb as b
          on amatnr eq bmatnr
          where b~matnr in s_matnr and
                b~werks in s_werks and
                b~lgort in s_lgort.
      if sy-subrc <> 0.
        g_exit = c_flag.
        message s899 with 'No Data found for the Selection Criteria'(006).
        stop.
      endif.
      sort i_mchb by matnr werks lgort charg.
    endform.                    " get_mat_stock_data
    *&      Form  get_plant_grp_data
    Get the Material Group Text and Plant Name from T023T and T001W
    form get_plant_grp_data.
      if not i_mchb[] is initial.
    Get the Plant Description from t001w Table
        clear i_plant.
        refresh i_plant.
        select werks      " Plant
               name1      " Name
          into table i_plant
          from t001w
          for all entries in i_mchb
          where werks = i_mchb-werks.
    Get the Material Description from MAKT Table
        clear i_makt.
        refresh i_makt.
        select matnr      " Material number
               maktx      " Material Description
          into table i_makt
          from makt
          for all entries in i_mchb
          where matnr = i_mchb-matnr and
                spras = sy-langu.
        sort i_plant by werks.
        delete adjacent duplicates from i_plant comparing werks.
        sort i_makt by matnr.
        delete adjacent duplicates from i_makt comparing matnr.
      endif.
    endform.                   "form get_plant_grp_data.
    *&      Form  append_final_data
    Append the data into final Internal Table
    form append_final_data.
      data : l_matbatch(28),
             l_tabix like sy-tabix.
      if not i_mchb[] is initial.
        loop at i_mchb.
          l_tabix = sy-tabix.
          clear l_matbatch.
          concatenate i_mchb-matnr i_mchb-charg into l_matbatch.
          move-corresponding i_mchb to i_output.
    Get the Plant Description from i_plant Table
            read table i_plant with key werks = i_mchb-werks binary search.
            if sy-subrc = 0.
              i_output-name1 = i_plant-name1.
            endif.
    Get the Material Description from i_makt Table
          read table i_makt with key matnr = i_mchb-matnr binary search.
          if sy-subrc = 0.
            i_output-maktx = i_makt-maktx.
          endif.
    Get the Characteristic Values data from INOB and AUSP Tables
          clear inob.
          select single cuobj from inob
              into inob-cuobj
              where klart = c_klart and
                    obtab = c_obtab and
                    objek = l_matbatch.
          if sy-subrc = 0.
            select objek
                   atinn
                   atflv
               from ausp
               into table i_ausp
               where objek = inob-cuobj and
                     atinn in s_atinn   and
                     klart = c_klart.
            sort i_ausp by objek atinn.
            loop at i_ausp.
              clear cabn.
              select single atinn atnam from cabn
                         into (cabn-atinn,cabn-atnam)
                         where atinn = i_ausp-atinn.
              if sy-subrc = 0.
    If the ratio value is between 13-14.99, display 13
                if cabn-atnam cs c_ratio.
                  if i_ausp-atflv between c_13 and c_1499.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_13.
    If the ratio value is between 15-16.99, display 15
                  elseif i_ausp-atflv between c_15 and c_1699.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_15.
    If the ratio value is between 17-18.99, display 17
                  elseif i_ausp-atflv between c_17 and c_1899.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_17.
    If the ratio value is between 19-20.99, display 19
                  elseif i_ausp-atflv between c_19 and c_2099.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_19.
    If the ratio value is between 21-22.99, display 21
                  elseif i_ausp-atflv between c_21 and c_2299.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_21.
    If the ratio value is greater than or equal to 23, display 23
                  elseif i_ausp-atflv >= c_23.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_23.
                  endif.           " Condition for RATIO values
                else.              " If characteristic does contain RATIO
                  i_mchb-atflv = i_ausp-atflv.
                endif.
                i_output-atinn = cabn-atinn.
                i_output-atnam = cabn-atnam.
                i_output-atflv = i_ausp-atflv.
                i_mchb1-matnr = i_mchb-matnr.
                i_mchb1-werks = i_mchb-werks.
                i_mchb1-lgort = i_mchb-lgort.
                i_mchb1-charg = i_mchb-charg.
                i_mchb1-clabs = i_mchb-clabs.
                i_mchb1-atinn = i_ausp-atinn.
                i_mchb1-atflo = i_mchb-atflv.
                i_mchb1-atflv = i_ausp-atflv.
                append : i_output, i_mchb1.
                clear i_mchb1.
                modify i_mchb index l_tabix transporting atflo atflv .
              endif.
            endloop.
          endif.
        endloop.
      endif.
    Checking whether the table is filled or not
      if not i_output[] is initial.
        sort i_output by atinn werks matnr atflv.
      else.
        g_exit = c_flag.
        message s899 with 'No Data found for the Selection Criteria'(006).
      endif.
    Delete the records where RATIO is less than 13.
      delete i_output where atnam cs c_ratio and atflv lt c_13.
    endform.                    "append_final_data
    *&      Form  display_report
    Display the Report Output data
    form display_report.
    data: l_tabix like sy-tabix.
      loop at i_output1.
        l_tabix = sy-tabix.
    At new Characteristic
         at new atinn.
          read table i_output1 index l_tabix.
          format color 1 intensified on.
          write: /1 sy-vline, 2(20) 'Characteristic Name:'(007),
                 23(40) i_output1-atnam,
                 125 sy-vline.
          format color off.
          format color 4 intensified on.
          write: /1 sy-vline, 2(20) 'Plant Name         :'(022),
                 23(4) i_output1-werks, 29(30) i_output1-name1,
                 125 sy-vline.
          format color off.
          write /1(125) sy-uline.
        endat.
        clear: g_clabs, g_clabs1.
        format color col_normal.
        write :/1 sy-vline,  2(18)   i_output1-matnr,
               20 sy-vline,  21(40)  i_output1-maktx,
               61 sy-vline.
        if i_output1-atflv = c_c23.
          write: 62(22)  c_g23 centered.
        else.
          shift i_output1-atflv left deleting leading space.
          write: 62(22)  i_output1-atflv centered.
        endif.
        write:  84     sy-vline,
               103     sy-vline,
               110(5)  i_output1-meins.
    If the quantity value is negative
        if i_output1-clabs ge 0.
          write: 85(18) i_output1-clabs unit i_mchb-meins,
                125     sy-vline.
        else.
          i_output1-clabs = - i_output1-clabs.
          write i_output1-clabs unit i_mchb-meins to g_clabs1.
          condense g_clabs1.
          concatenate '(' g_clabs1 ')' into g_clabs separated by space.
          write: 85(18) g_clabs right-justified,
               125 sy-vline.
        endif.
        format color off.
        hide : i_output1.
        new-line.
    At end of material
        at end of matnr.
          sum.
          move : i_output1-matnr to g_matnr.
          format color 3 intensified on.
          write /1(125) sy-uline.
          write :/1 sy-vline,  2(25) 'Total for Material      :'(012),
                 28(18) g_matnr.
          if i_output1-clabs ge 0.
            write: 85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          write: 125 sy-vline.
          format color off.
          write /1(125) sy-uline.
        endat.
    At end of plant
        at end of werks.
          sum.
          move : i_output1-werks to g_werks.
          format color 3 intensified off.
          write :/1 sy-vline,  2(25) 'Total for Plant          :'(013),
                 28(4) g_werks.
          if i_output1-clabs ge 0.
            write:  85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          format color off.
          write /1(125) sy-uline.
        endat.
    At end of  characteristic
        at end of atinn.
          read table i_output1 index l_tabix.
          sum.
          format color 3 intensified on.
          write :/1 sy-vline,  2(25) 'Total for Characteristic:'(014),
                 28(25) i_output1-atnam.
          if i_output1-clabs ge 0.
            write:  85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          format color off.
          write /1(125) sy-uline.
        endat.
      endloop.
    endform.                    " display_report
    *&      Form  DISPLAY_BATCH
         Display the batch details for the seclected material            *
    form display_batch.
    Get the batch details for the selected material
      get cursor field g_cursor.
      if g_cursor = c_cursor1 or
         g_cursor = c_cursor2 or
         g_cursor = c_cursor3 or
         g_cursor = c_cursor4 or
         g_cursor = c_cursor5 or
         g_cursor = c_cursor6.
        format color 3.
        write: /1 sy-vline,
                2(17) 'Material Number :'(020),
               20(17) i_output1-matnr,
               94 sy-vline.
        format color off.
        write /1(94) sy-uline.
        loop at i_mchb1 where matnr = i_output1-matnr and
                              atinn = i_output1-atinn and
                              atflo = i_output1-atflv.
          format color col_normal.
          shift i_mchb1-charg left deleting leading '0'.
          write :/1 sy-vline,  2(16) i_mchb1-lgort centered,
                 18 sy-vline, 19(17) i_mchb1-charg centered,
                 36 sy-vline.
          if i_output1-atnam cs c_ratio.
            write: 37(29) i_mchb1-atflv
                           exponent 0 decimals 2 centered.
          else.
            write : 37(29) i_mchb1-atflv
                          exponent 0 decimals 0 centered.
          endif.
          write : 66 sy-vline, 67(27) i_mchb1-clabs unit i_mchb-meins,
                  94 sy-vline.
          format color off.
        endloop.
        write /1(94) sy-uline.
      else.
        message s899 with 'Invalid cursor position'(016).
        exit.
      endif.
    endform.                    " DISPLAY_BATCH
    *&      Form  HEADING_SECLIST
          Write the Column Headings for Interactive Report
    form heading_seclist.
      write /1(94) sy-uline.
      format color col_heading on.
      write :/1 sy-vline,  2(16) 'Storage Location'(021),
             18 sy-vline, 19(17) 'Batch Number'(017) centered,
             36 sy-vline, 37(29) 'Characteristic Value'(018) centered,
             66 sy-vline, 67(27) 'Quantity'(019) centered,
             94 sy-vline.
      write /1(94) sy-uline.
      format color off.
    endform.                    " HEADING_SECLIST
    *&      Form  COLLECT_RATIO
          Display the Characteristic ratio data
    form collect_ratio.
      loop at i_output.
        clear g_atinn.
        i_output1-atinn = i_output-atinn.
        i_output1-atnam = i_output-atnam .
        i_output1-werks = i_output-werks.
        i_output1-name1 = i_output-name1.
        i_output1-matnr = i_output-matnr.
        i_output1-maktx = i_output-maktx.
        i_output1-clabs = i_output-clabs.
        i_output1-meins = i_output-meins.
        call function 'CONVERSION_EXIT_ATINN_OUTPUT'
             exporting
                  input  = i_output-atinn
             importing
                  output = g_atinn.
        if g_atinn cs c_ratio.
    If the ratio value is between 13-14.99, display 13
          if i_output-atflv between c_13 and c_1499.
            i_output1-atflv = c_13.
    If the ratio value is between 15-16.99, display 15
          elseif i_output-atflv between c_15 and c_1699.
            i_output1-atflv = c_15.
    If the ratio value is between 17-18.99, display 17
          elseif i_output-atflv between c_17 and c_1899.
            i_output1-atflv = c_17.
    If the ratio value is between 19-20.99, display 19
          elseif i_output-atflv between c_19 and c_2099.
            i_output1-atflv = c_19.
    If the ratio value is between 21-22.99, display 21
          elseif i_output-atflv between c_21 and c_2299.
            i_output1-atflv = c_21.
    If the ratio value is greater than or equal to 23, display 23
          elseif i_output-atflv >= c_23.
            i_output1-atflv = c_23.
          endif.
          write i_output1-atflv to i_output1-atflv .
        else.
          write i_output-atflv to i_output1-atflv exponent 0 decimals 0.
        endif.
        collect i_output1.
        clear   i_output1.
      endloop.
      sort i_output1 by atinn werks matnr atflv.
    endform.                    " COLLECT_RATIO
    Reward if useful..
    Regards,
    Anji

  • How to get the link between MCH1, AUSP, CAWN and CAWNT tables

    Hi,
        Can anyone let me know how to get the link between MCH1, AUSP, CAWN and CAWNT tables as I want to get the description (CAWNT-ATWTB) for a particular Batch (MCH1-CHARG).
    Thanks & Regards,
    Kumar

    Hi,
        Can anyone let me know how to get the link between MCH1, AUSP, CAWN and CAWNT tables as I want to get the description (CAWNT-ATWTB) for a particular Batch (MCH1-CHARG).
    Thanks & Regards,
    Kumar

  • Is there a link EKBE PO# (EBELN) to the FI Logistics doc in BSAK (BELNR)?

    Is there another table besides BSEG to link EKBE PO# (EBELN) to the FI Logistics doc in BSAK (BELNR) for a data pull?
    Our problem is EKBE contains Material Doc# and we need the FI/AP Logistics document which is in BSAK.  We are using BSEG but it is so large the run time is days. 
    Thanks
    Mary
    Edited by: Mary Calaway on Jan 10, 2008 11:00 PM

    EKBE-BELNR (material document number) concatenated with EKBE-GJAHR (fiscal year) is matched wtih BKPF-AWKEY.

  • BSIK BSAK Link

    Hello,
    I have an Open Item in BSIK which moves to BSAK when cleared.  When the clearing document is reversed, the initial document moves to the BSIK table as it is now an open item.  For reporting purposes, I need to establish a link between the open document in BSIK table and the initial clearing document in BSAK.  Please let me know if you ahve any information on the same.

    Link both these tables to BKPF using the doc#, company code, and fiscal year.

  • Linking BSAK with EKBE

    Hello experts,
    I am currently modifying a report where in I need to change some statements because it gets a PO's balance in table BSAK-wrbtr and instead I need to change it to EKBE-wrbtr. The problem is I don't know if there's a common field where I can link both tables.I have pasted below the code I am trying to modify. Also, How can I know if my report shows details of a PO correctly? where would I verify this? Thanks guys and take care!
    SELECT augdt augbl shkzg dmbtr wrbtr FROM bsak
           INTO (bsak-augdt,bsak-augbl,bsak-shkzg,
                 bsak-dmbtr,bsak-wrbtr)
             WHERE bukrs = bkpf-bukrs
                   AND gjahr = bkpf-gjahr
                   AND belnr = bkpf-belnr.
                IF bsak-shkzg = 'H'.
                  bsak-dmbtr = - bsak-dmbtr.
                  bsak-wrbtr = - bsak-wrbtr.
                ENDIF.
    IF t_pohistory-currency <> 'PHP'.
    IF bsak-augdt GT pa_augdt.
    IF bsak-augdt IN so_augdt.
        t_amount-tramt = t_amount-tramt + bsak-wrbtr.
          ENDIF.
    ELSE.
    IF bsak-augdt GT pa_augdt.
      IF bsak-augdt IN so_augdt.
         t_amount-tramt = t_amount-tramt + bsak-dmbtr.
        ENDIF.
      ENDIF.
    ENDSELECT.
    ENDIF.

    Hi viraylab,
    phew! That's not immediate, but let's have a look at it:
    1. first of all, take fields BSAK-BUKRS, BSAK-BELNR and BSAK-GJAHR and go to table BKPF.
    2. then take field BKPF-AWKEY
    3. then BKPF-AWKEY0(10) links to field EKBE-BELNR and BKPF-AWKEY10(4) to EKBE-GJAHR.
    I hope it helps. BR,
    Alvaro

  • Link between BSAK and Profit Center

    Hi Alll,
                        I want relation between profit center (PRCTR) and accounting documents tables. I know bseg consist of prctr field,but I  canu2019t use this table  because of performance issue in my report.
                                          So tell me any other accounting document table like BSAK, BSIK which consist of that field PRCTR.
    Thanx advance,,,,,

    Go to table DD03L and put field name-> execute
    you can follow this also
    Tcode SE84
    ABAP Dictionary -> Fields -> Table Fields --> field name = <your field name->Execute.

  • Batch Characteristic not updating with result for linked MIC

    Hi,
    I have created a MIC and linked to a batch characteristic i.e. potency and included the characteristic in a specific batch class. This MIC is part of the inspection plan for a certain material.
    If I generate a lot of origin 01 and 09 for the material and record a result for the MIC and apply a UD, the batch characteristic is not updated with the result recorded in the batch master record..
    If I generate a lot origin 89 for the same material, when the result is recorded for the MIC and apply a UD the batch characteristic is updated with the mic value in the batch master record.
    Can you help regards?

    Ok. I am a little bit further.
    I put a trace (ST05) on the result recording and I find a difference between 4.7 and ECC6.0.
    In ECC6.0 I've an deletion in table "AUSP". This deletion isn't performed in the 4.7 system.
    Hope that this can help to solve my problem.
    Regards,
    René
    @ Mayank
    Above, all the master data and customizing is mentioned to transfer the result to the batch classification
    Edited by: Rene Fuhner on Jul 30, 2010 7:03 PM

  • Link required for the payment made and PO

    Hi
    I made payment to one vendor. He sent three invoices. I did MIGO and then MIRO for the same. Then i did my payment to all the invoices.
    Now i want a report which says amount paid, MIRO documnet number, PO number. Is there any standard report / table from where i can get this data.
    I tried for BSIK and BSAK. But there was no relevant link i was able to find between the items i mentioned above.
    Edited by: Meenu_ND on Aug 18, 2010 7:55 PM
    Edited by: Meenu_ND on Aug 18, 2010 7:56 PM

    Dear Meenu,
    There is no standard report available which fulfills your requirement. Hence please take EKKO,EKBE,BSEG,BSET,BSIK,BSAK,etc. to have a complete report.
    Please take Material document as your base, then find out the PO, then find out the Vendor details(EKKO), GR and Invoice details(EKBE), Paid / unpaid items (BSAK/BSIK), Tax items (BSET) and payment details (BSEG).
    I hope this will be helpful in finding a solution to your problem.
    Regards

Maybe you are looking for

  • Get a 15" rMBP now or wait Broadwell?

    Hey guys, I am a software engineering student from Brazil and I will spend the next year living and studying in US. As some of you know gadgets in Brazil are really expensive so this is a great opportunity to replace my late 2011 13" MacBook Pro with

  • Calculation of SLA times based on Service Organization

    Is it possible to calculate the SLA times based only on Service org? a) Using Service contracts i.e create SC with only org and assign the Service & Response profiles. Else as mentioned below. Please give your more thoughts. I maintain the Service &

  • Reading global attributes from implementation class

    Hi, How to access                 global attributes of implementation class                          from getter method of context node class. Thanks in advance, Srinivas.

  • I need urgrnt help in working with JasperReports

    I just want to know how can I pass a query to a JasperReport. I've just gone thru the JasperReports.sourceforge.net but couldn't make it. Please if someone can make it. Thanx for the interest.

  • Time Capsule freezes when transferring files

    My time capsule freezes when data is transferring from my Macbook Pro during its initial update. I tried to connect it through WiFi or ethernet cable. It just freezes like when 800 Mb - 5 Gb were transferred (I have left it overnight). What can I do?