BI Settings performance

Hi , Thank alot for such a wonderful suggestions, We have 25 millions of records going to cube so for high load performance . Can u tell me where and which trancation code  to set the setting below
1.Export/Import Buffer
2. Program Buffer
3.Extended Memory
4. Single record buffer
5. Max Runtime for a work process
6. Link to Front end
7Data Base Interface oracle
value 1000000
Thanks
Poonam

1)Export/import buffer:
<b>Tcode = RZ11</b>
a) Size in the shared memory:
Parameter = rsdb/obj/buffersize [in kilobytes]
Default: 4,096 [kB]
Maximum: 2,097.148 [kB] for kernel release 3.I to 6.20 with a patch number
lower than 1129. Size restrictions no longer apply to releases above this
level. Every directory requires approx.
b) Number of the bufferable objects (directories):
Parameter = rsdb/obj/max_objects
Default: 2.000
The number of directories must be adapted to the total size of the buffer:
Each directory needs approximately 430 bytes of administrative information
in the buffer. All together, the directories should not take up more than
10% of the buffer, to allow enough memory space for the objects being
buffered.
2)Program Buffer
<b>Tcode = ST02</b>
Parameters
abap/buffersize    Size of program buffe
abap/pxa           Program buffer mode
3)Extended Memory
<b>Tcode =RSPFPAR</b>
parameter = ztta/roll_extension
         ztta/roll_extension_nondia      
The value specifies the amount of memory that one user context can allocate to the SAP extended memory. This value is valid for all types of work processes.You can also control the quotas for dialog and non-dialog work
processes separately. To do this use parameters ztta/roll_extension_dia and ztta/roll_extension_nondia. For example, you can give a larger proportion of extended memory to batch processes than to dialog work processes.
4)Single record buffer
You should only buffer tables that you change infrequently. You specify whether or not a table should be buffered in Transaction <b>SE13.</b>
Changes to buffered information must be updated in the buffers of other application servers that are sharing that information. These updates can adversely affect performance. The more servers that need updating, the more expensive the update process.
http://help.sap.com/saphelp_nw04s/helpdata/en/c4/3a6ebf505211d189550000e829fbbd/content.htm
5)Max Runtime for a work process
<b>Tcode = RSPFPAR</b>
Parameter = rdisp/max_wprun_time
6)Link to Front end
I dont know what you meant by that however if you meant SAPGUI buffers its below
http://help.sap.com/saphelp_nw04s/helpdata/en/c4/3a6e23505211d189550000e829fbbd/content.htm
7)Databas Interface Oracle
<b>Tcode = RSCUSTV26</b>
Parameter = Degree
Hope it Helps
Chetan
@CP..

