Logic needed

I have a report in which most of condition types hard coded in the program and every time required modification on creation of new condition type.
I wish to make this report flexi to show the values of all condition type of selected records.
Wht steps should be taken to determine runtime recorde to be written as output.
Please Guide

hi
one way is
using FM 
CALL FUNCTION READ_TEXT
   Exporting
      cleint  = sy_mandt
      id       = threadid
      lang =
      name
      object
tables
  lines = it_lines.
for ex  tid is ZSIG tdname is 9900 and tdobject is ZMM.
from the is u get the all the condtions and their values.
other way is
all the condtions are stored KONV table,
u get the values u should add the condtions in report.
without add condition types how to get values for that condition type.
sample code
start-of-selection.
  select vbrk~fkart
         vbrp~matnr
         vbrp~aubel
         vbrk~vbeln
         vbrk~vbtyp
         vbrk~fkdat
         vbrp~posnr
         vbrp~vgbel
         vbrp~vgpos
         vbrp~fkimg
         vbrp~netwr
         vbrp~lgort
         vbrp~cuobj
         vbrk~knumv
         vbrk~erdat
         into table int_vbrk
         from ( ( vbrk inner join vbrp
                 on vbrk~vbeln = vbrp~vbeln )
                 inner join mara
                  on vbrp~matnr = mara~matnr )
        where vbrk~fkdat in s_fkdat
        and mara~mtart = 'FERT'.
  if not int_vbrk[] is initial.
    select ser01~lief_nr
    ser01~posnr
    objk~equnr
    objk~sernr
    into table int_sernr
    from ser01 inner join objk on ser01~obknr = objk~obknr
    for all entries in int_vbrk where
                            ser01~lief_nr = int_vbrk-vgbel and
                            ser01~posnr = int_vbrk-vgpos .
  endif.
  if not int_sernr[] is initial.
    select ser05~ppaufnr
           ser05~ppposnr
           objk~sernr
           into table int_aufnr
           from ser05 inner join objk on ser05~obknr = objk~obknr
           for all entries in int_sernr where
                            objk~sernr = int_sernr-sernr.
  endif.
  loop at int_aufnr.
    select single *
                  from aufk where aufnr = int_aufnr-ppaufnr.
    "and auart in ordty.
    if sy-subrc <> 0.
      delete int_aufnr where ppaufnr = int_aufnr-ppaufnr.
    else.
      int_aufnr-auart = aufk-auart.
      modify int_aufnr transporting auart.
    endif.
  endloop.
  loop at int_aufnr.
    concatenate 'OR' int_aufnr-ppaufnr into int_aufnr-order.
    modify int_aufnr.
  endloop.
  describe table int_aufnr lines sy-tabix .
  if sy-tabix > 0.
    select objnr from
                 auak into corresponding fields of table itab3
                 for all entries in int_aufnr
                 where objnr = int_aufnr-order
                 and stflg = space
                and stokz = space.
  endif.
  if not int_vbrk[] is initial.
    select knumv zaehk kbetr kschl kwert
          from konv
             into corresponding fields of table it_konv
                for all entries in int_vbrk
                   where knumv = int_vbrk-knumv
                    and kschl in ('VA00',
                                  'ZMD1',
                                  'ZV00',
                                  'ZED',
                                  'ZSED',
                                  'ZCES',
                                  'KF00',
                                  'ZD00',
                                  'ZDIF',
                                  'Z007',
                                  'Z004',
                                  'ZTD3',
                                  'ZTD2',
                                  'ZREB',
                                  'ZCM5',
                                  'ZV01',
                                  'ZTD1',
                                  'ZP07',
                                  'ZDDF',
                                  'Z009',
                                  'ZV02',
                                  'ZVAS',
                                  'ZMDS',
                                  'ZSTD',
                                  'ZNCD',
                                  'ZV03',
                                  'ZV04',
                                  'ZV05',
                                  'ZTD1',
                                  'ZTD4',
                                  'ZTD5',
                                  'ZTD6',
                                  'ZTD7',
                                  'ZTD8',
*********************Start on EDS and SZ398R - 04/03/2008,05/03/2008
                                'ZTD9','ZTDI','ZTDN','ZTDR','ZTSP',
                                  'ZSP','ZSPE','ZSCR','ZPCE','ZPAE',
                                   'ZEDC','ZEDU','ZF00','ZED2','ZP06',
                                  'SKTO','ZNDP','SKTV','Z001','ZADB',
                                  'PR00','UTXJ','JMOD','JEX2','JAED',
                                  'JEXA','JSED','JEXS','JNED','JEXN',
                                  'JCES','JCED','JECS','JECX','JA1X',
                                  'JA1Y','JIN6','JIN7','ZDIF').
*********************End of EDS and SZ398R - 04/03/2008,05/03/2008
  endif.
                       END OF SELECTION
