Get open and close items

Hello All,
I need to get Open and Close items for customer based on company code....i mean to say user don't want to give customer number he want to get Open and Close item for all customer under that company code.
It would be great if some one suggest me any function module and BAPI name....

Hi,
I/m not sure whether there is any FM for the requirement.Instead can have a look into this BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date or CUSTOMER_OPEN_ITEMS FM
In a report prpgram.. Hit the KNB1 table for a specify company code fetch all the customer and using these customers fetch the open and closed items.
Regards,
Aditya
Edited by: aditya on Dec 22, 2009 12:42 PM
Edited by: aditya on Dec 22, 2009 12:46 PM

Similar Messages

  • Open and Close Item Identification

    Hai Friends..,
    How to identify the Pen and Close item in the 0FI_AP_4 extractor....,
    Please advise me on this..,
    Thanks

    Status of the FI item (O = open, C = cleared) is identified by field STATUSPS in the extract structure.
    Fields in Source Table: BSIK-BSTAT,
    Fields in Source Table: BSIK-AUGDT

  • 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.

  • I have macbook pro. The pinch open and close is not working in firefox 4, but works in safari. How can I get that feature back

    To find pinch open and close and how it works in macbook pro go to the apple icon. Open system preferences and the choose trackpad. Each item is illustrated.

    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    * browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    * browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    * browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    * browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    * browser.gesture.pinch.latched -> <b>false</b>
    *http://kb.mozillazine.org/about:config
    See also:
    *pinchy: https://addons.mozilla.org/firefox/addon/pinchy/

  • My macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Any suggestions?

    my macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Also, no sound comes out of my Macbook. I only hear with earbuds or headphones. Any suggestions?

    If you have more than one user account, you must be logged in as an administrator to carry out these instructions.
    Triple-click anywhere in the line below to select it:
    syslog -k Sender kernel -k Message CSeq "Previous Shutdown" | tail | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.

  • Open and Close Front Panel of SubVI

    Hi all,
    Running LabVIEW 2011 on Windows 7 x64.  I am trying to get a subVI front panel to open from my main FP with the press of a button and then close with a button press in the subVI.  Here is the piece from my main FP that calls the VI and opens the FP 
    Plots is defined in another loop and all of the loops are in a flat sequence.  I did it this way because I want it to start with the first press and not stop my main loop from running.  I have moved the item in the left loop around a lot so I'm not sure if I can run that in the same loop as the event or not.  Either way opening the VI seems to work fine.
    The problem shows up when trying to close the subVI for the SECOND time.  The code is here:
    As I said, the first time I open and close the VI everything works as I expect it should.  I am then able to open it again but now the "blank button" doesn't function and I can't close the window or even open the block diagram to probe anything.  I have been trying to figure this out for awhile, any insite would be greatly appreciated!
    Thanks
    Solved!
    Go to Solution.

    Its good that you found the bug.
    This code may serve as a way for you to compare notes.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Any way to see ICONS in Open and Close Dialog boxes?

    Is there any way to see ICONS in Open and Close Dialog boxes, instead of just lists of items names?
    I know you can preview one at a time, but I'd love to see all my artwork as picture icons, just as you can in a finder window.
    Windows does this, but not OSX that I know of. Is there a third party app that enables you to see icon view in the Open and Close Dialogs?

    Thank you Steve Jobs. I guess that feature has been added in Leopard. Now there really is nothing that I'll miss from Windoze.

  • Open and Close Posting Periods According to G/L Account Assignment Objects

    Hi,
    Can anybody please explain me how configurations related to " Open and Close Posting Periods According to G/L Account Assignment Objects " works in SAP FICO? I am confused about this config.
    Regards,
    Mandeep

    Hi Mandeep ,
    First i would like to tell about fiscal year
    fiscal year is nothing but a financial year of company in sap . it contain 12 normal periods and 4 special periods.In genaral we will call like month but that is sap that is a period. so 12 period for 12 months ok next special period will use in all companies for audit and tax adjustment purpose of previous year.
    coming to the open and close periods.in sap for security purpose we have to open one period like this month july so i opened july period only we cant post the pervious month (june)and we cant post future month lik in (Auguest)ok
    You can close and open periods by transaction ob52.
    In transaction ob52 there are account types
    + Valid for all account types
    A Assets
    D Customers
    K Vendors
    M Materials
    S G/L accounts
    V Contract accounts
    + means all types. if you want to open vendor then enter period from and to according to your fiscal year.
    you cant adjust items in closed period. if you want to then you have to open the period
    For your information.....
    posting periods also open user level tc S_ALR_87003642.
    customization levael OB52.
    Regards
    Kumar

  • Open and close posting period authorization control TCODE: S_ALR_87003642

    HI All,
    Is there any chance to control the user to open and close another company code posting period variant in TCODE: S_ALR_87003642.
    In our system we are using the same client for different countries. So user can able to change the other country company code posting periods.
    We would like to control either on the country (or) organizational unit(company code) (or) posting period variant so that user can only open/close  their country / company code posting periods.
    Our present authorization role for open and close posting period contain the auth.Obj. : S_TABU_DIS.
    Please share your knowledge if you come across this problem..
    Thanks in advance..

    Hey Sandhya,
    Congratz, this can be done using linbe item authorization with the object S_TABU_LIN.
    Field ORG_CRIT - Value 02
    Field ORG_FIeld1 - Value ZT001B
    We have successfully done it in our client.
    You need to contact your BASIS consultant for this.
    Thanks,
    Nitish

  • [bdb bug]repeatly open and close db may cause memory leak

    my test code is very simple :
    char *filename = "xxx.db";
    char *dbname = "xxx";
    for( ; ;)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    I try to run my test program for a long time opening and closing db repeatly, then use the PS command and find the RSS is increasing slowly:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 466 588 4999 980 0.3 -bash
    2615 pts/0 R 0:01 588 2 5141 2500 0.9 ./test
    after a few minutes:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 473 588 4999 976 0.3 -bash
    2615 pts/0 R 30:02 689 2 156561 117892 46.2 ./test
    I had read bdb's source code before, so i tried to debug it for about a week and found something like a bug:
    If open a db with both filename and dbname, bdb will open a db handle for master db and a db handle for subdb,
    both of the two handle will get an fileid by a internal api called __dbreg_get_id, however, just the subdb's id will be
    return to bdb's log region by calling __dbreg_pop_id. It leads to a id leak if I tried to open and close the db
    repeatly, as a result, __dbreg_add_dbentry will call realloc repeatly to enlarge the dbentry area, this seens to be
    the reason for RSS increasing.
    Is it not a BUG?
    sorry for my pool english :)
    Edited by: user9222236 on 2010-2-25 下午10:38

    I have tested my program using Oracle Berkeley DB release 4.8.26 and 4.7.25 in redhat 9.0 (Kernel 2.4.20-8smp on an i686) and AIX Version 5.
    The problem is easy to be reproduced by calling the open method of db handle with both filename and dbname being specified and calling the close method.
    My program is very simple:
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include "db.h"
    int main(int argc, char * argv[])
    int ret, count;
    DB_ENV *dbenvp;
    char * filename = "test.dbf";
    char * dbname = "test";
    db_env_create(&dbenvp, 0);
    dbenvp->open(dbenvp, "/home/bdb/code/test/env",DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL, 0);
    for(count = 0 ; count < 10000000 ; count++)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    dbenvp->close(dbenvp, 0);
    return 0;
    DB_CONFIG is like below:
    set_cachesize 0 20000 0
    set_flags db_auto_commit
    set_flags db_txn_nosync
    set_flags db_log_inmemory
    set_lk_detect db_lock_minlocks
    Edited by: user9222236 on 2010-2-28 下午5:42
    Edited by: user9222236 on 2010-2-28 下午5:45

  • Software issue iphone 4s:Apps open and close by themselves almost as if someone is pressing the buttons, anyone have this issue?

    Recieved my 3rd iphone  4s due to battery issues and got another dud. While in use, the apps  will open and close on there own, email will get deleted while I'm reading them or archived. while looking through my contacts directory, the phone will select a contact creating an outbound call. This is frustrating. Any one else have this issue?

    Hi Ralph9430,
    I've tried this numerous times and have the same issue. I've even restored the phone to factory settings and removed everything and problem persists.
    Cheers

  • How do I open and close VIs from within a VI?

    Ladies and gentlemen,
    I would like to use a VI to open and close other VIs based on user input.  Example:  The first VI will have text that reads:  "Does the car have heated mirrors?"  There will be two buttons: one for "YES" and the other for "NO."
    If the user hits the "NO" button, the current VI will close and a similar VI will open that asks the user the next question, "Are the mirrors lighted?" "YES" or "NO..."
    If the user hits the "YES" button, the current VI will close and another will open that will tell the user to "Activate the heated mirrors" and press a button that will say "NEXT."  At that point, that VI will close, and in two minutes another VI will open and ask the user "Is the driver's side mirror hot?" with another set of "Yes" or "No" buttons.  If the user presses "YES" we will have verified that the heated driver's side mirror is working properly and store that information somewhere .  If the user presses "NO", the VI will close and another VI will open with some kind of repair instruction and a button that says "RETEST" that will rerun the heated mirror test when repairs are completed.
    During the two minutes we are waiting for the mirrors to heat up the program should move on to the next question: "Are the mirrors lighted?" "YES" or "NO..."
    Does anyone know how to manipulate VIs in this way?  Please help!
    Drew

    Instead of opening and closing vi's, just create one main vi with a state machine architecture.  Search for examples on state machines to get a basic understanding of them.  This is pretty complex so I have written an example of how this could be accomplished.  The trick part was the 2 minute timer (my vi is set for 5 seconds for quick testing).  Each state produces a question, and depending on the answer, the next state is inserted into a queue.  You can add more states for more questions and answers.  Notice that the boolean buttons can be hidden if you just want to show one button (like Next) instead of two buttons (Yes and No).  Study the vi and let me know if you have questions.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Q&A.vi ‏166 KB

  • Main VI stops fucntioning after i open and close a subvi from an event structrue.

    Hi,
    I am trying to open a pop up vi from an event. I have been struggling with this for a while now. When i open a pop up vi and close it, the main vi stops running properly.
    I have narrowed it down to the fact that the event which calls the subvi never finishes when the subvi is closed.
    The attached image is an example of what I am currently doing. When I run this, i never see the dialog box that says 'here'
    maybe useful as a hint to the problem...
    This does work properly if I run the vi, click to open the subvi, close the subvi, (here the main vi is not working properly, cant click anything)  then stop the main vi, run the main vi again, open and close the subvi, and then i see the 'here' dialog, and my main vi functions properly.
    thanks
    J
    Solved!
    Go to Solution.

    What is actually happening is you hit the Ok button and your panel closes and you set the Stop 2 to True.  Ok, that is fine except for the fact that the Stop 2 terminal has already been read during that iteration of the loop.  So the loop will go again.  This time is has read the Stop 2 at a TRUE, but the event structure needs an event before the loop can complete.  But the front panel has been closed already and you are stuck.
    As Dennis said, get rid of the Stop 2 and just wire the TRUE constant straight out of the event case.  Wire a FALSE for all of the other event cases.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Pinch open and close

    Just got my MBP last week. Pinch open and close (to zoom in and out) works on pdfs, but not on photos in iPhoto. Am I doing something wrong? I have the box checked for it to work, obviously, since it works on the pdfs. Thanks in advance.

    Welcome to Apple Support Communities
    It doesn't work while viewing items in iPhoto, you can set 'screen zoom' in TrackPad prefs which will and sometimes that's handy.

  • Trackpad is presenting a bug to open and close windows, mission control, and to move/roll the application (App) up and down.

    Totally out of the blue, my trackpad is presenting a "bug". Every time that I try to open and close my mission control, or in the moments that I move / roll up and downs the Applications Screen, my Mac freezes for less than a second.
    It never suffered any damage (NEVER!)! I am feeling very frustrated because I have no idea about what could cause such problem.
    My MacBook Air is running OS X 10.9.5.
    Any help will be very welcome!

    Well, it all really depends on the custom program and how it was written. Does it have an ActiveX interface? If it does, than that's the easiest way to go. If you put an automation refnum on the fron panel, you can right click and it and choose Select ActiveX Class>Browse. The browser will list all of the ActiveX type libraries that are registered on your system. If you can find one that refers to your custom program, then you should be able to use it's methods and properties to control. If it does not have an ActiveX interface, then things get much more difficult.