Similar Messages

  • Why does my seconds hard drive does not appear in the list of volumes in Settings - Performance - work volumes

    Hallo,
    the photoshop installations is really slow after updating to version 2014. So I checkt all performance related facts. I the settings of photoshop I saw, that there is only the defauld drive (systemdrive) in list of volumes. This is not the optimal case. On a different PC (Windows 7 Pro), there are all volumes present that are listet in the windows explorer. I would like to change the Setting to a different drive. Where could be the problems?
    I tried and changed:
    - Changing SATA Mode from RAID to AHCI
    - Updated all drivers (chipset, grapghic ... verything, dell's update-software offered to me)
    here an image to show the problem (placing an image seams to be broken :-(
    Thanks for help
    Martin

    Sorry, I've just deleted my previous post of a few seconds ago asking about your platform, because I realized you are on Windows because you mention "the C drive".  Senior moment.

  • Settings icon has permanent (1) badge after iOS7 Update

    So I updated my new Retina iPad to iOS7 and now I have a (1) in the upper right hand corner of the Settings icon that will not go away. I've gone through every section of settings, performed a hard reset, checked for additional updates (checked app updates as well) and the thing will not go away. Suggestions?

    You can't turn off the notification badge for settings, and the reset settings did not work, it is still there.

  • JPEG DEVELOP SETTINGS TRANSFERED TO RAW FILES

    I am trying to find out if you can transfer the develop settings/ranking/Etc. done on JPEG files to the same names RAW files. I shoot JPEG+RAW and I would like to send the JPEGS to someone off site for color corrections, crop, ranking, Etc. (because they are smaller in size) and then somehow apply those corrections to the RAW files counterparts. This would allow me to outsorce my sorting and rough color and transfer that work to the "keepers" RAW files. I can't enven begin to tell you what a positive impact this would have on my business (and my sleep schedule). If you know of any way to "extract" that XMP data from the JPEGS and apply it to the RAW (I currently shoot with a Canon 5D Mark II which generates .cr2 files) I would really appreciate it. Even if it's a work around solution.
    Many thanks,
    Cris

    Cris,
    The following procedure should work:
    On your "Remote Site":
    Set "Include Develop settings in metadata inside JPEG, TIFF, and PSD files" in the Catalog Settings
    After working on the JPEGs, execute "Save Metadata to File"
    On your "local Site":
    Use ExifTool to "Export metadata into XMP files ..."
    Move the XMP files into the folder where your CR2s reside
    In LR, execute "Read Metadata from File" on all your CR2s which you have created XMP Sidecars for
    This will apply the metadata (like ratings, color labels, keywords) as well as development settings (including crops) from the extracted XMP-File to your CR2s.
    BUT:
    While I can see that the "normal" metadata (like ratings etc.) will make sense on your CR2s, I don't know if the development settings performed on a JPEG (except maybe cropping) will make any sense on a CR2. Give it a try and tell us ....
    Beat Gossweiler
    Switzerland

  • Optimum player settings

    When creating a MIDlet...are there any optimum settings performance wise for sound filles...?
    I.e the size of the file, sampling rate,
    I wrote a small game to test and on one phone, the images go static when the sound is played...but tried on another phone and all was ok.
    That would point to it being a problem with perhaps my phone, but wondered if there was a blanket recommended size, sampling rate etc..
    I guess Java access the "MP3 type player" on your phone? But have no real clue at the moment as pretty new to this and finding if not fumbling my way around...

    I was working from the assumption that the max file size should not exceed the original DNG size
    David,
    the fundamental reason behind the difference in filsize is that RAW files (including dng) are not (usually) full RGB files. This is because the sensor in your camera uses what is called a Bayer array. This means that at every pixel location, there is only one greyscale value representing light intensity measured behind an individual color filter element, usually in 12-bits precision. The RAW processor demosaics this using advanced algorithms to get to full RGB triplets at each pixel location. So a 10 MP camera will write raw files of about 10*12/8=15 MBytes. With lossless compression, this ends up at around 10 MB. However a 10 MP 16-bit tiff is 10*3*16/8 = 60MB, which with compression will be about 40MB. 4 times as large! Nothing you can do about it. Add a few adjustment layers in Photoshop and the filesize balloons to over 100MB easily. This is why the editing philosophy of Lightroom is so powerful. The file stays in RAW and you only store a develop recipe for it in the catalog file (and perhaps in a xmp sidecar) and a small jpeg preview and that's it.

  • Photoshop CS6 & CC shuts down right after startup

    Hello!
    I've just got my self new lisence for adobe Lightroom, PS CC & CS6. Previously I had just PS CS5. Problem is that I can't get PS CS6 nor PS CC to start up, or more accurately to stay on more than one second. Now I'm asking help to get just the CS6 to work, as when that problem is solved, I believe also the CC -problem is solved too, as the problem is excatly the same. Lightroom works fine.
    What happens when I now start up CS6; everything loads just fine, no errors or anything that is abnormal. At first time when I started CS6, I got a warning message (this is a translation from finnish to english so it might not be to the letter): "photoshop detected graphic cards that are not officially supported. If there are problems, remove the selection from settings, performance settings - use graphics processor". I haven't seen this message later (except when I tried CS6 with different windows account).
    When cs6 (or cc) is started there's time about one second to open a menu window, when a window is succesfully opened the program stays on, and I can use any menu window that I want, and I can change any options. Right after menus are closed, the program closes. Mysterious. But, because of that, I'm able to go to the "performance settings" and try different selections - I've tried deselect the "use GPU", and I've tried to use all of the advanced settings (basic, normal, advanced), but the "USE OPENCL" choise is allways grayed out, and i'm not able to select that. Also cs6 detects my gpu right.
    I thing this has something to do with GPU as the above message says, I just don't know what to try anymore.
    Now what have I tried and what's done (using admin rights):
    - updated both nvidia gpu drivers (three different drivers been tried) and intell drivers
    - installation and removing
    - removed ps cs5
    - used adobe cleaning tool
    - used two differend registry cleaning tools (cc cleaner / wise cleaner) before installations
    - used shift when starting
    - disabled the gpu sniffer
    - tried logging out from creative cloud
    - deleted FNTCACHE.DAT from /system32
    - Tried different 3d settings from NVidia control panel only for the photoshop.exe (tried forcing Nvidia GPU, tried different cuda GPU settings
    Using:
    Asus 13,3" i5-2430m, 4gb ram, NVidia Geforce GT 520M, 1gb + intel hd graphics 3000
    Operating System: Windows 7 64-bit (finnish language)
    Adobe system information (most translated to english):
    Adobe Photoshop Version: 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00) x64
    Operating System: Windows 7 64-bit
    Version: 6.1 Service Pack 1
    System architecture: Intel CPU Family:6, Model:10, Stepping:7 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
    Physical processor count: 2
    Logical processor count: 4
    Processor speed: 2394 MHz
    Built-in memory: 4001 MB
    Free memory: 1798 MB
    Memory available to Photoshop: 3367 MB
    Memory used by Photoshop: 71 %
    Image tile size: 128K
    Image cache levels: 4
    OpenGL-draw: Available
    OpenGL-piirtotila: normal
    OpenGL, normaalitilan salliminen: True
    OpenGL, lisäasetusten salliminen: True.
    OpenGL, allow old GPU's: Not detected
    OpenCL Not available
    OpenGL-versio: 2.1
    Videon nelikulmaisen kuvion koko: 16384
    OpenGL-muisti: 1024 Mt
    DisplayCard vendor: NVIDIA Corporation
    DisplayCard : GeForce GT 520M/PCIe/SSE2
    Display: 1
    display limits: ylä= 0, vasen= 0, ala= 768, oikea= 1366
    Displaycard number: 2
    Displaycard: Intel(R) HD Graphics Family
    Driver version: 8.15.10.2291
    Driver Date: 20110127000000.000000-000
    Displaycard Drivers: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32
    Display: 1366 x 768 x 4294967296 colors
    Displaycard name: Intel(R) HD Graphics Family
    Displaycard memory: 1809 Mt
    Displaycard number: 1
    Displaycard: NVIDIA GeForce GT 520M   
    Driver version: 9.18.13.3489
    Driver date: 20140208000000.000000-000
    Displaycard Drivers: nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
    display:
    Displaycard: NVIDIA GeForce GT 520M   
    Displaycard memory: 1024 Mt
    serialnumber: 96040830714407508674
    Application folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\
    Temporary file path: C:\Users\ANNE-M~1\AppData\Local\Temp\
    Photoshop scratch has async I/O enabled
    Scratch volume(s):
    C:\, 279,5G, 123,3G free
    Required Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Required\
    Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\
    Additional Plug-ins folder: not set

    Hi!
    Win 7 64bit, tried in safemode with networking enabled, no help, same issue.
    One funny thing more, I opened a pdf -file through explorer in cc and it asked me if i wanted to save the changes before closing application. I couldn't do anything for the pdf file, except to save it. ;]
    What I want to say is, CC (or CS6) is not crashing, it's closing itself.
    - K

  • Unable to incorporate multiple data in BDC * URGENT*

    Hi EveryOne  .
      See the code. This code can do BDC for a single value of store and bonus buy no., in transaction  WPMA
    The current requirement is for a given store all bonus buy values should get populated and then executed each time store wise.
    Eg
        Store                            bonus buy values
        1001                               1
        1001                               2
         1001                              4
         1002                              A
         1002                             L
         1003                             6
         1003                             7
         1003                             H.
    See the code below, and tell me the necessary changes required!!
    report zwpma1
           no standard page heading line-size 255.
    type-pools slis.
    data: wt_fcat type slis_fieldcat_alv.
    data: it_fcat type slis_t_fieldcat_alv.
    data: cnt type sy-tabix.
    *include bdcrecx1.
    types: begin of ty_final,
           store(10) type c,
           docnum type docnum,
           bbynr type bbynr,
           end of ty_final.
    types: begin of ty_final1,
           store(10),
           bbynr type bbynr,
           end of ty_final1.
    data: wa_bonusbuy type zbonusbuy,
          it_bonusbuy type  standard table of zbonusbuy  with header line,
          it_bonusbuy1 type  standard table of ty_final1  with header line,
          it_t001w type  standard table of t001w  with header line,
          it_edidc type  standard table of edidc  with header line,
          it_edid4 type  standard table of edid4  with header line,
          it_final type  standard table of ty_final  with header line,
    *Work areas:
            wa_edidc type edidc,
            wa_edid4 type edid4,
            wa_final type ty_final.
    data :   it_bdcmsgcoll like bdcmsgcoll occurs 0 with header line.
    data: bdcdata like table of bdcdata with header line.
    data: lv_mode(1) value 'N'.
    data : mtext(100) type c,
           mvar1      like balm-msgv1,
           w_msg(200) type c.
    data : l_startt type sy-uzeit,   " Time before Recording
           l_endt type sy-uzeit,     " time after recording
           l_cdate type sy-datum.    " Current date
    start-of-selection.
      call function 'SAPGUI_PROGRESS_INDICATOR'
        exporting
          percentage = 100
          text       = 'Extracting Data.......  '.
      select werks  from t001w  into corresponding fields of table  it_t001w.
      delete adjacent duplicates from it_t001w  comparing werks.
      if not it_t001w[] is initial.
        select store bbynr mmid from  zbonusbuy  into corresponding fields of table it_bonusbuy for all
        entries in it_t001w where store = it_t001w-werks.
        if sy-subrc = 0.
          sort it_bonusbuy by store.
        endif.
      endif.
      refresh it_t001w.
      loop at it_bonusbuy.
        move-corresponding it_bonusbuy to it_bonusbuy1.
        append it_bonusbuy1.
        clear: it_bonusbuy, it_bonusbuy1.
      endloop.
      l_cdate = sy-datum.
      clear l_startt .
      l_startt = sy-uzeit.
      loop at it_bonusbuy.
    *break retaildev.
    *perform open_group.
        perform bdc_dynpro      using 'RWDPOSAN' '1000'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'SO_BBUY-LOW'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=ONLI'.
        perform bdc_field       using 'PA_VKORG'
                                      'HB00'.
        perform bdc_field       using 'PA_VTWEG'
                                      'H2'.
        perform bdc_field       using 'SO_FISEL-LOW'
                                 '1001'.
                                it_bonusbuy-store.
       LOOP AT   it_bonusbuy1 WHERE store = it_bonusbuy-store.
          if sy-subrc = 0.
            perform bdc_field       using 'PA_BBUY'
                                          'X'.
            perform bdc_field       using 'SO_BBUY-LOW'
                                 'TEST_00035'.
                                         it_bonusbuy1-bbynr.
                                          it_bonusbuy-bbynr.
          endif.
          clear it_bonusbuy1.
       ENDLOOP.
    *Refresh: it_bonusbuy1.
        clear bdcdata.
        call transaction 'WPMA' using bdcdata
             mode lv_mode
          UPDATE 'S'
             messages into  it_bdcmsgcoll.
        refresh bdcdata.
        clear it_bonusbuy.
      endloop.
      l_endt = sy-uzeit.
      break retaildev.
      select docnum
             direct
             credat
             cretim
             mestyp
             idoctp
             from edidc into corresponding fields of table it_edidc
             where
             credat = l_cdate and
             ( cretim  ge l_startt and cretim le l_endt )  and
             mestyp = 'WPDBBY'  and
             idoctp = 'WPDBBY01'.  "  "    l_startt and l_endt  and
      break retaildev.
      if sy-subrc = 0.
        select docnum
               counter
               segnum
               segnam
               sdata
               from edid4 into corresponding fields of table it_edid4 for all entries in it_edidc
               where
               docnum = it_edidc-docnum.
      endif.
    *Loop at it_final into wa_final.
      loop at it_edid4 into wa_edid4 where segnam = 'E1WPBB01'.
        wa_final-store = wa_edid4-sdata(10).
        wa_final-docnum = wa_edid4-docnum.
        wa_final-bbynr = wa_edid4-sdata+10(12).
        append wa_final to it_final.
      endloop.
      delete adjacent duplicates from it_final comparing docnum store bbynr.
      sort it_final by store.
      clear: wa_final,wa_edidc, wa_edid4.
      refresh : it_edid4, it_edidc.
    *ALV OutPut
      write :'Following are the Idocs posted successfully Storewise' .
      loop at it_final.
        write :  it_final-store , it_final-docnum , it_final-bbynr   .
      endloop.
    *Break retaildev.
      perform top_of_page.
      perform alv_layout-settings.
      perform zalv_fieldcatpopn using it_fcat.
      perform z_reuse_alv_grid_display.

    Have you tried serialization and sendingas an object using something like Zend AMF?
    Please mark this question as answered if this works for you.
    -Mr.12

  • Getting dump when using do_sum in alv field cat in the output of the report

    Dear Freinds,
                 Iam getting the alv report when i click on the segma field (Sum) on my salary
    field iam getting dump. and also if i try to print my alv output iam getting dump , only
    happening to my custom report.
    i have used the following code pleae correct me .
    This perform is used for Layout settings
      perform st_layout_build  using gs_layout.
    form st_layout_build  using  st_ls_layout type slis_layout_alv.
       st_ls_layout-no_input          = 'X'.
      st_ls_layout-colwidth_optimize = 'X'.
    st_ls_layout-zebra             = 'X'.
    st_ls_layout-detail_popup      = 'X'.
    endform.                    " st_layout_build
    Field Catalog details
    perform st_fieldcat_init changing gt_fieldcat.
    form st_fieldcat_init  changing  fp_i_fieldcat type slis_t_fieldcat_alv.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    = 'Orgunit'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'ORGTEXT'.
      ls_fieldcat-seltext_l    = 'Orgdesc'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'SALARY'.
      ls_fieldcat-seltext_l    = 'Salary'.
      ls_fieldcat-col_pos      = 3.
      ls_fieldcat-outputlen   = 15.
      ls_fieldcat-do_sum       = 'X'.
      ls_fieldcat-datatype     = 'CURR'.    "CURR
      append ls_fieldcat to fp_i_fieldcat.
    endform.
    Variant
      perform st_variant_init  using gs_variant g_repid.
    form st_variant_init   using  st_gs_variant type disvariant
                                 st_repid      like sy-repid.
      clear st_gs_variant.
      st_gs_variant-report = st_repid.
    endform.                    " st_variant_init
      g_repid = sy-repid.
      perform st_comment_build  using gt_list_top_of_page[].
    form st_comment_build  using   st_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.
    Listenüberschrift: Typ H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-000.
      append ls_line to st_lt_top_of_page.
    endform.                    " st_comment_build
         call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
             i_buffer_active        = 'X'
            i_callback_top_of_page = 'TOP_OF_PAGE'
            i_callback_program     = g_repid
            is_layout              = gs_layout
            it_fieldcat            = gt_fieldcat[]
           i_structure_name       = 'i_final'   "c_i_final "'objec'
           i_save                 = g_save
            is_variant             = gs_variant
          tables
            t_outtab               = fp_i_pyrol_final
          exceptions
            program_error          = 1
            others                 = 2.
        if sy-subrc ne 0.
          message e018. " Displaying the ALV GRID has failed
        endif.
    Please could any  one let me know why iam getting dump when iam clicking for total
    on my salary field.
    Regards
    latha

    Dear Chandu,
    my code iam giving in details
    types : begin of ty_output_data,
            staffno     type pernr_d,
            staffname   type emnam,
            grade       type stell,
            orgunit     type orgeh,
            orgtext     type hr_mcstext,
            psgroup     type trfgr,      " Pay Scale Group
            salary      type maxbt,       "PAD_AMT7S,
            rrefunded   type pad_amt7s,
            leavepay    type pad_amt7s,
            mshortfal   type pad_amt7s,   " Medical Shortfall
            echkshfal   type pad_amt7s,   " Execute checkup shortfall
            ofindeduc   type pad_amt7s,   " Other Finance Deduction
            mtyprem     type pad_amt7s,   " maternity premium
            vpbonus     type pad_amt7s,   " VP/Bonus
            gratuity    type pad_amt7s,   " Gratuity
            vpay        type pad_amt7s,   " Variable pay
            mallowance  type pad_amt7s,   " Meal Allowance
            overtime    type pad_amt7s,   " overtime
            other       type  pad_amt7s,  "  OTHER
            pfundeecon  type pad_amt7s,   " PFund Employee's Contribution
            banktrnsfer type pad_amt7s,   " Bank Transfer
            count       type i,
            end of ty_output_data.
    data : i_final         type standard table of ty_output_data.
    iam getting all my data in the internal table  I_FINAL.
    perform get_final_alv  using  i_final.
    form get_final_alv  using   fp_i_pyrol_final type ty_t_output_data.
    *local variable declarations
      data : l_v_idx      type sy-tabix.
    *local work areas
      data : l_wa_final type ty_output_data.
      g_save = 'A'.
    This perform is used for Layout settings
      perform st_layout_build  using gs_layout.
    Field Catalog details
      perform st_fieldcat_init changing gt_fieldcat.
    Variant
      perform st_variant_init  using gs_variant g_repid.
      g_repid = sy-repid.
      perform st_comment_build  using gt_list_top_of_page[].
      if not fp_i_pyrol_final is initial.
        delete adjacent duplicates from fp_i_pyrol_final comparing all fields.
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
             i_buffer_active        = 'X'
            i_callback_top_of_page = 'TOP_OF_PAGE'
            i_callback_program     = g_repid
            is_layout              = gs_layout
            it_fieldcat            = gt_fieldcat[]
           i_structure_name       = 'i_final'   "c_i_final "'objec'
           i_save                 = g_save
            is_variant             = gs_variant
          tables
            t_outtab               = fp_i_pyrol_final
          exceptions
            program_error          = 1
            others                 = 2.
        if sy-subrc ne 0.
          message e018. " Displaying the ALV GRID has failed
        endif.
      endif.
    endform.                    " get_final_alv
    form st_layout_build  using  st_ls_layout type slis_layout_alv.
       st_ls_layout-no_input          = 'X'.
      st_ls_layout-colwidth_optimize = 'X'.
    st_ls_layout-zebra             = 'X'.
    st_ls_layout-detail_popup      = 'X'.
    endform.                    " st_layout_build
    form st_fieldcat_init  changing  fp_i_fieldcat type slis_t_fieldcat_alv.
      data: ls_fieldcat type slis_fieldcat_alv.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    = 'Orgunit'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'ORGTEXT'.
      ls_fieldcat-seltext_l    = 'Orgdesc'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 5.
      ls_fieldcat-fieldname    = 'STAFFNAME'.
    ls_fieldcat-no_out       = 'X'.
      ls_fieldcat-seltext_l    = 'StaffName'.
      append ls_fieldcat to fp_i_fieldcat.
       clear ls_fieldcat.
      ls_fieldcat-col_pos      = 4.
      ls_fieldcat-fieldname    = 'STAFFNO'.
    ls_fieldcat-no_out       = 'X'.
      ls_fieldcat-seltext_l    = 'StaffNo.'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 6.
      ls_fieldcat-fieldname    = 'GRADE'.
      ls_fieldcat-seltext_l    = 'Grade'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 3.
      ls_fieldcat-fieldname    = 'COUNT'.
      ls_fieldcat-seltext_l    = 'Headcount'.
      append ls_fieldcat to fp_i_fieldcat.
    if the field name is 'Salary' then do a sum on this field.
    IF  fp_fname = c_betrg.
        l_wa_fieldcat-do_sum    = c_x.
    ENDIF.
    NOTE : IAM GETTING PROBLEM IN THE BELOW SALARY.
    IAM JUST CHECKING ITSELF NOT ALLOWING ME TO EXECUTE
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'SALARY'.
      ls_fieldcat-seltext_l    = 'Salary'.
      ls_fieldcat-col_pos      = 7.
      ls_fieldcat-outputlen   = 20.
      ls_fieldcat-do_sum       = 'X'.
      ls_fieldcat-datatype     = 'CURR'.    "CURR
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 9.
      ls_fieldcat-fieldname    = 'LEAVEPAY'.
      ls_fieldcat-seltext_l    = 'Leave Pay'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 10.
      ls_fieldcat-fieldname    = 'MSHORTFAL'.
      ls_fieldcat-seltext_l    = 'Med.Sfall'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 11.
      ls_fieldcat-fieldname    = 'ECHKSHFAL'.
      ls_fieldcat-seltext_l    = 'EX.Chckup.Sfall'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 12.
      ls_fieldcat-fieldname    = 'OFINDEDUC'.
      ls_fieldcat-seltext_l    = 'Oth.Fin.Deduction'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 13.
      ls_fieldcat-fieldname    = 'MTYPREM'.
      ls_fieldcat-seltext_l    = 'Mat.Premium'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 14.
      ls_fieldcat-fieldname    = 'VPBONUS'.
      ls_fieldcat-seltext_l    = 'VP/Bonus'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 15.
      ls_fieldcat-fieldname    = 'GRATUITY'.
      ls_fieldcat-seltext_l    = 'Gratuity'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 16.
      ls_fieldcat-fieldname    = 'VPAY'.
      ls_fieldcat-seltext_l    = 'Variable Pay'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 17.
      ls_fieldcat-fieldname    = 'MALLOWANCE'.
      ls_fieldcat-seltext_l    = 'Meal.Allowance'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 18.
      ls_fieldcat-fieldname    = 'OVERTIME'.
      ls_fieldcat-seltext_l    = 'Overtime'.
      append ls_fieldcat to fp_i_fieldcat.
        clear ls_fieldcat.
      ls_fieldcat-col_pos      = 19.
      ls_fieldcat-fieldname    = 'OTHER'.
      ls_fieldcat-seltext_l    = 'Other'.
      append ls_fieldcat to fp_i_fieldcat.
    pfundeecon
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 20.
      ls_fieldcat-fieldname    = 'P FUND EMPLOYEES CONTRIBUTION'.
      ls_fieldcat-seltext_l    = 'P.Fund.Emp.Contrib'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 21.
      ls_fieldcat-fieldname    = 'BANKTRNSFER'.
      ls_fieldcat-seltext_l    = 'Payment'.
      append ls_fieldcat to fp_i_fieldcat.
    endform.                    " st_fieldcat_init
    form st_variant_init   using  st_gs_variant type disvariant
                                 st_repid      like sy-repid.
      clear st_gs_variant.
      st_gs_variant-report = st_repid.
    endform.                    " st_variant_init
    form st_comment_build  using   st_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.
    Listenüberschrift: Typ H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-000.
      append ls_line to st_lt_top_of_page.
    endform.                    " st_comment_build
          FORM TOP_OF_PAGE                                              *
    form top_of_page.
      data: l_i_detailheader type slis_t_listheader.
    To get the header for ALV
      perform detail_header changing l_i_detailheader.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = l_i_detailheader.
    endform.                    "top_of_page
    form detail_header  changing fp_i_detailheader type slis_t_listheader.
      data: l_wa_header       type slis_listheader,
            l_v_time         type slis_edit_mask,
            l_v_date         type slis_edit_mask,
            l_v_abkrs        type char5,
            l_v_pabrj        type char8,
            l_v_pagno        type char10.
    Local Constants
      constants: l_c_h type char1 value 'H',
                 l_c_1  type i     value '1',
                 l_c_edit type char10 value '__.__.____',
                 l_c_slash  type c value '/'. " constant for slash
    To display the report Header
      l_wa_header-typ = l_c_h.
    WRITE sy-repid TO l_wa_header-info LEFT-JUSTIFIED.
      write text-014  to l_wa_header-info left-justified.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To display the Page no
      l_v_pagno =   sy-pagno + l_c_1.
      l_wa_header-typ = c_s.
      l_wa_header-key = text-008. " Page No:
      l_wa_header-info =  l_v_pagno.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To Display the User ID
      l_wa_header-typ = c_s.
      l_wa_header-key = text-009. " User ID
      l_wa_header-info = sy-uname.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To Display the Date/Time
      l_wa_header-typ = c_s.
      l_wa_header-key = text-010. " Date/Time:
      l_v_time = sy-uzeit.
      l_v_date = sy-datum.
      write: sy-uzeit to l_v_time.
      write sy-datum to l_v_date using edit mask l_c_edit.
      concatenate l_v_date
                  l_c_slash
                  l_v_time into l_wa_header-info+0(25) separated by space.
      append l_wa_header to fp_i_detailheader.
      clear: l_wa_header, l_v_date.
    To Display the Report Description
      l_wa_header-typ = c_s.
      l_wa_header-key = text-011.                " Report Description
      l_wa_header-info = text-012.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
      append l_wa_header to fp_i_detailheader.
    endform.                    " detail_header
    I will be greatful if any one can please help me in removing me the dump.
    REGARDS
    LATHA.

  • Netweaver 2004S installation on Windows 2003 server : Oracle 10g Problem

    Hi Friends,
    I am installing the SAP Netweaver 2004s on a server which has Windows 2003 server Operating system  on it.
    It has got 6GB RAM  and  has, 5gb of free space in C drive, H: drive has 70 gb and I: drive has 50 GB of free space in it.
    I am running  Pre_requiste checker tool to check my hardware & software requirements in order to go ahead with installation, as a part of SAPInst.exe execution.
    The results of Prerequisite checker tool are satisfied  except for one  " SWAP SPACE VALUES"
    I am getting the message as follows
    "The Minimum SWAP SPACE values required is 10994MB and currently you have 5993MB"
    How to increase this SWAP space value? Please let me know the procedure.
    Currently my server has a paging file details as below : Min size : 2MB & Max size : 9214MB allocated on C: drive. No other drive has paging file allocation.
    What effect will I have if i proceed without meeting this requirement??
    Suitable answers will be rewarded.
    Thanks
    Diwakar

    OPen windows explorer and right click my computer
    Select Properties
    Click Advanced Tab
    Click Settings (performance)
    Select Advanced Tab
    In virtual memory - click change.
    Increase swap space/page file here.

  • Netweaver 2004s installation problem on Windows: Oracle 10G

    Hi Friends,
    I would like to install Netweaver 2004S(with usage types AS ABAP, AS JAVA, BI, BI JAVA, EP & DI) on a server which has Windows 2003 server OS running on it.
    The server has 6GB RAM and has 5GB of free space on C: and a free sapce  of 60GB on H: & 50GB on I: respectively.The database that is to be used is Oracle 10g.
    Do I need to install first SAP solution manger 4.0 on this or Can i proceed with Netweaver  2004 S installation???
    I am installing a central system.
    First I tried installing SAP solution manger 4.0 on this system and it went successfully. Now when i am installing Netweaver 2004s on the same machine, during installation I am asked whether to "install a MCOD or create a new database for this installation".
    I chose Install MCOD and proceeded  further with Installation. But my installation is taking a lot of time while executing the service :"Creating database schema". The message which i get on status bar is " Removing schema user SAPSR3" and the status remains the same.
    Have any of you faced this problem ? Please let me know how you have proceeded further.
    Before starting the installation  one of the prerequisites " SWAP SPACE VALUES" for installation was not satisfied by my system  and even then i proceeded with the installation.
    Is it because of this SWAP space problem , my intsallation is strcuk?? or what could be the reason fo this?
    Thanks
    Diwakar

    Hello Diwakar, 
    If you are just installing NW2004s then it is not mandatory to install Solution manager.
    To increase the swap space --
    Right click my on computer ->Select Properties -> Click Advanced Tab ->Click Settings (performance) -> Select Advanced Tab -> In virtual memory -> Change
    you canIncrease swap space/page file here.
    Do not install the system as MCOD, make the seperate database.
    Do revert for further doubt.
    Best Regards,
    Sachin.

  • To Download file to desktop

    Hi All,
    i have two checkbox options for the output,
    1. create file
    2.create detail report
    If the Create file is checked, then i've to proceed with transfer of file and then show the selection screen data and the no of records transferred.
    If the create Detailed Report is check, then proceed with the ALV display.
    i.e here we should not transfer the file but display only the records and the top of page for the ALV should be displayed
    If the Create file and Detailed report is both checked, the file transfer should occur and then we have to show the ALV output and the top-of-page for ALV only.
    i.e here we should add the no of data transferred, Date and the physical path should be displayed in the top-of-page.
    please tell me how to do.
    REPORT ZPPI0036
    $$----
    $$ Standard routines and definitions
    $$----
    Include ZBSN0001.                      "Report Headers
    Include ZBSN0003.                      "Common Routines
    INCLUDE ZSDN0004.                      "Common Routines
    $$----
    $$ Tables-definitions
    $$----
    TABLES : ZVMATLMOVE,
             T161,
             T001W,
             T024E,
             T156,
             EKKO,
             LFA1,
             TVARV,
             MARA,
             MARC,
             EKPO,
             T024,                                        
             Z_LFA1,                                       
             M_PRCTN.                                      
    $$----
    $$ Internal tables definition
    $$----
                                                      Begin of SIR 090216
    *DATA  I_MATLMOVE LIKE ZVMATLMOVE OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF I_MATLMOVE OCCURS 0,
             MBLNR  TYPE MSEG-MBLNR,
             MJAHR  TYPE MSEG-MBLNR,
             BUDAT  TYPE MKPF-BUDAT,
             ZEILE  TYPE MSEG-ZEILE,
             BWART  TYPE MSEG-BWART,
             MATNR  TYPE MSEG-MATNR,
             WERKS  TYPE MSEG-WERKS,
             LGORT  TYPE MSEG-LGORT,                      
             LIFNR  TYPE MSEG-LIFNR,
             WAERS  TYPE MSEG-WAERS,
             MENGE  TYPE MSEG-MENGE,
             MEINS  TYPE MSEG-MEINS,
             EBELN  TYPE MSEG-EBELN,
             EBELP  TYPE MSEG-EBELP,
             PRCTR  TYPE MSEG-PRCTR,                      
           END OF I_MATLMOVE.
    DATA : BEGIN OF I_OUTPUT OCCURS 0.
              INCLUDE STRUCTURE ZIP1401OUT.
    DATA:  END OF I_OUTPUT.
    DATA: BEGIN OF I_T156 OCCURS 0,
            BWART TYPE T156-BWART,
            SHKZG TYPE T156-SHKZG,
          END   OF I_T156.
    DATA: BEGIN OF I_EKKO OCCURS 0,
            EBELN TYPE EKKO-EBELN,
            BSTYP TYPE EKKO-BSTYP,
            BSART TYPE EKKO-BSART,
            LIFNR TYPE EKKO-LIFNR,
            EKORG TYPE EKKO-EKORG,
            WAERS TYPE EKKO-WAERS,
          END   OF I_EKKO.
    DATA: BEGIN OF I_EKPO OCCURS 0,
            EBELN TYPE EKPO-EBELN,
            EBELP TYPE EKPO-EBELP,
            TXZ01 TYPE EKPO-TXZ01,
            MATKL TYPE EKPO-MATKL,
            MENGE TYPE EKPO-MENGE,
            NETPR TYPE EKPO-NETPR,
            PEINH TYPE EKPO-PEINH,
          KO_PRCTR TYPE EKPO-KO_PRCTR,                    
          END   OF I_EKPO.
    DATA: BEGIN OF I_MARC OCCURS 0,
            MATNR TYPE MARC-MATNR,
            WERKS TYPE MARC-WERKS,
            MAABC TYPE MARC-MAABC,
            EKGRP TYPE MARC-EKGRP,
          END   OF I_MARC.
    DATA: I_MATLMOVE_TMP LIKE I_MATLMOVE OCCURS 0.
    DATA: I_EKKO_TMP     LIKE I_EKKO OCCURS 0.
    DATA: I_EKPO_TMP     LIKE I_EKPO OCCURS 0.
    DATA: I_MARC_TMP     LIKE I_MARC OCCURS 0.
    DATA: BEGIN OF I_MBEW OCCURS 0,
            MATNR TYPE MBEW-MATNR,
            BWKEY TYPE MBEW-BWKEY,
            VPRSV TYPE MBEW-VPRSV,
            VERPR TYPE MBEW-VERPR,
            STPRS TYPE MBEW-STPRS,
          END   OF I_MBEW.
    DATA: BEGIN OF I_T024 OCCURS 0,
            EKGRP TYPE T024-EKGRP,
            EKNAM TYPE T024-EKNAM,
          END   OF I_T024.
    DATA: BEGIN OF I_LFA1 OCCURS 0,
            LIFNR TYPE Z_LFA1-LIFNR,
            NAME1 TYPE Z_LFA1-NAME1,
          END   OF I_LFA1.
    DATA: BEGIN OF I_PRCTN OCCURS 0,
            PRCTR TYPE M_PRCTN-PRCTR,
            MCTXT TYPE M_PRCTN-MCTXT,
          END   OF I_PRCTN.
    $$----
    $$ Variables defintions
    $$----
    DATA  V_FILE_CNT TYPE I.
    DATA  V_LASTRUN_DATE LIKE SY-DATUM.
    data  v_lastrun_time like sy-uzeit.
    data  v_lastrun_time_n_date(30).
    DATA  V_NAME         LIKE TVARV-NAME.
    DATA  V_TEMP1(10)    TYPE P DECIMALS 4.                
    $$----
    $$ Constants definitions
    $$----
    CONSTANTS: C_VPRSV_S(1) TYPE C VALUE 'S',
               C_VPRSV_V(1) TYPE C VALUE 'V',
               C_SHKZG_H(1) TYPE C VALUE 'H'.
            Definitions needed for ALV-grid-processing
    type-pools: slis,
                sscr.
             Variables defintions
    data:      v_restrict      type  sscr_restrict,
               v_assn          type  sscr_***,
               v_opt_list      type  sscr_opt_list.
             ALV types
             Field catalog with field descriptions.
    data:      i_fieldcat_alv    type slis_t_fieldcat_alv,
               i_list_comments   type slis_t_listheader,
               v_list_comments   like line of i_list_comments,
               i_events          type slis_t_event,
             Sort criteria for first list display.
               lt_sort_fieldcat  type slis_t_sortinfo_alv,
               ls_sort_fieldcat  type slis_sortinfo_alv,
               v_layout          type slis_layout_alv,
               v_fieldcat_alv    like line of i_fieldcat_alv,
               v_events          like line of i_events,
               v_repid           like sy-repid,
               v_variant         like disvariant,
               wa_variant        like disvariant,
               wa_variant_save   type c,
               wa_exit           type c,
               wa_repid          like sy-repid.
             Constants definitions
    constants: c_x(1)            type c value 'X',
               c_alv_subtotals_summary type slis_formname
                                 value 'ALV_SUBTOTALS_SUMMARY',
               c_top_of_page     type slis_formname value 'F_TOP_OF_PAGE',
               c_a(1)            type c             value 'A'.
    $$----
    $$ Select-options and parameters
    $$----
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS : S_WERKS FOR T001W-WERKS,
                     S_EKORG FOR T024E-EKORG,
                     S_LIFNR FOR LFA1-LIFNR,
                     S_MATNR FOR MARA-MATNR,
                     S_BWART FOR T156-BWART,
                     S_EBELN FOR EKKO-EBELN,
                     S_BSTYP FOR T161-BSTYP NO INTERVALS,
                     S_BSART FOR T161-BSART NO INTERVALS.
    PARAMETERS:      P_WAERS LIKE T001-WAERS DEFAULT 'USD' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK E WITH FRAME.
    PARAMETERS: P_FILE AS CHECKBOX,
                P_REPORT AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK E.
    selection-screen begin of block file01 with frame.
    PARAMETERS: P_FILEID(6).
    PARAMETERS: P_LF_01 LIKE FILETEXTCI-FILEINTERN
                        DEFAULT 'Z_IP1401_RECEIPT_EXTRACT',
                P_PF_01 LIKE V_FILENACI-FILEEXTERN.
    selection-screen end of block file01.
    SELECTION-SCREEN BEGIN OF BLOCK DT WITH FRAME.
    selection-screen skip 1.
    SELECTION-SCREEN COMMENT 1(65) TEXT-D00.
    PARAMETERS: P_DATE LIKE SY-DATUM.
    selection-screen skip 1.
    SELECTION-SCREEN END OF BLOCK DT.
    selection-screen begin of block sb with frame.
    selection-screen skip 1.
    selection-screen comment 10(65) text-X00.
    selection-screen skip 1.
    selection-screen comment 10(65) text-X01.
    selection-screen skip 1.
    selection-screen comment 10(65) text-X02.
    selection-screen end of block sb.
    $$----
    $$ initialization.
    $$----
    initialization.
        PERFORM GET_FILE_NAME USING P_LF_01 P_FILEID '' CHANGING P_PF_01.
    $$----
    $$ At Selection-Screen.
    $$----
    At Selection-Screen.
    IF P_FILE IS INITIAL AND P_REPORT IS INITIAL.
        MESSAGE E100.
      endif.
    If not p_lf_01 is initial.
        PERFORM GET_FILE_NAME USING P_LF_01 P_FILEID '' CHANGING P_PF_01.
      endif.
    $$----
    $$ Start-of-selection.
    $$----
    Start-of-selection.
      IF P_FILE = 'X'.
       PERFORM OPEN_DATASETS.
      ENDIF.
      CLEAR V_LASTRUN_DATE.
      CONCATENATE SY-CPROG P_FILEID INTO V_NAME.
      IF P_DATE IS INITIAL.
        PERFORM GET_LASTRUN_DATE.
      ELSE.
        V_LASTRUN_DATE = P_DATE.
      ENDIF.
      PERFORM SELECT_T156.
      PERFORM SELECT_ZVMATLMOVE.
      IF NOT I_MATLMOVE[] IS INITIAL.
        PERFORM SELECT_SUPPORTING_DATA.
        PERFORM PROCESS_DATA.
      ENDIF.
    Prepare the data to display the report as ALV GRID.
      perform process_alv_grid.
    $$----
    $$ End-of-selection.
    $$----
    End-of-selection.
    to change the sorting sequence for the output
      SORT I_OUTPUT BY MATNR BUDAT MJAHR.                   
      IF P_FILE = 'X'.
       PERFORM WRITE_TO_FILE.
      ENDIF.
      IF P_REPORT = 'X'.
      PERFORM WRITE_TO_REPORT.
      ENDIF.
    Perform Close_datasets.
    PERFORM UPDATE_TVARV.
    PERFORM ZSDN0004_PRINT_SELECT_OPTIONS
             USING SY-CPROG ' '.
    PERFORM FINAL_STATS.
    $$----
    $$ Top-of-page.
    $$----
    Top-of-page.
      FORMAT COLOR 2.
      PERFORM ZBSN0001_STANDARD_HEADER USING SPACE SYST-TITLE SPACE SPACE.
      FORMAT COLOR OFF.
    *Top-of-page.
    form f_top_of_page.
      clear  v_list_comments.
      refresh i_list_comments.
      v_list_comments-typ = 'H'.
      move: text-h01 to v_list_comments-info.
      append  v_list_comments  to  i_list_comments .
      clear  v_list_comments .
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary       = i_list_comments
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    endform.                                     "f_top_of_page.
    $$----
    $$ Form Open_Datasets.
    $$----
    *Form Open_Datasets.
      perform open_file using p_pf_01 'OUTPUT   ' 'TEXT  '.
    *Endform.
    $$----
    $$ Form  GET_LASTRUN_DATE
    $$----
    FORM GET_LASTRUN_DATE.
    Get the last run date from TVARV
      SELECT SINGLE LOW FROM TVARV
                        INTO TVARV-LOW
                        WHERE NAME = V_NAME
                          AND TYPE = 'P'
                          AND NUMB = 0.
      IF SY-SUBRC NE 0.
      If it does not exist then a full refresh will be sent
      ELSE.
        V_LASTRUN_DATE = TVARV-LOW+0(8).
      ENDIF.
    ENDFORM.
    $$----
    $$ Form  SELECT_T156
    $$----
    FORM SELECT_T156 .
    Get all of the info on the movement types that will be selected
      SELECT BWART              "Movement Type
             SHKZG              "Debit/Credit Indicator
        FROM T156
        INTO TABLE I_T156
        WHERE BWART IN S_BWART.
    ENDFORM.                    " SELECT_T156
    $$----
    $$ Form  SELECT_ZVMATLMOVE
    $$----
    FORM SELECT_ZVMATLMOVE .
    Get Material Document, Year of Material Doc, Item in Material Doc,
    PO number, PO line item, Posting Date, Movement Type, Plant,
    Purchasing Org, Material Group, Material number, Vendor Id,
    Currency Key, Quantity Recieved, UOM, Storage location from View of
    Material Doc Header and Items to the internal table I_MATLMOVE
      SELECT MBLNR
             MJAHR
             BUDAT
             ZEILE
             BWART                                         
             MATNR
             WERKS
             LGORT                                         
             LIFNR
             WAERS
             MENGE
             MEINS
             EBELN
             EBELP
             PRCTR                                         
        FROM ZVMATLMOVE
        INTO TABLE I_MATLMOVE
       WHERE BUDAT >= V_LASTRUN_DATE
         AND BWART IN S_BWART
         AND MATNR IN S_MATNR
         AND WERKS IN S_WERKS
         AND LIFNR IN S_LIFNR
         AND EBELN IN S_EBELN.
    ENDFORM.                    " SELECT_ZVMATLMOVE
    $$----
    $$ Form  SELECT_SUPPORTING_DATA
    $$----
    FORM SELECT_SUPPORTING_DATA .
      I_MATLMOVE_TMP[] = I_MATLMOVE[].
      SORT I_MATLMOVE_TMP BY EBELN.
      DELETE ADJACENT DUPLICATES FROM I_MATLMOVE_TMP COMPARING EBELN.
    Get Purchasing org, Currency, Account No, Purchasing doc category,
    Purchasing Document Type from Purchasing Document Header table
      SELECT EBELN          "Purchasing Document Number
             BSTYP          "Purchasing document category
             BSART          "Purchasing Document Type
             LIFNR          "Account Number of the Vendor
             EKORG          "Purchasing Organization
             WAERS          "Currency Key
        FROM EKKO
        INTO TABLE I_EKKO
         FOR ALL ENTRIES IN I_MATLMOVE_TMP
       WHERE EBELN = I_MATLMOVE_TMP-EBELN
         AND EKORG IN S_EKORG
         AND BSART IN S_BSART
         AND BSTYP IN S_BSTYP.
      CLEAR   I_MATLMOVE_TMP.
      REFRESH I_MATLMOVE_TMP.
      I_MATLMOVE_TMP[] = I_MATLMOVE[].
      SORT I_MATLMOVE_TMP BY EBELN EBELP.
      DELETE ADJACENT DUPLICATES
                 FROM I_MATLMOVE_TMP COMPARING EBELN EBELP.
    Get the material group and the net price from the PO Line item
      SELECT EBELN            "Purchasing Document Number
             EBELP            "Item Number of Purchasing Document
             TXZ01            "Short text
             MATKL            "Material Group
             MENGE            "Purchase order quantity
             NETPR            "Net price in purchasing document
             PEINH            "Price unit
           KO_PRCTR         "Profit Center                
        FROM EKPO
        INTO TABLE I_EKPO
         FOR ALL ENTRIES IN I_MATLMOVE_TMP
       WHERE EBELN = I_MATLMOVE_TMP-EBELN
         AND EBELP = I_MATLMOVE_TMP-EBELP.
      CLEAR   I_MATLMOVE_TMP.
      REFRESH I_MATLMOVE_TMP.
      I_MATLMOVE_TMP[] = I_MATLMOVE[].
      SORT I_MATLMOVE_TMP BY MATNR WERKS.
      DELETE ADJACENT DUPLICATES
                 FROM I_MATLMOVE_TMP COMPARING MATNR WERKS.
    Get the Purchasing Group from the Plant Data for Material table
      SELECT MATNR            "Material Number
             WERKS            "Plant
             MAABC            "ABC indicator
             EKGRP            "Purchasing Group
        FROM MARC
        INTO TABLE I_MARC
         FOR ALL ENTRIES IN I_MATLMOVE_TMP
       WHERE MATNR = I_MATLMOVE_TMP-MATNR
         AND WERKS = I_MATLMOVE_TMP-WERKS.
    Get the standard price from the Material Valuation table
      SELECT MATNR            "Material Number
             BWKEY            "Valuation area
             VPRSV            "Price Control Indicator
             VERPR            "Moving Average Price
             STPRS            "Standard Price
        FROM MBEW
        INTO TABLE I_MBEW
         FOR ALL ENTRIES IN I_MATLMOVE_TMP
       WHERE MATNR = I_MATLMOVE_TMP-MATNR
         AND BWKEY = I_MATLMOVE_TMP-WERKS.
      IF NOT I_MARC[] IS INITIAL.
        I_MARC_TMP[] = I_MARC[].
        SORT I_MARC_TMP BY EKGRP.
        DELETE ADJACENT DUPLICATES
                   FROM I_MARC_TMP COMPARING EKGRP.
      Get the Buyer name from the purchasing groups table
        SELECT EKGRP            "Purchasing Group
               EKNAM            "Description of purchasing group
          FROM T024
          INTO TABLE I_T024
           FOR ALL ENTRIES IN I_MARC_TMP
         WHERE EKGRP = I_MARC_TMP-EKGRP.
      ENDIF.
      IF NOT I_EKKO[] IS INITIAL.
        I_EKKO_TMP[] = I_EKKO[].
        SORT I_EKKO_TMP BY LIFNR.
        DELETE ADJACENT DUPLICATES
                   FROM I_EKKO_TMP COMPARING LIFNR.
      Get the Vendor name from the Vendor Master (General Data subset)
        SELECT LIFNR            "Account Number of Vendor or Creditor
               NAME1            "Name 1
          FROM Z_LFA1
          INTO TABLE I_LFA1
           FOR ALL ENTRIES IN I_EKKO_TMP
         WHERE LIFNR = I_EKKO_TMP-LIFNR.
      ENDIF.
    IF NOT I_EKPO[] IS INITIAL.
       I_EKPO_TMP[] = I_EKPO[].
       SORT I_EKPO_TMP BY KO_PRCTR.
       DELETE ADJACENT DUPLICATES
                  FROM I_EKPO_TMP COMPARING KO_PRCTR.
        I_MATLMOVE_TMP[] = I_MATLMOVE[].
        SORT I_MATLMOVE_TMP BY PRCTR.
        DELETE ADJACENT DUPLICATES
                   FROM I_MATLMOVE_TMP COMPARING PRCTR.
                                                        End of SIR 301081
      Get the Profit center name from the Generated view for matchcodeID
      PRCT-N
        SELECT PRCTR            "Profit Center
               MCTXT            "Search term for matchcode search
          FROM M_PRCTN
          INTO TABLE I_PRCTN
         FOR ALL ENTRIES IN I_EKPO_TMP                  
       WHERE PRCTR = I_EKPO_TMP-KO_PRCTR.               
           FOR ALL ENTRIES IN I_MATLMOVE_TMP              
         WHERE PRCTR = I_MATLMOVE_TMP-PRCTR.              
    ENDIF.                                             
      CLEAR: I_MATLMOVE_TMP,
             I_EKKO_TMP,
             I_EKPO_TMP,
             I_MARC_TMP.
      REFRESH: I_MATLMOVE_TMP,
               I_EKKO_TMP,
               I_EKPO_TMP,
               I_MARC_TMP.
    ENDFORM.                    " SELECT_SUPPORTING_DATA
    $$----
    $$ Form  PROCESS_DATA
    $$----
    FORM PROCESS_DATA .
      SORT I_EKKO  BY EBELN.
      SORT I_MARC  BY MATNR WERKS.
      SORT I_EKPO  BY EBELN EBELP.
      SORT I_MBEW  BY MATNR BWKEY.
      SORT I_T024  BY EKGRP.
      SORT I_LFA1  BY LIFNR.
      SORT I_PRCTN BY PRCTR.
    Loop the internal I_MATLMOVE and move the corresponding values to
    the internal table I_OUTPUT
      LOOP AT I_MATLMOVE.
        CLEAR V_TEMP1.
      Move the Purchasing document category, Purchasing Document Type,
      Account Number of the Vendor , Purchasing Organization from table
      Purchasing Document Header to the internal table I_OUTPUT
        CLEAR I_EKKO.
        READ TABLE I_EKKO WITH KEY EBELN = I_MATLMOVE-EBELN
                                   BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          I_OUTPUT-BSTYP    = I_EKKO-BSTYP.
          I_OUTPUT-BSART    = I_EKKO-BSART.
          I_OUTPUT-LIFNR    = I_EKKO-LIFNR.
          I_OUTPUT-EKORG    = I_EKKO-EKORG.
        Move the Vendor name from view Vendor Master(General Data subset)
        to the internal table I_OUTPUT
          CLEAR I_LFA1.
          READ TABLE I_LFA1 WITH KEY LIFNR = I_EKKO-LIFNR
                                     BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            I_OUTPUT-LIFNR1 = I_LFA1-LIFNR.
            I_OUTPUT-NAME1  = I_LFA1-NAME1.
          ENDIF.
        ENDIF.
      Move the ABC indicator,Purchasing Group from table Plant Data for
      Material to the internal table I_OUTPUT
        CLEAR I_MARC.
        READ TABLE I_MARC WITH KEY MATNR = I_MATLMOVE-MATNR
                                   WERKS = I_MATLMOVE-WERKS
                                   BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          I_OUTPUT-MAABC   = I_MARC-MAABC.
          I_OUTPUT-EKGRP   = I_MARC-EKGRP.
        Move the Buyer name from table Purchasing Group into the internal
        table I_OUTPUT
          CLEAR I_T024.
          READ TABLE I_T024 WITH KEY EKGRP = I_MARC-EKGRP
                                     BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            I_OUTPUT-EKNAM = I_T024-EKNAM.
          ENDIF.
        ENDIF.
      Move the Material Description, Material Group, Purchase order qty,
      Net price in purchasing doc, Profit Center from the table
      Purchasing Document Item to the internal table I_OUTPUT
        CLEAR I_EKPO.
        READ TABLE I_EKPO WITH KEY EBELN = I_MATLMOVE-EBELN
                                   EBELP = I_MATLMOVE-EBELP
                                   BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          I_OUTPUT-TXZ01    = I_EKPO-TXZ01.
          I_OUTPUT-MATKL    = I_EKPO-MATKL.
          I_OUTPUT-MENGE1   = I_EKPO-MENGE.
        I_OUTPUT-KO_PRCTR = I_EKPO-KO_PRCTR.            
        Convert to the currency of the input parameter
          PERFORM CONVERT_CURRENCY USING I_EKKO-WAERS
                                         P_WAERS
                                         I_EKPO-NETPR
                                CHANGING I_EKPO-NETPR.
          V_TEMP1 = I_EKPO-NETPR / I_EKPO-PEINH.
        Deleting commas to the purchase order quantity
          IF I_OUTPUT-MENGE1 IS NOT INITIAL.
            PERFORM DELETE_COMMAS CHANGING I_OUTPUT-MENGE1.
            SHIFT I_OUTPUT-MENGE1 RIGHT CIRCULAR.
            CONDENSE I_OUTPUT-MENGE1 NO-GAPS.
            SHIFT I_OUTPUT-MENGE1 RIGHT DELETING TRAILING SPACE.
          ENDIF.
        Move the Profit Center name (text) from Generated view for
        matchcode ID PRCT-N to the internal table I_OUTPUT
          CLEAR I_PRCTN.
                                                      Begin of SIR 301081
        READ TABLE I_PRCTN WITH KEY PRCTR = I_EKPO-KO_PRCTR
                                    BINARY SEARCH.
          READ TABLE I_PRCTN WITH KEY PRCTR = I_MATLMOVE-PRCTR
                                      BINARY SEARCH.
                                                        End of SIR 301081
          IF SY-SUBRC EQ 0.
            I_OUTPUT-MCTXT = I_PRCTN-MCTXT.
          ENDIF.
        ENDIF.
      Move the Standard Price from table Material Valuation to the
      internal table I_OUTPUT
        CLEAR I_MBEW.
        READ TABLE I_MBEW WITH KEY MATNR = I_MATLMOVE-MATNR
                                   BWKEY = I_MATLMOVE-WERKS
                                   BINARY SEARCH.
        IF SY-SUBRC EQ 0.
        To check the Price control indicator
        S for Standard Price
        V for Moving price
          IF I_MBEW-VPRSV EQ C_VPRSV_S.
          Convert to the currency of the input parameter
            PERFORM CONVERT_CURRENCY USING I_EKKO-WAERS
                                           P_WAERS
                                           I_MBEW-STPRS
                                  CHANGING I_MBEW-STPRS.
            I_OUTPUT-STPRS = I_MBEW-STPRS.
          ELSEIF I_MBEW-VPRSV EQ C_VPRSV_V.
          Convert to the currency of the input parameter
            PERFORM CONVERT_CURRENCY USING I_EKKO-WAERS
                                           P_WAERS
                                           I_MBEW-VERPR
                                  CHANGING I_MBEW-VERPR.
            I_OUTPUT-STPRS = I_MBEW-VERPR.
          ENDIF.
        ENDIF.
      Move the PO number, Material Document, Year of Material Doc,
      Item in Material Doc, PO line item, Plant, Material Number,
      Vendor Id, UOM, Currency Key, Movement Type, Storage location,
      Profit Center from view View of Material Doc Header and Items
      to the internal table I_OUTPUT
        I_OUTPUT-EBELN = I_MATLMOVE-EBELN.
        I_OUTPUT-MBLNR = I_MATLMOVE-MBLNR.
        I_OUTPUT-MJAHR = I_MATLMOVE-MJAHR.
        I_OUTPUT-ZEILE = I_MATLMOVE-ZEILE.
        I_OUTPUT-EBELP = I_MATLMOVE-EBELP.
        I_OUTPUT-WERKS = I_MATLMOVE-WERKS.
        I_OUTPUT-MATNR = I_MATLMOVE-MATNR.
        I_OUTPUT-LIFNR = I_MATLMOVE-LIFNR.
        I_OUTPUT-MEINS = I_MATLMOVE-MEINS.
        I_OUTPUT-WAERS = P_WAERS.
        I_OUTPUT-BWART = I_MATLMOVE-BWART.
        I_OUTPUT-LGORT = I_MATLMOVE-LGORT.
        I_OUTPUT-KO_PRCTR = I_MATLMOVE-PRCTR.              
        WRITE I_MATLMOVE-BUDAT TO I_OUTPUT-BUDAT.
      Multiply amt and qty by -1 if the movement type is a credit
        CLEAR I_T156.
        READ TABLE I_T156 WITH KEY BWART = I_MATLMOVE-BWART.
        IF I_T156-SHKZG = C_SHKZG_H.
          V_TEMP1 = V_TEMP1 * -1.
          I_MATLMOVE-MENGE = I_MATLMOVE-MENGE * -1.
          WRITE I_MATLMOVE-MENGE TO I_OUTPUT-MENGE UNIT I_MATLMOVE-MEINS.
          PERFORM DELETE_COMMAS CHANGING I_OUTPUT-MENGE.
          SHIFT I_OUTPUT-MENGE RIGHT CIRCULAR.
          CONDENSE I_OUTPUT-MENGE NO-GAPS.
          SHIFT I_OUTPUT-MENGE RIGHT DELETING TRAILING SPACE.
        ELSE.
          WRITE I_MATLMOVE-MENGE TO I_OUTPUT-MENGE UNIT I_MATLMOVE-MEINS.
          PERFORM DELETE_COMMAS CHANGING I_OUTPUT-MENGE.
        ENDIF.
      Formatting the PO unit price
        I_OUTPUT-NETPR = V_TEMP1.
        SHIFT I_OUTPUT-NETPR RIGHT CIRCULAR.
        CONDENSE I_OUTPUT-NETPR NO-GAPS.
        SHIFT I_OUTPUT-NETPR RIGHT DELETING TRAILING SPACE.
        APPEND I_OUTPUT.
        CLEAR I_OUTPUT.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    $$----
    $$ Form  WRITE_TO_FILE
    $$----
    *FORM WRITE_TO_FILE.
    LOOP AT I_OUTPUT.
       V_FILE_CNT = V_FILE_CNT + 1.
       TRANSFER I_OUTPUT TO P_PF_01 LENGTH 312.
    ENDLOOP.
    *ENDFORM.
    $$----
    $$ Form  WRITE_TO_REPORT
    $$----
    *FORM WRITE_TO_REPORT.
    PERFORM WRITE_HEADINGS.
    LOOP AT I_OUTPUT.
       WRITE : / I_OUTPUT-MBLNR.
       WRITE I_OUTPUT-MJAHR.
       WRITE I_OUTPUT-ZEILE.
       WRITE I_OUTPUT-EBELN.
       WRITE I_OUTPUT-EBELP.
       WRITE I_OUTPUT-BUDAT.
       WRITE I_OUTPUT-WERKS.
       WRITE I_OUTPUT-EKORG.
       WRITE I_OUTPUT-MATKL.
       WRITE I_OUTPUT-MATNR.
       WRITE I_OUTPUT-EKGRP.
       WRITE I_OUTPUT-LIFNR.
       WRITE I_OUTPUT-NETPR.
       WRITE I_OUTPUT-WAERS.
       WRITE I_OUTPUT-MENGE.
       WRITE I_OUTPUT-MEINS.
       WRITE I_OUTPUT-MENGE1.
       WRITE I_OUTPUT-MAABC.
       WRITE I_OUTPUT-STPRS.
       WRITE I_OUTPUT-TXZ01.
       WRITE I_OUTPUT-EKNAM.
       WRITE I_OUTPUT-LIFNR1.
       WRITE I_OUTPUT-NAME1.
       WRITE I_OUTPUT-KO_PRCTR.
       WRITE I_OUTPUT-MCTXT.
       WRITE I_OUTPUT-BSTYP.
       WRITE I_OUTPUT-BSART.
       WRITE I_OUTPUT-BWART.
       WRITE I_OUTPUT-LGORT.
    ENDLOOP.
    NEW-PAGE.
    *ENDFORM.
    $$----
    $$ Form Close_Datasets.
    $$----
    *Form Close_Datasets.
      Perform Close_file using p_pf_01.
    *Endform.
    $$----
    $$ Form  UPDATE_TVARV
    $$----
    *FORM UPDATE_TVARV.
        TVARV-NAME = V_NAME.
        TVARV-TYPE = 'P'.
        TVARV-NUMB = 0.
        TVARV-LOW = SY-DATLO.
        MODIFY TVARV.
    *ENDFORM.
    $$----
    $$ Form  FINAL_STATS
    $$----
    *FORM FINAL_STATS.
       WRITE: / 'FINAL STATS:'(018).
       WRITE: /'--------------'.
       IF P_FILE = 'X'.
         WRITE: / 'File Created - '(015), P_PF_01.
         WRITE: / 'Nbr of Records written to the file - '(016).
         WRITE: V_FILE_CNT.
       ELSE.
         WRITE: / 'No File Created.'(017).
       ENDIF.
       SKIP.
       IF P_DATE IS INITIAL.
         WRITE: / 'Last rundate before this run - '(001), V_LASTRUN_DATE.
       ENDIF.
       WRITE: / 'New Last rundate             - '(002)     , SY-DATLO.
    *ENDFORM.
    $$----
    $$ Form  CONVERT_CURRENCY
    $$----
    FORM CONVERT_CURRENCY USING    P_IN_WAERS
                                   P_OUT_WAERS
                                   P_IN_AMT
                          CHANGING P_OUT_AMT.
      IF P_IN_WAERS = P_OUT_WAERS.
        P_OUT_AMT = P_IN_AMT.
      ELSE.
        CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
             EXPORTING
                  DATE             = SY-DATUM
                  FOREIGN_AMOUNT   = P_IN_AMT
                  FOREIGN_CURRENCY = P_IN_WAERS
                  LOCAL_CURRENCY   = P_OUT_WAERS
                type_of_rate     = c_type
              IMPORTING
                  LOCAL_AMOUNT     = P_OUT_AMT
             EXCEPTIONS
                   NO_RATE_FOUND    = 1
                  OVERFLOW         = 2.
      ENDIF.
    ENDFORM.
    $$----
    $$ Form  DELETE_COMMAS
    $$----
    FORM DELETE_COMMAS CHANGING P_AMT.
        DO.
          REPLACE ',' WITH SPACE INTO P_AMT.
          IF SY-SUBRC NE 0.
            EXIT.
          ENDIF.
        ENDDO.
        CONDENSE P_AMT NO-GAPS.
        SHIFT P_AMT RIGHT DELETING TRAILING SPACE.
    ENDFORM.                    "DELETE_COMMASENDFORM.
    $$----
    $$ Form  WRITE_HEADINGS
    $$----
    *FORM WRITE_HEADINGS.
    ULINE.
    FORMAT COLOR 1.
    WRITE 'Matl Doc. '(004).
    WRITE 'Year'(005).
    WRITE 'Item'(006).
    WRITE 'PO Nbr    '(007).
    WRITE 'Item '(008).
    WRITE 'Post Date '(009).
    WRITE 'Plnt'(010).
    WRITE 'POrg'(011).
    WRITE 'Matl Grp '(012).
    WRITE 'Material          '(013).
    WRITE 'PGp'(014).
    WRITE 'Vendor    '(019).
    WRITE '            Price '(020).
    WRITE 'Ckey'(021).
    WRITE '              Qty'(022).
    WRITE 'UOM'(023).
                                                      Begin of SIR 300589
    WRITE 'Purchase order Qty'(024).
    WRITE 'ABC Inventory Indicator'(025).
    WRITE 'Standard Price'(026).
    WRITE 'Material Desc'(027).
    WRITE 'Buyer Name'(028).
    WRITE 'Vendor ID'(029).
    WRITE 'Vendor Name'(030).
    WRITE 'Profit Center'(031).
    WRITE 'Profit Center Name'(032).
    WRITE 'Purchasing Doc Category'(033).
    WRITE 'Purchasing Doc Type'(034).
    WRITE 'Movement Type'(035).
    WRITE 'Storage Location'(036).
                                                        End of SIR 300589
    FORMAT COLOR OFF.
    *ENDFORM.
                                                      Begin Of SIR-301278
    *&      Form  process_alv_grid
          To process the data for ALV GRID  display
    FORM process_alv_grid .
    To Maintain Layout settings.
      perform build_layout.
    To display column headings.
      perform fill_fieldcatalog.
    To build the alv events for output
      perform event_build.
    To display the output in a ALV grid
      perform grid_display.
    ENDFORM.                    " process_alv_grid
    *&      Form  build_layout
          To fill the layout characteristics for output
    FORM build_layout .
    Move the report title
      clear v_layout.
      v_layout-detail_titlebar = sy-title.
    ENDFORM.                    " build_layout
    *&      Form  event_build
           To build the alv events for output
    FORM event_build .
    refresh i_events.
      clear   v_events.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type = 0
        importing
          et_events   = i_events.
      read table i_events with key name = slis_ev_top_of_page
                                               into v_events.
      if sy-subrc = 0.
        move c_top_of_page to v_events-form.
        modify i_events from v_events index sy-tabix.
      endif.
      read table i_events with key name = slis_ev_subtotal_text
                                                 into v_events.
      if sy-subrc = 0.
        move c_alv_subtotals_summary to v_events-form.
        modify i_events from v_events index sy-tabix.
      endif.
    ENDFORM.                    " event_build
    *&      Form  fill_fieldcatalog
         This subroutine builds the fieldcatalog for output
    FORM fill_fieldcatalog .
    refresh: i_fieldcat_alv[].
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'MBLNR'.
      v_fieldcat_alv-reptext_ddic = text-001.
      v_fieldcat_alv-col_pos      = 1.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'MJAHR'.
      v_fieldcat_alv-reptext_ddic = text-002.
      v_fieldcat_alv-col_pos      = 2.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'ZEILE'.
      v_fieldcat_alv-reptext_ddic = text-003.
      v_fieldcat_alv-col_pos      = 3.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'EBELN'.
      v_fieldcat_alv-reptext_ddic = text-004.
      v_fieldcat_alv-col_pos      = 4.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'EBELP'.
      v_fieldcat_alv-reptext_ddic = text-005.
      v_fieldcat_alv-col_pos      = 5.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'BUDAT'.
      v_fieldcat_alv-reptext_ddic = text-006.
      v_fieldcat_alv-col_pos      = 6.
      append v_fieldcat_alv to i_fieldcat_alv.
      clear v_fieldcat_alv.
      v_fieldcat_alv-tabname      = 'I_OUTPUT'.
      v_fieldcat_alv-fieldname    = 'WERKS'.
      v_fieldcat_alv-reptext_ddic = text-007.
      v_fieldcat_a

    Hi Priya,
    u can download the data from dictionary table to ur pc/dektop by using three function modules.
    1.DOWNLOAD
    2.WS_DOWNLOAD
    3.GUI_DOWNLOAD
    i did a small prg.just hv a look and if it is possible change this to ur require output.
    TABLES: VBAK,VBAP.
    DATA: BEGIN OF I_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          AUDAT LIKE VBAK-AUDAT,
          VBTYP LIKE VBAK-VBTYP,
          END OF I_VBAK.
    DATA: BEGIN OF I_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          MATKL LIKE VBAP-MATKL,
          END OF I_VBAP.
    DATA: BEGIN OF IT_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          AUDAT LIKE VBAK-AUDAT,
          VBTYP LIKE VBAK-VBTYP,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          MATKL LIKE VBAP-MATKL,
          END OF IT_VBAK.
    SELECT VBELN ERDAT ERNAM AUDAT VBTYP FROM VBAK INTO TABLE I_VBAK.
    SELECT VBELN POSNR MATNR CHARG MATKL FROM VBAP INTO TABLE I_VBAP.
    SORT: I_VBAK BY VBELN,I_VBAP BY VBELN.
    LOOP AT I_VBAK.
    READ TABLE I_VBAP WITH KEY VBELN = I_VBAK-VBELN BINARY SEARCH.
    IF SY-SUBRC = 0.
      MOVE I_VBAK-VBELN TO IT_VBAK-VBELN.
      MOVE I_VBAK-ERDAT TO IT_VBAK-ERDAT.
      MOVE I_VBAK-ERNAM TO IT_VBAK-ERNAM.
      MOVE I_VBAK-AUDAT TO IT_VBAK-AUDAT.
      MOVE I_VBAK-VBTYP TO IT_VBAK-VBTYP.
      MOVE I_VBAP-POSNR TO IT_VBAK-POSNR.
      MOVE I_VBAP-MATNR TO IT_VBAK-MATNR.
      MOVE I_VBAP-CHARG TO IT_VBAK-CHARG.
      MOVE I_VBAP-MATKL TO IT_VBAK-MATKL.
    APPEND IT_VBAK.
    ENDIF.
    ENDLOOP.
    *& IT ASKS THE CONFIRMATION FOR THE FILE FORMATE,WE CAN CHANGE THE FILENAME DYNAMICALLY(e.g DOC-TXT,XLS)
    *CALL FUNCTION 'DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
      FILENAME                      = 'D:\C1.TXT'
      FILETYPE                      = 'DAT'   "ASC is also another format
      ITEM                          = ' '
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      FILEMASK_MASK                 = '.TXT'
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = 'X'
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = 'X'     "THIS WILL NOT SHOW THE FILE TYPE(DAT) WHILE CONFIRMATION OF FILE NAME
      SILENT                        = 'S'
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      FILESIZE                      =
      CANCEL                        =
    TABLES
       DATA_TAB                      = IT_VBAK
      FIELDNAMES                    =
    EXCEPTIONS
      INVALID_FILESIZE              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *& this will not ask for the confirmation for the filename
    *CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
      FILENAME                      = 'D:\C2.DOC'
      FILETYPE                      = 'DAT'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
    TABLES
       DATA_TAB                      = IT_VBAK
      FIELDNAMES                    =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      NO_AUTHORITY                  = 10
      OTHERS                        = 11
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'D:\C5.DOC'
       FILETYPE                        = 'ASC'  "Separate Columns by Tabs in Case of ASCII Download
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = 'X' "Overwrite The File Only After
                        Confirmation                          
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = IT_VBAK
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    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 u need any more then i welcome u to clarify it.
    reward points,if it is useful.

  • The Venerable ThinkPad W540 – A Journey in Multiple Parts: Part 2

    Missed Part 1?  Catch it here
    Part 2: System / BIOS setup.
    For the average consumer machine, users can get the most out of it without ever having to contemplate these advanced setup procedures. A ThinkPad, however, requires the user to take a peek at them at least, because the default settings certainly do not fit all usage scenarios. From hardware settings, performance and power setup, to security, OS installation and enterprise deployment, almost everything is configurable. Having your ThinkPad wrongly configured in BIOS can slow down OS booting, disabled features you need are not showing up in OS and enabled features you don‘t need will produce unwanted activity / battery drainage etc.
    For every ThinkPad I‘ve ever bought, sold or maintained through the years, the BIOS setup is the first thing I ever perform. This is particularly vital today, even before loading up any OS on it, because of the default legacy pre-installed Windows 7 or UEFI BIOS pre-installed Windows 8/8,1 OS, which like in the case of the former, upgrading your Windows 7 pre-installation to Windows 8 instead of clean installing will give you a legacy installed Windows 8 and thus fail to take advantage of some of the UEFI features that are built into the OS. I‘ll get into some of the differences between Legacy/UEFI installations in Part 3 as well as the main only and secondary hard drive dual booting.
    NB. Although this setup is for the W540/T540p, most of the options are identical to other ThinkPad models and serve the same function, but being a fully loaded W540, it has several options that other models don‘t have, and thus a perfect machine demonstrate this on.
    To enter the ThinkPad UEFI BIOS there are several methods you can use.
    Press F1 on the Lenovo screen to bring up the BIOS setup instantly. (Only possible during restart or when started up again from a full shutdown, which you can have your machine enter if you hold down Shift while clicking Shutdown in Windows 8/8.1).
    Press Enter on the Lenovo screen, again, only possible using the same restart methods as above, to bring up the Startup Interrupt Menu, and then select F1 for the BIOS setup.
    From within Windows 8/8.1:
    Open the Charm Bar by pressing Win+C key combination.
    Click on Settings
    Click on Change PC Settings
    Click on General (Win 8) Update and Recovery (Win 8.1)
    Scroll to the bottom and click on Advanced Startup -> Restart Now (Win 8) Select Recovery -> Advanced Startup -> Restart Now (Win 8.1)
    Click on Troubleshoot
    Click on Advanced Options
    Click on UEFI Firmware Settings
    Click on Restart
    NB. By default, a Windows 8/8.1 shutdown is not a real shutdown. Instead, it is hybrid shutdown where contents of memory are saved to disk. This allows for a faster startup. However, turning on the PC after a hybrid shutdown does not allow for pressing F1 or F12 during startup. To disable this behaviour and for further information on booting Windows 8/8.1 pre-installed machines head over to this page: Windows 8/8.1 boot instructions - Lenovo.
    If you have a ThinkPad with a Legacy BIOS, just press F1 on the ThinkPad screen.
    On the main screen you can see various important information about your ThinkPad such as the serial and MTM numbers, information on your installed CPU and RAM, OS Licence and Secure Boot status. On the image above, I‘ve annotated where you can find the various categories of settings for your machine.
    My W540 is setup as non-enterprise, standalone workstation, so the first things I do is turn off AMT (Intel Active Management Technology) and all Wake/Boot from LAN settings, as my machine won‘t be either booted up from LAN nor managed remotely.
    To turn these settings off, open up your Config screen and select Network and toggle your preferred settings between Enabled / Disabled. I disable all options. The Intel AMT settings are also found on the Config screen, which I set to disabled. NB, do not select Permanently Disabled if you plan on reselling your machine later on, as permanently disabled means just that.
    There are a couple of other features that I disable in the Config section, which is the Intel Smart Connect Technology, which powers on your machine on regular intervals to check for mail and social media updates and the Power – Intel Rapid Start Technology, which I don‘t need on my W-series machines, but I do keep it enabled on my ThinkPad travelmates, such as the T440s.
    Walking through the other settings I change on the Config screen, on USB I have everything set to Enabled and USB 3.0 set to Auto. I am particularly fond of the USB always on and Charge in battery mode, as my ThinkPads that have large 9 cell batteries have managed to save my phone from running out of power on countless occasions. Finally, I set my display options for standalone operation, but if you have your machine docked and connected to one or more external monitors, you need to set these accordingly.
    On to the Security screen, where many mission critical options reside. Many of these options should not be played with, as setting them wrongly can have serious consequences. Particular care should be taken when setting one or more Passwords for access control, as there is no fallback or fix that can reset a forgotten password.
    Leaving the Security settings at their default is fine in most usage scenarios, but some features are disabled by default, like Virtualization, and need to be enabled for them to work. The Security Chip is initially set to Inactive, which means it is visible in your OS, but inactive. I set mine to Active as it is required by the Security Reporting Options, which I do monitor if something comes up as well as enabling the Intel Trusted Execution Technology (TXT) options, which I also have set to Enabled.
    The UEFI BIOS Update Option is self-explanatory and in addition you can prevent older BIOS flashing by turning the Secure Rollback Prevention to Enabled. Memory Protection and I/O Port Access are all enabled by default and no restrictions or access control to your hardware is set. The Internal Device Access option is for the Bottom Cover Tamper Protection, which works in conjunction with the Supervisor Password, so if no Supervisor Password is set, the Tamper Protection won‘t take effect even if set to Enabled. The Anti-Theft module is active by default, and thus you‘ll get popups in your Windows OS regarding enrollment. If you do not wish to see those or you won‘t be using the feature, just set the AT Module to Disabled. Same as with the Intel AMT Control, the AT Module can be permanently disabled as well.
    Lastly, the Secure Boot option is something that is always enabled by default on all machines that come with a Windows 8/8,1 sticker from manufacturer. Secure boot defines how platform firmware manages security certificates, validation of firmware, and a definition of the interface (protocol) between firmware and the operating system. Secure boot prevents “unauthorized” operating systems and software from loading during the startup process.
    Quick summary of the Secure Boot feature:
    UEFI allows firmware to implement a security policy.
    Secure boot is a UEFI protocol not a Windows 8 feature.
    UEFI secure boot is part of Windows 8 secured boot architecture.
    Windows 8 utilizes secure boot to ensure that the pre-OS environment is secure.
    Secure boot doesn’t “lock out” operating system loaders, but is a policy that allows firmware to validate authenticity of components.
    OEMs have the ability to customize their firmware to meet the needs of their customers by customizing the level of certificate and policy management on their platform.
    Microsoft does not mandate or control the settings on PC firmware that control or enable secured boot from any operating system other than Windows.
    I will go deeper into the Secure Boot settings and functionality in Part 3, where the OS installation will be the topic, but unless you‘re clean installing a new OS or upgrading from Windows 7 to Windows 8, these settings as well as the OS Optimized Default setting on the Restart screen can be left at their defaults.
    The Startup section is one that I always clean up and only leave the boot devices I regularly use active on the Boot Priority Order. Don‘t use it? Lose it. This eliminates your machine having to go through all possible boot options on cold boot / restart but a temporary boot device can always be selected through the F12 Boot Menu if you need to boot your machine from a device you don‘t regularly use.
    I use my machine as UEFI OS only, as setting it up as dual booted Windows / Linux in UEFI mode has become much simpler, and effective in the last couple of years. However, dual booting a UEFI and a legacy OS, or legacy only is also an option, and will be further discussed in my next instalment.
    For detailed information on the W540 System Setup, refer to the User Guide available here:
    ThinkPad T540p and W540 - User Guide
    Click here to read Part 1 of AtliJarl's mods to his W540, which is one of the machines we had passed to him for use.

    Good write-up ;-)

  • Hyperion Report taking a long time to process local query

    Hi All,
    I am trying to run a report on Hyperion IR 9.3.1. I am facing a performance issue with this report. I am joining 13 tables using full outer join. Each table is having data about 900 rows and the final output i am getting from the local query is about 11000 rows. This local query is taking a long time to get process about 3 - 5 minutes. I suppose it should run with in 30 sec as number of rows are very few. Can anyone tell me what is the problem with this local query and how the performance of the report can be increased?
    Thanks in advance.
    Regards
    Ujjawal

    Be aware that XP takes approx 1gb of your RAM leaving you with 1gb for whatever else is running. MS Outlook is also a memory hog.
    To check Virtual Memory Settings:
    Control Panel -> System
    System Properties -> Advanced Tab -> Performance Settings
    Performance Options -> Adavanced Tab - Virtual Memory section
    Virtual Memory -
    what are
    * Initial Size
    * Maximum Size
    In a presentation at one of the Hyperion conferences years ago, Mark Ostroff suggested that the initial be set to the same as Max. (Max is typically 2x physical RAM)
    These changes may provide some improvement.

  • Document currency

    Hi,
      I am working on a report in which there are 5 fields gl account(hkont),vendor code(lifnr),vendor name(name1),aging details,currency(document currency-waers).Here the requirement is I have to split the aging details column into 4 columns(current,31-60,61-90,>90).The document currency  has to be summed up according to vendor name and currency key and split into these 4 columns accordingly.I am not getting the logic how can i split the document currency into these 4 columns.Can anyone suggest me the proper solution for this?I am sending the program on which I am working.
    REPORT  zfir087_prctr_payables NO STANDARD PAGE HEADING
           LINE-SIZE 85
           LINE-COUNT 65
           MESSAGE-ID zfi.
                 INCLUDEs                                               *
    ***THE FOLLOWING INCLUDE CONTAINS HEADER FOOTER DETAILS
    INCLUDE  zca_standard_header_footer1.
    ***THE FOLLOWING INCLUDE CONTAINS ALL THE DATA DECLARATIONS AND
    ***SELECTION SCREEN DETAILS
    INCLUDE  zfir087_accounts_payables_top.
    ***THE FOLLOWING INCLUDE CONTAINS ALL THE SUBROUTINES
    INCLUDE  zfir087_accounts_payables_sub.
                 AT SELECTION SCREEN                                    *
    AT SELECTION-SCREEN .
    Validate the profit center entered on selection screen.
      PERFORM f_valiate_profit_center.
    Validate Recon Account entered on selection screen.
      PERFORM f_validate_recon_account.
    Validate Partner profit center entered on selection screen
      PERFORM f_val_part_profit_center.
    *Begin of SRR-17677
    *At Selection Screen Output
    AT SELECTION-SCREEN OUTPUT.
      PERFORM screen_changes.
    *End of SRR-17677
    START-OF-SELECTION.
    *--SIR-07541 Begin
      SELECT * FROM t001 INTO TABLE t_t001.
    *--SIR-07541 End
    Get data from bsik table
    GET bsik.
    MOVE-CORRESPONDING  bsik TO t_ldb_data.                   "#EC ENHOK
      MOVE:bsik-bukrs TO  d_ldb_data-bukrs,
           bsik-lifnr TO  d_ldb_data-lifnr,
           bsik-belnr TO  d_ldb_data-belnr,
           bsik-bldat TO  d_ldb_data-bldat,
           bsik-blart TO  d_ldb_data-blart,
           bsik-gjahr TO  d_ldb_data-gjahr,
           bsik-buzei TO  d_ldb_data-buzei,
           bsik-xblnr TO  d_ldb_data-xblnr,
           bsik-dmbtr TO  d_ldb_data-dmbtr,
           bsik-waers TO  d_ldb_data-waers,
           bsik-wrbtr TO  d_ldb_data-wrbtr,
           bsik-dmbe2 TO  d_ldb_data-dmbe2,
           bsik-vbund TO  d_ldb_data-vbund,
           bsik-ebeln TO  d_ldb_data-ebeln,
           bsik-augdt TO  d_ldb_data-augdt,
           bsik-augbl TO  d_ldb_data-augbl,
           bsik-zuonr TO  d_ldb_data-zuonr,
           bsik-budat TO  d_ldb_data-budat,
           bsik-sgtxt TO  d_ldb_data-sgtxt,
           bsik-hkont TO  d_ldb_data-hkont,
           bsik-zlsch TO  d_ldb_data-zlsch,
           bsik-zlspr TO  d_ldb_data-zlspr,
           bsik-filkd TO  d_ldb_data-filkd,
           bsik-shkzg    TO     d_ldb_data-shkzg,
    Begin of SRR-22879 APARMAA
           bsik-zfbdt    TO     d_ldb_data-zfbdt,
           bsik-zbd1t    TO     d_ldb_data-zbd1t,
           bsik-zbd2t    TO     d_ldb_data-zbd2t,
           bsik-zbd3t    TO     d_ldb_data-zbd3t,
           bsik-rebzg    TO     d_ldb_data-rebzg.
    End of SRR-22879 APARMAA
      APPEND d_ldb_data TO t_ldb_data.
    Get data from bkpf table
    GET bkpf.
      MOVE:bkpf-bukrs TO d_bkpf-bukrs,
           bkpf-belnr TO d_bkpf-belnr,
           bkpf-gjahr TO d_bkpf-gjahr,
           bkpf-awkey TO d_bkpf-awkey,
           bkpf-hwae2 TO d_bkpf-hwae2.
      APPEND d_bkpf TO t_bkpf.
    END-OF-SELECTION.
    Get purchasing information from rseg table
      IF NOT t_bkpf[] IS INITIAL.
        PERFORM f_get_ebeln_from_rseg.
      ENDIF.
    Get profit center and partner profit center from bfok_a table
      IF NOT  t_ldb_data[] IS INITIAL.
        PERFORM f_get_data_from_bfok_a.
      ENDIF.
    Begin of SRR-22879 APARMAA
      IF NOT  t_ldb_data[] IS INITIAL.
        PERFORM f_get_data_from_lfa1.
      ENDIF.
    End of SRR-22879 APARMAA
    Calculate the sum of the dmbtr field
      PERFORM f_get_sum_from_bfok_a.
    Split the amount in doc currency(wrbtr) in bsik
      PERFORM f_split_wrbtr_in_bsik.
      IF NOT t_final[] IS INITIAL.
    LOGO FOR ALV GRID
        v_logo = c_logo.
        v_title = sy-title.
        v_repid = sy-repid.
    BUILD PRINT SETTINGS
        PERFORM f_build_print_settings USING f_print_settings.
    BUILD LAYOUT
        PERFORM f_build_layout USING f_grid_layout v_title.
    BUILD EVENTS
        PERFORM f_build_events USING t_events[] .
    *DISPLAY REPORT
        IF p_disp EQ 'X'.                                       "SRR-17677
          PERFORM f_display_data.
        ENDIF.                                                  "SRR-17677
      Begin of SRR-17677
    Begin of SRR-22879 APARMAA
       IF p_expo = 'X'.
         EXPORT T_R087 FROM T_FINAL TO MEMORY ID 'R087'.
       ENDIF.
        IF p_expo = 'X'.
         MOVE-CORRESPONDING t_final TO t_final1.              "SRR-24422
          t_final1[] = t_final[].                               "SRR-24422
          EXPORT t_r087 FROM t_final1 TO MEMORY ID 'R087'.
        ENDIF.
    End of SRR-22879 APARMAA
      End of SRR-17677
    Refresh and Clear all internal tables.
        PERFORM f_free_and_clear.
      ELSE.
    NO RECORDS MATCH THE SELECTION CRITERIA
        IF p_disp EQ 'X'.                                       "SRR-17677
          MESSAGE i000 WITH
            'No data exists for the given selection criteria'(050).
        ENDIF.                                                  "SRR-17677
        EXIT.
      ENDIF.
                     DICTIONARY TABLES
    TABLES :bfok_a, lfa1, lfb1, bsik, bkpf,cepc.                "#EC NEEDED
                       TYPES
    *TYPES:
    DATA:
    Type like bsik table
      BEGIN OF d_ldb_data,
        bukrs LIKE  bsik-bukrs,  "COMPANY CODE
        lifnr LIKE  bsik-lifnr,  "Account Number of Vendor or Creditor
        belnr LIKE  bsik-belnr,  "ACCOUNTING DOCUMENT NUMBER
        bldat LIKE  bsik-bldat,  "DOCUMENT DATE IN DOCUMENT
        blart LIKE  bsik-blart,  "DOCUMENT TYPE
        gjahr LIKE  bsik-gjahr,  "FISCAL YEAR
        buzei LIKE  bsik-buzei,
        "NUMBER OF LINE ITEM WITHIN ACCOUNTING DOCUMENT
        xblnr LIKE  bsik-xblnr,  "REFERENCE DOCUMENT NUMBER
        dmbtr LIKE  bsik-dmbtr,  "AMOUNT IN LOCAL CURRENCY
    *--SIR-07541 Begin
         lwaer  LIKE  t001-waers,  "LOCAL CURRENCY KEY
         hwae2  LIKE  bkpf-hwae2,  "2ND LOCAL CURRENCY KEY
    *--SIR-07541 End
        waers LIKE  bsik-waers,  "CURRENCY KEY
        wrbtr LIKE  bsid-wrbtr,  "AMOUNT IN DOCUMENT CURRENCY
        dmbe2 LIKE  bsik-dmbe2,  "AMOUNT IN SECOND LOCAL CURRENCY
        vbund LIKE  bsik-vbund,  "COMPANY ID OF TRADING PARTNER
        ebeln LIKE  bsik-ebeln,  "BILLING DOCUMENT
        augdt LIKE  bsik-augdt,  "CLEARING DATE
        augbl LIKE  bsik-augbl,  "DOCUMENT NUMBER OF THE CLEARING
                                      "DOCUMENT
        zuonr LIKE  bsik-zuonr,  "ASSIGNMENT NUMBER
        budat LIKE  bsik-budat,  "POSTING DATE IN THE DOCUMENT
        sgtxt LIKE  bsik-sgtxt,  "ITEM TEXT
        hkont LIKE  bsik-hkont,  "GENERAL LEDGER ACCOUNT
        zlsch LIKE  bsik-zlsch,  "PAYMENT METHOD
        zlspr LIKE  bsik-zlspr,  "PAYMENT BLOCK KEY
        filkd LIKE  bsik-filkd,  "ACCOUNT NUMBER OF THE BRANCH
        shkzg     LIKE  bsik-shkzg,  "Debit/Credit Indicator
        awkey LIKE bkpf-awkey,   "Reference Key
        prctr LIKE bfok_a-prctr, "Profit Center
        pprct LIKE bfok_a-pprct, "Partner Profit Center
        status TYPE c,           "Status indicator
        korrk LIKE bfok_a-korrk,  "Adjustment Account
    Begin of SRR-22879 APARMAA
        name1   LIKE lfa1-name1,    "Vendor Name
        duedate LIKE sy-datum,      "Due Date
        aging(5) TYPE c,            "Aging Indiacator
        zfbdt   LIKE bsik-zfbdt,
        zbd1t   LIKE bsik-zbd1t,
        zbd2t   LIKE bsik-zbd2t,
        zbd3t   LIKE bsik-zbd3t,
        rebzg   LIKE bsik-rebzg,
    End of SRR-22879 APARMAA
      END OF d_ldb_data,
    Type declaration of type bkpf table
      BEGIN OF d_bkpf,
        bukrs LIKE bkpf-bukrs,       "Company Code
        belnr LIKE bkpf-belnr,       "Accounting Document Number
        gjahr LIKE bkpf-gjahr,       "Fiscal Year
        awkey LIKE bkpf-awkey,       "Reference Key
    *--SIR-07541 Begin
        hwae2 LIKE bkpf-hwae2,       "@nd local currency
    *--SIR-07541 End
      END OF d_bkpf,
    Type declaration of type rseg table
      BEGIN OF d_rseg ,
      belnr  LIKE rseg-belnr,  "Accounting Document Number
      gjahr  LIKE rseg-gjahr,  "Fiscal Year
      buzei  LIKE rseg-buzei,  "Document item in invoice document
      ebeln  LIKE rseg-ebeln,  "Purchasing Document Number
      bukrs  LIKE rseg-bukrs,  "Company Code
      END OF d_rseg,
    Begin of SRR-22879 APARMAA
    Type declaration of type lfa1 table
      BEGIN OF d_lfa1,
      lifnr LIKE lfa1-lifnr,
      name1 LIKE lfa1-name1,
      END OF d_lfa1,
    End of SRR-22879 APARMAA
    Type declaration of type bfok_a table
      BEGIN OF d_bfok_a,
      bukrs LIKE bfok_a-bukrs,  "Company Code
      belnr LIKE bfok_a-belnr,  "Accounting Document Numbe
      gjahr LIKE bfok_a-gjahr,  "Fiscal Year
      buzei LIKE bfok_a-buzei,  "Number of Line Item
      auzei LIKE bfok_a-auzei,
                     "No of Breakdown by Account Assignments for FI Document
      hkont LIKE bfok_a-hkont,  "General Ledger Account
      shkzg LIKE bfok_a-shkzg,  "Debit/Credit Indicator
      dmbtr LIKE bfok_a-dmbtr,  "AMOUNT IN DOCUMENT CURRENCY
      dmbe2 LIKE bfok_a-dmbe2,  "Amount in Second Local Currency
      prctr LIKE bfok_a-prctr,  "Profit Center
      pprct LIKE bfok_a-pprct,  "Partner Profit Center
      korrk LIKE bfok_a-korrk,  "Adjustment Account
      counter TYPE i,
      END OF d_bfok_a.
    Begin of SRR-22879 APARMAA
    Creation of t_final1 table for export to R091.
    Since t_ldb_data has been modified for this SRR, exporting of t_final
    results in a short dump when R091 is executed.Hence t_final1 is
    created with the original structure of t_ldb_data.This will be
    exported to R091.
    DATA:BEGIN OF d_final1,
         bukrs  LIKE  bsik-bukrs,  "COMPANY CODE
         lifnr  LIKE  bsik-lifnr,  "Account Number of Vendor or Creditor
         belnr  LIKE  bsik-belnr,  "ACCOUNTING DOCUMENT NUMBER
         bldat  LIKE  bsik-bldat,  "DOCUMENT DATE IN DOCUMENT
         blart  LIKE  bsik-blart,  "DOCUMENT TYPE
         gjahr  LIKE  bsik-gjahr,  "FISCAL YEAR
         buzei  LIKE  bsik-buzei,
         "NUMBER OF LINE ITEM WITHIN ACCOUNTING DOCUMENT
         xblnr  LIKE  bsik-xblnr,  "REFERENCE DOCUMENT NUMBER
         dmbtr  LIKE  bsik-dmbtr,  "AMOUNT IN LOCAL CURRENCY
    *--SIR-07541 Begin
         lwaer  LIKE  t001-waers,  "LOCAL CURRENCY KEY
         hwae2  LIKE  bkpf-hwae2,  "2ND LOCAL CURRENCY KEY
    *--SIR-07541 End
         waers  LIKE  bsik-waers,  "CURRENCY KEY
         wrbtr  LIKE  bsid-wrbtr,  "AMOUNT IN DOCUMENT CURRENCY
         dmbe2  LIKE  bsik-dmbe2,  "AMOUNT IN SECOND LOCAL CURRENCY
         vbund  LIKE  bsik-vbund,  "COMPANY ID OF TRADING PARTNER
         ebeln  LIKE  bsik-ebeln,  "BILLING DOCUMENT
         augdt  LIKE  bsik-augdt,  "CLEARING DATE
         augbl  LIKE  bsik-augbl,  "DOCUMENT NUMBER OF THE CLEARING
                                      "DOCUMENT
         zuonr  LIKE  bsik-zuonr,  "ASSIGNMENT NUMBER
         budat  LIKE  bsik-budat,  "POSTING DATE IN THE DOCUMENT
         sgtxt  LIKE  bsik-sgtxt,  "ITEM TEXT
         hkont  LIKE  bsik-hkont,  "GENERAL LEDGER ACCOUNT
         zlsch  LIKE  bsik-zlsch,  "PAYMENT METHOD
         zlspr  LIKE  bsik-zlspr,  "PAYMENT BLOCK KEY
         filkd  LIKE  bsik-filkd,  "ACCOUNT NUMBER OF THE BRANCH
         shkzg     LIKE  bsik-shkzg,  "Debit/Credit Indicator
         awkey LIKE bkpf-awkey,       "Reference Key
         prctr LIKE bfok_a-prctr,     "Profit Center
         pprct LIKE bfok_a-pprct,     "Partner Profit Center
         status TYPE c,               "Status indicator
         korrk LIKE bfok_a-korrk,     "Adjustment Account
         END OF d_final1.
    End of SRR-22879 APARMAA
                             TYPE-POOLS
    TYPE-POOLS: slis, " TYPE POOL FOR ALV REPORT
                slist. " System: List Processor for ALV List
                        ALV SPECIFIC DECLARATIONS
    DATA:
    TABLES REQUIRED SPECIFICALLY FOR ALV REPORTING
          t_sortcat        TYPE  slis_t_sortinfo_alv   ,
           t_field_catalog  TYPE slis_t_fieldcat_alv,
           t_events         TYPE slis_t_event,
                   FIELD STRINGS (Naming convention F_)
          f_grid_settings  TYPE lvc_s_glay,                     "#EC *
          f_grid_layout    TYPE slis_layout_alv,                "#EC *
          f_print_settings TYPE slis_print_alv.       "print settings
                         INTERNAL TABLES
    Int table to get the data from bsik table using logical databse
    DATA: t_ldb_data  LIKE STANDARD TABLE OF d_ldb_data,
    Int table to get the data from bkpf table
          t_bkpf LIKE STANDARD TABLE OF d_bkpf,
    Int table to store the data from rseg table
          t_rseg LIKE STANDARD TABLE OF d_rseg,
    Int table to store the data from bfok_a table
          t_bfok_a LIKE STANDARD TABLE OF d_bfok_a.
    *Int table to store the sum of the values of field dmbtr in t_bfok_a
    *table
    DATA:  t_bfok_a1 LIKE STANDARD TABLE OF d_bfok_a,
           t_bfok_a2 LIKE STANDARD TABLE OF d_bfok_a WITH HEADER LINE.
    DATA:  t_final LIKE STANDARD TABLE OF d_ldb_data WITH HEADER LINE.
    *Begin of SRR-17677
    Begin of SRR-22879 APARMAA
    *DATA: t_r087 LIKE STANDARD TABLE OF d_ldb_data WITH HEADER LINE.
    DATA: t_r087 LIKE STANDARD TABLE OF d_final1 WITH HEADER LINE.
    End of SRR-22879 APARMAA
    *End of SRR-17677
    Begin of SRR-22879 APARMAA
    DATA: t_lfa1 LIKE STANDARD TABLE OF d_lfa1.
    DATA: t_ldb_data1 LIKE STANDARD TABLE OF d_ldb_data.
    DATA: t_final1 LIKE STANDARD TABLE OF d_final1 WITH HEADER LINE.
    End of SRR-22879 APARMAA
    *--SIR-07541 Begin
      DATA: wa_t001 TYPE t001,
            t_t001  LIKE STANDARD TABLE OF wa_t001.
    *--SIR-07541 End
                             VARIABLES
    DATA: v_title LIKE sy-title,            " Variable for Report Title
          v_repid LIKE sy-repid,            " Variable for Report Name
          v_base_amount LIKE bfok_a-dmbtr,  " Base amount to be split
          v_amount_sum  LIKE bfok_a-dmbtr,  " Base amount sum
    Begin of SRR-22879 APARMAA
         v_aging(5) type c.                                   "SRR-24422
          v_aging(5) type n.                                    "SRR-24422
    End of SRR-22879 APARMAA
    FIELD-SYMBOLS: <ldb_data> LIKE LINE OF  t_ldb_data,
                   <bfok_a>   LIKE LINE OF  t_bfok_a,
                   <bfok_a1>  LIKE LINE OF  t_bfok_a1,
                   <bkpf>   LIKE LINE OF  t_bkpf,
                   <rseg>   LIKE LINE OF  t_rseg,
    Begin of SRR-22879 APARMAA
                   <lfa1>   LIKE LINE OF  t_lfa1.
    End of SRR-22879 APARMAA
                            RANGES
                             CONSTANTS
    CONSTANTS:c_logo(5)     TYPE c VALUE  'R087',
              c_flag        TYPE c VALUE  'X',
              c_flag1       TYPE c VALUE  'x',
              c_010         TYPE p DECIMALS 6 VALUE '0.10',
              c_f           TYPE c VALUE  'F',
              c_debit       TYPE c VALUE  'H',
              c_xyz(3)      TYPE c VALUE 'XYZ',                 "SRR-17677
              c_waers      LIKE bsid-waers VALUE 'JPY',
    Begin of SRR-22879 APARMAA
              c_0to29(5)    VALUE '<30',
              c_30to59(5)   VALUE '31-60',
              c_60to89(5)   VALUE '61-90',
              c_90on(5)     VALUE '90+'.
    End of SRR-22879 APARMAA
                            SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_prctr  FOR cepc-prctr," Profit center
                    s_hkont  FOR bsik-hkont,"General Ledger Account
                    s_pprct FOR bfok_a-pprct. "Partner Profit Center
    SELECTION-SCREEN END OF BLOCK b1.
    Selection screen for ALV List displat
    SELECTION-SCREEN BEGIN OF BLOCK disp WITH FRAME TITLE text-004.
    PARAMETERS: p_grid RADIOBUTTON GROUP r2 DEFAULT 'X'
                MODIF ID abc, " Grid Display
                p_list RADIOBUTTON GROUP r2 MODIF ID abc.  " List Display
    SELECTION-SCREEN END OF BLOCK disp.
    Begin of SRR-22879 APARMAA
    SELECTION-SCREEN BEGIN OF BLOCK use_new WITH FRAME TITLE text-055.
    PARAMETERS: p_use AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK use_new.
    End of SRR-22879 APARMAA
    *Begin of SRR-17677
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-054.
    PARAMETERS: p_disp AS CHECKBOX DEFAULT 'X' MODIF ID xyz,
                p_expo AS CHECKBOX MODIF ID xyz.
    SELECTION-SCREEN END OF BLOCK b2.
    FORM f_valiate_profit_center .
      IF NOT s_prctr[] IS INITIAL.
    Local variable for profit center(s_prctr) validation
        DATA:v_prctr LIKE cepc-prctr.                           "#EC NEEDED
        SELECT SINGLE prctr FROM cepc INTO v_prctr WHERE prctr IN s_prctr.
                                                                "#EC *
        IF sy-subrc NE 0.
    Message please enter valid profit center
          MESSAGE e000(zfi) WITH   text-002.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_valiate_profit_center
    *&      Form  f_get_ebeln_from_rseg
    Purpose:To get the purchase doc number from the table rseg
    FORM f_get_ebeln_from_rseg .
    Select belnr,gjahr buzei ebeln fields  from rseg table
      SELECT belnr
             gjahr
             buzei
             ebeln
             bukrs
             FROM rseg INTO TABLE t_rseg
             FOR ALL ENTRIES IN t_bkpf
             WHERE belnr = t_bkpf-awkey+0(10) AND
                   gjahr = t_bkpf-gjahr       AND
                   bukrs = t_bkpf-bukrs .
    Sort and delete the adjacent duplicates from t_rseg table
      IF sy-subrc EQ 0.
        SORT t_rseg BY bukrs belnr gjahr .
        DELETE ADJACENT DUPLICATES FROM t_rseg COMPARING belnr gjahr bukrs.
      ENDIF.
    ENDFORM.                    " f_get_ebeln_from_rseg
    *&      Form  f_get_data_from_bfok_a
    Purpose:Get data from bfok_a table
    FORM f_get_data_from_bfok_a .
    Select data from bfok_a table
      SELECT bukrs
             belnr
             gjahr
             buzei
             auzei
             hkont
             shkzg
             dmbtr
             dmbe2
             prctr
             pprct
             korrk
             FROM  bfok_a
             INTO TABLE t_bfok_a FOR ALL ENTRIES IN t_ldb_data
             WHERE bukrs = t_ldb_data-bukrs AND
                   belnr = t_ldb_data-belnr AND
                   gjahr = t_ldb_data-gjahr AND
                   buzei = t_ldb_data-buzei AND
                   pprct IN s_pprct.
    Sort t_bfok_a table on fields bukrs belnr gjahr buzei
      IF sy-subrc EQ 0.
        SORT t_bfok_a BY bukrs belnr gjahr buzei auzei ASCENDING dmbtr
                                                       DESCENDING.
      ENDIF.
    ENDFORM.                    " f_get_data_from_bfok_a
    *&      Form  f_get_sum_from_bfok_a
    purpose:To get the sum of the line item field of dmbtr
    FORM f_get_sum_from_bfok_a .
    Line item counter
      DATA : l_index LIKE sy-tabix,  "To get the index
             v_counter TYPE i.       "Counter to store line items
      t_bfok_a2[] = t_bfok_a[].
    Get the sum of all the line items dmbtr(amount) field
      LOOP AT t_bfok_a2 .
    MOVE:t_bfok_a TO wa_bfok_a.
    Increment the line item counter
        v_counter = v_counter + 1.
        IF t_bfok_a2-shkzg EQ c_debit.
          t_bfok_a2-dmbtr = t_bfok_a2-dmbtr * -1.
          t_bfok_a2-dmbe2 = t_bfok_a2-dmbe2 * -1.
          MODIFY t_bfok_a2.
        ENDIF.
    Find the sum of dmbtr field at end of belnr
        AT END OF buzei.
          SUM.
          MOVE-CORRESPONDING t_bfok_a2  TO d_bfok_a.
          d_bfok_a-counter = v_counter.
          APPEND d_bfok_a TO t_bfok_a1.
          CLEAR: v_counter.
        ENDAT.
        CLEAR t_bfok_a2.
      ENDLOOP.
    Sort t_bfok_a1 on bukrs belnr gjahr buzei
      SORT t_bfok_a1 BY bukrs belnr gjahr buzei ASCENDING dmbtr DESCENDING.
      SORT t_ldb_data BY bukrs belnr gjahr buzei ASCENDING .
    SORT t_bfod_a1 BY bukrs belnr gjahr buzei.
      t_bfok_a[] = t_bfok_a2[].
      FREE t_bfok_a2[].
    Find the sum of line items having single line item
      LOOP AT t_bfok_a1 ASSIGNING <bfok_a1> WHERE counter = 1.
        l_index = sy-tabix.
        READ TABLE t_ldb_data WITH KEY bukrs = <bfok_a1>-bukrs
                                       belnr = <bfok_a1>-belnr
                                       gjahr = <bfok_a1>-gjahr
                                       buzei = <bfok_a1>-buzei
                                       ASSIGNING <ldb_data>
                                       BINARY SEARCH.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING <ldb_data> TO t_final.
    *--SIR-07541 Begin
          READ TABLE t_t001 INTO wa_t001 WITH KEY bukrs = <bfok_a1>-bukrs.
          IF sy-subrc = 0.
            t_final-lwaer = wa_t001-waers.
          ENDIF.
          READ TABLE t_bkpf INTO d_bkpf WITH KEY bukrs = <bfok_a1>-bukrs
                                                  belnr = <bfok_a1>-belnr
                                                  gjahr = <bfok_a1>-gjahr.
          IF sy-subrc = 0.
            t_final-hwae2 = d_bkpf-hwae2.
          ENDIF.
    *--SIR-07541 End
    Begin of SRR-22879 APARMAA
    Move Vendor Name
          READ TABLE t_lfa1 WITH KEY lifnr = <ldb_data>-lifnr
                                     ASSIGNING <lfa1>
                                     BINARY SEARCH.
          IF sy-subrc EQ 0.
            MOVE:<lfa1>-name1 TO t_final-name1.
          ENDIF.
    Calculate Due Date
          CALL FUNCTION 'NET_DUE_DATE_GET'
            EXPORTING
              i_zfbdt = <ldb_data>-zfbdt
              i_zbd1t = <ldb_data>-zbd1t
              i_zbd2t = <ldb_data>-zbd2t
              i_zbd3t = <ldb_data>-zbd3t
              i_shkzg = <ldb_data>-shkzg
              i_rebzg = <ldb_data>-rebzg
              i_koart = 'K'
            IMPORTING
              e_faedt = t_final-duedate.
    Calculate Aging Details.
          v_aging = sy-datum - <ldb_data>-zfbdt.
          IF v_aging GE 0  AND
             v_aging LE 29.
            t_final-aging = c_0to29.
          ENDIF.
          IF v_aging GE 30 AND
             v_aging LE 59.
            t_final-aging = c_30to59.
          ENDIF.
          IF v_aging GE 60 AND
             v_aging LE 89.
            t_final-aging = c_60to89.
          ENDIF.
          IF v_aging GE 90.
            t_final-aging = c_90on.
          ENDIF.
    End of SRR-22879 APARMAA
          PERFORM f_check_debit_credit_indicator USING <ldb_data>-shkzg.
          READ TABLE t_bfok_a WITH KEY bukrs = <bfok_a1>-bukrs
                                      belnr = <bfok_a1>-belnr
                                      gjahr = <bfok_a1>-gjahr
                                      buzei = <bfok_a1>-buzei
                                      ASSIGNING <bfok_a>
                                      BINARY SEARCH.
          IF sy-subrc EQ 0.
    *--SRR-25731 Begin
            IF t_final-dmbtr ne <bfok_a1>-dmbtr.
              CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 5.
    *For other break down line items the split amount is calculated as below
                t_final-wrbtr = ( <ldb_data>-wrbtr  * <bfok_a>-dmbtr )
                                     / <ldb_data>-dmbtr.
              ENDCATCH.
            ENDIF.
    *--SRR-25731 End
            v_amount_sum = v_amount_sum + t_final-wrbtr.
        Move dmbtr,bmbe2,korrk fields from t_bfok_a to t_final int table
            MOVE:<bfok_a>-dmbtr TO t_final-dmbtr,
                 <bfok_a>-dmbe2 TO t_final-dmbe2,
                 <bfok_a>-korrk TO t_final-korrk.
          ENDIF.
      Populate the status field to t_final int table
      Read t_bkpf table
          READ TABLE t_bkpf WITH KEY    bukrs    = <ldb_data>-bukrs
                                        belnr    = <ldb_data>-belnr
                                        gjahr    = <ldb_data>-gjahr
                                        ASSIGNING <bkpf>
                                        BINARY SEARCH.
          IF sy-subrc EQ 0.
    Read table t_rseg
            READ TABLE t_rseg WITH KEY bukrs =  <bkpf>-bukrs
                                       belnr =  <bkpf>-awkey+0(10)
                                       gjahr =  <bkpf>-gjahr
                                       ASSIGNING <rseg>
                                       BINARY SEARCH.
            IF sy-subrc NE 0.
    Populate status field with value 'F'
              t_final-status = c_f.
            ENDIF.
          ENDIF.
        PERFORM f_check_debit_credit_indicator USING <bfok_a>-shkzg.
          t_final-prctr = <bfok_a>-prctr.
          t_final-pprct = <bfok_a>-pprct.
          APPEND t_final.
          CLEAR:  t_final.  "t_bfok_a.
          DELETE t_bfok_a1 INDEX l_index.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " f_get_sum_from_bfok_a
    *&      Form  f_build_print_settings
      in_print
    FORM f_build_print_settings  USING in_print TYPE slis_print_alv .
      in_print-no_print_selinfos  = c_flag.
      in_print-no_print_listinfos = c_flag.
      in_print-no_coverpage       = c_flag.
    ENDFORM.                    " f_build_print_settings
    *&      Form  f_build_layout
       Purpose:To build ALV layout
          P_F_GRID_LAYOUT  -Grid layout
         P_V_TITLE         - Title
    FORM f_build_layout  USING  in_layout TYPE slis_layout_alv in_repid TYPE
    any.
      in_layout-zebra             = 'X'.
      in_layout-window_titlebar   = in_repid. "Put Report Name in titlebar
    in_layout-expand_fieldname  = t_slis_ev_item_data_expand.
      in_layout-colwidth_optimize = 'X'.       "Optimize column widths
    Set Grid display settings
      f_grid_settings-coll_top_p = c_flag1.
      f_grid_settings-coll_end_l = c_flag1.
      f_grid_settings-top_p_only = c_flag1.
      f_grid_settings-eol_p_only = c_flag1.
      in_layout-totals_text       = 'TOTAL:'(035).
      in_layout-subtotals_text    = 'SubTotal:'(036).
    ENDFORM.                    " f_build_layout
    *&      Form  f_build_events
         To build events
         P_T_EVENTS[]  ->events
    FORM f_build_events  USING    p_events TYPE slis_t_event.
      DATA l_f_events TYPE slis_alv_event.
      CLEAR l_f_events.
      l_f_events-name = 'TOP_OF_PAGE'.
      l_f_events-form = 'PREPARE_ALV_HEADER_G'.
      APPEND l_f_events TO p_events.
    ENDFORM.                    " f_build_events
    *&      Form  f_display_data
       To display data
    FORM f_display_data .
    BUILD FIELD CATALOG
      PERFORM f_fieldcat_build :
    Company code
      USING 'BUKRS' 'T_FINAL' ' ' ' ' ' ' 'Comp Code'(031)
    Customer
      USING 'LIFNR' 'T_FINAL' ' ' ' ' ' ' 'Vendor'(005)
    Account Number of the Branch
      USING 'FILKD' 'T_FINAL' ' ' ' ' ' ' 'Branch'(044)
    General Ledger Account
      USING 'HKONT' 'T_FINAL' ' ' ' ' 'X' 'Genderal Ledger Account'(027)
    Adjustment Account
      USING 'KORRK' 'T_FINAL' ' ' ' ' 'X' 'Adjustment Account'(053)
    Document Number
      USING 'BELNR' 'T_FINAL' ' ' ' ' ' ' 'Document Number'(006)
    Document date
      USING 'BLDAT' 'T_FINAL' ' ' ' ' ' ' 'Document date'(007)
    Document type
      USING 'BLART' 'T_FINAL' ' ' ' ' ' ' 'Document type'(008)
    Fiscal Year
      USING 'GJAHR' 'T_FINAL' ' ' ' ' ' ' 'Fiscal Year'(009)
    Line item
      USING 'BUZEI' 'T_FINAL' ' ' ' ' ' ' 'Line item'(010)
    Reference
      USING 'XBLNR' 'T_FINAL' ' ' ' ' ' ' 'Reference'(011)
    *--SIR-07541 Begin
    Local currency
      USING 'LWAER' 'T_FINAL' ' ' ' ' ' ' 'Local Currency'(040)
    *--SIR-07541 End
    Amount in local currency
      USING 'DMBTR' 'T_FINAL' ' ' ' ' ' ' 'Amount in local currency'(012)
      ' '  ' ' ' ' 'X' 'LWAER' '',
    Document Currency
      USING 'WAERS' 'T_FINAL' ' ' ' ' ' ' 'Document Currency'(013)
    Amount in document currency
      USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' 'Amount in document currency'(014)
      ' '  ' ' ' ' 'X' 'WAERS' '',
    *--SIR-07541 Begin
    2nd Local Currency
      USING 'HWAE2' 'T_FINAL' ' ' ' ' ' ' '2nd Local Currency'(041)
    *--SIR-07541 End
    Amount in Second Local Currency
      USING 'DMBE2' 'T_FINAL' ' ' ' ' ' '
      'Amount in Second Local currency'(015)
      ' '  ' ' ' ' 'X' 'HWAE2' '',
    Profit Center
      USING 'PRCTR' 'T_FINAL' ' ' ' ' ' ' 'Profit Center'(016)
    Partner Profit Center
      USING 'PPRCT' 'T_FINAL' ' ' ' ' ' ' 'Partner Profit Center'(017)
    Trading Partner
      USING 'VBUND' 'T_FINAL' ' ' ' ' ' ' 'Trading Partner'(018)
    Purchasing doc no
      USING 'EBELN' 'T_FINAL' ' ' ' ' ' ' 'Purchasing Document number'(019)
    USING 'AWKEY' 'T_FINAL' ' ' ' ' ' ' 'Reference key'(020)
    Status  field
      USING 'STATUS' 'T_FINAL' ' ' ' ' ' ' 'Status'(021)
    Clearing date
      USING 'AUGDT' 'T_FINAL' ' ' ' ' ' ' 'Clearing date'(022)
      ' '  'X' ' ' ' ' ' ' '',
    Document Number of the Clearing Document
      USING 'AUGBL' 'T_FINAL' ' ' ' ' 'X' 'Clearing Document No'(023)
      ' '  'X' ' ' ' ' ' ' '',
    Assignment
      USING 'ZUONR' 'T_FINAL' ' ' ' ' 'X' 'Assignment'(024)
      ' '  'X' ' ' ' ' ' ' '',
    Posting Date
      USING 'BUDAT' 'T_FINAL' ' ' ' ' 'X' 'Posting Date'(025)
      ' '  'X' ' ' ' ' ' ' '',
    Item Text
      USING 'SGTXT' 'T_FINAL' ' ' ' ' 'X' 'Item Text'(026)
      ' '  'X' ' ' ' ' ' ' '',
    Payment method
      USING 'ZLSCH' 'T_FINAL' ' ' ' ' 'X' 'Payment method'(028)
      ' '  'X' ' ' ' ' ' ' '',
    Payment Block Key
      USING 'ZLSPR' 'T_FINAL' ' ' ' ' 'X' 'Payment Block Key'(029)
      ' '  'X' ' ' ' ' ' ' ''.
    Begin of SRR-22879 APARMAA
      IF p_use EQ 'X'.
        PERFORM f_fieldcat_build :
    Vendor Name
         USING 'NAME1' 'T_FINAL' ' ' ' ' ' ' 'Vendor Name'(054)
    Due Date
         USING 'DUEDATE' 'T_FINAL' ' ' ' ' ' ' 'Due Date'(056)
    BEGIN OF SRR 25449
        USING 'AGING' 'T_FINAL' ' ' ' ' ' ' 'Aging Details'(057)
    Current
          Using 'WRBTR' 'T_FINAL' ' ' ' ' ' ' 'current'(061)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    31-60
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '31-60'(058)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    61-90
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '61-90'(059)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    >90
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '>90'(060)
          ' '  ' ' ' ' ' ' 'WAERS' ''.
    END OF SRR 25449
      ENDIF.
    End of SRR-22879 APARMAA
    BUILD SORT CATALOG
      PERFORM f_sortcat_build :
    SORT BY COMPANY CODE
      USING '01' 'BUKRS' 'T_FINAL' 'X' 'X',
    SORT BY Venodr Number
      USING '01' 'LIFNR' 'T_FINAL' 'X' 'X',
    SORT BY Document Number
      USING '01' 'BELNR' 'T_FINAL' 'X' ' ',
    SORT BY Fiscal Year
      USING '01' 'GJAHR' 'T_FINAL' 'X' ' '.
       IF p_list = 'X'.
    *GENERATE CLASSIC LIST LAYOUT
        PERFORM f_call_alv_list_view1.
      ELSEIF p_grid = 'X'.
    *--GENERATE CLASSIC GRID LAYOUT
        PERFORM f_call_alv_grid_viewer1.
      ENDIF.
    ENDFORM.                    " f_display_data
    *&      Form  f_fieldcat_build
      To build field catelog
    FORM f_fieldcat_build USING    l_fieldname TYPE slis_fieldname
                                   l_tabname   TYPE slis_tabname
                                   l_reftab    LIKE dd03p-tabname
                                   l_reffield  LIKE dd03p-fieldname
                                   l_outputlen TYPE any
                                   l_seltext_l LIKE dd03p-scrtext_l
                                   l_hotspot   TYPE c
                                   l_no_out    TYPE c
                                   l_no_zero   TYPE c
                                   l_do_sum    TYPE c
                                   l_cfldname  TYPE char30
                                   l_col_pos   LIKE sy-cucol.
    *LOCAL DATA
      DATA : l_wa_fieldcat LIKE LINE OF t_field_catalog.
      l_wa_fieldcat-fieldname     = l_fieldname.
      l_wa_fieldcat-tabname       = l_tabname.
      l_wa_fieldcat-outputlen     = l_outputlen.
      l_wa_fieldcat-hotspot       = l_hotspot.
      l_wa_fieldcat-no_out        = l_no_out .
      l_wa_fieldcat-no_zero       = l_no_zero .
      l_wa_fieldcat-do_sum        = l_do_sum .
      l_wa_fieldcat-cfieldname    = l_cfldname.
      l_wa_fieldcat-col_pos       = l_col_pos.
    *--SIR-07541 Begin
      IF l_fieldname = 'DMBTR'.
        l_wa_fieldcat-cfieldname = 'LWAER'.
      ENDIF.
      IF l_fieldname = 'WRBTR'.
        l_wa_fieldcat-cfieldname = 'WAERS'.
      ENDIF.
      IF l_fieldname = 'DMBE2'.
        l_wa_fieldcat-cfieldname = 'HWAE2'.
      ENDIF.
    *--SIR-07541 End
      IF NOT l_seltext_l IS INITIAL.
        l_wa_fieldcat-seltext_l     = l_seltext_l.
      ELSE.
        l_wa_fieldcat-ref_fieldname = l_reffield.
        l_wa_fieldcat-ref_tabname   = l_reftab.
      ENDIF.
      APPEND l_wa_fieldcat TO t_field_catalog.
      CLEAR l_wa_fieldcat.
    ENDFORM.                    " f_fieldcat_build
    *&      Form  f_sortcat_build
         To sort the catelog
    FORM f_sortcat_build USING l_spos      LIKE alvdynp-sortpos
                                 l_fieldname TYPE slis_fieldname
                                 l_tabname   TYPE slis_tabname
                                 l_up        TYPE c
                                 l_subtot    TYPE c.
    LOCAL DATA
      DATA:  l_sort TYPE slis_sortinfo_alv.
      l_sort-spos      = l_spos.
      l_sort-fieldname = l_fieldname.
      l_sort-tabname   = l_tabname.
      l_sort-up        = l_up.
      l_sort-subtot    = l_subtot.
      APPEND l_sort TO t_sortcat.
      CLEAR l_sort.
    ENDFORM.                    " f_sortcat_build
    *&      Form  f_call_alv_list_view1
        To call alv_list_display
    FORM f_call_alv_list_view1 .

    Hi-
    This might help you
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa0115493111d182b70000e829fbfe/frameset.htm
    Chandra.

  • Swap Space error in pre requisite check of NWDS2004(Support Pack18)install

    Hi,
    Trying to install NWDI SP 18 (SAP Netweaver Developer Workplace ) trial version on my machine with Windows XP.
    The installation (after installing J2EE Engine + MaxDB + NWDS 2004 etc), it has thrown some error regarding page size.
    So when we check the pre requisites for the installation of the software, it is giving the below error that the swap size needs to be increased.
    ==============================================
    Condition:- Swap Size
    Result Code:- Condition not met
    Severity:- HIGH
    Message:- For the selected services atleast 7135 MB swap space recommeneded.Current value 3921 MB(updated 2005-06-24)
    =============================================
    Please anybody let me know if there is a way to increase the swap size and fix the issue at the earliest.

    Hi Gandhi,
    Right click my on computer ->Select Properties -> Click Advanced Tab ->Click Settings (performance) -> Select Advanced Tab -> In virtual memory -> Change ; You canIncrease swap space/page file here.
    regards
    Juan
    Please reward with points if helpful

Maybe you are looking for

  • How to change the text of a field in organisational assignment.

    hi gurus, how to change the text of field MSTBR (super visor) to a differnt name in info type pa0001. i have changed the field name in cmod , changed name appears in table.but it is not appearing in the info type screen 0001. how to resolve this pls

  • HDMI to DVI-D

    Hi, I'm trying to connect an external HP 2510i (WD005AA) monitor to my M6-K125DX HP Envy notebook. I'm using an HDMI to DVI adapter cable but the monitor says it does not receive a signal. The display shows no image en after a while, the monitor goes

  • Illustrator crashes on startup - Win7

    Just did a clean install of Win 7 64bit. The rest of CC seems fine. Illustrator keeps crashing as soon as I get through the splash screen. I've updated my graphics card driver, tried deleting various plug-ins, signed out and signed in, reinstalled th

  • How can we restrict generation of schedule line if target qty is reached

    Hi, I have an issue, even if the target Qty is reached , system generates schedule lines through MRP. How can i restrict the generation of schedule line if Target Qty is reached. Regards, Satish.

  • Contacts take forever to load!  Grr!

    Hello all, So this has been bugging me since day one, and I figured I'd see if anyone else has the issue. iPhone 3G 16GB, 2.1 firmware, sync with MS Exchange server at work. Whenever I launch the Contacts application, it displays fairly quick, but th