Foriegn Payments

Hi All,
Presently we are working with SRM 4.0 with Extended Classic. We have only one currency as USD. Now we want to add EUR, etc., in order to make Shopping Cart, PO, Invoice & AP documents can have the option of foriegn currency apart from default currency USD.
Please explain me what are the config settings we have to made in SRM.
Thanks

Hi
What is your exact business need ? Change rates maintenance ? Which R/3 version and SRM scenario are you using ?
Because you don't have to take care about the SC item currency. The requestor can add items from a catalog, potentially with items on N currencies (USD, EUR, GBP...), or add some items manually, selecting a currency from the list.
The SC total value will be calculated in the user's default currency defined as an attribute in PPOMA_BBP.
This is this amount/currency that is used in WF starting conditions.
Later, in follow on documents, the prices are converted in the vendor currency.
As you can see, the initially selected currency is converted.
The main requirement is to maintain exchange rates up to date in your SRM system.
You have 2 options to control the available currencies in the drop down list box:
-> using the BADI BBP_F4_READ_ON_ENTRY, with method GET_CURRENCY.
change currency validity dates in SPRO, as SRM will propose non expired currencies
->To define a default currency as favorite for all users, create an entry in table BBP_CURRENCY_FAV, with owner = SAP_DEF_USER (this can also be controled in the BADI).
Please check the currency in your WF starting conditions.
Usually, the attribute CUR in your org structure is the currency used by the WF at "header level". (for example : shopping cart total value). Of course, if you maintain specific line item starting conditions, you have to make sure that the correct currency is mentionned else you get an issue.
Related pointers ->
Currency  USD differs from Purchase order currency EUR. Enter in PO currenc
Note 970992 - Purchase order currency overwritten by partner dflt currency
Re: Usage of multiple currencies while creating shopping cart
Default USD for carts
Re: Default Currency
Re: Currency
Do let me know.
Regards
- Atul