end-of-selection.
*******Start on EDS and SZ398R - 05/03/2008
v_date =  '20080101' .
*******End of EDS  and SZ398R - 05/03/2008
set pf-status 'ABCD'.
  loop at int_vbrk.
    flag = 0.
    clear int_sernr.
    read table int_sernr with key
             lief_nr = int_vbrk-vgbel
             posnr = int_vbrk-vgpos .
    clear int_aufnr.
    read table int_aufnr with key
              sernr = int_sernr-sernr.
    clear itab3.
    clear settle.
    read table itab3 with key objnr = int_aufnr-order.
    if sy-subrc <> 0.
      loop at int_aufnr where sernr = int_sernr-sernr.
        clear itab3.
        read table itab3 with key objnr = int_aufnr-order.
        if sy-subrc eq 0.
          settle = 'X'.
          exit.
        endif.
      endloop.
      if sy-subrc ne 0.
        delete int_vbrk where vgbel = int_vbrk-vgbel
                    and vgpos = int_vbrk-vgpos.
        clear int_vbrk.
        flag = 1.
      endif.
    else.
      settle = 'X'.
    endif.
    if flag = 0.
      clear itab.
      move-corresponding int_vbrk to itab.
      select single * from vbrk where vbeln = itab-vbeln.
      select single * from kna1 where kunnr = vbrk-kunag.
      itab-delc = kna1-kunnr.
      itab-deln = kna1-name1.
      if int_vbrk-vbtyp = 'M' or int_vbrk-vbtyp = 'S'.
        itab-sold = 1.
      elseif int_vbrk-vbtyp = 'N' or int_vbrk-vbtyp = 'O'.
        itab-sold = -1.
      endif.
      select single *
             from  ausp
             where  mafid  = 'O    '
             and    klart  = '002  ' "  '002' For Equipment
             and    objek   = int_sernr-equnr.
      if ausp-atinn eq  4.
        itab-atwrt = ausp-atwrt.
      endif.
      itab-sernr   = int_sernr-sernr.
      itab-ppaufnr = int_aufnr-ppaufnr.
      itab-ppposnr = int_aufnr-ppposnr.
      itab-auart = int_aufnr-auart.
      loop at it_konv where knumv = int_vbrk-knumv.
        case it_konv-kschl.
          when 'VA00'.
            itab-va00 = itab-va00 + it_konv-kwert.
          when 'ZVAS'.
            itab-va00 = itab-va00 + it_konv-kwert.
          when 'ZMD1'.
            itab-zmd1 = itab-zmd1 + it_konv-kwert.
          when 'ZMDS'.
            itab-zmd1 = itab-zmd1 + it_konv-kwert.
          when 'ZV00'.
            itab-zv00 = itab-zv00 + it_konv-kwert.
******************************Start on +EDS and SZ398R - 04/03/2008
*Basic Excise Duty Add conditions ZED1 ZEDB ZEXD JMOD JEX2'
          when 'ZED' or 'ZED1' or'ZEDB' or 'ZEXD' or 'JMOD' or 'JEX2'.
            itab-zed = itab-zed + it_konv-kwert.
*Special Excise Duty Add conditions JSED JEXS ZEDS
         when 'ZSED' or 'JSED' or 'JEXS' or 'ZEDS'.
            itab-zsed = itab-zsed + it_konv-kwert.
*Cess on Excise Duty Add conditions JCES JCED ZPCE.
         when 'ZCES' or 'JCES' or 'JCED' OR 'ZPCE'.
            itab-zces = itab-zces + it_konv-kwert.
********************************End of +EDS and SZ398R - 04/03/2008
           when 'KF00'.
            itab-kf00 = itab-kf00 + it_konv-kwert.
          when 'ZD00'.
            itab-kf00 = itab-kf00 + it_konv-kwert.
          when 'ZDIF'.
            itab-zdif = itab-zdif + it_konv-kwert.
          when 'Z007'.
            itab-z007 = itab-z007 + it_konv-kwert.
          when 'Z004'.
            itab-z007 = itab-z007 + it_konv-kwert.
          when 'ZREB'.
            itab-zreb = itab-zreb + it_konv-kwert.
          when 'ZCM5'.
            itab-zcm5 = itab-zcm5 + it_konv-kwert.
          when 'ZV01'.
            itab-zv01 = itab-zv01 + it_konv-kwert.
          when 'ZTDI'.
            itab-ztdi = itab-ztdi + it_konv-kwert.
          when 'ZTD2'.
            itab-ztd2 = itab-ztd2 + it_konv-kwert.
          when 'ZTD3'.
            itab-ztd3 = itab-ztd3 + it_konv-kwert.
          when 'ZP07'.
            itab-zp07 = itab-zp07 + it_konv-kwert.
          when 'ZDDF'.
            itab-zddf = itab-zddf + it_konv-kwert.
          when 'Z009'.
            itab-z009 = itab-z009 + it_konv-kwert.
          when 'ZV02'.
            itab-zv02 = itab-zv02 + it_konv-kwert.
*******************************Start on EDS and SZ398R - 04/03/2008
*Additional  Excise Duty  Add conditions JAED JEXA  ZED2'
          when 'ZNCD' or 'JAED' or 'JEXA' or 'ZED2'.
            itab-zncd = itab-zncd + it_konv-kwert.
*New condtions added start
*National Calamity and Contingency Duty.
          when 'ZNCT' or 'JNED' or 'JEXN'.
            itab-znccd = itab-znccd + it_konv-kwert.
*Education Cess
          when 'JECS' or 'JECX' or 'ZPAE' or 'ZEDC' or 'ZEDU'.
            itab-zedu = itab-zedu + it_konv-kwert.
*Higher and Sec. Education Cess
          when 'JA1X' or 'JA1Y'.
            itab-zhsedu = itab-zhsedu + it_konv-kwert.
