Report to find oldest SR date

hi
i want to find the oldest SR date. Which view in report is best suit for that?
regards
sowm

hi venky
my requirement is to find the SR record which was received at the oldest date(i.e oldest complaint).
I tried with MIN() in SR date field..Is that function returns one record with oldest date or it will sort the field in descending order?
How to achieve this?
regards
sowm

Similar Messages

  • Query to find oldest man data from table

    Emp tab:
    f_name varchar2(30)
    l_name varchar2(30)
    dob date
    sex varchar2(5)
    I want to find the F_name of the oldest man born in year 1965 , who possess the "DA" in the f_name.

    How about this?
    SELECT f_name
      FROM (SELECT *
              FROM emp
             WHERE TRUNC(dob) = 1965
               AND UPPER(f_name) LIKE '%DA%'
             ORDER BY dob desc
    WHERE ROWNUM = 1       
    not tested and assuming that there are no duplicate dates. Another option would be analytic functions.
    C.

  • Fi report to find last payment date

    Hi guys
    How can i find the last payment date of a customer.
    Suppose a customer has a balance of 100 $ as of today and he clears an amount of 20 $ tomorrow so 21.10.2008 becomes his latest payment date, where will this be stored any idea?
    Thanks

    IN KNKK table there is a field CASHD & CASHA.check if this works.
    otherwise do this,
    there will be a doc type for customer payment (DZ or something)
    give that doctype in BKPF and get the line items from BSEG and filter it based on customer number.
    Sort the records based on the posting date descending.first record would give the last payment.

  • Command to find oldest email in mailbox

    how to find oldest email date on a particular mailbox through exchange management shell command ?

    Karthick asked in
    The Official Scripting Guys Forum!, but Bill_Stewart moved it here for some reason. Exchange Server 2013 - General Discussion or Windows
    PowerShell would be more appropriate.
    Actually any forum BUT Outlook would be OK. I was also confused by the wording of the question at first. Not the OPs fault but just one of wording and visual/perceptual interpretation.
    As you have shown, the request can be handled by the Exchange Shell quite easily although, with the Exchange 2010 shell, the "where" may have to be reverted.
    ¯\_(ツ)_/¯

  • Report to find open items and close items for given vendor

    Hi All,
    What are the steps needed to write a REPORT to find out
    open and close items for a given vendor.
    Which are the fields i'll have to take and what are the comparisons i'll have to make.
    I know,
    BSIK is for open Vendor &
    BSAK for closed Vendors..
    what are the conditions i'll have to check.
    Thanks in Advance..
    Pradeep Alex

    Hi Pradeep,
    This report I developed is definitely useful to you.
    *& Report  ZFI_PROV_IT_VENDOR
    REPORT  ZFI_VENDOR.
    TYPE-POOLS: slis.
    tables: BKPF,
            BSEG,
            bsik,
            bsak,
            bsid,
            bsad,
            lfa1,
            t005u,           "Region Description
            J_1IMOVEND.
    TYPES: BEGIN OF ty_bkpf,
            bukrs type bkpf-bukrs,
            belnr TYPE bkpf-belnr,
            gjahr type bkpf-gjahr,
            blart TYPE bkpf-blart,
            budat TYPE bkpf-budat,
           END   OF ty_bkpf.
    types: begin of ty_J_1IMOVEND,
             lifnr     type lfa1-lifnr,
             J_1IPANNO type J_1IMOVEND-J_1IPANNO,
             J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
             J_1ISERN  type J_1IMOVEND-J_1ISERN,
           end   of ty_J_1IMOVEND.
    TYPES: BEGIN OF ty_bseg,
            belnr TYPE bseg-belnr,
            gjahr type bseg-gjahr,
            bschl TYPE bseg-bschl,
            umskz type bseg-umskz,
            shkzg type bseg-shkzg,
            wrbtr TYPE bseg-wrbtr,
            hkont type bseg-hkont,
            lifnr TYPE bseg-lifnr,
           END   OF ty_bseg.
    types: begin of ty_t005u,
            bland type t005u-bland,
            bezei type t005u-bezei,
           end   of ty_t005u.
    types: begin of ty_lfa1,
            lifnr type lfa1-lifnr,
            name1 type lfa1-name1,   "35
            ort01 type lfa1-ort01,   "35
            ort02 type lfa1-ort02,   "35
            pfach type lfa1-pfach,   "10
            pstlz type lfa1-pstlz,   "10
            regio type lfa1-regio,   "3
            stras type lfa1-stras,   "35
            ktokk type lfa1-ktokk,
            telf1 type lfa1-telf1,   "16
            telf2 type lfa1-telf2,   "16
           end   of ty_lfa1.
    types: begin of ty_bsik,
            bukrs type bsik-bukrs,
            lifnr type bsik-lifnr,
            augdt type bsik-augdt,
            augbl type bsik-augbl,
            belnr type bsik-belnr,
            budat type bsik-budat,
            blart type bsik-blart,
            shkzg type bsik-shkzg,
            wrbtr type bsik-wrbtr,
           end   of ty_bsik.
    types: begin of ty_bsid,
            bukrs type bsid-bukrs,
            lifnr type bsid-kunnr,
            augdt type bsid-augdt,
            augbl type bsid-augbl,
            belnr type bsid-belnr,
            budat type bsid-budat,
            blart type bsid-blart,
            shkzg type bsid-shkzg,
            wrbtr type bsid-wrbtr,
           end   of ty_bsid.
    types: begin of ty_out2,
            lifnr type bsik-lifnr,
            wrbtr type bsik-wrbtr,
            end  of ty_out2.
    types: begin of ty_out,
            lifnr type lfa1-lifnr,
            name1 type lfa1-name1,
            addr(162) type c,
            J_1IPANNO type J_1IMOVEND-J_1IPANNO,
            J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
            J_1ISERN  type J_1IMOVEND-J_1ISERN,
            opbal  type bseg-wrbtr,
            purch type bseg-wrbtr,
            PAYM  type bseg-wrbtr,
            grdeb type bseg-wrbtr,
            othdeb type bseg-wrbtr,
            othcre type bseg-wrbtr,
            tds   type bseg-wrbtr,
            bal   type bseg-wrbtr,
            blart type bkpf-blart,
            bschl type bseg-bschl,
           end  of ty_out.
    types: begin of ty_bsegtemp,
            lifnr TYPE bseg-lifnr,
           end   of ty_bsegtemp.
    types: begin of ty_bsegnew,
            wrbtr TYPE bseg-wrbtr,
            lifnr TYPE bseg-lifnr,
           end   of ty_bsegnew.
    data: it_bsik type table of ty_bsik with header line,
          it_bsid type table of ty_bsid with header line,
          it_bsak type table of ty_bsik with header line,
          it_out2  type table of ty_out2 with header line,
          it_out3 type table of ty_out2 with header line.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
           it_listheader TYPE slis_t_listheader,
           it_alvevent TYPE slis_t_event,
           gt_events TYPE slis_t_event WITH HEADER LINE.
    DATA: I_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA : wa_fieldcat TYPE slis_fieldcat_alv,
           wa_listheader TYPE slis_listheader,
           wa_alvevent TYPE slis_alv_event.
    DATA: WA_SORT TYPE SLIS_SORTINFO_ALV.
    DATA: ls_line TYPE slis_listheader.
    DATA : g_repid  LIKE sy-repid,                  " Program ID
           g_layout TYPE slis_layout_alv.           " Layout Workarea
    DEFINE m_fieldcat.
      wa_fieldcat-col_pos       = &1.               " Fieldcat column postion
      wa_fieldcat-fieldname     = &2.               " Field name
      wa_fieldcat-DO_SUM        = &3.
      wa_fieldcat-seltext_m     = &4.               " Column Text
      wa_fieldcat-outputlen    = &5.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    END-OF-DEFINITION.
    DATA: wa_lfa1 TYPE ty_lfa1,
          wa_bkpf TYPE ty_bkpf,
          wa_bkpf1 type ty_bkpf,
          wa_bsegtemp type ty_bsegtemp,
          wa_bsegnew type ty_bsegnew,
          wa_bsegnew1 type ty_bsegnew,
          wa_J_1IMOVEND type ty_J_1IMOVEND,
          wa_t005u type ty_t005u,
          wa_bseg TYPE ty_bseg,
          wa_out    TYPE ty_out.
    DATA: gt_out TYPE STANDARD TABLE OF ty_out,
          gt_out1 TYPE STANDARD TABLE OF ty_out,
          gt_lfa1 TYPE STANDARD TABLE OF ty_lfa1,
          gt_bsegtemp type standard table of ty_bsegtemp with header line,
          gt_bsegnew type standard table of ty_bsegnew with header line,
          gt_bsegnew1 type standard table of ty_bsegnew with header line,
          gt_J_1IMOVEND type standard table of ty_J_1IMOVEND,
          gt_bkpf1 TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE,
          gt_t005u type standard table of ty_t005u,
          gt_bseg TYPE STANDARD TABLE OF ty_bseg WITH HEADER LINE,
          gt_bkpf TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_budat for bkpf-budat obligatory,
                    s_ktokk for lfa1-ktokk obligatory.
                   s_wrbtr for bseg-wrbtr.
    parameters: p_bukrs type bkpf-bukrs obligatory default '1000'.
               p_gjahr type bkpf-gjahr obligatory.
               p_lifnr type bseg-lifnr obligatory default '300040',
               p_ktokk type lfa1-ktokk obligatory default 'Z200'.
    selection-screen end   of block b1.
    START-OF-SELECTION.
      PERFORM sub_fetch_data.
      PERFORM sub_process_data.
    END-OF-SELECTION.
      PERFORM sub_build_fieldcat.
      PERFORM sub_build_layout.
      PERFORM eventtab_build USING gt_events[].
      PERFORM comment_build USING it_listheader[].
      PERFORM sub_disp_data.
    *&      Form  SUB_BUILD_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM sub_build_fieldcat .
    sort gt_out by name1.
    *DEFINE M_SORT.
       ADD 1 TO WA_SORT-SPOS.
       WA_SORT-FIELDNAME = &1.
       WA_SORT-UP        = 'X'.
       WA_SORT-SUBTOT    = &2.
       APPEND WA_SORT TO I_SORT.
    END-OF-DEFINITION.
    *m_sort 'NAME1' 'X'.
    *M_SORT 'ADDR' 'X'.
      m_fieldcat 1  'LIFNR' ' '  text-026 10.
      m_fieldcat 2  'NAME1' ' '  text-006 35.
      m_fieldcat 3  'ADDR' ' ' text-007 162.
      m_fieldcat 4  'J_1IPANNO' ''  text-008 40.
      m_fieldcat 5  'J_1ICSTNO'  '' text-009 40.
      m_fieldcat 6  'J_1ISERN'  '' text-010 40.
      m_fieldcat 7  'OPBAL'  '' text-011 18.
      m_fieldcat 8  'PURCH'    '' text-012 18.
      m_fieldcat 9  'PAYM' ''  text-013 18.
      m_fieldcat 10  'GRDEB'  '' text-014 18.
      m_fieldcat 11  'OTHDEB'  '' text-020 18.
      m_fieldcat 12  'OTHCRE'  '' text-021 18.
      m_fieldcat 13  'BAL'  '' text-023 18.
      m_fieldcat 14  'TDS'  '' text-022 18.
    ENDFORM.                    " SUB_BUILD_FIELDCAT
    *&      Form  SUB_BUILD_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM sub_build_layout .
      g_layout-zebra             = 'X'.
      g_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " SUB_BUILD_LAYOUT
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    FORM eventtab_build  USING    gt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  COMMENT_BUILD
          text
         -->P_IT_LISTHEADER[]  text
    FORM comment_build  USING    p_it_listheader TYPE
                                            slis_t_listheader.
    data: v_text(30) type c,
          v_datelow(10) type c,
          v_datehigh(10) type c,
          v_month(2) type c,
          v_day(2) type c,
          v_year(4) type c.
    v_day  = s_budat-low+6(2).
    v_month = s_budat-low+4(2).
    v_year = s_budat-low+0(4).
    concatenate v_day '.' v_month '.' v_year into v_datelow.
    clear: v_day,v_month,v_year.
    v_day  = s_budat-high+6(2).
    v_month = s_budat-high+4(2).
    v_year = s_budat-high+0(4).
    concatenate v_day '.' v_month '.' v_year into v_datehigh.
    clear: v_day,v_month,v_year.
    concatenate 'From' v_datelow 'To' v_datehigh into v_text
                                        separated by space.
    clear: v_datelow, v_datehigh.
      ls_line-typ  = 'H'.
      ls_line-info = text-116.
      APPEND ls_line TO p_it_listheader.
    ls_line-typ  = 'S'.
      ls_line-key = text-090.
      ls_line-info = v_text.
      APPEND ls_line TO p_it_listheader.
    ENDFORM.                    " COMMENT_BUILD
    *&      Form  TOP_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader.
    ENDFORM.                    " TOP_OF_PAGE
    *&      Form  SUB_DISP_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM sub_disp_data .
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = g_repid
          it_fieldcat        = it_fieldcat[]
          is_layout          = g_layout
          i_save             = 'U'
          it_events          = gt_events[]
        IT_SORT             = I_SORT[]
        TABLES
          t_outtab           = gt_out1[].
    ENDFORM.                    " SUB_DISP_DATA
    *&      Form  sub_fetch_data
          text
    -->  p1        text
    <--  p2        text
    form sub_fetch_data .
    select bukrs
           belnr
           gjahr
           blart
           budat
           from bkpf
           into table gt_bkpf
           where budat in s_budat
           and   bukrs = p_bukrs
          and   gjahr = p_gjahr
           and   blart in ('KR','KG','KZ','RE','DK','Z1','AB','SA','KA','DZ').
    select belnr
           gjahr
           bschl
           umskz
           shkzg
           wrbtr
           hkont
           lifnr
           from bseg
           into table gt_bseg
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and   gjahr = gt_bkpf-gjahr
          and gjahr = p_gjahr
           and   bschl in (21,25,29,31,50,39,38,19,35).
          and kunnr in gt_
          and lifnr = '0000300019'.
    select belnr
           gjahr
           bschl
           umskz
           shkzg
           wrbtr
           hkont
           kunnr
           from bseg
           appending table gt_bseg
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and   gjahr = gt_bkpf-gjahr
          and gjahr = p_gjahr
           and   bschl in (21,25,29,31,50,39,38,19).
    break manukapur.
    sort gt_bseg by  lifnr bschl.
    delete adjacent duplicates from gt_bseg comparing all fields.
    loop at gt_bseg into wa_bseg.
    if wa_bseg-lifnr is not initial.
    move: wa_bseg-lifnr to wa_bsegtemp-lifnr.
          append wa_bsegtemp to gt_bsegtemp.
          endif.
    endloop.
    delete adjacent duplicates from gt_bsegtemp comparing lifnr.
    select lifnr
            name1
            ort01
            ort02
            pfach
            pstlz
            regio
            stras
            ktokk
            telf1
            telf2
            from lfa1
            into table gt_lfa1
            for all entries in gt_bseg
            where lifnr = gt_bseg-lifnr
            and ktokk in s_ktokk.
           and lifnr = '0000300030'.
    select  bland
            bezei
            from t005u
            into table gt_t005u
            for all entries in gt_lfa1
            where bland = gt_lfa1-regio
            and land1 = 'IN'
            and spras = sy-langu.
    select lifnr
           J_1IPANNO
           J_1ICSTNO
           J_1ISERN
           from J_1IMOVEND
           into table gt_J_1IMOVEND
           for all entries in gt_bseg
           where lifnr = gt_bseg-lifnr.
    *select bukrs
          belnr
          blart
          budat
          from bkpf
          into table gt_bkpf1
          where budat < s_budat-low.
          and zfdbt < s_budat-low.
    select
           wrbtr
           lifnr
           from bseg
           into table gt_bsegnew
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and xopvw = 'X' .
          and zfbdt < s_budat-low.
    select bukrs
           lifnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsik
           into table it_bsik
           for all entries in gt_bseg
           where lifnr = gt_bseg-lifnr
          and   lifnr = '0000300000'
           and   bukrs = '1000'
           and   budat <= s_budat-low.
    select bukrs
           lifnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsak
           appending table it_bsik
           for all entries in gt_bseg
           where bukrs = '1000'
           and   lifnr = gt_bseg-lifnr
          and   lifnr = '0000300000'
           and   budat <= s_budat-low
           and   augdt > s_budat-low.
    select bukrs
           kunnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsid
           into table it_bsid
           for all entries in gt_bseg
           where bukrs = '1000'
           and   kunnr = gt_bseg-lifnr
          and   kunnr = '0000300000'
           and   budat <= s_budat-low.
    select bukrs
           kunnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsad
           appending table it_bsid
           for all entries in gt_bseg
           where bukrs = '1000'
           and   kunnr = gt_bseg-lifnr
          and   kunnr = '0000300000'
           and   budat <= s_budat-low
           and   augdt > s_budat-low.
    if it_bsid[] is not initial.
    append lines of it_bsid to it_bsik.
    endif.
    *delete gt_bsegnew where lifnr  <> '0000300000'.
    *break manukapur.
    *sort gt_bsegnew by lifnr.
    *loop at gt_bsegnew into wa_bsegnew.
    *collect wa_bsegnew into gt_bsegnew1.
    *endloop.
    loop at it_bsik .
    it_out2-lifnr = it_bsik-lifnr.
    *it_out1-budat = it_bsik-budat.
    *it_out1-blart = it_bsik-blart.
    if it_bsik-SHKZG = 'H'.
    it_out2-wrbtr = it_bsik-wrbtr.
    else .
    it_out2-wrbtr = it_bsik-wrbtr * -1.
    endif.
    append it_out2.
    clear: it_out2, it_bsik.
    *endif.
    *clear it1.
    endloop.
    sort it_out2 by lifnr.
    loop at it_out2.
    it_out3-lifnr = it_out2-lifnr.
    it_out3-wrbtr = it_out2-wrbtr.
    collect it_out3.
    clear: it_out3, it_out2.
    endloop.
    endform.
    *&      Form  sub_process_data
          text
    -->  p1        text
    <--  p2        text
    form sub_process_data .
    *sort gt_bsegtemp by  lifnr .
    sort gt_bseg by lifnr bschl.
    sort gt_bsegnew by lifnr.
    sort it_out3 by lifnr.
    *loop at gt_bsegnew into wa_bsegnew.
    *at end of lifnr.
    *sum.
    *endat.
    *endloop.
    sort gt_bkpf by blart.
    loop at gt_bseg into wa_bseg.
    if wa_bseg-lifnr is not initial.
    read table gt_lfa1 into wa_lfa1 with key lifnr = wa_bseg-lifnr.
    move: wa_lfa1-name1 to wa_out-name1,
         wa_lfa1-lifnr to wa_out-lifnr.
    read table gt_t005u into wa_t005u with key bland = wa_lfa1-regio.
    concatenate wa_lfa1-stras ',' wa_lfa1-ort01 ','
                wa_lfa1-ort02 ',' wa_t005u-bezei ','
                wa_lfa1-pfach ','
                wa_lfa1-pstlz ',' 'Ph:'
                wa_lfa1-telf1 ','
                wa_lfa1-telf2
                into wa_out-addr separated by space.
    read table gt_J_1IMOVEND into wa_J_1IMOVEND with key lifnr = wa_bseg-lifnr.
    move: wa_J_1IMOVEND-J_1IPANNO to wa_out-J_1IPANNO,
          wa_J_1IMOVEND-J_1ICSTNO to wa_out-J_1ICSTNO,
          wa_J_1IMOVEND-J_1ISERN  to wa_out-J_1ISERN.
          read table gt_bkpf into wa_bkpf with key belnr = wa_bseg-belnr.
    if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 31 or
    wa_bkpf-blart = 'KR' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-purch = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-purch = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KR' and wa_bseg-bschl = 50.
    *wa_out-tds = wa_out-tds + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-tds = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-tds = wa_bseg-wrbtr * -1.
    endif.
    endif.
    *wa_out-tds = wa_bseg-wrbtr.
    endif.
    if wa_bkpf-blart = 'KG' and wa_bseg-bschl = 21.
    *wa_out-grdeb =  wa_out-grdeb + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 21.
    *wa_out-grdeb =  wa_out-grdeb + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 25
    *or wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29
    **and wa_bseg-umskz = 'A'
    or wa_bkpf-blart = 'SA' and wa_bseg-bschl = 25.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-paym = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-paym = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'DK' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'SA' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 38.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'DZ' and wa_bseg-bschl = 19
    and wa_bseg-umskz = 'A'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 39
    and wa_bseg-umskz = 'G' or
           wa_bseg-umskz = 'H' or
           wa_bseg-umskz = 'J' or
           wa_bseg-umskz = 'L' OR
           wa_bseg-umskz = 'A'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 35.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if ( wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29 )
       and wa_bseg-umskz = 'A' or
           wa_bseg-umskz = 'B' or
           wa_bseg-umskz = 'I' or
           wa_bseg-umskz = 'M' or
           wa_bseg-umskz = 'O' or
           wa_bseg-umskz = 'V'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21 .
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    **if wa_bseg-shkzg = 'H'.
    ***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    **wa_out-othdeb = wa_bseg-wrbtr.
    **else.
    **if wa_bseg-shkzg = 'S'.
    ***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    **wa_out-othdeb = wa_bseg-wrbtr * -1.
    **endif.
    **endif.
    **endif.
    ***if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
          wa_out-othdeb =  wa_bseg-wrbtr.
    ***endif.
    ***if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21.
          wa_out-othdeb =  wa_bseg-wrbtr.
    ***endif.
    read table it_out3 with key lifnr = wa_bseg-lifnr binary search.
    on change of wa_bseg-lifnr.
    *move: wa_lfa1-name1 to wa_out-name1,
        wa_lfa1-lifnr to wa_out-lifnr.
    wa_out-opbal = it_out3-wrbtr.
    endon.
    *if wa_out-opbal is not initial.
    *wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    **else.
    *wa_out-bal = wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    *endif.
    wa_out-bal = wa_out-opbal + wa_out-purch + wa_out-paym + wa_out-grdeb + wa_out-othdeb + wa_out-othcre.
    at end of lifnr.
    *wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    append wa_out to gt_out.
    *collect wa_out into gt_out.
    clear wa_out.
    clear it_out3.
    clear wa_bsegnew1.
    endat.
    endif.
    clear: wa_bseg, wa_bkpf, wa_J_1IMOVEND.
    endloop.
    loop at gt_out into wa_out.
    collect wa_out into gt_out1.
    endloop.
    endform.                    " sub_process_data
    Regards,
    Santosh Kumar M.

  • Report to find a material by a mfr part number and old material number

    Hi,
    Is there any standard report to find a material by a mfr part number and old material number ?
    For the moment, we are using MM03 to search articles by these selection criterion.
    Thanks,
    Julien Girard

    Hi
    As there is no stsndard report use the SQVI to find out the details, It is very simple , please follwo the below steps.
    Use Txn SQVI, enter the Quick view field say- ZMNFR and click the  create button, Enter the title in the next screen i.e Report name- Say - Manufacturer's Part No. Details, in the same screen you need to enter  MARA  for the data from table/database view, please leave the 1. data source as Table only and the radio button as Basis mode only.  Click the tick mark , you will go to the next screen,
    You will notice Quick viewer Intial screen
    Open the node general material data
    Select the Buttons besides the fields MARA-MATNR for material number, MARA-MFRPN for manufacturers part number, and MARA-BISMT for old material number. You can include any other field if you wish to have in your output. You will notice two check boxes against each field, one is for input screen field and the other is for outputf field. But currently you do not bother about and select both the check boxes or any other field you wish to have as input and output as well. Once selected all the fields afer clicking the check boxes save the total arrangement. and then in the same screen use the execute button or use F8 to find out your report input screen.
    Now enter the Material number for which you wish to know other two details in the report and execute again you will find the report output.
    Please ensure that you are maintaining both the details in material master basic data1 and purchasing  view if you wish to get  out output
    Best regards
    SAM
    Edited by: samuel mendis on Apr 8, 2009 6:52 AM

  • PLSQL function body returning an sql report returns ORA-01403 No Data Found

    I am on APEX 3.1.2.00.02 and Oracle 10g.
    I am developing a report with SQL Query (PL/SQL function body returning SQL query) type. But on running the report I am getting
    report error:
    ORA-01403: no data found
    Region Source
    declare
      qry varchar2(32767);
    begin
      --Procedure call
      my_pkg.get_query(qry);
      htp.p(qry);
      return /*select 1 from dual */ qry;
    end;
    Procedure
    PROCEDURE get_query (V_QRY OUT VARCHAR2)
    IS
      qry varchar2(32767);
    begin
      qry := ' select name
         , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Jan-09"
         , max(decode(to_char(service_date,''Mon-YY''), ''Jan-09'', value, null)) as "Feb-09"
         from MY_TABLE
         group by name ';
      V_QRY := qry;
    end;
    The query will be enhanced later to add more months and year based on user parameters once I am successfull in running report on this.
    I wish to use Query Specific Column names. I have seen this suggestion from Scott in a number of threads to use /*select 1 from dual */ with query but not working in my case.
    Can someone please suggest what can I do to make it working?
    Regards,
    Amir

    Firstly, have you unit tested the procedure (namely, within the SQL Workshop, SQL*Plus, SQL Developer,etc, etc.) to see if it produces the right output in the first place?
    If you have, and the query string generated is valid, try assigning the output to a page item (thus allowing you to view it in the session browser) or even pass the procedure output into the debug window (with the use of the wwv_flow.debug function). This might reveal some state or session change which is causing it not to return.You might find this easier to achieve if you change from a 'procedure and out parameter' combination to a 'function returning string' approach.
    Alternatively, try re-creating the report in a new region - occasionally I've come across weird bugs with report regions which resolved themselves in this manner.

  • Need to know the sqluery to find the disabled date from OIM 9.1.0.1

    Hi Experts,
    Need very urgent inputs from you all for the preparation of our audit.
    We are using OIM9.1.0.1
    We need to know the sqlquery for finding the Disabled date in OIM given the user ids, as currently we are unable to get the exact data from Historical Reports Option in OIM.
    I need to give in this format:
    select usr_login, usr_disabled from schemaname.tablename where usr_login in
    ('aaa','bbb'..... etc)
    We have three attributes :USR_DISABLED_BY_PARENT,USR_DISABLED,USR_DEPROVISIONING_DATE,but none of them give the exact date,
    USR_DISABLED gives just a flag as 1 or 0.
    Also there are no other fields in the corresponding usr table.
    So how to fetch the exact Disabled date from OIM system when I input the user ids.
    Your immediate response is appreciated.
    Thanks
    SS

    In the entire thread many experts have given nice queries in different formats...
    The best approach would be to open up the SQL Developer, connect with the OIM Database and experiment with all sorts of SQL queries provided by all the experts..
    Learn some SQL techniques, like Inner Join etc...
    Then you yourself will be able to figure out what you need, in exactly which format, for which users and for whom you have to restrict
    Then not only this question, you would be able to solve dozens of similar such issues yourself...
    And trust me, nothing can match that...
    Just in case, you are not familiar with SQL Developer,
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    Oracle SQL Developer 3.2.1 (3.2.10.09.57)
    September 24, 2012
    The Disabled DATE will be the creation date of that entry in the UPA_FIELDS table when Users.Status changed to Disabled.
    SELECT USR.USR_LOGIN, UPA_FIELDS.CREATE_DATE
    FROM UPA_FIELDS
    WHERE UPA_FIELDS.FIELD_NAME='Users.Status'
    AND UPA_FIELDS.FIELD_NEW_VALUE='Disabled'
    AND UPA_FIELDS.UPA_USR_KEY=USR.USR_KEY
    AND USR.USR_LOGIN NOT IN ('XELSYSADM', 'XELOPERATOR', 'WEBLOGIC');

  • Problem report for finder: finder quit unexpectedly

    Last night I removed some viruses etc., from my computer that were making ads appear and also tabs opening when not wanted by random ads. I then installed virus protection, and also installed a software update. During those processes I restarted my computer a few times. The last time, finder wouldn't close down but in the end my macbook restarted and since then I have this message constantly popping up: problem report for finder - finder quit unexpectedly. I can't open up anything else and get a message saying when I try: check with developer to make sure safari (as an example) works with this version of OS X. You may need to reinstall the application.
    In ten the details part it states crashed thread 0 but it also mention application specific information:
    dyld: launch, loading dependant libraries, ignoring DYLD_*env vars
    and then:
    dyld error message:
    library not loaded:/ system/library/frameworks/videotoolbox.framework/versions/a/videotoolbox
    referenced from: /system/library/frameworks/qtkit.framework/versions/a/qtkit
    reason: image not found.
    Please please help. It's driving me nuts. I really need my computer. So much that Im even contemplating just buying a new one if nothing works :/

    FIrst, get rid of your "virus protection," which is either useless or worse than useless. Then see below.
    If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.
    If you use FileVault 2, then before running the Installer you must launch Disk Utility and select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another icon with the same name. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main Recovery screen.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.
    *The linked support article refers to OS X 10.9 ("Mavericks"), but the procedure is the same for OS X 10.7 ("Lion") and later.

  • Report to find the basic price

    dear gurus,
    is there any report to find the vendor , material , and the basic price excluding tax.

    Hi,
    Me2L will be a better report to view your desired data.
    Hope this will work for you.
    T & R,
    Brijesh

  • Where to find Pick Release Date After Ship Confirm in Order to Cash cycle

    Dear All,
    In Order to Cash cycle how to find Pick Release Date. After performing the Ship Confirm Transaction, how to view when we have performed Pick Release Transaction?
    Thanks in Advance.
    Regards,
    Aditya

    Run the Diagnostic OM order Information report against the order. In the report you can the find the picked date.
    Can I know you are using the transact move order ?
    Thanks

  • Error Opening Reports (Cannot find Dimension Scenario, Error executing query: the member null doesn't exist in this application)

    Hello,
    two of our users get the following error message, when opening two specific reports:
    First Report: Cannot find Dimension Scenario.
    Second Report: Error executing query: the member null doesn't exist in this application.
    Other users can access these reports, and the same users where the problem occurs can access other reports in the same folder.
    I set the same rights for me, but i can access the reports without problems.
    Somebody encountered the same problem before?

    Hi there,
    I had the same issue a few weeks ago... not sure how it happened but it was related only with my username.
    In order to fix it:
    1. I created a report which does not require to select the scenario in advance. Try to use the default data-grid that you get when you first create a report for example.
    2. When the user runs the report, try to see if he can see the dimension. Do not use the missing dimension on rows or columns. If he can see the dimension, ask him to select one scenario. This will solve the issue.
    3. If he cannot see the dimension, try to change the layout of the report.
    Regards,
    Thanos

  • Server could not find any Meta-Data devices!

    Our MDC dropped out and the backups did not engage.
    On a reboot of the MDC we were able to mount the volume, but all files (QuickTme movies, FCP projct files) could not be opened with an "unknown file type error".
    We shut all the clients down we checked the volume and (cvfsck -nv) and while "dirty" it did not report any errors.
    Stopped the volume and ran a cvfsck -w which gave us:
    "Server could not find any Meta-Data devices!"
    Checking Xsan admin logs shows us:
    "PioOpen: no such device.
    Fatal: Cannot open stripe group "md" - Operation not supported by device
    Fatal: Physio_init failed."
    Where "md" is our metadata storage pool.
    We shutdown all switches, RAIDS, clients, etc, but bring them all back up and checking with one MDC or another is the same result. Volume will not mount.
    All fiber connections seem good, checked in RAID admin and on switch.
    Ideas?

    AppleCare suggested that maybe a metadata backup could have helped.
    http://docs.info.apple.com/article.html?artnum=303371
    In any case, we nuked and paved.

  • Report error: ORA-01403: no data found.

    Hi,
    I was getting a following error and not able to figure it out.
    Here what I have:
    I have a page where I have 3 regions and out of them, there are 2 Html conditional regions
    and one SQL updatable report. Also, I have a validation to validate a field on the tabular form
    based on one field on the HTML region. The validation works fine but it also throws following error :
    report error: ORA-01403: no data found.
    Code:
    Declare
    v_office_id number;
    Begin
    SELECT count(id) into v_office_id from dar_asd.asd_office;
    if (:P299_ROLE_TYPE_ID = 1 and apex_application.g_f30.COUNT = v_office_id ) or
    (:P299_ROLE_TYPE_ID = 2 and (apex_application.g_f30.COUNT < v_office_id
    and apex_application.g_f30.COUNT >= 1) ) then
    return null;
    else
    RETURN 'Error: '||'Not a valid office selection.';
    end if;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN 'Error: '||SQLERRM;
    end;
    Thanks.

    Marc,
    Thanks for the reply.
    It is derived columns i.e. Use Query-Specific Column Names and Validate Query. The select statement returned by the stored procedure function will allways have all list of columns in select list. But the report displays allways some fixed number of columns in the secod region and remaining will be dependent on the check boxes and lov items selected in the first region. For e.g. if the select has 20 columns. Out of this, let's say 8 will allways displayed and remaining 12 will be displayed depending on the check box and lov items defined for them in the first region. I mean if 3 check boxes are checked and if the user selected some value from lov for the corresponding check box items, then the report will display 8+3 = total 11 colums. And the lov values selected will be used in the where condition of the SQL.
    How can I go to the report attributes? I can go to page definition, but I am not finding report attributes here. Please let me know...
    Thanks,
    Srini

  • How to find Pick Release Date in O2C Cycle

    Dera All,
    How to find Pick Release date in Order to Cash cylec after we perform the ship confirm Transaction.
    Please advice me as its a requirement from my customer. Pick Release date should come in Report.
    Regards,
    Aditya

    Run the Diagnostic OM order Information report against the order. In the report you can the find the picked date.
    Can I know you are using the transact move order ?
    Thanks

Maybe you are looking for

  • While running servlets getting errors 404 or 505 resource not found

    Hi all, I'm novice to J2EE. I've encountered a problem while accessing the deployed module in weblogic 8.1 server. I'm sure that the webapplication module is deployed as i saw my module in administration console & also the status said that it is depl

  • SAP dont start when upgrade kenel 620 to 640

    HI everyone. Im trying to update kernel 620 to kernel 640 on our SAP R/3 Enterprise 4.7 system (Win 2003/MSSQL 2000) I did this following instructions in sap note 664679. I update kernel succesfully in our DEV and QAS system. But in our PRD system du

  • Listening to the radio

    So, the gym I go to isn't the most fancy and instead of having a tv on each machine they just have like a dozen big screens mounted on the walls. Each screen's sound is broadcast over a different FM radio frequency. For example, if I wanted to hear t

  • Senior Test Automation Engineer LabView Perm Position in San Diego

    Senior  Hardware Test Automation Engineer- LabView Company is, headquartered in San Diego, California, is focused on developing technology for the continuous monitoring of glucose in people with diabetes. Company is committed to developing technologi

  • Business Rules migration to Calc Manager

    Hi there, We are currently in 11.1.2.1 and looking at applying the 11.1.2.2 patch. One of the pre-requisites is the HBR migration to Calc Manager. We are trying to find out if there is a better way of preparing the business rules for migration to cal