How to handle effect of sales price increase in already invoiced sales

Our customer is dealing with parts made by metal.As metal prices are fluctuating, Customer need to raise prices of products.In some cases as the customer of customer take time in approval of prices increase, when our customer receives approval from his customer, he generates supplimentary bill, which is actually the price difference between old price and new price.
The issue is in this scenario,  material movement is not involved, so in SAP B1 if we take the same item which was supplied to customer earlier, then inventory will not allowed.
Request to suggest the correct process to record the accounting and tax effect in case of price difference case.
Samir Gandhi

samir,
Direct Solution,
1.Reverse the ar invoice by ar credit memo.
2.Create a new delivery for customer with new price.
3.Raise ar invoice.
There is a work around as below,
1.Create a excisable item master as Item Code Supp.Inv.
2.Do goods receipt for item with qty as 1 and unit price
as total price difference(for all items) post good receipt to inventory account (to inventory account impact happens in case of delivery).
3.Do delivery for customer with qty as 1 and price difference
as unit price and with reqd. excise tax code.
4.Do Outgoing ex. invoice frm delivery
5.Raise ar invoice frm delivery.
Hope this solution will solve the problem.
Jeyakanthan

Similar Messages

  • How to handle E1 Purchases & Sales in SAP B1

    Hi all,
    How to handle E1 Purchases and Sales in SAP Business One.
    Kindly advise, if possible provide me the documents.
    Regards,
    Vikram

    Hi Samir,
    I am using 2007B PL - 08
    My customer place the Purchase Order to X Supplier for Excisable Items.
    X supplier place the order to Y.
    Y will directly deliver the goods to my customer with the reference of supplier's X details and also Y will mention the Unit Price and Excise duty paid by him.
    Based on the material delivered by Y,X supplier's send's the Invoice to my customer.
    but in this scenario my customer is eligible to claim the excise duties as per Y supplier.
    How to handle the above scenario.
    Kindly advise.
    Reagdrs,
    Vikram

  • How to handle the US Sales Tax

    Can anybody let me know how to handle Sales Tax of the US within Oracle Retail?
    I found that there is a sales tax functionality in RMS (that is Tax Rate Batch) which prepares appropriate sales tax data and sends a flat file to the customer's POS system.
    My questions are:
    1. Is it standard to manage the sales tax by POS systems in the US?
    2. Can the customers use POS log data in ReSA, instead of in the POS system, to generate sales tax reports?
    Sorry if my questions might sound funny, that's because I'm not familiar with the US tax system..
    Thanks,
    Atsuko
    Edited by: user759517 on 2012/02/02 1:52

    Hi,
    use method : get_current_cell                    
      CALL METHOD grid1->get_current_cell                    
                          IMPORTING es_row_id = ls_row_id     
                                    es_col_id = ls_col_id     
                                     e_value  = l_value.     

  • How can I copy the price from a reference invoice

    Hi,
    How can I programmatically copy the price from a reference invoice to the orders which I am creating using FM SD_SALESDOCUMENT_CREATE.
    Regards,
    Tanmay

    Hi,
    Try using the BAPI BAPI_SALESDOCU_CREATEFROMDATA1.
    In that pass REFOBJECTTYPE
    REFOBJECTKEY
    REFDOCTYPE
    to create from an invoice..
    Thanks,
    Naren

  • How to handle different Unit of measures in ALV reports? Quantity/Price

    Anyone knows how to handle different unit of measures for quantity or price in hierarchy ALV reports?

    hi,
    use the below fields:
    Link to measurement unit
    •qfieldname (measurement unit field name)
    only relevant for quantity columns with unit link.
    Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
    The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    •qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    regards,
    madhumitha

  • How to handle zero price

    Hi,
    There are 2 scenario and list of questions for SAP guru's...
    Scene 1: -
    The basic price (ZSAA) has to be fetched from one of the legacy system. For example, Material M1, the legacy system holds the price as 0.00. So, the alternative cal.type attached to ZSAA has to fetch the price as 0.00 and it should be valid price.
    Issue: - The routine is properly fetching 0.00, but SAP is
    not accepting the 0.00 as valid basic price. (where as discount has been accepted as 0.00)
    Scene 2: - The basic price (ZSAA) has to be fetched from one of the legacy system. For example, Material M2, the legacy system does not hold any price but holds some error message.
    Issue :- Here the routine attached to the ZSAA should bring the error message, that need to be populated during M2 pricing.
    And ZSAA value should be 0.00 but not active.
    How to handle this?

    Hi Lakshmanan,
                        Iam giving some inputs as per my thinking,
    1. You try to maintain the logic in the routine that '0' price also should accept.
      you put that routine in the requirement column of your pricing procedure.
    2. second scinerio also you can get through the new pricing routine.
    Thanks,
    Murali.

  • How to handle duplicate price creation while using RV_CONDITION_COPY

    Hi,
    I using FM RV_CONDITION_COPY in my BAPI to create the price but if the same record is being passed again either with same validation date or different validation dates then system pops up a window with message "The validity period of the condition created overlaps with conditions with shorter validity periods. These conditions will be deleted when you save." and other detail. This screen is same as when we try to create price using VK11.
    Does anybody know how to handle this issue.
    Thanks and Regards,
    Seema

    this may helps you.
    Look at the below thread ....
    Check if the below code can help you:
    U can try like this
    CONSTANTS:
    CON_A(1) TYPE C VALUE 'A',
    CON_B(1) TYPE C VALUE 'B',
    CON_C TYPE C VALUE 'C',
    CON_D TYPE C VALUE 'D',
    CON_E TYPE C VALUE 'E',
    CON_F TYPE C VALUE 'F',
    CON_G TYPE C VALUE 'G',
    CON_K TYPE C VALUE 'K',
    CON_T TYPE C VALUE 'T',
    CON_S(1) TYPE C VALUE 'S',
    CON_V LIKE T681A-KAPPL VALUE 'V',
    CON_X TYPE C VALUE 'x',
    CON_XX TYPE C VALUE 'X',
    CON_T074 LIKE T681-KOTABNR VALUE '074',
    CON_PREF LIKE T685A-KSCHL VALUE 'PREF',
    CON_ULTIMO LIKE RV13A-DATAB VALUE '99991231',
    CON_DATA_LOG_NAME(8) TYPE C VALUE 'PREF',
    CON_ERROR_LOG_NAME(8) TYPE C VALUE 'ERROR',
    CON_CUSTOM_LOG_NAME(8) TYPE C VALUE 'P_CUSTOM'.
    Verkaufsmengeneinheit
    PERFORM f3_vkme_ermitteln.
    Hauswährung
    IF t001w-werks NE cstmat-werks.
    PERFORM f3_waehrung_ermitteln USING cstmat-werks.
    ENDIF.
    pro Zollgebiet Konditionssatz anlegen
    LOOP AT t_matwerte.
    CHECK t_matwerte-noupd_cond IS INITIAL.
    CLEAR: komk,
    komp,
    komg,
    w_komv.
    REFRESH w_komv.
    Schlüssel füllen
    komg-werks = w_marc-werks.
    komg-matnr = w_marc-matnr.
    komg-gzolx = t_matwerte-gzolx.
    komg-land1 = t001w-land1. "101298
    Preisinfo füllen
    w_komv-kappl = 'V '.
    w_komv-kschl = con_pref.
    IF t_matwerte-kp = kp_max.
    w_komv-kpein = 1.
    MOVE kp_max TO w_komv-kbetr.
    ELSE.
    w_komv-kpein = pm_peinh.
    COMPUTE w_komv-kbetr = t_matwerte-kp * pm_peinh / hlp_ameng.
    ENDIF.
    IF w_komv-kbetr = 0.
    COMPUTE w_komv-kbetr = 1 / 100 * -1.
    ENDIF.
    w_komv-waers = t001-waers.
    w_komv-kmein = hlp_ame.
    APPEND w_komv.
    CHECK f3_kz_update_cond IS INITIAL OR
    NOT pm_simu IS INITIAL.
    IF NOT pm_mdmps IS INITIAL.
    MOVE komg-werks TO bg_kond-werks.
    MOVE komg-matnr TO bg_kond-matnr.
    MOVE komg-gzolx TO bg_kond-gzolx.
    MOVE w_komv-kpein TO bg_kond-kpein.
    MOVE w_komv-kbetr TO bg_kond-kbetr.
    MOVE w_komv-kmein TO bg_kond-kmein.
    MOVE w_komv-waers TO bg_kond-waers.
    *{ REPLACE D20K904946 1
    APPEND bg_kond.
    Siemens: Fehlerkorektur SAP-Standard
    READ TABLE BG_KOND TRANSPORTING NO FIELDS
    WITH KEY WERKS = BG_KOND-WERKS
    MATNR = BG_KOND-MATNR
    GZOLX = BG_KOND-GZOLX
    BINARY SEARCH.
    INSERT BG_KOND INDEX SY-TABIX.
    *} REPLACE
    ENDIF.
    CHECK f3_kz_update_cond IS INITIAL.
    CALL FUNCTION 'RV_CONDITION_COPY'
    EXPORTING
    application = con_v
    condition_table = con_t074 "Konditionstabelle
    condition_type = con_pref "Konditionsart
    date_from = sy-datlo "Von jetzt an
    date_to = con_ultimo "Bis Ultimo
    enqueue = 'X' "Sperren ist besser
    i_komk = komk
    i_komp = komp
    key_fields = komg "Schlüssel
    maintain_mode = 'A' "Lieber A als B
    no_authority_check = 'X' "X wie nix
    keep_old_records = ' '
    OVERLAP_CONFIRMED = 'X'
    IMPORTING
    e_komk = komk
    e_komp = komp
    new_record = i_new_record
    TABLES
    copy_records = w_komv
    EXCEPTIONS
    enqueue_on_record = 01
    invalid_application = 02
    invalid_condition_number = 03
    invalid_condition_type = 04
    no_authority_ekorg = 05
    no_authority_kschl = 06
    no_authority_vkorg = 07
    no_selection = 08
    table_not_valid = 09.
    CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
    MESSAGE A???
    ENDCASE.
    CALL FUNCTION 'RV_CONDITION_SAVE'.
    CALL FUNCTION 'RV_CONDITION_RESET'.
    ENDLOOP.

  • Sales price increase in Condition records

    Dear All,
    Need a  Standard Report  to view Sales price increase in Condition records, When we change Condition records system should show Customer,Material, Sales Organization, Distribution channel wise. Except T-Code : V/LD.
    Regards
    KS

    In VK12, once you execute the condition record, click from top menu bar "Environment > Changes".
    G. Lakshmipathi

  • My cube size is go on increasing essbase how to handle this ?

    ex:day 1 my cube size is 60 gb.after 2 days it go 80 gb.how to handle this in essbase

    May be you can try to do a restructure of the Cube. But it will take more time and and when this restructure is being performed no one will be able to access the cube.
    All the pag files will reduce to less files once its done.
    We have around 170 pag files and after restructure they have reduced to 130 pag files. You do not need to change any data inside the cube to do this.
    The process to do from F to H and back from H to F.
    Restructure to H drive
    Create the directories on the H drive if they do not exist. (not sure if this is necessary)
    Go to properties of the cube (storage tab) and remove the F drive, and add H drive
    Do a stop and start of the database
    Go back to properties and insure the H drive is there
    Right click on the cube and confirm the H drive is  there
    Then go to cube and do a restructure
    Restructure back to F drive
    Go to properties of the cube (storage tab) and remove H drive and add F drive
    Do a stop and start of the database
    Go back to properties and insure F drive is there
    Then go to cube, right click and do a restructure back to F.
    Regards,
    Naveen

  • How to do a clearance sale on a list of materials

    Hello,
    I got a request from our spare parts department that I'm not sure how to handle. They have a list of about 30 materials that they want to get rid of through a clearance sale. That is, they want to sell off all of the remaining stock of those materials at a discount. After the inventory is cleared, they want those parts to effectively become make-to-order parts, and they want to raise the price. So the parts are not being discontinued or obsoleted, just cleared from inventory.
    Does anyone have ideas on how we might configure this type of clearance sale? I looked into using promotions and sales deals, but they only seem to allow for sales based on a specified period, whereas we want the promotion to end based on when stock is depleted. I searched here and elsewhere for other ways of accomplishing this, but came up empty.
    Any help is greatly appreciated. BTW, we're on 4.6c.
    Regards,
    - Greg

    Good question. It doesn't look like there is a good option for clearance discount available (unless you're running Retail or are ready to invest in some additional "solution").
    Since it's only 30 materials, maybe the easiest way would be to create the new material records for them and move the stock to the new materials through inventory adjustment? This would affect the reporting but if you report by Product Hierarchy, that should still be good.
    I've noticed how in many stores when you buy a clearance item they actually have special barcodes on them. I.e. those are, essentially, not the "real" materials anymore.

  • How to handle this kind of scenario in SBO

    Hello, I am new to SAP Business One. I would like to know how to handle Transporation Company scenario below in SBO.
    QUESTION 1: A transportation company has 30 truck. The company receives orders from the customer and use the trucks to deliver the goods from Point A to Point B everyday. The cost for delivery is $0.50 per-KG.
    The way I handle above:
    1. In ITEM MASTER DATA:
    Create a new item > Item Type: Labor > Description: Delivery from Point A to Point B > and determine the delivery price is $0.50.
    2. Use the item created in no 1 above when creating Sales order/Invoice.
    If the weight is 5000kg then simply put QTY 5000 in Sales Order with the price of $0.50/KG, which has been set in Item Master Data.
    Is the above method correct or there is better way to handle?
    QUESTION 2: TRACKING EACH TRUCK EXPENSES BY ITS LICENSE PLATE:
    Each truck has Spare Parts expense (e.g. bulbs, oil, battery, tires etc) that the company would like to track.
    The company purchased the spare parts from suppliers and keep it in the warehouse. When a truck needs to replace its spare parts, the company will issue the parts and record it under that truck's license number as that truck's expense.
    The goal is SBO must be able to provide detail monthly expense report for each truck when inquired by its license plate. I prefer NOT to manually input "directly" in Journal Entry to prevent error.
    Thanks.

    Hi,
    welcome to sbo forum!
    For your question 1, it will depend if you will only have 1 route for all of your deliveries.If your point of origin is always point a then destination is point B w/ price of $0.50,then you are right with your process... but if you will have to expand and move into different places, i think it will best for you to create a UDT for your pricing.
    in summary:
    1.create UDT pricing(with origin,destination and price)
    2.Create UDF in row level of Sales order(U_origin,_U_destination)
    3.) create FMs for your Sales order Origin and destination based on UDT Pricing table.
    4.) create automatic fms for your price( based on origin and destination selection).
    for question 2, all your repairs and maintenance will pass through AP invoice( either by item or service). in our country we normally use Ap service,since a truck has normally several types of spare parts. This figures will will surely add up to the number of item master data record in your system ,since you will need create a unique item for each and every item available.
    -To monitor all your expenses, you will need to create a UDF in the header of PO, GRPO or AP invoice, place your plate number here. so that when you extract your reports, you will easily identify your expenses per truck.
    in summary:
    1.create UDF for header of PO,GRPO or AP( Udf_Plate number) you can set valid values for you udf or by FMS with default values.
    2.Create Udf for lines of PO,GRPO or ap(UDF_spare part type) --note: if you will use the Item type document for repairs and  maintenance then i guess you dont need to add UDF_spare parts.
    Hope i was able to help you.
    Regards,
    Darius Gragasin

  • How to handle defect items in sap sd..

    Hi Friends,
    How to handle defect items in sap sd..
    My requirement is some of the XYZ materials are damaged 10%.Some more materials(Material number is XYZ) are damaged to 20%.When sales order is created with these defect items,the system should pickup the defect items only?One more thing is for 10% damaged items,one price is given.For 20% damaged items,one more price is given and so on.How this will be configured in sap sd.
    We hav an idea that making these type of defects as scrap.Then create one more material number  as AXYZ(Defects of XYZ) and receipt without po.We can use the defects in sales order and soon.But how pricing will be set for different levels of damages?
    Any ideas,documents and settings required for this scenario and share any ideas
    Thanks in advace....VM

    Hi All,
    Thank you very much for your replies and sharing your valuable information
    Just I am giving all the meeting points and those are
    They donu2019t want to convert into scrap.
    One more point is that if materials are in batches then???
    When we create sales order that damaged one only should be picked by the system.
    Manual entering the price need to be stopped
    Without maintaining separate material for the damaged, any possibilities?
    We discussed abt Split valuation point .Is it suitable to this? then how?
    How to handle this we are thinking.
    Both Rithvikau2019s point and Jigneshu2019s point need to be considered, actually this is main issue. There are more chances of malpractices/confusion to the user as mentioned by Rithvika. Here one more constraint is more material codes required for 10%, 20%, 30%........90% damaged one for one material as said by Jignesh
    Actually I mentioned only as example 10% and 20% but have many.
    Any ideas how to proceed...
    Thanks and Regardsu2026VM
    Edited by: vm on Apr 13, 2009 4:45 PM

  • How to handle labor cost?

    Dear All,
    Scenario:
    I have a finished component ;an assembly of 3 items,how to handle the labor cost i am paying for assembling in SBO.
    could you all please write in detail .
    Thanks,
    Nandakumar

    Hi Nandakumar,
    you could have a look at this Expert Empowerment Session:
    PDF:
    [18.05.2007 -  Moving Average Price calculation - effects of Rounding|https://websmp203.sap-ag.de/~sapidb/011000358700000418832007E/KP_MAP_in_BOM.pdf]
    Recorded Webex
    [18.05.2007 -  Moving Average Price calculation - effects of Rounding|https://websmp203.sap-ag.de/~sapidb/011000358700000415572007E/CW20_FIN_moving.wrf]
    There is an example involving a BOM with integrated labout costs.
    & also this Wiki:
    [How to include labour cost in a BOM. |https://wiki.sdn.sap.com/wiki/display/B1/Howtoincludelabourcostina+BOM.]
    All the best,
    Kerstin

  • How to handle Supplementary Bills

    Hi all,
    Can any one suggest me how to handle the supplementary bills in indian localization?
    The concept is encountered in cases when companies follow contract agreements in sales and purchase. To provide a breif description of the scenario: A contract prevails with a vendor from a period of 1st april to 30th June for an item A @ Rs. 30. Now all the bills generated within this period is raised at the said rate along with taxations. The contract is liable for renewal from 1st July but the process take time and the new rates are available on 25th July but effective from 1st July @ Rs. 40. Now the bills generated from the period of 1st July to 24th July has been raised at the old rate as new rates were not available. On 25th July, the company raises a supplementary bill for the difference amount i.e. Rs 10 x Qty billed from 1st july to 25th july. Now this will efect the taxation also. In case of a cost raise the tax accounts shall be debited and the stock accounts shall have to be revaluated for the item. In case of a reduction the tax accounts have to be credited and the stock account has to be revaluated for those items. However, though this has an effect on the stock value it does not have any effect in the stock quantity.
    How to map this in SAP Business One? This has been a standard practice in any manufacturing industry now a days and I am seeking for any one who has done it. Please share a solution.
    Regards,
    Raj

    Hello,
    still not get proper answer for this prob.
    It is very complax issue for handing in SAP .
    i think it can handle making nos of AccountAmount reconcialation , inventory tracking(phsical stock tracking) and service invoice .
    and result based on your client Accountant and your clear explaination. 
    You have only one opion make credit note make with respective excise docuemnt  .but whenever you receive bill you have issued qouantiy in production floor.otherwise make all document again..
    Thanks
    Manvendra Singh Niranjan

  • How to retrieve the ARCHIVED Sales order data

    Hi All,
    When issuing the output for the delivery, it is giving an error saying 'Sales Order XXXX does not exist' due to which the prices in the output were displayed as '0'. Reason for this can be that 'the order might have been archived'.
    My requirement is,
    1. If Sales Order doesnu2019t exist in data base then need to check if Sales order exists in archive data base.
    2. If  yes, take needed data from archive data base tables to calculate price. The logic of price calculation should be the same as for not archived Sales Orders.
    Can anyone help me on this..?
    Please tell me how to check whether the Sales order exists in the Archived database. Please share the table names(sample logic if possible) sothat I can use them in the report logic.
    Please tell me how to pull the data from the archive database tables to calculate the price.
    Thank you in advance.
    Thanks & Regards,
    Paddu.
    Edited by: Paddu K on Feb 23, 2009 3:42 PM

    *&      Form  get_archive_data
    *       Fetch Archive Data
    FORM get_archive_data .
      CLEAR:    g_read_handle, g_commit_cnt,
                g_read_cnt, g_reload_cnt,it_rel_tab,it_bseg_a,it_bkpf_a,
                it_bset_a, gt_result.
      REFRESH: it_rel_tab[],it_bseg_a[],it_bkpf_a[],
               it_bset_a[], gt_result[].
    *Populating selection screen fields to field-symbols
      PERFORM build_fs_select_options.
    *Call FM as_api_read  FI Data
      CALL FUNCTION 'AS_API_READ'
        EXPORTING
          i_fieldcat                      = 'SAP_FI_DOC_002'
          i_selections                    = ft_selections[]
    *   I_OBLIGATORY_FIELDS             =
    *   I_MAXROWS                       =
       IMPORTING
         e_result                        = gt_result[]
    EXCEPTIONS
       parameters_invalid              = 1
       no_infostruc_found              = 2
       field_missing_in_fieldcat       = 3
       OTHERS                          = 4
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT gt_result[] IS INITIAL.
    *Sorting by KEY and Offset
        SORT gt_result BY archivekey archiveofs.
    *To delete duplicates
        DELETE ADJACENT DUPLICATES FROM gt_result COMPARING archivekey
        archiveofs.
    *looping the internal table
        LOOP AT gt_result.
    *Get read handle for  object
          CALL FUNCTION 'ARCHIVE_READ_OBJECT'
            EXPORTING
              object         = 'FI_DOCUMNT'
              archivkey      = gt_result-archivekey
              offset         = gt_result-archiveofs
            IMPORTING
              archive_handle = g_read_handle
            EXCEPTIONS
              OTHERS         = 1.
          IF NOT sy-subrc IS INITIAL.
            MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
          IF sy-subrc = 0.
    *Get Acoounting Document details
            PERFORM object_read_opened
                      TABLES it_rel_tab
                             it_bseg_a
                             it_bkpf_a
    *                         it_bset_a
    *                         it_bsik_a
    *                         it_bsak_a
                             it_bsid_a
                             it_bsad_a
    *                         it_bsec_a
                      USING g_read_handle
                            l_archobj
                            g_commit_cnt
                            g_read_cnt
                            g_reload_cnt
          ENDIF.
    *close the file.
          CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
            EXPORTING
              archive_handle          = g_read_handle
            EXCEPTIONS
              internal_error          = 1
              wrong_access_to_archive = 2
              OTHERS                  = 3.
          IF sy-subrc <> 0.
            MESSAGE i004." 'Unable to close archive session'.
            EXIT.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
        EXIT.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
      IF NOT it_bkpf_a[] IS INITIAL.
        SORT it_bkpf_a BY belnr.
        DELETE ADJACENT DUPLICATES FROM it_bkpf_a COMPARING belnr.
        DELETE it_bkpf_a WHERE budat GT p_budat. "#ECDK902206
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF it_bkpf_a[] IS INITIAL.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT it_bseg_a[] IS INITIAL.
        SORT it_bseg_a BY belnr gjahr buzei.
        DELETE ADJACENT DUPLICATES FROM it_bseg_a COMPARING
                                              belnr gjahr buzei.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    ENDFORM.                    " get_archive_data
    *&      Form  build_fs_select_options
    FORM build_fs_select_options .
      REFRESH:  ft_selections.
    *Comapny code
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'BUKRS'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_bukrs  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Customer
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'KUNNR'.
      LOOP AT s_kunnr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_kunnr TO <lw_selopt>.
      ENDLOOP.
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    **Customer Group
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'KTOKD'.
    *  loop at s_ktokd.
    *    append initial line to <fw_selections>-selopt_t
    *           assigning <lw_selopt>.
    *    move-corresponding  s_ktokd to <lw_selopt>.
    *  endloop.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *Profit Center
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'PRCTR'.
      LOOP AT s_prctr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_prctr TO <lw_selopt>.
      ENDLOOP.
    *Commented #ECDK902210
    **Key Date
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'BUDAT'.
    *  append initial line to <fw_selections>-selopt_t assigning <lw_selopt>
    *  move p_budat  to <lw_selopt>-low.
    *  move  'I' to <lw_selopt>-sign.
    *  move  'EQ' to <lw_selopt>-option.
    *Aging Period1
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'ANZTA'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag1  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period2
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag2  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period3
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag3  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period4
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag4  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period5
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag5  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    ENDFORM.                    " build_fs_select_options
    *&      Form  object_read_opened
    *       To Fetch Arichive Data
    FORM object_read_opened TABLES   it_rel_tab
                                      it_bseg_a
                                      it_bkpf_a
    *                                  it_bset_a
    *                                  it_bsik_a
    *                                  it_bsak_a
                                      it_bsid_a
                                      it_bsad_a
    *                                 it_bsec_a
                             USING value(g_read_handle) LIKE sy-tabix
                                   value(l_archobj) LIKE arch_def-object
                             value(g_commit_cnt) LIKE arch_usr-arch_comit
                               g_read_cnt TYPE i
                               g_reload_cnt TYPE i.
      DATA: BEGIN OF table_wa ,
               table LIKE arch_stat-tabname,
            END  OF table_wa.
      DATA: lit_data(2048) TYPE c OCCURS 1 WITH HEADER LINE.
      DATA:  l_structure LIKE arch_stat-tabname,
             l_lin TYPE i.
      CLEAR: it_table_org1,lit_struc,it_table_org2,table_wa,it_rel_tab.
      REFRESH: it_table_org1[],lit_struc[],it_table_org2[],it_rel_tab[].
      CLEAR: g_duprec,g_read_cnt,g_reload_cnt,g_object_cnt.
    *Read  data from the infostructure
      DO.
        ADD 1 TO g_object_cnt.
        CLEAR l_structure.
        CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
          EXPORTING
            archive_handle                = g_read_handle
         IMPORTING
           record                        = lit_data
    *   RECORD_CURSOR                 =
    *   RECORD_FLAGS                  =
           record_structure              = l_structure
    *   RECORD_LENGTH                 =
    *   RECORD_REF                    =
         EXCEPTIONS
           end_of_object                 = 1
           internal_error                = 2
           wrong_access_to_archive       = 3
           OTHERS                        = 4
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          EXIT.
        ENDIF.
        IF NOT l_structure IS INITIAL.
          table_wa-table = l_structure.
          APPEND table_wa TO it_rel_tab.
        ENDIF.
        APPEND lit_data.
        CLEAR l_lin.
        FIELD-SYMBOLS: <fs_struc> TYPE c.
        CASE l_structure.
    *BKPF data
          WHEN 'BKPF'.
            ASSIGN it_bkpf_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bkpf_a.
    *BSID data
          WHEN  'BSID'.
            ASSIGN it_bsid_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsid_a.
    *BSAD data
          WHEN  'BSAD'.
            ASSIGN it_bsad_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsad_a.
    *BSEG data
          WHEN 'BSEG'.
            ASSIGN it_bseg_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bseg_a.
        ENDCASE.
        REFRESH lit_data.
        CLEAR g_object_cnt.
      ENDDO.
    ENDFORM.                    " object_read_opened
    *&      Form  get_bsid_bsad_archive_data
    *If Exclude Spl. GL Trnasaction is initial get BSID BSAD Archive data  *
    FORM get_bsid_bsad_archive_data .
    *Work Area
      DATA: wa_bsid TYPE type_bsid.
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a   where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE  bukrs = p_bukrs AND
                                budat LE p_budat. "#ECDK902206
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a   WHERE bukrs EQ p_bukrs AND
                                  belnr EQ it_bkpf_a-belnr AND
                                  gjahr EQ it_bkpf_a-gjahr AND
                                  augdt GT p_budat AND
    *                            koart eq 'D'     and
                                  kunnr IN s_kunnr AND
                                  prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat."#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT i_bsid[] IS INITIAL.
        SORT i_bsid BY belnr.
    *Commenting this logic by GTATIKONDA on 10/31/2008 #ECDK902245
    *  delete adjacent duplicates from i_bsid comparing belnr.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
    ENDFORM.                    " get_bsid_bsad_archive_data
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a  where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE bukrs = p_bukrs AND  "#ECDK902206
                               budat LE p_budat.
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a  WHERE bukrs EQ p_bukrs AND
                                 belnr EQ it_bkpf_a-belnr AND
                                 gjahr EQ it_bkpf_a-gjahr AND
                                 kunnr IN s_kunnr AND
                                 umskz EQ space AND
                                 augdt GT p_budat AND
                                 prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat. "#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.

Maybe you are looking for

  • Cover Flow View Options

    Is it possible to define my Cover Flow view to display all my videos, after the first 5 seconds, instead of the very beginning? This was available in one of my office's Mac stations, but no one knows how it was defined to do it so-

  • All Rows not displaying

    Hi i have two regions. Region 1 is check box region where you check the columns and region2 displays report of checked columns. Region two is displayed when submit button is pressed in region1 Now I have report is set up with 15 rows per page so when

  • EHP4 Lean Sales Order Web Dynpro - Global ATP interaction

    We are currently looking to use the Lean Sales Order interface Web Dynpro in ECC EHP4 and have a question about how it integrates with Global ATP. If SAP standard VA01 is used, the user is presented with an APO Availability check screen which allows

  • Messed up keyboard

    Dear community, Why is my keyboard messed up? Even after Firefox reset. When I press - button p - a window pop with Inspector, Style Editor, Profiler, Console, Debugger - button 9 - Menu pop up at the top - button 5 - refresh current webpage I haven'

  • How do I retrieve my old playlists from time machine

    I had to re-install Lion on my Imac. To avoid bringing back the root problem, I have entered time machine and retrieved all my documents, folders, pictures, music, etc. The only thing i can't seem to find is the play lists we have created and of cour