*New condtions added end
********************************End of EDS and SZ398R - 04/03/2008
          when 'ZV03'.
            itab-zv03 = itab-zv03 + it_konv-kwert.
          when 'ZV04'.
            itab-zv04 = itab-zv04 + it_konv-kwert.
          when 'ZV05'.
            itab-zv05 = itab-zv05 + it_konv-kwert.
          when 'ZTD1'.
            itab-ztd1 = itab-ztd1 + it_konv-kwert.
          when 'ZTD4'.
            itab-ztd4 = itab-ztd4 + it_konv-kwert.
          when 'ZTD5'.
            itab-ztd5 = itab-ztd5 + it_konv-kwert.
          when 'ZTD6'.
            itab-ztd6 = itab-ztd6 + it_konv-kwert.
          when 'ZTD7'.
            itab-ztd7 = itab-ztd7 + it_konv-kwert.
          when 'ZTD8'.
            itab-ztd8 = itab-ztd8 + it_konv-kwert.
          when 'ZSTD'.
            itab-zstd = itab-zstd + it_konv-kwert.
********************Start on EDS and SZ398R - 05/03/2008
*New condtions added start
          when 'ZTD9'.
            itab-ztd9 = itab-ztd9 + it_konv-kwert.
*Trade Discount New.
          when 'ZTDN'.
            itab-ztdn = itab-ztdn + it_konv-kwert.
Cash  Discount
          when 'SKTO' OR 'SKTV'.
            itab-zcd = itab-zcd + it_konv-kwert.
CST Discount
          when 'ZDIP'.
            itab-zcstd = itab-zcstd + it_konv-kwert.
Adok Discount
          when 'ZDIK'.
            itab-zad = itab-zad + it_konv-kwert.
Adhoc Discount.
          when 'ZDOK'.
            itab-zad1 = itab-zad1 + it_konv-kwert.
Test Drive Discount
          when 'ZTDR'.
            itab-ztdd = itab-ztdd + it_konv-kwert.
Special Trade Discount.
            when 'ZTSP'.
            itab-zstd1 = itab-ztd1 + it_konv-kwert.
*New condtions added end
***********************End of EDS and SZ398R - 05/03/2008
        endcase.
      endloop.