Similar Messages

  • How to pay a foreign vendor on a French Bank Account

    Hi Team
    We have a issue where we need to clear a Forien Vendor.
    So we used a payment menthod say "T" where is marked Foriegn payments allowed.But F110 did not work as the Bank Account was Local .
    Company belongs to France
    Vendor belongs to Swiss
    Vendor Bank Account Belongs to France
    So clearing Foreign vendor with Local Bank Account,is not possible
    So please advice us what are the settings to be done where we can clear the foreign vendor.through F110.using a payment method wich alloes FOrien vendor using Local Bank Account.
    Thanks
    Swetha

    Hi Sujatha,
    All the settings of F110 come From FBZP, have you check the following :
    - FBZP--Ranking Order : is you Bank in the first Rank
    - FBZP--Bank Account : in your case you must have this entry
    House Bank : Name of the Local Bank Account (France)
    Payment method : T
    Currency : CHF
    Bank Subaccount : your bank subaccount
    - FBZP--Available Amounts : Check if you have an available amount for your Bank (France) and Currency (CHF)
    Don't forget to check also if for this foreign vendor we have the payment method ' T ' in the master Data (Tcode : XK03)
    Regards

  • MT940 Interest line Tag86

    Hi Specialist
    I need to upload in my system the file MT940 but i have one problem.
    Normally in the TAG61 the system can find  the document total amount to clear it. but if the document has some interest or discount users must clear the documents after upload the file manually.
    I would like clear everything automatic after upload the file and then I propose to the bank add the interest and the discount in the note payee line TAG86. I think is table FEBEP. And actually is reading it but...
    I dont know which kind of the algorith and user exit should I use to get the solution. 
    Please , could you explain me how can I use it and how is going to clear it in the system?
    Thank you
    Regards,

    Hi
    I was having a similar issue for foriegn payments. My bank currency was EUR, but my customer was paying in USD (inoivce document currency). So when i get the bank statement, the foriegn amount and the exchange rate was also appearing in the note to payee field and also the forieng curr and amount was appearing in TAG 61 with an identifier /OCMT/USD/1000
    (1000 USD is the document amount).
    I was using MT940 unstructured format. When I saw the code for this Std SAP program identifies this identifier OCMT and takes the foreign amount.
    try to take help of an ABAPer and see whts there in the code for your query.
    Regards
    Nikhil

  • F110 and Payment in Foriegn currency for Invoice Book in different currency

    Hi,
    I am facing problem in Automatic payment Program [F110] scenario as follows:
    I have booked invoice in INR and now wants to make Payment in USD.
    All related setting for FBZP i have done as follows:
    Define Payment method and inserted USD as currency. In payment method i have allowed Foreign currency payments.
    Alll related Band Determination setting i have done.
    Still it is not allowing to make payment in USD. Payment line item process with Error giving message
    NO VALID PAYMENT METHOD FOUND.
    If i remove USD currency from Payment Method it Process without error.
    Please suggest any way of processing INR BOOKED INVOICE PAYMENT IN USD with Automatic Payment Program F110.

    Hi,
    "have entered Run Date and Identification.
    Given Company code, +Payment method with Currency as USD+ & Next run date vendor with Open Item in INR.
    Than in Additional log i have selected three option.
    Printout i have given variant for payment method and house bank."
    My observation is, program is asking for payment method by which you wanna make payment to vendor in USD, but ur giving payment method it self as USD which is not correct, payment method can be like Check method, EFT method, ACH method, Direct Debit method, Wire transfer method extu2026..
    Edited by: Giridhar Reddy on Jul 9, 2008 11:53 AM

  • Invoice payment other than local currency

    Company code currecny is INR
    Invoice booked in foriegn currency i.e. document currency EUR 100 and converted to local currency 1000 (inr)
    Making the payment in INR in 1000 (INR) against EUR invoice posted, now the vendor will be cleared in local currency and no open items, balances will '0'
    But the problem is amount in the doc currency balances will show two difference amounts 1000 INR and 100 EUR.
    Is there are any specific settings where we can the knock off the balance lying in the document currency and balances should show '0'.
    Regards,
    Krishna.

    You can clear the vendor using F-44 mentioning clearing currency on the selection screen as INR.
    Regards,
    Gaurav

  • How to pay a forign currency invoice in another currency payment in R12

    Hi,
    I have Oracle R12.06.
    How to allow cross currency payment, for example :
    I have an invoice in USD , i need to make an payment for that Invoice in EUR or any other currency sometimes functional currency.
    I already check the allow Multiple currency Payment for all bank accounts and also allow multiple currency in Payable options ,BUT I still not allowed to pay any invoice in different currency.
    Regards.

    Please note the following in respect of payment in foriegn currency other than the functional currency:
    Invoice and Payment Currency.
    Payment Region – Type - If the Payment Currency is different from the Invoice Currency and both are fixed-rate currencies, Payables displays EMU Fixed. If the invoice and payment currencies are the same, you cannot enter a value in this field.
    If the payment currency is different from your functional currency, enter exchange rate information in the Payment Rate field.
    You can pay invoices in a different currency only if the currencies are related fixed-rate currencies – EURO BASED CURRENCIES
    In all the other circumstances other than above the invoice currency and payment currency has to be the same.
    They cannot be different,
    Hope this helps.
    Thanks
    Manish Jain.

  • APP - Payment in foreign currency

    Hi everyone,
    We have posted a incoive in USD for 1000, now we want to make payment in usd only how to make it? my co code currency is INR
    We have configured all settings in TC: FBZP selected Foriegn currency allowed. but while running F110 system threws error message like :Invalid payment method'
    Please advice
    Regards

    Hi
    Probably it is not Foreign currency error but Payment method you are using. Check payament method which you have given in Vendor master data and FBZP.
    Regards,
    Hari Peddi
    Edited by: HARI PEDDI on Oct 3, 2008 12:51 PM

  • APP RUN Error -Foriegn Currency

    HI Guru's,
    Iam trying post  APP run for Foriegn currency showint following error..
    Job started
    Step 001 started (program SAPF110S, variant &0000000004436, user ID RJRAO)
    Log for proposal run for payment on 21.08.2008, identification T4
    >
    > Additional log for vendor 302289 company code G1SG
    >
    > -
    Payment method selection additional log
    > Payment method selection for items due now to the amount of USD       25,000.00-
    > Payment method "B" is being checked
    > Bank details are being checked
    >    Customer/vendor bank details are being read
    > Country SG / Bank number 7375048 / Account 3043051758 ...
    >     Customer/vendor bank details are being checked
    >   System reads house banks and checks if they are allowed
    >   House bank is selected ...
    > No suitable bank can be selected for comp.code G1SG pmnt meth. B curr. USD
    > Payment method "C" is being checked
    > Payment amount is not within the limits allowed ( 0.00 - 19,999.99 )
    > Payment method "I" is being checked
    > Bank details are being checked
    >   System reads house banks and checks if they are allowed
    >   House bank is selected ...
    > No suitable bank can be selected for comp.code G1SG pmnt meth. I curr. USD
    > No permitted payment method exists
    Information re. vendor 302289 / paying company code G1SG ...
    ... payment not possible because of reported error
    End of log
    Job finished
    regards
    Dhana

    Hi Janardhan...
    Sorry if this is not the correct place to put my question... Can you please provide any documents or any links for setting up the Workflow approval process for parked documents as you have already done that ...
    Please kindly help me...will be really thankful

  • APP RUN-Foriegn Currency

    HI Guru's,
    Iam trying to run for foriegn currency its shwoing folllowing error.
    Job started                                                              
    Step 001 started (program SAPF110S, variant &0000000004418, user ID RJRAO)
    Log for proposal run for payment on 21.08.2008, identification JOT5      
    Information re. vendor 302289 / customer  / paying company code G1SG ... 
    Payment with currency USD, payment method : No valid payment procedure   
    Information re. vendor 302289 / paying company code G1SG ...             
    ... payment not possible because of reported error                       
    End of log                                                               
    Job finished                                                             
    how to solve it
    regards
    JK

    HI
    Check Payment method in T.C FBZP for currenices allowed for APP. If any currency code is mentioned in currency fields only that currency are allowed for running  APP.(for allowing all currency don't mention any currency in this field)
    Check it for company code  level
    Thanks & Regards
    CRM
    Edited by: crm on Aug 21, 2008 8:35 AM

  • Foriegn trade EOU unit with excise bonds

    i have a EOU(export oriented unit) which has to be brought into SAP though roll-out. Now do i have to use the foriegn trade for this or i can do it directly.
    IF any one have any documents please forward  to
    Also let me know about the excise under bonds and other statuatory requirements involved.
    [email protected]
    regards,
    Raghu.

    Hi,
    Plant 2000 Can send a material for Subcontracting against Subcontracting Challan ie 57F4, but Cant sell in domestic market.
    Ans: - This can be mapped through following Subcontracting process in Plant 2000;
    Creation and maintenance of 57F4 Challans for Subcontracting Process (Subcontracting without Payment of Duty)
    1. Transfer Posting of components to Subcontractor (MB1B)
    2. Creation of Subcontracting Challan (J1IF01)
    3. Refer Subcontracting Challan at the time of GR (MIGO)
    4. Reconciliation of Subcontracting Challan (J1IFQ)
    5. Completion of Subcontracting Challan (J1IF13)
    6. Generation of Annexure IV (J1IFR)
    1000 Plant is Subcontractor for 2000 Plant. In this case I cant transfer stock from 2000 plant to 1000 plant through STO.
    If 1000 Creates STO, 2000 has to create sales document and outbound delivey which is not applicable as per EOU laws.
    Ans: - As per EOU law, you can not sale a material in local market (means you have to only export the materials fron this plant) that doesn't mean that you can not transfer the material from plant to plant.
    1. ME21N - You create a Subcontracting PO in Plant 2000, keeping Vendor as Plant 1000 (Create Plant 1000 as Vendor)
    2. MIGO - Transfer Posting > Others (Use Movement type 303 to transfer the stock from plant 2000 to plant 1000)
    3. J1IF01 - Create Subcontracting Challan w.r.t. Mateerial Doc of 303 mvmt type)
    4. MIGO - Goods Receipt > Others (Use Movement type 305 to receive the stock from plant 2000 to plant 1000)
    Prerequisite: - In config. include 303 in movement tupe groups of issues (i.e. 0001)

  • Error during payment proposal

    Hello SAP friends,
    Had a question about Payment proposal.
    We have our Bank determination set up as shown below-
    P M           Crcy     Rank Order     House bank
    M          1     TCS
    M     GBP     1     TCS
    M     USD     1     TCS
    HB     PM     Currency     Account ID
    tcs     M          tol1
    tcs     M     USD     tol2
    Vendor master has TCS as house bank. We have foriegn currency evaluation in our system.
    1)When we create invoice using GBP. It works fine. Proposal is done. Payment is made.
    2) When we create invoice using USD. It gives error message in proposal that no valid payment method found. We can fix it by reallocation but why is it not picking up housebank and account Id by itself.
    Why is this happening?
    Thanks for your help.
    Tina.

    Check your FBZP settings, whether you have restricted with any currencies.
    Also check whether you have allowed foreign business partners to make the payment.

  • Void payment taking original exchange rate

    Hi,
    At the time of voiding payment transaction for foriegn exchange Wires the system is taking the original exchange rate. Is there any possibility to change the exchange rate to manual.

    Well, just thinking as an accountant here, why would you not want the void of payment to be at the original exchange rate? I would think you would want that to be the case, because then everything ends up being 0. Let us take an example.
    Paid $10 on 12/28/2009, or 140 euro (not the real rate, just making up for this example).
    On 01/02/2010, you void the payment. You void $10. Let us say that is now 150 Euro. So you have -$10 and -150 Euro.
    The +$10 and the -$10 net to 0.
    The +140 Euro and the -150 Euro net to -10 Euro. Is that what you really want? I would think, as an accountant, I would want the euro to net to 0 also. After all, did you really spend 10 Euro in cash? No, you did not. But maybe someone does not think like me.
    So how do you get around this? Well, I think you would have to create a manual journal entry. I would debit Cash for the exchange rate difference. Not sure what would credit - maybe Payables Liability? Accounting would have to say what to credit, I think. Yes, I agree, it would be a pain to identify the situation and manually calculate the journal entry amount and manually input the journal entry. But I don't know of any other way to work around this. Maybe someone else will see this and come up with an idea.
    John Dickey

  • Foriegn trade

    Hi All,
    I want to know the information regarding below mentioned points in Foriegn Trade.I have gone through so many thredds but i am not getting the exact informaion.
    1. Specific Data for Customs Processing=Customs quota, antidumping laws.
    2. Official Documents/Certificates/Verifications/Cust.Approvals= Pre approved customs number is    available which big expo/import houses use for faster processing of the trade documents.
    thanks in advance...
    with cheers
    Sandeep D

    Hi
    I give below the details which I know on Foreign trade
    Exports - Form ARE1 is prepared for the export documentation and sent alongwith the material till port. Endorsements are done by the customs authorities on the ARE1 with the Bill of lading and the vessel details alongwith the shipping bill details and sent back two copies of the ARE1 back to the initiator. Bid exporters are provided with additional facility like they can apply for licence with the customs for the export proceeds made by them during the year and get DEPB licence (Duty Entitlement Pass Book) which can be used for payment of Customs duty on the Import of materials. This will fasten the process for these giants in clearing their goods at customs.
    Imported goods can be kept in customs for an initial period of 7 days beyond which charges will be levied on the basis of the storage area occupied by the imported material by customs.
    Regards,
    Lakshmanan Krishnan

  • 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

  • Pension payment period record issue in Retiree Payroll

    Dear Experts,
    We are implementing Retiree payroll with new set of wagetypes and payroll area. Now requirement is that there needs to be a provision of recording the balance period of pension payment and further it should be displayed in the form of report. That means say employee has the eligibility of receiving pension from 01.12.1998 to 14.11.2015 and he has received it till  Oct, 2010, remaining balance period needs to be projected in month and days like 60.14/98.12 etc.
    Now please suggest how to achieve it, should we create a custom infotype for storing it or any other way is there.
    Thanks and regards
    Tan

    It is Indian payroll.
    Requirement is to store the balance period of pension payment, like if one employee is eligible to get pension ( as per our pension benefit scheme) for 10 years 3months 15 days since his retirement date and has already received for 36 months i.e. 3years, we need to store and display that he is eligible to get pension for another 7years 3months 15 days in 87.15 format (i.e. 7*12+3= 87months and 15days) on monthly basis.
    This will be also captured in a report later on.
    Please suggest
    Regards
    Tan

Maybe you are looking for