Penalty to vendor

Dear QM Experts,
Can any one help me for below scenario.
My client wants to make payment to vendor based on the value observed by quality inspection. For Ex one Mateial say rock salt,we need the rock salt form vendor xyz be 50%. , when PO made. amd when Vendor send the material and analaysis perfomred by QM then found the % in Cr is 45%.
So while making payment to vendor by FI, they want Penalty paymeny of 5% to vendor.
please suggest how to mapped the scenario.
Your valuable comments are highly appreciable.
regards,
Ufarooq

Hello Farooq,
If your need is to inform the FI & MM guy regarding the Quality of issue of the non conformance of 5% then you can create an UD attached a Follow up action attached to it for sending the mail.
Please look into the answer provided by Mr. Shyamal regarding the same in the below link provided
Link: [Deduction during procurement;
also go thru this link also
Link: [Q. M PROCUREMENT-PAYMENT TO VENDOR  BASED ON INPSPECTION RESULTS]
Regards
Gajesh

Similar Messages

  • Penalty charge for not meeting the Delivery date by the vendor

    Dear Sapians,
    My client want to have Liquitidy damage charged to the vendor if he fails to meet the agreed delivery date. For example PO Delivery date is 10-08-2007 and the vendor delivers the material after 10-08-2007 , then the purchase price has to be reduced.
    Kindly suggest me as to how to bring this in SAP
    Best Regards
    Sukumaran.E

    Hallo Sukumar,
    There is no settings available in std,  I think you have to do enhancement for this.
    SAP expert in this forums may help you
    Regards,
    sriram

  • Vendor Interest calculation with penalty calculation

    Dear All,
    We have some requiremnt from my client.
    We receive Deposit from our Loan Creditor for a specified period and refund/payback the amount along with interest after completion of the tenure of the deposit.
    Meanwhile,if the depositor wants to withdraw the principle amount then the following are the scenarios,
    In case the deposit is withdrawn after 6 months but before 18 months, then the rate applicable for ONE year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal.
    In case the deposit is withdrawn after 18 months but before 30 months, then the rate applicable for TWO year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal.
    In case the deposit is withdrawn after 30 months but before 36 months, then the rate applicable for THREE year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal.
    Also we want the applicable tax should be deducted on interest and the net interset amount should be credited to depositoru2019s account once we are execute the (period specific) interest calculation run in SAP.
    The entry must be
    Interest on Fixed Deposits Dr
    Interest Payable on Fixed Deposits (Net of TDS, if applicable) Cr
    TDS on Interest Payable CR
    Do suggest,how this can been config in SAP system.
    Appreciate your time and patience.
    Regards,

    Dear All,
    Stil;l expected some inputs on our req.
    Do comment
    Regards

  • Interest calculation type-Z-Penalty Interest Calculation

    Hi all !!
    I would like to know  about the Interest calculation type-Z-Penalty Interest Calculation, if  it is necesary to do some aditional customizing , and which are the differences between Item Interest Calculation and Penalty Interest Calculation.
    Best regards and thanks all

    Thanks Chandra,
    Could you give us some links where we can find more info of how to configure/run this specific issue of calculate interest on interest and other aspects of penalty interest calculation.
    The other point if it is possible or there is a way to depending on open items for a same vendor have a different interest indicator, I mean something like a field at the financial document in order to choose between different type of interest indicators.
    Best regards and thanks

  • Mapping of vendor incentive scheme

    Hi Gurus,
    We operate on vendor incentive scheme where vendor gets incentive for before time delivery (90% of delivery quantity). In case of delayed delivery, he gets penalized.
    The percentage of incentive and penalty will vary based on number of days of the devaiation.
    One option to map this is to create report and propose calculation as per the calculation chart. This will be followed by credit memo or debit memo.
    Can we interlink this with sudsequent PO conditions automatically where vendor evaluation score will be transfered to arrive at discount / surcharge value?
    Regards,
    Krishna

    If you are going to do considerable business with Vendor incentice scheme. then I would suggest you to develop a report based on Scheduled Delivery Date and Actual Delivery Date and input the logic as to which how to calculate the incentive/Penalty (by +/-). Link this transaction to PO number and hence to Vendor.
    Generate the report in such a way that it should show actual PO price and calculated PO price after considering Incentives/Penalties per Vendor per PO.
    Once you get the output, y6ou can either communicate to Vendor about the balance (which Vendor need to raise Invoice) or you can create a new transaction (similar to MRKO for consignment/Pipeline settlement) where you can raise Invoice and pay Vendor directly without waiting for Vendor to send Invoice.
    BR,
    Krishna

  • MATERIAL & VENDOR EVALUTION

    CAN ANY BODY DONE MATERIAL & VENDOR  EVALUTION  LIKE MY SCENARIO IS  I  CONFIGURED 3 SELECTED  AS A  ACCEPTED ACCEPTED CERTAIN DEVIATION AND  ACCEPTED DEVIATION WITH PENALTY AND REJECTED   I DONE  QUALITY SCORE  ACCEPTED 100 ACCEPTED CERTAIN DEVIATION 70 ACCEPTED DEVIATION WITH PENALTY 30 REJECTED 1
    IN CONFIGURATION DEFINITION OF QUALITY SCORE CLASS LIMIT I ALSO CONFIGURED  BUT WHAT IS THE MEAN OF EXPONENTIAL AND EQUIDISTANT IF I ASSIGN MY QUALITY SCORE  USAGE INDICATOR  ANYTHING WILL HAPPEN OR WE CAN AND I ALSO  TRIED ASSIGNED QUALITY SCORE CLASSES  FOR  INFO STRUCTURE SYSTEM NOT ALLOWED
    FINALLY HOW  I WILL ASSIGN  MY QUALITY SCORE TO MATERIAL ANALYSIS AND VENDOR ANALYSIS KINDLY GUIDE ME IF ANY BODY DONE THIS  SCENARIO.

    I hope you would have wrote it readable & formatted in good sentence...........
    Nevertheless.......
    As per SAP std settings....................
    Both uniform and exponentially weighted classifications are predefined in the standard system. The uniform classification is proposed as the default.
    Equidistant is uniform one ...uni formally increasing where as Exponential score is exponentially which is predefined.
    Now Its only "statistics" & not "Evaluation" info structure you can assign here............
    Warning: You cannot change classifications that have already been used! First, you must delete the data contents in the related information structures. You can then change the classification. Finally, you must update the information structures to provide them with data entries, provided that the original documents have not already been archived.

  • Advance & Retension for a vendor

    Dear Friends,
    My Issue:
    For a vendor my payment should be:
    --> 10% Advance of the total Contract should be given to the Vendor
    --> when ever vendor invoices (partial invoices) we should cut 10%(on advance given before) and 10% Retension and pay him 80% of the value in invoice
    --> at the end of the final work we should pay to vendor the 10% retension which we are deducting with all the invoices
    Hope this is clear
    Reg
    Rajesh

    Dear Rajesh
    There are two scenario's for your problem. if the invoice comes from the Purchasing order or directly from the FI vendor.
    If it is from the Purchase order, pl follow the following sequence.
    1) pay the advance as usual which is the same for the both the cases F-48
    2) raise the invoice for total amount.Say Ex. invoice amount, 10,000, (retn amount,500, and recovery of the advance, 1000 and any penalty etc, 500) 3) using clearing to some of the balance sheet accounts for retention amount and recovery of the advance amount paid and if any penalty etc through P&L accounts through F-51for the balances of 500, 1000 etc.,)
    4) Now only you are able to see the open item for the particular vendor i.e. 10000-500-1000= 9500
    5) pay for the open item  9500 then the issue was solved.
    When you want to repay the retention amount, such time debit that amount and credit the bank account.
    I hope it will suffice you requirement.
    Regards
    madhav

  • Penalty as a deduction

    Hi friends,
    when I want to create contract for service in SAP my customer wants me to add some deduction(e.g. penalties) items to other items. these deduction items help them to deduct vendor's price in Service Entry Sheet (ML81N) if vendor does not do his job well. otherwise they don't calculate the penalty.
    How can I add or consider these kinds of items in ME31K?
    is it possible?
    thx in advance

    Generally these penalties are called Liquidity Damages.
    You need to define Header Text for penalties, Your Client will be knowing at the time of SES only,
    whether LD ( Liquidity damages ) will apply or Not.
    If LD is to apply, then you need to raise Credit memo

  • Vendor Interest calculation

    Dear All,
    We have some requiremnt from my client.
    We receive Deposit from our Loan Creditor for a specified period and refund/payback the amount along with interest after completion of the tenure of the deposit.
    Meanwhile,if the depositor wants to withdraw the principle amount then the following are the scenarios,
    In case the deposit is withdrawn after 6 months but before 18 months, then the rate applicable for ONE year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal. 
    In case the deposit is withdrawn after 18 months but before 30 months, then the rate applicable for TWO year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal. 
    In case the deposit is withdrawn after 30 months but before 36 months, then the rate applicable for THREE  year shall be taken and 1% penalty should be deducted and interest shall be recalculated for the period for which the deposit is run and excess interest paid (if any) is to be deducted from the interest/principal.
    Also we want the applicable tax should be deducted on interest  and the net interset amount should be credited to depositoru2019s account once we are execute the (period specific) interest calculation run in SAP.
    The entry must be
    Interest on Fixed Deposits Dr
    Interest Payable on Fixed Deposits (Net of TDS, if applicable) Cr
    TDS on Interest Payable CR
    Do suggest,how this can been config  in SAP system.
    Appreciate your time and patience.
    Regards,

    Hi
    asset accounting is not the right place for this inquiry, as asset accounting does not vendor interes calculation.
    Blaz

  • Interst on vendor invoice

    how do we calculate the interst on a vendor invoice.
    please help.
    i will assign points on any inputs

    Hi,
    Follow the following steps
    Financial Accounting> Accounts Receivable and Accounts Payable> Business Transactions> Interest Calculation
    Interest Calculation Global Settings>
    Define Interest Calculation Types
    Give the Interest Indicator (your choice)
    Select the interest cal. Type as Z-Penalty Interest Calculation
    Define Number Ranges for Interest Forms
    Define the number range here with internal numbering
    <b>Prepare Item Interest Calculation</b>
    New entries>
    Check Open Items Check Box
    Check radio buttons as required
    Ref. Date-4
    Calendar type-G
    Factory Calendar ID-select your factory calander
    Check box Post Interest
    Save your entries
    <b>Define Reference Interest Rates</b>
    Ref.int.rate- Give the Code
    Long text-
    Date from- Effective Date of the interest
    Currency
    Save your entry
    <b>Define Time-Based Terms</b>
    Int.calc.indicator-Give your indicator
    Currency Key
    Eff. From- Date
    Sequential number-1
    Term-Credit interest: arrears interest calc.
    Ref. interest rate- Give the ref. rate as defined above
    Save your entries
    <b>Enter Interest Values</b>
    New Entries
    Select your Reference as defined above
    Enter the Interest Rate
    <b>Interest Posting</b>
    Interest on Arrears Calculation (Vendors)
    Create Symbols- Create symbol for interest received
    Save your entry
    Create- Posting Specifications “ Click on the create symbol”
    Business Transaction-1000
    Enter the Debit and Credit Posting Key and the account symbol as created: Interest Receivd
    Accounts
    Chart of Accounts
    Select Account Symbol for Interest Received
    Currency-
    GL Account-  “Give the Account for interest received”-Revenue account
    Your Configuration is complete here.
    Now mention this interest indicator in your vendor account.
    Interest postings can be carried out through T-Code- F.44
    Regards,
    Vijay

  • Partial settlement & penalty for Consignment Liabilities

    Hi buddies,
    I have a question on consignment liabilities settlement.
    Scenario -
    Consignment PO, qty - 50 created,
    MIGO - 101 'K' done for qty 50,
    MIGO - 411 'K' or 201 'K' done for entire 50 qty.
    In standard SAP 100 % liabilities are settled by MRKO. However, I want to settle liabilities in parts viz. 60 % in current month and remaining 40 % in next month. The second requirement is that I want to levy penalty of 10 % on Vendor. This is possible in case of standard PO by way of sebsequent credit but in case of consignment PO this is not possible since I am settling liabilities by MRKO. Is there any workaround for these two queries?
    Cheers!
    Sachin Narvekar

    Penalty clarification -
    If the vendor liability is 100 but the material is of poor quality I have to pay 90 to Vendor i.e. 10 is the penalty I am imposing. In case of normal PO I levy penalty to him by creating subsequent cerdit. How do I levy penalty in case of consignment PO?

  • Payments to a vendor on quality basis

    Hi,
    I have a scenario in which users order a material for a particular composition, conditions are that if the vendor is deviating by some percentage of the composition he will be penaltied on the amount in the purchase order.
    Now while doing the GR i will be knowing the actual compositon and the percentage of deviation after the quality check
    My requirement is as and when Quality has decided the composition is deviated from the proposed one in the purchase order, the system has to calculate the new price taking the conditions into account and suggest the payment with out changing the purchase order.
    So how can i map this into sap
    Suggestions will be really helpful

    Dear Avinash,
    Steps for Agent Commission:
    1. Create partner function for Vendor or Agent.
    2. Add the partner function to Customer Master
    3.Create the Vendor or Agent in XK01
    4.Run the sales process till billing
    5.Now you can get the list of billing documents generated for a particular period in VF05 along with the partner function-VN or Agent(based on your configuration)
    6.Based on this ask FI people to settle the Agent commission throught JV.
    7.If at all you want to have seperate list which shows the Agent commission calculated billing document wise- add Agent commission condition type to the pricing procedure.
    8.Make the condition types as statistical.
    9.Capture the amount into a Zee report developed with the help of ABAPers.
    10.Give this list to FI People to post JV.
    Note: As per my knowledge there is no automatic posting based on sold-to-party for Agent.
    This is how we are following in our current industry and its working fine.
    Hope this works for you. Further any information let me know.
    Best Regards
    Sri

  • Vendor evaluation - Service

    hi
    we have following requirements:
    1) Addition of new sub criteria for the main criterion "Service"   (we already use standard sub criterion --- timeliness of service and quality of service).
           i) Legal requirements
          ii) Safety
         iii) Damanges / Penalty
    These sub criterion should appear during Service entry sheet (as timeliness of service and quality of service appears) and user will enter the scores against this sub criterion.
    Pl suggest.
    2) When Service will be procured by central purchasing group ---vendor evaluation should consider following sub criterion only
         i) Timeliness of service
        ii) Quality of service
    When Service will be procured by local purchasing group ---vendor evaluation should consider following all sub criterion
       i) Timeliness of service
        ii) Quality of service
      iii) Legal requirements
          iv) Safety
         v) Damanges / Penalty
    Pl suggest how we can achieve this
    regards
    Pravin

    Hi,
    the enhancement MM06L001 comprises four function exits, which are invoked          
    during the calculation of the scores for the subcriteria.
    In order to satisfy your business process you need to write your own                 
    coding into the function modules                                                                               
    1. EXIT_SAPLMEL0_001                                                                    
    2. EXIT_RM06LBAT_001                                                                    
    3. EXIT_SAPMM06L_001
    4. EXIT_RM06LBEW_001
    Regards,
    Edit

  • Custom purchase requsitionto vendor open and cleared payment report

    dear all i develop report but i cant ableto show in that open amount and cleared amount of vender in that report so please see this report and feedback me for logic to show open and clear amount of vendor purchase orderwise or vendorwise
    report zpo_purchase_history no standard page heading message-id 00.
    TABLES : bsik, bsak, lfa1, lfb1, skb1, t001, bapifvdexp_vzzbepp.
    type-pools:slis,ICON.
    types :begin of ty_po,
            banfn type eban-banfn,
            "Purchase Requisition Number
            bnfpo type eban-bnfpo,
            "Item Number of Purchase Requisition
            ekgrp type eban-ekgrp,                 "Purchasing Group
            badat type eban-badat,
            "Requisition (Request) Date
            menge type eban-menge,
            KNTTP TYPE EBAN-KNTTP,
             PSTYP type eban-PSTYP,
            "Purchase Requisition Quantity
            meins type eban-meins,
            "Purchase Requisition Unit of Measure
            lifnr type ekko-lifnr,                 "Vendor Account Number
            bedat type ekko-bedat,                 "Purchasing Document Date
            ebeln type ekpo-ebeln,
            "Purchasing Document Number
            ebelp type ekpo-ebelp,
            "Item Number of Purchasing Document
            matkl type ekpo-matkl,                 "Material Group
            mtart type ekpo-mtart,                 "Material Type
            matnr type ekpo-matnr,                 "Material Number
            txz01 type ekpo-txz01,                 "Short Text
            menge1 type ekpo-menge,                "Purchase Order Quantity
            meins1 type ekpo-meins,
            "Purchase Order Unit of Measure
            balqty type ekpo-menge,                "Balance Quantity
            netpr type ekpo-netpr,
            "Net Price in Purchasing Document
            peinh type ekpo-peinh,                 "Price Unit
            mblnr type mseg-mblnr,
            "Number of Material Document
            zeile type mseg-zeile,                 "Item in Material Document
            menge2 type mseg-menge,                "GR Quantity
            meins2 type mseg-meins,                "GR Unit of Measure
            werks type mseg-werks,                 "Plant
            charg type mseg-charg,                 "Batch
            belnr type rbkp-belnr,
            "Document Number of an Invoice Document
            bldat type ekbe-bldat,                 "Document Date in Document
            belnr_b type rbkp-belnr,
            SHKZG type ekbe-SHKZG ,                "Debit/Credit Indicator
            DMBTR type   bsik-dmbtr,                "Amount in Local Currency
            DMBTR_C type   bsAk-dmbtr,                "Amount in Local Currency
            thick(10) type c,                      "Thickness
            width(10) type c,                      "Width
            length(10) type c,                     "Length
            grade(10) type c,                        "Grade
            BELNR_d type bseg-belnr,
            xblnr type bkpf-xblnr,
            awkey  type bkpf-awkey,
            RMWWR type rbkp-RMWWR,
            WMWST1 type rbkp-WMWST1,
            end of ty_po.
    types :begin of ty_ekko,
            ebeln type ekko-ebeln,
            lifnr type ekko-lifnr,
            bedat type ekko-bedat,
            end of ty_ekko.
    types:begin of ty_ekpo,
            ebeln type ekpo-ebeln,
            ebelp type ekpo-ebelp,
            matnr type ekpo-matnr,
            txz01 type ekpo-txz01,
            menge type ekpo-menge,
            meins type ekpo-meins,
            netpr type ekpo-netpr,
            peinh type ekpo-peinh,
            banfn type ekpo-banfn,
            bnfpo type ekpo-bnfpo,
            mtart type ekpo-mtart,
            end of ty_ekpo.
    types :begin of ty_eban,
            banfn type eban-banfn,
            bnfpo type eban-bnfpo,
            matnr type eban-matnr,
            menge type eban-menge,
            meins type eban-meins,
            end of ty_eban.
    types : begin of ty_ekbe,
             ebeln type ekbe-ebeln,
             ebelp type ekbe-ebelp,
             belnr type ekbe-belnr,
             bldat type ekbe-bldat,
             gjahr type ekbe-gjahr,
             buzei type ekbe-buzei,
             matnr type ekbe-matnr,
             DMBTR type ekbe-dmbtr,
             shkzg type ekbe-shkzg,
             end of ty_ekbe.
    types : begin of ty_mseg,
             mblnr type mseg-mblnr,
             mjahr type mseg-mjahr,
             zeile type mseg-zeile,
             menge type mseg-menge,
             meins type mseg-meins,
             ebeln type mseg-ebeln,
             ebelp type mseg-ebelp,
             matnr type mseg-matnr,
             werks type mseg-werks,
             charg type mseg-charg,
             end of ty_mseg.
    types : begin of ty_rbkp,
             belnr type rbkp-belnr,
             gjahr type rbkp-gjahr,
             bldat type rbkp-bldat,
             lifnr type rbkp-lifnr,
             ZUONR type rbkp-ZUONR,
             RMWWR type rbkp-RMWWR,
             WMWST1 type rbkp-WMWST1,
             end of ty_rbkp.
    types : begin of ty_bseg,
             bukrs type bseg-bukrs,
             belnr type bseg-belnr,
             gjahr type bseg-gjahr,
             buzei type bseg-buzei,
             valut type bseg-valut,
             wrbtr type bseg-wrbtr ,
             augbl type bseg-augbl,
             matnr type bseg-matnr,
             lifnr type bseg-lifnr,
             ebeln type bseg-ebeln,
             end of ty_bseg.
    types : begin of ty_rseg,
             belnr type rseg-belnr,
             gjahr type rseg-gjahr,
             ebeln type rseg-ebeln,
             ebelp type rseg-ebelp,
             matnr type rseg-matnr,
             bukrs type rseg-bukrs,
             end of ty_rseg.
    types : begin of ty_bsik,
             belnr type bsik-belnr,
              buzei type bsik-buzei,
             DMBTR type bsik-DMBTR,
             budat type bsik-budat,
             shkzg type bsik-shkzg,
             ebeln type bsik-ebeln,
             lifnr type bsik-lifnr,
             end of ty_bsik.
    types : begin of ty_bsak,
             belnr type bsak-belnr,
       lifnr type bsak-lifnr,
        ebeln type bsak-ebeln,
             DMBTR_C type bsak-DMBTR,
    ZUONR type bsak-ZUONR,
             end of ty_bsak.
    types: begin of ty_bkpf,
             BELNR type bkpf-belnr,
             xblnr type bkpf-xblnr,
             awkey  type bkpf-awkey,
           end of ty_bkpf.
    data: it_po type standard table of ty_po,
           it_ekko type standard table of ty_ekko,
           it_ekpo type standard table of ty_ekpo,
           it_eban type standard table of ty_eban,
           it_ekbe type standard table of ty_ekbe,
           it_mseg type standard table of ty_mseg,
           it_rbkp type standard table of ty_rbkp,
           it_rseg type standard table of ty_rseg,
           it_bseg type standard table of ty_bseg,
           it_bsik type STANDARD TABLE OF ty_bsik with header line,
           it_bsak type STANDARD TABLE OF ty_bsak,
           it_bkpf type standard table of ty_bkpf,
           wa_po type ty_po,
           wa_ekko type ty_ekko,
           wa_ekpo type ty_ekpo,
           wa_eban type ty_eban,
           wa_mseg type ty_mseg,
           wa_rbkp type ty_rbkp,
           wa_rseg type ty_rseg,
           wa_bseg type ty_bseg,
           wa_ekbe type ty_ekbe,
           wa_bsik type ty_bsik,
           wa_bsak type ty_bsak,
           wa_bkpf type ty_bkpf.
    data: it_fcat type slis_t_fieldcat_alv,
           it_lshead type slis_t_listheader,
           it_sort type slis_t_sortinfo_alv,
           wa_fcat type slis_fieldcat_alv,
           wa_lshead type slis_listheader,
           wa_layout type slis_layout_alv,
           wa_sort type slis_sortinfo_alv.
    data :it_cl_data like table of clobjdat,
           wa_cl_data like clobjdat.
    data: values(10) type n.
    data: value1(4) type N.
    data: c_matkl type ekpo-matkl,
           c_matnr type ekpo-matnr,
           c_ekgrp type eban-ekgrp,
           c_badat type eban-badat,
           c_index type sy-tabix,
           c_grmenge type mseg-erfmg,
           c_low(10) type c,
           c_high(10) type c,
           c_date type string,
           c_bukrs type ekko-bukrs,
           c_WERKS type eban-WERKS.
    data: gd_date(10).
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
           WA_EVENT TYPE SLIS_ALV_EVENT.
    *********Selection screen variables*********
    selection-screen:begin of block b1 with frame title text-001.
    select-options: s_bukrs for c_bukrs DEFAULT  'bmp1',
                     s_WERKS for c_WERKS,
                     s_matnr for c_matnr DEFAULT 'rm-01',
                     s_matkl for c_matkl ,
                     s_badat for c_badat ,"obligatory,
                     s_ekgrp for c_ekgrp.
    parameters: ch_bal as checkbox.
    selection-screen:end of block b1.
    *initialization.
    * PERFORM EVENT_CALL.
    *  PERFORM POPULATE_EVENT.
    start-of-selection.
         PERFORM EVENT_CALL.
       PERFORM POPULATE_EVENT.
       perform getdata.
       perform setdata.
       perform fieldcat.
       perform display.
    *&      Form  GETDATA
    form getdata .
       select a~BANFN
              a~bnfpo
              a~ekgrp
              a~badat
              a~KNTTP
              a~PSTYP
              b~ebeln
              b~ebelp
              b~matkl
              b~matnr
              b~bukrs
              into corresponding fields of table it_po
              from eban as a inner join ekpo as b
              on a~banfn = b~banfn and
                 a~bnfpo = b~bnfpo AND
                 A~KNTTP = B~KNTTP and
                 a~PSTYP = b~PSTYP
              where  a~badat in s_badat and
                     a~ekgrp in s_ekgrp and
                     a~WERKS in s_WERKS and
                     b~matnr in s_matnr and
                     b~matkl in s_matkl and
                     b~bukrs in s_bukrs and
                     b~loekz <> 'L' and
                     a~loekz <> 'X'.
       if it_po[] is not initial.
         select ebeln
                ebelp
                matnr
                txz01
                menge
                meins
                netpr
                peinh
                banfn
                bnfpo
                mtart
                from ekpo into table it_ekpo
                for all entries in it_po
                where ebeln = it_po-ebeln and
                      ebelp = it_po-ebelp and
                      loekz <> 'L'.
         select banfn
                bnfpo
                matnr
                menge
                meins
                from eban into table it_eban
                for all entries in it_po
                where banfn = it_po-banfn and
                      bnfpo = it_po-bnfpo and
                      loekz <> 'X'.
         if it_ekpo[] is not initial.
           select ebeln
                  lifnr
                  bedat
                  from ekko into table it_ekko
                  for all entries in it_ekpo
                  where ebeln = it_ekpo-ebeln.
           select ebeln
                  ebelp
                  belnr
                  bldat
                  gjahr
                  buzei
                  matnr
                  DMBTR
                  shkzg
                  from ekbe into table it_ekbe
                  for all entries in it_ekpo
                  where ebeln = it_ekpo-ebeln and
                        ebelp = it_ekpo-ebelp .
    *if it_ekbe-shkzg = 'H'.
    **ekbe-dmbtr = ekbe-dmbtr * -1.
    **ekbe-menge = ekbe-menge * -1.
    *endif.
    * select belnr
    *             gjahr
    *             ebeln
    *             ebelp
    *     from bseg into table it_bseg
    *             for all entries in it_ekpo
    *             where ebeln = it_ekpo-ebeln and
    *                   ebelp = it_ekpo-ebelp.
           select belnr
                  gjahr
                  ebeln
                  ebelp
                  matnr
                  bukrs
                  from rseg into table it_rseg
                  for all entries in it_ekpo
                  where ebeln = it_ekpo-ebeln and
                        ebelp = it_ekpo-ebelp.
         endif.
         if it_ekbe[] is not initial.
           select mblnr
                  mjahr
                  zeile
                  menge
                  meins
                  ebeln
                  ebelp
                  matnr
                  werks
                  charg
                  from mseg into table it_mseg
                  for all entries in it_ekbe
                  where mblnr = it_ekbe-belnr and
                        mjahr = it_ekbe-gjahr and
                        zeile = it_ekbe-buzei and
                        bwart = '101'.
         endif.
         if it_rseg[] is not initial.
           select belnr
                  gjahr
                  bldat
                  lifnr
                  ZUONR
                  RMWWR
                  WMWST1
                  from rbkp into table it_rbkp
                  for all entries in it_rseg
                  where belnr = it_rseg-belnr.
         endif.
    *if it_rseg[] is not initial.
    *      SELECT bukrs
    *              belnr
    *              gjahr
    *              buzei
    *              valut
    *              wrbtr
    *              augbl
    *              matnr
    *              lifnr
    *              ebeln
    *        INTO TABLE it_bseg
    *          FROM bseg
    *          FOR ALL ENTRIES IN it_rseg
    *          WHERE bukrs = it_rseg-bukrs and ebeln = it_rseg-ebeln and mwskz = ''.
    *endif.
    *loop at it_BKPF into wa_BKPF.
    *  values = wa_rbkp-belnr.
    *  value1 = wa_rbkp-gjahr.
       data: aekey_1 type string .
    *CONCATENATE values value1 into aekey_1.
    *  if it_BSEG[] is not initial.
    *MESSAGE aekey_1 type 'I'.
           SELECT single belnr xblnr awkey into wa_bkpf
             from bkpf
             where awkey = aekey_1.
    SELECT SINGLe belnr
    buzei
    dmbtr
    budat
       shkzg
       ebeln
       lifnr
       FROM bsik
    INTO CORRESPONDING FIELDS OF  wa_bsik
    *FOR ALL ENTRIES IN it_bseg
    WHERE
        bukrs in s_bukrs and
        lifnr = wa_rbkp-lifnr
    and
    *AND gjahr = it_bseg-gjahr
    * AND
        belnr = wa_bkpf-belnr.
    insert wa_bsik into table it_bsik.
    CLEAR wa_bsik.
    CLEAR it_bsik.
    *endloop.
    * and ebeln = it_bseg-ebeln .
    *    select BELNR
    **           SHKZG
    **           DMBTR
    *           from bkpf into table it_bkpf
    *            for ALL ENTRIES IN it_rbkp
    *            where belnr = it_rbkp-belnr.
    *        ENDif.
    IF IT_bseg[] IS NOT INITIAL.
           select belnr
             LIFNR
             ebeln
                  DMBTR
              ZUONR
                  from bsik into table it_bsik
                  for all entries in it_bseg
                  where belnr = it_bseg-belnr.
           select belnr
             LIFNR
             ebeln
                  DMBTR
              ZUONR
                  from bsak into table it_bsak
                  for all entries in it_bseg
                  where belnr = it_bseg-belnr.
    ENDIF.
       else.
         message s002.
         leave list-processing.
       endif.
    endform.                    " GETDATA
    *&      Form  SETDATA
    form setdata .
       clear wa_po.
       loop at it_po into wa_po.
         c_index = sy-tabix.
    ********Calculate PR Quantity**********
         clear wa_eban.
         read table it_eban into wa_eban
                    with key banfn = wa_po-banfn
                             bnfpo = wa_po-bnfpo.
         if sy-subrc eq 0.
           move:wa_eban-menge to wa_po-menge,
                wa_eban-meins to wa_po-meins.
         endif.
    ********Calculate PO Quantity**********
         clear wa_ekpo.
         read table it_ekpo into wa_ekpo
                    with key banfn = wa_po-banfn
                             bnfpo = wa_po-bnfpo .
         if sy-subrc eq 0.
           move:wa_ekpo-txz01 to wa_po-txz01,
                wa_ekpo-netpr to wa_po-netpr,
                wa_ekpo-peinh to wa_po-peinh,
                wa_ekpo-mtart to wa_po-mtart,
                wa_ekpo-menge to wa_po-menge1,
                wa_ekpo-meins to wa_po-meins1.
         endif.
    ********Calculate Balance Quantity******
         clear wa_mseg.
         loop at it_mseg into wa_mseg
                where ebeln = wa_po-ebeln and
                      ebelp = wa_po-ebelp.
           c_grmenge = c_grmenge + wa_mseg-menge.
         endloop.
         move:wa_mseg-mblnr to wa_po-mblnr,
              c_grmenge to wa_po-menge2,
              wa_mseg-meins to wa_po-meins2,
              wa_mseg-werks to wa_po-werks,
              wa_mseg-charg to wa_po-charg.
         wa_po-balqty = wa_eban-menge - c_grmenge.
         clear : wa_rseg,wa_rbkp.
         read table it_rseg into wa_rseg with key
                        ebeln = wa_mseg-ebeln
                        ebelp = wa_mseg-ebelp.
         read table it_rbkp into wa_rbkp
                    with key belnr = wa_rseg-belnr
                             gjahr = wa_rseg-gjahr.
         if sy-subrc eq 0.
           move : wa_rbkp-belnr to wa_po-belnr,
                  wa_rbkp-bldat to wa_po-bldat,
                  wa_rbkp-RMWWR to wa_po-RMWWR,
                  WA_RBKP-WMWST1 TO WA_PO-WMWST1.
         endif.
           read table it_bseg into wa_bseg with key
                         ebeln = wa_rseg-ebeln
                         bukrs = wa_rseg-bukrs.
           if sy-subrc eq 0.
             move wa_bseg-belnr to wa_po-belnr_d.
           endif.
    *    read table it_bkpf into wa_bkpf
    *    with key belnr = wa_ekbe-belnr.
    *    read table it_bseg into wa_bseg
    *    with key belnr = wa_bkpf-belnr.
    CLEAR wa_bsik.
    clear it_bsik.
         read table it_bsik into wa_bsik
         with key belnr = wa_bkpf-belnr.
    *    if wa_bsik-shkzg = 'H'.
    *     wa_bsik-DMBTR = wa_bsik-DMBTR * 1.
    *     endif.
           if sy-subrc eq 0.
             move : wa_bsik-belnr to wa_po-belnr,
                     wa_bsik-DMBTR to wa_po-DMBTR.
            endif.
    *    clear wa_bsik.
    *    read table it_bsik into wa_bsik
    *               with key  belnr = wa_bseg-belnr.
    *    if sy-subrc eq 0.
    *        move : wa_bsik-DMBTR to wa_po-DMBTR.
    *    endif.
    *clear wa_bsak.
    *    read table it_bsak into wa_bsak
    *               with key  belnr = wa_bseg-belnr.
    *    if sy-subrc eq 0.
    *        move : wa_bsak-DMBTR_C to wa_po-DMBTR_C.
    *    endif.
    *clear : wa_rbkp.
    *loop at it_bsik into wa_bsik.
    *read table it_bsik into wa_bsik with key belnr = wa_rbkp-belnr.
    *if sy-subrc eq 0.
    *  move : wa_bsik-DMBTR to wa_po-DMBTR.
    *    endif.
    *endloop.
    *********Assign Vendor,PO Date*********
         clear wa_ekko.
         read table it_ekko into wa_ekko
                    with key ebeln = wa_po-ebeln.
         if sy-subrc eq 0.
           move:wa_ekko-lifnr to wa_po-lifnr,
                wa_ekko-bedat to wa_po-bedat.
         endif.
    *clear wa_ekko.
    *read table it_ekko into wa_ekko
    *with key lifnr = wa_po-lifnr.
    *if sy-subrc eq 0.
    *  move: wa_bsik-DMBTR to wa_po-DMBTR.
    *  endif.
    *    call function 'ZSD_BATCH_CLASSIFICATION_DATA'
    *      exporting
    **        ch_charg                   = wa_po-charg
    *        ch_matnr                   = wa_po-matnr
    *        ch_werks                   = wa_po-werks
    *      tables
    *        cl_data                    = it_cl_data
    **       I_SEL_CHARACTERISTIC       =
         loop at it_cl_data into wa_cl_data.
           if wa_cl_data-ausp1 ne '?'.
             if wa_cl_data-atnam eq 'THICKNESS'.
               move wa_cl_data-ausp1 to wa_po-thick.
             elseif wa_cl_data-atnam eq 'LENGTH'.
               move wa_cl_data-ausp1 to wa_po-length.
             elseif wa_cl_data-atnam eq 'WIDTH'.
               move wa_cl_data-ausp1 to wa_po-width.
             elseif wa_cl_data-atnam eq 'GRADE'.
               move wa_cl_data-ausp1 to wa_po-grade.
             endif.
           endif.
         endloop.
         modify it_po from wa_po index c_index.
         clear :c_grmenge,wa_po,wa_ekpo,wa_mseg,c_index.
       endloop.
    endform.                    " SETDATA
    *&      Form  FIELDCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form fieldcat .
       perform buildfields using '1' 'BANFN'  'IT_PO' 'PR Number' '' ''.
    *  perform buildfields using '2' 'BNFPO'  'IT_PO' 'PR Item Number' '' ''.
       perform  buildfields using '2' 'KNTTP' 'IT_PO' 'A/c Assignment Cat' '' ''.
       perform  buildfields using '2' 'PSTYP' 'IT_PO' 'Item Cat' '' ''.
       perform buildfields using '3' 'EKGRP'  'IT_PO' 'Purchase Group' '' ''.
       perform buildfields using '4' 'BADAT'  'IT_PO' 'Request Date' '' ''.
       perform buildfields using '5' 'MENGE'  'IT_PO' 'PR Quantity'  'X' ''.
       perform buildfields using '6' 'MEINS'  'IT_PO' 'PR Unit' '' ''.
       perform buildfields using '7' 'LIFNR'  'IT_PO' 'Vendor Number' '' ''.
       perform buildfields using '8' 'EBELN'  'IT_PO' 'Purchasing Doc No' '' ''  .
       perform buildfields using '9' 'BEDAT'  'IT_PO' 'PO Date' '' ''.
       perform buildfields using '10' 'MTART' 'IT_PO' 'Material Type' '' ''.
       perform buildfields using '11' 'MATKL' 'IT_PO' 'Material Group' '' ''.
       perform buildfields using '12' 'MATNR' 'IT_PO' 'Material Number' '' ''.
       perform buildfields using '13' 'TXZ01' 'IT_PO' 'Material Desc' '' ''.
       perform buildfields using '18' 'MENGE1' 'IT_PO' 'PO Quantity' 'X' ''.
       perform buildfields using '19' 'MEINS' 'IT_PO' 'PO Unit' '' ''.
       perform buildfields using '20' 'NETPR' 'IT_PO' 'Net Price' '' ''.
       perform buildfields using '21' 'PEINH' 'IT_PO' 'Price Unit' '' ''.
       perform buildfields using '22' 'MBLNR' 'IT_PO' 'GR Number' '' ''.
       perform buildfields using '23' 'MENGE2' 'IT_PO' 'GR Quantity' 'X' ''.
       perform buildfields using '24' 'MEINS2' 'IT_PO' 'GR Unit' '' ''.
       perform buildfields using '25' 'BELNR' 'IT_PO' 'Invoice doc. number' '' ''.
       perform buildfields using '26' 'BLDAT' 'IT_PO' 'Invoice Date' '' ''.
    *  perform buildfields using '26' 'BELNR_D' 'IT_POP' 'A/C Doc. No.' '' ''.
    *  perform buildfields using '26' 'AUGBL' 'IT_PO' 'Clearing Doc No.' '' ''.
       perform buildfields using '26' 'DMBTR' 'IT_PO' 'OPEN AMOUNT' '' ''.
      perform buildfields using '26' 'DMBTR' 'IT_PO' 'clear AMOUNT' '' ''.
    *  perform buildfields using '26' 'DMBTR_C' 'IT_PO' 'Clear balance' '' ''.
       if ch_bal = 'X'.
         perform buildfields using '27' 'BALQTY' 'IT_PO' 'Balance Quantity'
         'X' ''.
       endif.
       perform buildfields using '26' 'WMWST1' 'IT_PO' 'TOTAL TAX ADDED' 'X' ''.
       perform buildfields using '26' 'RMWWR' 'IT_PO' 'TOTAL AMOUNT IN INVOICE' 'X' ''.
    endform.                    " FIELDCAT
    *&      Form  BUILDFIELDS
    *       text
    *      -->P_0449   text
    *      -->P_0450   text
    *      -->P_0451   text
    *      -->P_0452   text
    form buildfields  using    value(p_col_pos) like sy-cucol
                                value(p_fldname) type slis_fieldname
                                value(p_tabname) type slis_tabname
                                value(p_reptext) like dd03p-reptext
                                value(p_do_sum) type char1
                                value(hotspot) type char1.
       wa_fcat-col_pos = p_col_pos.
       wa_fcat-fieldname = p_fldname.
       wa_fcat-tabname = p_tabname.
       wa_fcat-reptext_ddic = p_reptext.
       wa_fcat-do_sum = p_do_sum.
       wa_fcat-hotspot = hotspot.
       append wa_fcat to it_fcat.
       clear wa_fcat.
    endform.                    " BUILDFIELDS
    *&      Form  DISPLAY
    form display .
       clear wa_layout.
       wa_layout-zebra = 'X'.
       wa_layout-colwidth_optimize = 'X'.
    * wa_layout-box_fieldname     = 'SEL'.
    * wa_layout-edit = 'X'.
       perform build_sort using 'BANFN' '1' 'X'.
       call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          i_callback_program               = sy-cprog
    *   I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
          i_callback_top_of_page           = 'TOP_OF_PAGE'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
        i_background_id                   = 'ALV_BACKGROUND'
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
          is_layout                        = wa_layout
          it_fieldcat                      = it_fcat
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
         it_sort                           = it_sort
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
        I_SAVE                            = 'A'
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
         tables
           t_outtab                          = it_po[]
      exceptions
        program_error                     = 1
        others                            = 2
       if sy-subrc <> 0.
         message id sy-msgid type sy-msgty number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       endif.
    endform.                    " DISPLAY
    *&      Form  top_of_page
    *       text
    form top_of_page.                                           "#EC *
    **********Create report header*********
       refresh it_lshead.
       clear wa_lshead.
    **********To display date in header*********
    *  write: s_badat-low to c_low dd/mm/yyyy,s_badat-high to c_high
    *  dd/mm/yyyy.
    *  if s_badat-high is initial.
    *    concatenate 'Dated on' c_low into c_date separated by space.
    *  else.
    *    concatenate 'Dated between' c_low 'and' c_high into c_date separated
    *    by space.
    *  endif.
       wa_lshead-typ = 'H'.
       wa_lshead-info = 'PR To Payment History'.
    *  'Pending Indents History -

    We had a requirement to retrieve "aging of receiveables" by customer. Basically, it goes thru each record and depending on the due date places the amounts in the following buckets (example). 0-30 day Overdue, 31-60 days Overdue, 61-90 days overdue, 30+ days overdue, 60+ days overdue) etc all the way to 6+ years overdue.
    There are also cooresponding buckets for coming due analysis. For example, what is: 0-30 days coming due, 31-60 days coming due, 30+ days coming due, etc...
    To do this, first I needed to be able be able to produce an open items statement at any given time in the past. Now, this seems impossible because of how the items go from open to cleared all the time. And an item that was open one month ago, may not be open anymore.
    What I did was first remove any selections on item status. Then compare the posting date with teh key date in the past, if the posting date is less than or equal to the key date, keep the record.
    Then compare the clearing date with the key date. First, keep all that are #. (This keeps all records still open from that posting date/key date)
    Then, add another check for all items that were cleared after the key date (GT Key Date). This gives you the open items on that date.
    Hope that makes sense. Let me know if you want clarification.
    /smw

  • Trying to Submit an App to Vendor Portal. Can't get it to work.

    HI,  
    I've spent about 14 hours trying to submit an App to the Vendor portal.   Running FIrefox 3.0.19 on Windows XP, SP3.  Seems the push-buttons and forms just won't work.  I've updated to the latest JRE 6.0.250.10 runtime, and still no luck.
    Several folks reported this issue back in 2011 on other developer forums.  Solution then was to use latest IE9,
    with the upgrade to latest Java Runtime 6.   Is IE9 the only browser Vendor Portal works with?
    FOr example, I can log into the Vendor Portal (ver. 4.0.1.3, i think, as of now, 24Sept2012), and update fields such as address, name, etc.  But if I try to upload a 480x480 logo, it just keeps reporting "Invalid logo file" (or whatever the red error message is).  And, when I press the button to do the "Add Rating" on the app description screen, I get
    all the radio buttons, but when I click submit, the form disappears, (without indicating any update - ie no green
    "G" for General Audience).   Attempts to press "Next" to get to next page, report that "Rating has not been added"
    and must be added.
    SO, I am stymied.  I even tried the browser on the PLaybook, and even it will not allow a 480x480 logo file to be
    uploaded successfully.
    Is the Vendor Portal disabled?  My Firefox+WinXP(sp3) platform is used to connect to numerous secure
    sites, and has all the features enabled to allow secure uploads, and Java/Javascript operation. 
    This is a remarkably difficult process.   Any suggestions?  Is there a Linux flavour combo that might work, or is
    the Vendor Portal not online right now, for app submission?    Thanx for any info...
    - Rus

    More details: Trying to add a logo picture, using Vendor Portal website version 4.0.3.1.   I have confirmed,, using three different graphics packages, that my logo picture is 480x480 pixels.   Latest attempt is using Firefoix 13.0.1, from a MacBook Air!   (Bought in June 2012, latest Firefox.. all new code, latests JRE, etc.  This platform works everywhere folks... )   Attempts to load a logo .jpg file fail, with a message "Please Select valid logo".  
    This is the Vendor Portal for adding Playbook Apps, and managing Vendor accounts.  Pretty important thingy, no?
    Website URL is: https://appworld.blackberry.com/isvportal
    Been trying for two days to add a logo-picture, and the details of a completed app.   Anyone minding the store on this?? Anyone got any suggestions?   If I can determine what the problem is, I will post my solution here.   It occurs to me that this must be possible, somehow, no?
    - Rus

Maybe you are looking for

  • How to block Specific G/L for an user

    Dear All my Expert, It is very much essential for me that I need to block the specific G/L for some users. It means those user only can made add/change the data but can not do the display the line item in FBL3n of selected G/L which I want to restric

  • How to Print text in two main windows

    For printing label have created two main windows on a page. calling function write_form In ABAP Program under do loop for two times.  but program prints only one window. why is it so? how can i print text on two windows. do 2 times.   COUNT = COUNT +

  • How can i save repartition model and ALE ?

    Hi, We will refresh SAP from production to preproduction and we want to save the ALE link and repartition model because we have a lot of one. Here, nobody know how to do that and wether it's possible or not. Does we rebuild all link manually ? or the

  • Smart playlist sort by Genius data status?

    I have a very extensive library and would love to be able to create a Smart Playlist to monitor the availability of Genius matching data on all my songs.  It doesn't show up on the list of query options currently - has anyone found a workaround to do

  • DAC repository metadata tables

    Hi, I am preparing reports in OBIEE for analysing DAC runs. For this I need to have the knowledge of the DAC metadata tables and the information they store in them. Can anybody please share any information/documents about these tables? Thanks Anamika