Similar Messages

  • Why does logic need to be "warmed up"?

    Whenever I start logic pro 7.1.1 and load up my most recent song, I always have to go through a series of core overloads. Most of my softsynths ( I typically use around 25 ) are EXS24 samples, and it seems as though whenever I load up an instrument I have a huge spike in CPU when a new note is played for the first time, and then it plays fine after that. The problem is when I load up a song and press play, I have to go through an annoying and tedious series of core overloads every time a new note is played until logic cashes all of the notes and I can actualy get to work. Is there any settings that I should change so logic will play the song the first time?
    My core audio settings
    256mb buffer
    larger disk buffer
    medium process buffer range
    power book g4 1.5ghz 512mb ram logic 7.1.1 pro

    512mb ram
    That's problem #1
    larger disk buffer
    Not a good idea, in view of your low RAM.
    Are you using an external drive for your projects?
    Having said that, I know this has been mentioned here before, so you might want to search for EXS24+missing notes. I think it was iSchwartz that had a theory about this - but I know that even with plenty of memory it seems that Logic needs its pump primed sometimes.

  • Things that Logic needs to be #1!!!!

    I think Logic needs to do some work on the waveform edit.
    More like Pro Tools.
    Right now, the main thing i miss is not to be able to quantize an Apple Loop. I mean, some parts of the loop that are offbeat are impossible to quantize.
    Message was edited by: Bob Antis

    Yes,i mean the blue apple loops.
    I wouldn't even mind if i could tweak the normal aiff loops like Ableton Live or Pro Tools, to be able to quantize by yourself with precision!
    I think Apple should include that in their next update, it's so important for waveform editing. My self, i edit a loop in Pro Tools,then export it and work it in Logic, it's so frustrating!!!

  • Fail safe logic needed for purchase order upload program

    Hello all,
    i am working on creating PO's by reading data from a text file. I need to implement fail safe logic in it, which is to make sure this program uploads all the records in the text file successfully. For example, i have 1000 records in my text file and while running the upload program if the program times out while creating the 500th PO or if SAP is down at that time, then we have 499 PO's created and 501 yet to be created. But if we run the same program again, we will generate duplicate PO's for 499 again. I want to avoid this kind of problem.
    How do i implement this idea?
    Kindly guide me on this.
    Thanks.

    Ok ..
    Then I would suggest you use Application Log to keep the success and error messages of PO processing.
    You can check trsnaction SLG0 and create your own application log object.
    Then you need to use FMs BAL_LOG_* to crate and add messages to it.
    This way you will have a facility to check as which of your records are converted to PO for a run.
    In case SAP gets down in between , still you can find the details using Xn SLG1 and then accordingly remove the records from your file which are already converted to PO.
    Thanks,
    Ram

  • Logic needed to print blank line in alv report

    hi experts,
    can anyone please tell me the logic for this
    i want to logic one is
    1) in alv report contains
    a set of data contains 100 (5 datas)
    and a set of data contain 200(5 datas)
    i want to have one coloum containing serial no
    ex for 100 i want to move no '5' to one coloumn ,but it should display only ones not for all 5 records.
    same for 200 also i want to move 7 to this ,it should b displayed ones
    i used for at new command alos its not working
    2)suppose for particular date, 200 related records is not there
    it should conatin blank line,displaying 'NIL'.
    SO THE OPT FROMAT MUST BE
    MATNR            DOCNO
    100                  1000
    100                  1000
    100                    "
    100                     "
    100                    "
    200                   2000
    200                      "
    200                     "
    200                    "
    200                    "
    SUPPOSE 200 RECORD IS NOT THERE THE OPT SHLD B
    100           1000
    100            1000
    200           NIL

    Arun,
    1)
    If you are using the  function module REUSE_ALV_GRID_DISPLAY, then use the internal table it_sort with a row for the column where you want the suppression of repeated values.
    2)
    If you are using the  function module REUSE_ALV_GRID_DISPLAY, then simply ensure that your internal table t_outtab has the rows that you need containing 'NIL'.
    John

  • Logic needed in selection screen

    hi experts,
       in  a selection screen i have one field S_budat ( it contains the range ) the user enters the date in it .the problum is we need to check the following condition .
    if sy-datum> s_budat+13 months if it is ok we need get the values from the archive db else r/3 data .but in the mean while we have to check residency limit ( for ex: the data is archived till 22-03-2007. but in the selection screen  the user entered the range 20-2-2006 to 24-5-2007 this falls in the both .so for this how to write the logic .till 22-03-2007 we have to take the data from the archive DB after thatwe have to take online data )
    points will be reworded.

    You can check whether the Achive date lies between the range.
    If it does, then create 2 records in the select-option table
    1) from s_budat-low to arcive date
    2) from archive date to s_budat-high.
    Now you can do 2 selects 1 on archived tables , other on R/3 data using these 2 date ranges.
    For the 2nd select , you can use the "appending" addition in the select statement

  • Soundtrack Pro making a LOT of files - used to working in Logic, need help

    So I'm used to working with Logic Studio/7.2/etc, and it's my first foray into working with Soundtrack Pro at work. My questions are this: When I use the razorblade tool (since I can't find an equivalent to the split tool in logic) in soundtrack to cut up a sequence, it seems to be creating a LOT of extra files:
    http://www.1217design.com/pics/stp_question.png is an example of what I mean. Is this supposed to happen? The recorded files themselves were done in FCP and sent to Soundtrack Pro via the Send to STP Multitrack session function.
    What I'm trying to find out is: Is this supposed to be happening? How can I stop this from happening? Are all of these extra files necessary in order to export the final project? And what will happen if I delete them?
    I just want to know because the folder is now 4.71gb for a 30 second audio file (the final aif export is roughly 30mb), and there's over 200 of these extra files that have been created in the process of working on this project.
    If this is what is necessary to work in Final Cut then I won't be able to work with FCP due to size issues (which is a shame as I feel so much more comfortable working within that environment than I do working in FCP).
    Thanks for the help in advance,
    Sean

    Sean A wrote:
    By doing this, will it still create all of those extra files? That's what I'm trying to figure out. Is it just from the blade tool being used?
    For all edits, yeah, baby, STP will generate more files than cows create methane.
    First, I know what works for me, but I'm still learning, so I strongly encourage you to keep a COMPLETE BACKUP of all projects until you know your workflow. Also, you may have Preferences set up differently than I do, so you may not find the same paths as what I describe here.
    When you have an audio file the way you want it, and you're confident that you won't need those edit files again (be SURE) Process > Flatten All Actions (or Audible Actions) and Save that audio file. Then -- as I understand it so far -- you can safely trash all the edits related to that file. (If you use Photoshop or similar visual programs, it's the same idea.)
    During my first few weeks of intensive STP work, my drive grew more and more sluggish, for no reasons known to me. I saw disk space shrinking rapidly. Finally I figured it had to have something to do with STP, so I started searching and eventually I found my edits piling up in home/Documents/Soundtrack Pro Documents, especially (for me) in Edited Media. Since they all came from projects I'd finished and exported to AAC and MP3, I was comfortable trashing them all. Suddenly, whoa, I had an extra 12 GB of disk space available.
    Just keep those edit files until you are CERTAIN that you know what you're doing and that you're DONE. Otherwise, when some project needs one precious little 3MB turn of a phrase, you may find yourself confronting suicidal or homicidal tendencies.
    I welcome further clarification and/or correction from people who know more and can explain it better.
    Best,
    chuck

  • Logic needed on general abap

    Hi Experts
    I am having a list of TAXCODES like.
    "CA" "CC" "CD" "DA" "DE" "WS"
    Now in purchase orders if  i am having different line items having the above TAX CODES.
    i need to pass a variable &XXX& which is having text to sap script form.
    And if the Purchase order having line items which is having one of the taxcode above for one line item and the other line item having diifferent  taxcode like V0 etc { for these case i dont need to send text data }
    and if the PO  having one tax code for all line items.{ i need to send the data }
    how to achive this
    i am trying in this way
        SELECT ebeln
               ebelp
               mwskz          "Tax code
          FROM ekpo
          INTO TABLE lt_ekpo
          WHERE ebeln = v_ebeln
         AND   mwskz in r_mwskz
          AND loekz = ''.
        DESCRIBE TABLE lt_ekpo LINES lv_count.
        lt_ekpo1[] = lt_ekpo[].
        SORT lt_ekpo1 BY ebelp DESCENDING.
        READ TABLE lt_ekpo1 INTO wa_ekpo INDEX 1.
        v_ebelp1 = wa_ekpo-ebelp.
        CLEAR wa_ekpo.
    LOOP AT lt_ekpo INTO wa_ekpo.
          IF sy-tabix = 1.
            lv_taxcode = wa_ekpo-mwskz.
         ELSE.
            IF lv_taxcode NE wa_ekpo-mwskz.
              lv_diff_tax = 'X'.
           if  lv_taxcode EQ 'CA' or lv_taxcode EQ 'CC' or lv_taxcode EQ 'CD' OR lv_taxcode EQ 'DA' OR lv_taxcode EQ 'DE' or  lv_taxcode EQ 'WS'.
             ELSE.
           ENDIF.
          ENDIF.
    please provide the logic for the above case.
    Edited by: suribabu124 on Apr 26, 2010 4:13 PM

    hi
    this can be done using rages
    Regards
    Suresh

  • Logic needed urgent

    Hi Friends,
    I need logic (code for the following requirement.
    1. Bank guarantees received are entered by F-57 transaction as a noted item in system and the following data will be captured in the respective field.
    Document date: Bank Guarantee date
    Posting date: Date of entry         
    Reference field: BG Number
    Document header text: Bank guarantee type
    Assignment: Bank name
    Special G/L Assignment: Bank account number
    Text: Bank address
    Due date: Claim end date
    2. Posting keys (BSEG-BSCHL) 39 & 29 are used in F-57 transaction with special G/L Indicator (BSEG-UMSKZ) at time of Entering statistical postings and Reversal respectively
    3. Cross check the period of validity of bank guarantee by comparing the due date (BSEG-ZFBDT) at the time of entering statistical postings and Document date (BKPF-BLDAT) at the time of Reversal.
    4. If the bank guarantee cancels or reversed before due date (BSEG-ZFBDT) cancellation date i.e. Document date of reversal is to be populated in the report and in other case the due date is to be populated in the report.
    Selection screen has the fields
    BKPF-BUKRS   Mandatory
    LFA1/BSEG-LIFNR     Optional
    BSEG-ZFBDT     Optional
    BKPF-BLADT     Optional
    The o/p structure has the following fields
    BKPF-XBLNR     BG NO(Reference)
    BSEG-LIFNR     Vendor code
    LFA1-NAME1     Vendor Name
    BKPF-BLDAT     Start date(Document date)
    BSEG-ZFBDT     End date(Due date)
    BSEG-WRBTR     Amount
    BKPF-WAERS     Currency
    BSEG-ZUONR     Bank Name(Assignment)
    BSEG-SGTXT     Bank Address
    BSEG-HZUON     Account Number
    BKPF-BKTXT     BG Type
    BSEG-ZFBDT     Claim end date

    Hi,
    define internal table
    It_bseg with fields BURKS, BELNR,GJAHR, BUZEI and other field (look the output fields).
    it_bkpf with fields BURKS, BELNR,GJAHR anmd other required fields.
    it_lfa1 with fields LIFNR and NAME1.
    NOw
    SELECT BURKS, BELNR,GJAHR ,<other required fileds>
             into table it_bkpf  from BKPF
    where BUKRS  in/= <selectionscreen-burks>
    and bladt in/= <selectionscreen--bladt>.
    If it_bkpf[] is not initial.
    select BURKS, BELNR,GJAHR, BUZEI and other fields
       into  table it_bseg from bseg
    for all entries in it_bkpf
    where burks = it_bkpf-burks
    and belnr = it_bkpf-belnr
    and gjahr = it_bkpf-gjahr
    and ZFBDT in/= <selection screen ZFBDT>
    endif.
    Now
    select lifnr name1 from lfa1 into it_lfa1
    where lifnr in <selection scfreen lifnr>.
    YOu have three tables now..
    you can loop at 1st table get the output fields put in into work area
    read 2nd table relevant to first one and then read IT_LFA1 table with lifnr same as lifnr in BSEG and fill the final internal table.
    Any doubts in retrieving please feel free to post your question
    rewards if useful,
    regards,
    nazeer
    Message was edited by:
            'Nazeer'

  • Internal Table Logic Needed

    Hi all,
    I have a requirement regarding data processing in a internal table,
    internal table consists of filelds Vendor,Material and Scheduling Dates and Total Qty.
    Here i need to fill the field Total Quantity, individual addition of quanties of that material for a particular vendor .
    Let us consider intitially my internal table consists of data like this with these fields.
                      Vendor ,           Material  ,            qty(individual),   Total qty   ,  Schedule dates
                       v1        ,           m1       ,                 10          
                       v1        ,           m1        ,                10
                       v1       ,             m1       ,                  20
                       v1       ,              m2      ,                    5
                       v1       ,             m2        ,                 10
                       v2        ,            m2         ,                20
                      v2        ,             m2        ,                  15
                      v2        ,            m3         ,                  20
                      v2        ,            m3           ,                10
        Initiall the total qty field is empty i need to fill tht field for the last item for a particular material Like M1
      for vendor v1 and total qty of m2 for vendor v1, total qty of m1 for v2, total qty of m2 for v2 and so on.
    Requied output should be like this.
                     Vendor     ,          Material       ,    qty(individual)            Total qty   Schedule dates
                      v1         ,                m1         ,         10           ,               0        
                       v1          ,              m1          ,        10           ,                 0
                       v1         ,                m1         ,         20          ,                40(101020)
                       v1        ,                 m2          ,         5           ,               0
                       v1          ,               m2           ,      10            ,              15(5+10)
                       v2          ,               m2          ,        20            ,             0    
                       v2          ,               m2           ,       15             ,              35(20+15)
                      v2           ,              m3          ,        20              ,             0
                      v2            ,              m3           ,       10              ,           30(20+10)
    Here i made one thing , i calculated the total qty of material for particular vendor.
    Like              
             Vendor                           Material                     Total Qty      
                     v1        ,                        m1            ,             40
                     v1        ,                       m2              ,            15
                     v2         ,                     m2                ,           35
                     v2          ,                    m3                 ,           30
    Finally i need the logic by using Control Events(At New   , At End of )  to adjust that total qty of a material for a particular vendor by Modifying the internal table.
    i hope my problem is clear , pls let me know if any clarifications needed. and
    code for the same .
    Thannks in advance,
    Niranjan.

    Hi,
    Solution is here.
    sort itab by vendor material.
    field-symbols: <itab> like line of itab.
    loop at itab assigning <itab>.
    on change of vendor.
    clear flag.
    endon.
    add <itab>-quanity to lw_quantiy.
    *--here pdate internal table end of each similar kind of record
    at end of.
    flag = 'x'.
    <itab>-totalqty =  lw_quantiy.
    clear  lw_quantiy
    endat.
    *--rest of record update zero by checking flag
    if flag is initial.
    <itab>-totalqty = 0.
    endif.
    endloop.
    close this thread if you got solution.
    Regards,
    Peranandam

  • Logic needed in query

    Hi all
    i have a table with columns
    SUN MON TUE WED THU FRI SAT
    Y................ ........Y..................
    i need to selected the column SUN which is Sunday,
    along with this i need to select the columns MON,TUE
    THU is having value so i don't needed that
    if i select WED then i needed THU, FRI, SAT also
    can u pls help on this.
    Edited by: 881121 on Apr 5, 2013 11:13 PM

    user648773 wrote:
    You need to return the name of days? or you need to return the values of the colum?
    You have onley two cases? or could be more? could you describe the logic in general?
    one query always return the same number of colums. So, in your case you should return one column and concatenate the values as you need.
    here is an example with concatenate, and return the correspondig values:
    select out
    from
    select case
    when SUN = 'Y' THEN SUN||MON||TUE
    WHEN WED = 'Y' THEN WED||THU||FRI
    END out
    from table
    here is an example that return the name of days:
    select out
    from
    select case
    when SUN = 'Y' THEN 'SUN,MON,TUE'
    WHEN WED = 'Y' THEN 'WED, THU, FRI'
    END out
    from table
    May be you could do these things to describe us what you need:
    - make a desc of you table to know the structure.
    - describe each case with an imput and it corresponding outpu.Maybe everything would be easy if you would post:
    1) CREATE TABLE and INSERT statement
    2) Expected output.
    You question is vague and not clear. Please read SQL and PL/SQL FAQ
    This will avoid people here trying to guess what you are trying to say.
    Also keep in mind: when you put some code or output please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    Regards.
    Al
    Edited by: Alberto Faenza on Apr 8, 2013 2:09 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Date selection in query : logic needed!

    Hi,
    we have one calendar day depending on which the query result is displayed!
    Now the requirement is such that when user enters one date the query has to generate the result for the multiple date ranges including the one which he has entered.
    example: if user has entered 15/9/2007 then query should not only display the result of the date 15/9/2007 but also the results of  -5 to +2 ( means 10/9,11/9,12/9,13/9 and 14/9 plus 16/9 and 17/9 )
    simlarly other ranges like -8 to + 7 and so on
    How to define this in query?
    Thanks,
    Ravi

    Hello ,
    I need to make a graph conveying the information of the deliveries by comparing the goods issue date and promised date !
    report also requires how many deliveries were on time, how many were late and how many were early!
    for this requirement, i had thought of making a date selection field which is promised date and make furthur more date ranges selections by query it self so that late deliveries and early deliveries also covered in these date ranges.
    -5 to + 2 is that one range which is on time delivery range
    if the delivery is more eally than the -5 days then it is early delivery. even in ealry delivery i want to make how early it is.
    and suppose the delivery has crossed the promised date 2 days more then it is late delivery.
    all has to be acheived by single date selection and there after the logic which takes care of all the date ranges i had explained.
    i am looking for that logic which i am not finding
    Hope this is clear now
    Thanks,
    Ravi

  • New To Logic need help using drum samples.

    Hey guys im extremly new to logic actually this is my first trip into a mac doing pro audio. Ive been using windows in my studio for years and im trying to learn the ins and outs of Logic right now. My question is im using a set of samples (trigger thru middi usually scored out in staff view) call the steven slate samples usually in windows im using the dr008 to load and trigger them. What would be the equivilent in Logic can i load those samples into ultra beat and trigger them off the staff view?? Again very new to logic but i like what im seeing and i just need come exp. help to get started and cought up to where i was on a PC/Sonar System. Thanx for the help in advance

    Isn't the dr-008 great? I wish they had a Mac version.
    If you're using midi, yes you could configure either UB or the ESX24 with your samples etc.
    The closest thing to the dr-008 that I've found for Mac is either iDrum or Battery - it's fun to play with either in the same way as the DR.

  • Logic needs a better integration for hardware sinthesizers like Emagic - SoundDiver was!

    I work with a community of about 50 logic users in Germany and nearly all of them love to use some of the old hardware machines from Roland, Korg, Akai and so on.
    In the past there was a program from Emagic called "SoundDiver". Sound Diver was a program who integrated all well known hardware synthesizers in to logic that a logic user was able to edit (with read, write, automation!!) the programs and sounds in SoundDiver and Logic.
    SoundDiver was the bridge between Logic and the hardware synthesizers. Especially for the old hardware with midi function was SoundDiver the best program on the market to integrate your hardware in to logic.
    The most important point was that SoundDiver did all this great work by saving time for us as Logic user.
    Our Logic User community agrees that Logic Studio 10 needs a better integration for hardware Synthesizers and especially for the old ones. SoundDiver was the best feature for this.
    Apple: Please integrate the Sound Diver in to Logic 10!!! You will see, all professional and semi professional users will love it and you will have a big benefit in comparison to Cubase and ProTools.
    The current way to work with logic and hardware synthesizers needs to much time and it is not ideal.

    Sound diver was really cool, but it's not working in modern OS. If Apple will try to add it's functionallity , it has to rewrite this soft completely. But even in this case they could not support a big variety of old hardware. I would be happy if I have a little bit more functions in external midi instrument track. I also tried to replace Sound Diver with MIDI Quest AU plugin, but it does not work well with my old Virus.

  • Looping Query logic Needed

    Hi Team
    I have requirement below , can you please help me with sql logic
    My input table is below
    INC_NUM
    FA_ADD
    HZ_ADD
    PARENT_INC_NUM
    ID
    A0001
    A
    A
    A0001-02
    A
    A
    A0001
    1
    A0001-04
    B
    C
    A0001
    1
    A0001-05
    B
    C
    A0001
    1
    A0001-09
    B
    S
    A0001
    1
    A0001-07
    D
    A
    A0001
    1
    B0001
    J
    K
    B0001-03
    L
    M
    B0001
    2
    B0001-04
    J
    K
    B0001
    2
    B0001-05
    A
    B
    B0001
    2
    B0001-06
    A
    B
    B0001
    2
    B0001-07
    A
    B
    B0001
    2
    C0001-02
    A
    B
    C0001-03
    A
    C
    C0001-02
    3
    C0001-05
    A
    B
    C0001-02
    3
    My output
    INC_NUM
    FA_ADD
    HZ_ADD
    PARENT_INC_NUM
    A0001
    A
    A
    A0001-02
    A
    A
    A0001
    A0001-04
    B
    C
    A0001-05
    B
    C
    A0001-09
    B
    S
    A0001-07
    D
    A
    B0001
    J
    K
    B0001-03
    L
    M
    B0001-04
    J
    K
    B0001
    B0001-05
    A
    B
    B0001-06
    A
    B
    B0001-07
    A
    B
    C0001-02
    A
    B
    C0001-03
    A
    C
    C0001-05
    A
    B
    C0001-02
    Here i n considering  null values of parent_inc_num or null values of ID as Parent record  ID
    And i m comparing this record  FA_ADD and HZ_ADD with its child records FA_ADD and HZ_ADD ,If they matches then i m assigning Parent_INC_NUM else null
    Let me take example of record C0001-02, it has null values of PARENT_INC_NUM (or null for ID)
    So C0001-02 is considered as base record ,
    Now i m comparing FA_ADD and HZ_ADD values of C0001-02 with its child records FA_ADD and HZ-ADD (ie C0001-03,C0001-05 )
    C0001-03 doesnt match so i m assigning null in target else i m assigning its base record ie C0001-02
    Below is table sample data
    could you please help
    with t as
    (select 'A0001' as INC_NUM,'A' as FA_ADD,'A' as HZ_ADD ,null as PARENT_INC_NUM ,null as ID from dual
    union all
    select 'A0001-02' as INC_NUM,'A' as FA_ADD,'A' as HZ_ADD ,'A0001' as PARENT_INC_NUM ,1 as ID from dual
    union all
    select 'A0001-04' as INC_NUM,'B' as FA_ADD,'C' as HZ_ADD ,'A0001' as PARENT_INC_NUM ,1 as ID from dual
    union all
    select 'A0001-05' as INC_NUM,'B' as FA_ADD,'C' as HZ_ADD ,'A0001' as PARENT_INC_NUM , 1 as ID from dual
    union all
    select 'A0001-09' as INC_NUM,'B' as FA_ADD,'S' as HZ_ADD ,'A0001' as PARENT_INC_NUM,1 as ID from dual
    union all
    select 'A0001-07' as INC_NUM,'D' as FA_ADD,'A' as HZ_ADD ,'A0001' as PARENT_INC_NUM,1 as ID from dual
    union all
    select 'B0001' as INC_NUM,'J' as FA_ADD,'K' as HZ_ADD ,null as PARENT_INC_NUM , null as ID from dual
    union all
    select 'B0001-03' as INC_NUM,'L' as FA_ADD,'M' as HZ_ADD ,'B0001' as PARENT_INC_NUM,2 as ID from dual
    union all
    select 'B0001-04' as INC_NUM,'J' as FA_ADD,'K' as HZ_ADD ,'B0001' as PARENT_INC_NUM ,2 as ID from dual
    union all
    select 'B0001-05' as INC_NUM,'A' as FA_ADD,'B' as HZ_ADD ,'B0001' as PARENT_INC_NUM,2 as ID from dual
    union all
    select 'B0001-06' as INC_NUM,'A' as FA_ADD,'B' as HZ_ADD ,'B0001' as PARENT_INC_NUM,2 as ID from dual
    union all
    select 'B0001-07' as INC_NUM,'A' as FA_ADD,'B' as HZ_ADD ,'B0001' as PARENT_INC_NUM,2 as ID  from dual
    union all
    select 'C0001-02' ,'A','B',null,null from dual
    union all
    select 'C0001-03','A','C','C0001-02',3 from dual
    union all
    select 'C0001-05','A','B','C0001-02',3 from dual
    select * from t
    I have 100 thousands of records of this  data ,so need to take care of performance as well
    Thank you
    Sumanth

    with t as
    (select 'A0001' INC_NUM,'A' FA_ADD,'A' HZ_ADD ,null as PARENT_INC_NUM ,null as ID from dual union all
    select 'A0001-02','A','A','A0001',1 from dual union all
    select 'A0001-04','B','C','A0001',1 from dual union all
    select 'A0001-05','B','C','A0001',1 from dual  union all
    select 'A0001-09','B','S','A0001',1 from dual union all
    select 'A0001-07','D','A','A0001',1 from dual union all
    select 'B0001','J','K',null,null from dual union all
    select 'B0001-03','L','M','B0001',2 from dual union all
    select 'B0001-04','J','K','B0001',2 from dual union all
    select 'B0001-05','A','B','B0001',2 from dual union all
    select 'B0001-06','A','B','B0001',2 from dual union all
    select 'B0001-07','A','B','B0001',2 from dual union all
    select 'C0001-03' ,'A','B',null,null from dual union all
    select 'C0001-02','A','C','C0001-03',3 from dual union all
    select 'C0001-05','A','B','C0001-03',3 from dual union all
    select 'C0001-06','A','B','C0001-03',3 from dual
    select INC_NUM,FA_ADD,HZ_ADD,
           case when fa_add = connect_by_root fa_add
                 and hz_add = connect_by_root hz_add
                then parent_inc_num
           end parent_inc_num
      from t
    start with parent_inc_num is null
    connect by prior inc_num = parent_inc_num
    INC_NUM
    FA_ADD
    HZ_ADD
    PARENT_INC_NUM
    A0001
    A
    A
    A0001-02
    A
    A
    A0001
    A0001-04
    B
    C
    A0001-05
    B
    C
    A0001-07
    D
    A
    A0001-09
    B
    S
    B0001
    J
    K
    B0001-03
    L
    M
    B0001-04
    J
    K
    B0001
    B0001-05
    A
    B
    B0001-06
    A
    B
    B0001-07
    A
    B
    C0001-03
    A
    B
    C0001-02
    A
    C
    C0001-05
    A
    B
    C0001-03
    C0001-06
    A
    B
    C0001-03
    Regards
    Etbin

  • Reg : Logic Needed

    Hi Friends,
    Can any one please provide logic for this.This will help me lot
    My Input structure below mentioned :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_DisputeCaseSAP xmlns:ns0="http://hnwl.com/INFFI00041/DisputeCase">
    <Records>
    <Invo>BVN0001</Invoice_No>
    <Invdate>20101025</Inv_IssueDate>
    <Due_Date>20101125</Due_Date>
    </Records>
    <Records>
    <Invoice_No>BVN0001</Invoice_No>
    <Inv_IssueDate>20101025</Inv_IssueDate>
    <Due_Date>20101124</Due_Date>
    </Records>
    Condition i need to follow is : 1.If Invo is >10 no need to send that record and if Invo repeats i have to send only latest Due_Date records to target.
    Please let me know suitable way to solve this
    Thanks,
    Dinesh

    Hi,
    Chk this:
    Create one UDF:
    Context Type:All values of a queue.
    Input will be 3 varaibale: var1, var2, var3
    int a=0;
    String mm ="";
    for(int i=0;i<var1.length;i++)
    for(int j=0;j<var2.length;j++)
    if(var1[ i ].equals(var2[j]))  ("i" and "j" in square brackets)
    a=a+1;
    mm= mm + ";" +var3[j];
    String delimiter =";" ;
    String[] temp = mm.split(delimiter);
    Arrays.sort(temp,Collections.reverseOrder());
    result.addValue(temp[0]);
    a=0;
    mm="";
    Mapping:
    Invoice_No->removeContext->sort->splitByValue(valueChange)->collapseContext->removeContext->
    Invoice_No->removeContext-->  -UDF----->Target.
    Due_Date->removeConetxt----
    >
    Thanks
    Amit

Maybe you are looking for

  • How to export the sql output to Excel?

    I installed Raptor on my system. I ran few reports and trying to figure out how to save the reprots to excel srpeasheet format. I just see 'save' but not sure where the output is saved and with what filename. Saveas is grayed out all the time.

  • How to export an album straight to facebook?

    I used to be able to directly export my pictures from iPhoto directly to Facebook, but when I made updates to my computer, the feature went away.  Anyone know how to do this with iPhoto '08? 

  • Shift/F12 launches Dashboard instead of Flash Publish Settings

    How do I use shift/f12 within a program such as Flash? I can't find anywhere in my preferences where f12 is assigned. My Preferences -> Dashboard & Expose settings don't have anything selected for Dashboard. The option "-" is selected which would lea

  • How do I save my catalogue, with only fotos without videos ?

    Hi, I try to make a back up from my catalogue with Photoshop Element 6. I want to save only my fotos and not my videos. Is there a possibility ? Thanks for your help. Alain

  • Expired Password Custom JAAS LoginModule

    Hello, We need to be able to determine how long till a user's password expires.  We are authenticating with ldap / Microsoft AD.  We have attempted to create a jaas login module which causes the login to to be forwarded to the changePasswordPage.jsp