Maybe you are looking for

  • Forms60_repformat

    HI The Default is set to forms60_repformat = PDF. Application is deployed on web(forms6i in 9IAS). One report needs to run in RTF. Run_report_object with desformat=RTF is not working. Dropping forms60_repformat from registry is restricting any report

  • IMac 4,1 with recent upgrade from Tiger to Snow Leopard....problem after problem after problem...PLEASE HELP!

    Hi, I purchased our iMac 4 with Tiger OS X some time ago (2007) and until recently had absolutely no problems....and then, we met the Snow Leopard. I added the 2GB of memory without a hitch. Backed -up what needed to be backed up to an external hard

  • I live outside the US and am confused if i should get a locked or unlocked Iphone 4s?

    I live outside the US and probably will not move their either. I am confused if i should purchase a locked or unlocked IPhone 4S. I travel frequently but buy a sim card for each country i travel so i want a phone that i can insert any sim card into.

  • K-9 filter block

    @K-9 filter block Here's the problem: I have a K-9 Web protection filter. When I try to go on to Creative Cloud.exe or TypeKit K-9 blocks it because of "http://hammer.behance.net:433" or http://api.behance.net:433. If these are sites, I could go onto

  • Navigation with MouseListener

    Hi! My navigation goes wrong, but perhaps it's an easy answer to it? In my application I have a JFrame with BorderLayout. In West I have a JPanel with some JLabels ( let's call them A, B and C) creating a menu with 3 alternatives and in Center I have