Vendor accumulated balnacess

Dear experts;
We are preparing vendor balancess businessa area  wise for this we are using 0FI_ap_3 data source and 0fiap_o03 ods iam geting debt credit blancess period wise but here we need accumulated balancess for this which field i have  to take other wise what routine we have write for this plz give me code   plz suggest me
regards

hi asish
  Thanks for your reply  my seniario is like this in period 1 vendor blances is 1000 this was carrieforword to next period 2 in period 2 balances is 500  total accumulated balnces is 1500 in r/3 side it has shown in accoumulated (cumulated)balnces as 1500 i need this blance is bw we  have in bw only blances of debit creidt Diffrance amt is balnce for this perticular period only but no amt whith carrie forword blancess are shown in bw if you want well undersantd this plz check in r3 tocde fk10n
  thanks and regards
raman

Similar Messages

  • Watching the accumulative credit of a vendor

    I'm searching for a report that produce the accumulative credit of a vendor/
    I mean something like fbl1n but the sum column has to be like that:
    if fl1n give the 3 line:
    vendor         sum
    50051          100
    50051          150
    50051          -30
    than i need a report that look like this:
    vendor         sum
    50051          100
    50051          250
    50051          220

    Hi,
    Use the following drilldown report: S_ALR_87012079.  This is an advanced report.  You can also create your own drill down report to suit your tase using transaction code: FKI1.
    For the specific output that you have in mind, execute the report.  In the output, select the column header where the total is, so that the entire value column is higlighted.  Then go to the menu: Edit -> Cumulative display on/off.  You will get the desired output.
    To retain this state, from the menu select: Report -> Save Layout.
    Cheers

  • This report for Vendor Balance Reconcillation.......

    Hi Seniors,
    Please help me with this issue........i have to develope a New report Vendor balance Reconcillation ......Using the Standard report S_ALR_87012082 vendor balances in local currency.....it should be same like this Standard report but this Report is not Designed to give Line Items Because it has Picked up the Data only from few tables like LFA1 LFB1 LFC3.....which give Direct Balances in these tables......But i have Developed a report to Some Extent....But Finding it Difficult in Adding a Special GL Date which is Reflecting in the LFC3 Table....I have to Keep a Check Box Special GL balances in the Selection-Screen when when ever i select Special GL Balances indicator ....Date from LFC3
    should be Selected and Addred to the Final in the Internal Table....I have Written a program .......Based on GSBER And LIFNR SUBTOTALS.....I have to Add this New check box in this Slection-Screen.....this report should be same like this Standard Report....S_ALR_87012082...the Program for this Report is RFKSLD00...please tel me the logic or help me with the Modification my below Report.....If i am not clear please reply me back...
    waiting for your replys...
    Thank you...
    *& Report  ZVENDOR_BALANCES
    REPORT  ZMM_PO_CHECKLIST.
    TYPE-POOLS : SLIS.
    DATA:   it_fcat    TYPE slis_t_fieldcat_alv,
            wa_fcat    LIKE LINE OF it_fcat,
            lt_top_of_page TYPE slis_t_listheader,
            ls_layout      TYPE slis_layout_alv,
            gt_events      TYPE slis_t_event.
    TYPES : BEGIN OF TY_BSEG,
              LIFNR  TYPE BSEG-LIFNR,
              BUKRS  TYPE BSEG-BUKRS,
              BELNR  TYPE BSEG-BELNR,
              GJAHR  TYPE BSEG-GJAHR,
              SHKZG  TYPE BSEG-SHKZG,
              GSBER  TYPE BSEG-GSBER,
              DMBTR  TYPE BSEG-DMBTR,
              WRBTR  TYPE BSEG-WRBTR,
              SGTXT  TYPE BSEG-SGTXT,
           buzei TYPE bseg-buzei,
            buzid TYPE bseg-buzid,
            augdt TYPE bseg-augdt,
            augcp TYPE bseg-augcp,
            augbl TYPE bseg-augbl,
            bschl TYPE bseg-bschl,
            koart TYPE bseg-koart,
            umskz TYPE bseg-umskz,
            zuonr TYPE bseg-zuonr,
            saknr TYPE bseg-saknr,
            hkont TYPE bseg-hkont,
            END OF TY_BSEG,
            BEGIN OF TY_LFA1,
              LIFNR TYPE LFA1-LIFNR,
              LAND1 TYPE LFA1-LAND1,
              NAME1 TYPE LFA1-NAME1,
            END OF TY_LFA1,
            BEGIN OF TY_LFC1,
              LIFNR TYPE LFC1-LIFNR,
              BUKRS TYPE LFC1-BUKRS,
              GJAHR TYPE LFC1-GJAHR,
              UMSAV TYPE LFC1-UMSAV,
            END OF TY_LFC1,
            BEGIN OF TY_BKPF,
              BUKRS TYPE BKPF-BUKRS,
              BELNR TYPE BKPF-BELNR,
              GJAHR TYPE BKPF-GJAHR,
              BLart type bkpf-blart,
              BUDAT TYPE BKPF-BUDAT,
                      bldat TYPE bkpf-bldat,
                      monat TYPE bkpf-monat,
                      usnam TYPE bkpf-usnam,
                      xblnr TYPE bkpf-xblnr,
            END OF TY_BKPF,
         BEGIN OF it_bsak,
            bukrs TYPE bsak-bukrs,
            lifnr TYPE bsak-lifnr,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            shkzg TYPE bsak-shkzg,
            gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
          END OF it_bsak,
            BEGIN OF it_skat,
                  spras TYPE skat-spras,
                  saknr TYPE skat-saknr,
                  txt20 TYPE skat-txt20,
                  txt50 TYPE skat-txt50,
            END OF it_skat,
          BEGIN OF TY_ITAB,
              GSBER  TYPE BSEG-GSBER,
              LIFNR  TYPE BSEG-LIFNR,
              BUKRS  TYPE BSEG-BUKRS,
              BELNR  TYPE BSEG-BELNR,
              GJAHR  TYPE BSEG-GJAHR,
              SHKZG  TYPE BSEG-SHKZG,
             GSBER  TYPE BSEG-GSBER,
              DMBTR  TYPE BSEG-DMBTR,
              WRBTR  TYPE BSEG-WRBTR,
              SGTXT  TYPE BSEG-SGTXT,
           buzei TYPE bseg-buzei,
            buzid TYPE bseg-buzid,
            augdt TYPE bseg-augdt,
            augcp TYPE bseg-augcp,
            augbl TYPE bseg-augbl,
            bschl TYPE bseg-bschl,
            koart TYPE bseg-koart,
            umskz TYPE bseg-umskz,
            zuonr TYPE bseg-zuonr,
            saknr TYPE bseg-saknr,
            hkont TYPE bseg-hkont,
             LIFNR TYPE LFA1-LIFNR,
              LAND1 TYPE LFA1-LAND1,
              NAME1 TYPE LFA1-NAME1,
              DMBTR_H  TYPE BSEG-WRBTR,
              DMBTR_S  TYPE BSEG-WRBTR,
              DH TYPE BSEG-WRBTR,
              DS TYPE BSEG-WRBTR,
              HS   TYPE BSEG-WRBTR,
              BAL  TYPE BSEG-WRBTR,
              FLAG TYPE C,
             LIFNR TYPE LFC1-LIFNR,
             BUKRS TYPE LFC1-BUKRS,
             GJAHR TYPE LFC1-GJAHR,
              UMSAV TYPE LFC1-UMSAV,
              UM(15) TYPE P DECIMALS 2,
             BUKRS TYPE BKPF-BUKRS,
             BELNR TYPE BKPF-BELNR,
             GJAHR TYPE BKPF-GJAHR,
              BLart type bkpf-blart,
              BUDAT TYPE BKPF-BUDAT,
                     bldat TYPE bkpf-bldat,
                      monat TYPE bkpf-monat,
                      usnam TYPE bkpf-usnam,
                      xblnr TYPE bkpf-xblnr,
                  spras TYPE skat-spras,
                 saknr TYPE skat-saknr,
                  txt20 TYPE skat-txt20,
                  txt50 TYPE skat-txt50,
               LINE_COLOR(4) TYPE C,
               LINE_CTR(4) TYPE C,
            END OF TY_ITAB,
            BEGIN OF TY_TEMP,
              LIFNR  TYPE BSEG-LIFNR,
                        GSBER  TYPE BSEG-GSBER,
              BUKRS  TYPE BSEG-BUKRS,
              BELNR  TYPE BSEG-BELNR,
              GJAHR  TYPE BSEG-GJAHR,
              SHKZG  TYPE BSEG-SHKZG,
             GSBER  TYPE BSEG-GSBER,
              DMBTR  TYPE BSEG-DMBTR,
              WRBTR  TYPE BSEG-WRBTR,
              SGTXT  TYPE BSEG-SGTXT,
           buzei TYPE bseg-buzei,
            buzid TYPE bseg-buzid,
            augdt TYPE bseg-augdt,
            augcp TYPE bseg-augcp,
            augbl TYPE bseg-augbl,
            bschl TYPE bseg-bschl,
            koart TYPE bseg-koart,
            umskz TYPE bseg-umskz,
            zuonr TYPE bseg-zuonr,
            saknr TYPE bseg-saknr,
            hkont TYPE bseg-hkont,
             LIFNR TYPE LFA1-LIFNR,
              LAND1 TYPE LFA1-LAND1,
              NAME1 TYPE LFA1-NAME1,
             LIFNR TYPE LFC1-LIFNR,
             BUKRS TYPE LFC1-BUKRS,
             GJAHR TYPE LFC1-GJAHR,
              UMSAV TYPE LFC1-UMSAV,
              DMBTR_H  TYPE BSEG-WRBTR,
              DMBTR_S  TYPE BSEG-WRBTR,
              HS       TYPE BSEG-WRBTR,
              BAL      TYPE BSEG-WRBTR,
              FLAG TYPE C,
             FLAG TYPE C,
             BUKRS TYPE BKPF-BUKRS,
             BELNR TYPE BKPF-BELNR,
             GJAHR TYPE BKPF-GJAHR,
              BLart type bkpf-blart,
              BUDAT TYPE BKPF-BUDAT,
                      bldat TYPE bkpf-bldat,
                      monat TYPE bkpf-monat,
                      usnam TYPE bkpf-usnam,
                      xblnr TYPE bkpf-xblnr,
           bukrs TYPE bsak-bukrs,
           lifnr TYPE bsak-lifnr,
           umskz TYPE bsak-umskz,
           augdt TYPE bsak-augdt,
           augbl TYPE bsak-augbl,
           zuonr TYPE bsak-zuonr,
           gjahr TYPE bsak-gjahr,
           belnr TYPE bsak-belnr,
           buzei TYPE bsak-buzei,
           budat TYPE bsak-budat,
           bldat TYPE bsak-bldat,
           xblnr TYPE bsak-xblnr,
           blart TYPE bsak-blart,
           monat TYPE bsak-monat,
           bschl TYPE bsak-bschl,
           shkzg TYPE bsak-shkzg,
           gsber TYPE bsak-gsber,
           dmbtr TYPE bsak-dmbtr,
           wrbtr TYPE bsak-wrbtr,
           sgtxt TYPE bsak-sgtxt,
           saknr TYPE bsak-saknr,
           hkont TYPE bsak-hkont,
                  spras TYPE skat-spras,
                 saknr TYPE skat-saknr,
                  txt20 TYPE skat-txt20,
                  txt50 TYPE skat-txt50,
               LINE_COLOR(4) TYPE C,
               LINE_CTR(4) TYPE C,
            END OF TY_TEMP.
    DATA : IT_BSEG TYPE STANDARD TABLE OF TY_BSEG WITH HEADER LINE,
           IT_LFA1 TYPE STANDARD TABLE OF TY_LFA1 WITH HEADER LINE,
           IT_LFC1 TYPE STANDARD TABLE OF TY_LFC1 WITH HEADER LINE,
           IT_BKPF TYPE STANDARD TABLE OF TY_BKPF WITH HEADER LINE,
          IT_BSIK TYPE STANDARD TABLE OF TY_BSIK WITH HEADER LINE,
          IT_BSAK TYPE STANDARD TABLE OF TY_BSAK WITH HEADER LINE,
          IT_BSIP TYPE STANDARD TABLE OF TY_BSIP WITH HEADER LINE,
           IT_SKAT TYPE STANDARD TABLE OF IT_SKAT WITH HEADER LINE,
           IT_ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE,
           IT_TEMP TYPE STANDARD TABLE OF TY_TEMP WITH HEADER LINE.
           TABLES : BSEG, LFA1, LFC1, BKPF ,SKAT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE T001.
    SELECT-OPTIONS: Vendor FOR BSEG-LIFNR OBLIGATORY.
    PARAMETERS : CoCd LIKE BSEG-BUKRS  OBLIGATORY.
    PARAMETERS : Fiscal LIKE BSEG-GJAHR OBLIGATORY.
    SELECT-OPTIONS : Period FOR BKPF-MONAT .
    *SELECT-OPTIONS : b_monate for rfsdo-allgbmon          "Berichtsperioden
              no-extension,
    *SELECT-OPTIONS: SO_LIFNR FOR BSEG-LIFNR.
                   SO_BELNR FOR BSEG-BELNR.
    SELECTION-SCREEN END OF BLOCK B1.
    PERFORM DATA_RETRIVE.
    *PERFORM SUB_MOVE_DATA.
    **PERFORM SUB_FETCH_EXTRA_DATA.
    **PERFORM SUB_MOVE_EXTRA_DATA.
    PERFORM SUB_CALC.
    PERFORM SUB_FIELDCAT.
    PERFORM SUB_DISPLAY.
    *&      Form  DATA_RETRIVE
          text
    -->  p1        text
    <--  p2        text
    form DATA_RETRIVE .
    SELECT LIFNR BUKRS BELNR GJAHR SHKZG GSBER DMBTR WRBTR SGTXT BUZEI
           BUZID AUGDT AUGCP AUGBL BSCHL KOART UMSKZ ZUONR SAKNR HKONT
           FROM BSEG INTO TABLE IT_BSEG
           WHERE LIFNR IN vendor AND BUKRS = CoCd AND GJAHR = Fiscal.
    IF NOT IT_BSEG[] IS INITIAL.
    SELECT LIFNR LAND1 NAME1
           FROM LFA1 INTO TABLE IT_LFA1 FOR ALL ENTRIES IN IT_BSEG
           WHERE LIFNR = IT_BSEG-LIFNR.
    ENDIF.
    IF NOT IT_BSEG[] IS INITIAL.
    SELECT LIFNR BUKRS GJAHR UMSAV
           FROM LFC1 INTO TABLE IT_LFC1 FOR ALL ENTRIES IN IT_BSEG
           WHERE LIFNR = IT_BSEG-LIFNR AND BUKRS = IT_BSEG-BUKRS AND GJAHR = IT_BSEG-GJAHR.
    ENDIF.
    IF NOT IT_BSEG[] IS INITIAL.
    SELECT BUKRS BELNR GJAHR BLART BUDAT BLDAT MONAT USNAM XBLNR
           FROM BKPF INTO TABLE IT_BKPF FOR ALL ENTRIES IN IT_BSEG
           WHERE MONAT IN Period AND BUKRS = IT_BSEG-BUKRS AND GJAHR = IT_BSEG-GJAHR AND BELNR = IT_BSEG-BELNR.
    ENDIF.
    LOOP AT IT_BSEG.
    IT_ITAB-LIFNR = IT_BSEG-LIFNR.
    IT_ITAB-BUKRS = IT_BSEG-BUKRS.
    IT_ITAB-BELNR = IT_BSEG-BELNR.
    IT_ITAB-GJAHR = IT_BSEG-GJAHR.
    IT_ITAB-SHKZG = IT_BSEG-SHKZG.
    IT_ITAB-GSBER = IT_BSEG-GSBER.
    IT_ITAB-DMBTR = IT_BSEG-DMBTR.
    IT_ITAB-WRBTR = IT_BSEG-WRBTR.
    IT_ITAB-SGTXT = IT_BSEG-SGTXT.
    IT_ITAB-BUZEI = IT_BSEG-BUZEI.
    IT_ITAB-BUZID = IT_BSEG-BUZID.
    IT_ITAB-AUGDT = IT_BSEG-AUGDT.
    IT_ITAB-AUGCP = IT_BSEG-AUGCP.
    IT_ITAB-AUGBL = IT_BSEG-AUGBL.
    IT_ITAB-BSCHL = IT_BSEG-BSCHL.
    IT_ITAB-KOART = IT_BSEG-KOART.
    IT_ITAB-UMSKZ = IT_BSEG-UMSKZ.
    IT_ITAB-ZUONR = IT_BSEG-ZUONR.
    IT_ITAB-SAKNR = IT_BSEG-SAKNR.
    IT_ITAB-HKONT = IT_BSEG-HKONT.
    READ TABLE IT_LFA1 WITH KEY LIFNR = IT_ITAB-LIFNR.
      IF SY-SUBRC = 0.
      IT_ITAB-LAND1 = IT_LFA1-LAND1.
      IT_ITAB-NAME1 = IT_LFA1-NAME1.
      ENDIF.
    READ TABLE IT_LFC1 WITH KEY LIFNR = IT_ITAB-LIFNR
                                BUKRS = IT_ITAB-BUKRS
                                GJAHR = IT_ITAB-GJAHR
                                BINARY SEARCH.
      IF SY-SUBRC = 0.
      IT_ITAB-UMSAV = IT_LFC1-UMSAV.
      ENDIF.
    READ TABLE IT_BKPF WITH KEY BUKRS = IT_ITAB-BUKRS
                                BELNR = IT_ITAB-BELNR
                                GJAHR = IT_ITAB-GJAHR.
    IF SY-SUBRC = 0.
    IT_ITAB-BLART = IT_BKPF-BLART.
    IT_ITAB-BUDAT = IT_BKPF-BUDAT.
    IT_ITAB-BLDAT = IT_BKPF-BLDAT.
    IT_ITAB-MONAT = IT_BKPF-MONAT.
    IT_ITAB-USNAM = IT_BKPF-USNAM.
    IT_ITAB-XBLNR = IT_BKPF-XBLNR.
    ENDIF.
    APPEND IT_ITAB.
    CLEAR  IT_ITAB.
    ENDLOOP.
    endform.                    " DATA_RETRIVE
    *&      Form  SUB_CALC
          text
    -->  p1        text
    <--  p2        text
    form SUB_CALC .
    *SORT IT_ITAB BY LIFNR GSBER GJAHR.
    *LOOP AT IT_ITAB.
    *IF IT_ITAB-SHKZG = 'S'.
      IT_ITAB-DMBTR = IT_ITAB-DMBTR * ( -1 ).
    *ENDIF.
    *CLEAR IT_ITAB-DMBTR_S.
    *MODIFY IT_ITAB.
    *ENDLOOP.
    *LOOP AT IT_ITAB.
    *IT_ITAB-BAL = IT_ITAB-UMSAV + IT_ITAB-DMBTR.
    *MODIFY IT_ITAB.
    *CLEAR IT_ITAB.
    *ENDLOOP.
    *LOOP AT IT_ITAB.
      IF IT_ITAB-SHKZG = 'S'.
      IT_ITAB-DMBTR = IT_ITAB-DMBTR * ( -1 ).
      ENDIF.
      MODIFY IT_ITAB.
    *ENDLOOP.
      LOOP AT IT_ITAB.
        IF IT_ITAB-SHKZG = 'S'.
            IT_ITAB-DMBTR_S  = IT_ITAB-DMBTR .
        ELSE.
        IF IT_ITAB-SHKZG = 'H'.
          IT_ITAB-DMBTR_H  = IT_ITAB-DMBTR.
          ENDIF.
        ENDIF.
       IT_ITAB-DMBTR = ''.
        MODIFY IT_ITAB INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
    "VAR.
        CLEAR IT_ITAB.
      ENDLOOP.
    *MOVE CORRESPONDING IT_LFC1-UMSAV = IT_ITAB-UMSAV.
      SORT IT_ITAB BY LIFNR GSBER.
    LOOP AT IT_ITAB.
         IT_ITAB-DMBTR_H = IT_ITAB-DMBTR_H.
         IT_ITAB-DMBTR_S = IT_ITAB-DMBTR_S.
         IT_ITAB-DH = IT_ITAB-DMBTR_H.
         IT_ITAB-DS = IT_ITAB-DMBTR_S.
           IT_ITAB-FLAG = 'X'.
           IT_ITAB-CTR = 'X'.
           IT_ITAB-HS = IT_ITAB-DMBTR_H - IT_ITAB-DMBTR_S.
           IT_ITAB-BAL = IT_ITAB-UMSAV + IT_ITAB-HS.
         MODIFY IT_ITAB INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S HS
                                                    FLAG BAL.
      CLEAR IT_ITAB.
    ENDLOOP.
    *LOOP AT IT_ITAB.
    **IF IT_ITAB-MONAT = ''.
      DELETE IT_ITAB[] WHERE MONAT = ''.
    *MODIFY IT_ITAB.
    *ENDLOOP.
    LOOP AT IT_ITAB.
       AT END OF GSBER.
         SUM.
         IT_ITAB-DMBTR_H = IT_ITAB-DMBTR_H.
         IT_ITAB-DMBTR_S = IT_ITAB-DMBTR_S.
         IT_ITAB-DH = IT_ITAB-DMBTR_H.
         IT_ITAB-DS = IT_ITAB-DMBTR_S.
           IT_ITAB-FLAG = 'X'.
           IT_ITAB-CTR = 'X'.
           IT_ITAB-DMBTR_H = IT_ITAB-DMBTR_H.
           IT_ITAB-DMBTR_S = IT_ITAB-DMBTR_S.
           IT_ITAB-HS   = IT_ITAB-DMBTR_S - IT_ITAB-DMBTR_H.
           IT_ITAB-BAL  = IT_ITAB-UMSAV - IT_ITAB-HS.
         MODIFY IT_ITAB INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S  HS
                                                    FLAG BAL.
       ENDAT.
      CLEAR IT_ITAB.
    ENDLOOP.
      LOOP AT IT_ITAB.
        AT END OF GSBER.
          SUM.
          IT_ITAB-DMBTR_H = IT_ITAB-DMBTR_H.
          IT_ITAB-DMBTR_S = IT_ITAB-DMBTR_S.
          IT_ITAB-DH = IT_ITAB-DMBTR_H.
          IT_ITAB-DS = IT_ITAB-DMBTR_S.
            IT_ITAB-FLAG = 'X'.
           IT_ITAB-CTR = 'X'.
            IT_ITAB-DMBTR_H = IT_ITAB-DMBTR_H.
            IT_ITAB-DMBTR_S = IT_ITAB-DMBTR_S.
            IT_ITAB-BAL = IT_ITAB-UMSAV + ( IT_ITAB-DMBTR_H - IT_ITAB-DMBTR_S ).
          MODIFY IT_ITAB INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DH DS
                                                     FLAG BAL.
        ENDAT.
       CLEAR IT_ITAB.
      ENDLOOP.
    DELETE IT_ITAB[] WHERE FLAG <> 'X'.
    SORT IT_ITAB BY LIFNR GSBER.
    LOOP AT IT_ITAB.
       MOVE-CORRESPONDING IT_ITAB TO IT_TEMP.
       APPEND IT_TEMP.
    ENDLOOP.
    REFRESH IT_ITAB.
    SORT IT_TEMP BY LIFNR GSBER.
    LOOP AT IT_TEMP.
       MOVE-CORRESPONDING IT_TEMP TO IT_ITAB.
       APPEND IT_ITAB.
       CLEAR IT_ITAB.
       AT END OF LIFNR.
         SUM.
         IT_TEMP-FLAG = ''.
         MODIFY IT_TEMP INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S FLAG.
         MOVE-CORRESPONDING IT_ITEMP TO IT_ITAB.
         IT_ITAB-LIFNR = ''.
         IT_ITAB-NAME1 = ''.
         IT_ITAB-BELNR = ''.
         IT_ITAB-BUKRS = ''.
         IT_ITAB-GJAHR = ''.
         IT_ITAB-GSBER = ''.
         IT_ITAB-UMSAV = '0000'.
         IT_ITAB-DMBTR_H = IT_TEMP-DMBTR_H.
         IT_ITAB-DMBTR_S = IT_TEMP-DMBTR_S.
         IT_ITAB-BAL = IT_TEMP-DMBTR_H - IT_TEMP-DMBTR_S.
         IT_ITAB-FLAG = 'Y'.
         IT_ItAB-CTR = IT_TEMO-CTR.
         APPEND IT_ITAB.
       ENDAT.
       IF IT_ITAB-FLAG = 'Y'.
         it_itab-line_color = 'C600'.
         MODIFY IT_ITAB.
       ENDIF.
       CLEAR IT_TEMP.
    ENDLOOP.
    LOOP AT IT_ITAB WHERE FLAG = 'Y'.
         it_itab-line_color = 'C602'.
         MODIFY IT_ITAB INDEX SY-TABIX.
         CLEAR IT_ITAB.
    ENDLOOP.
    loop at it_itab WHERE FLAG  = ''.
         it_itab-line_color = 'C103'.
         IT_ITAB-LINE_CTR = 'C103'.
         MODIFY IT_ITAB INDEX SY-TABIX.
         CLEAR IT_ITAB.
    ENDLOOP.
    PERFORM SUB_CALC_1.
    endform.                    " SUB_CALC
    *&      Form  SUB_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_FIELDCAT .
      WA_FCAT-FIELDNAME = 'LIFNR'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Vendor No'. "'VENDOR NAME'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'NAME1'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Vendor Name'. "'VENDOR NAME'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'BELNR'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'SAP Document No'. "'DOC NUMBER'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'BLDAT'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'Doc Date'. "'FISCAL YEAR'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR wa_fcat.
      WA_FCAT-FIELDNAME = 'GSBER'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'BusA'. "'BUSINESS AREA'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'UMSAV'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Balance Carry Forward'. "'BAL  CARRIED FORWARD'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'FLAG'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'FLAG'. "'DOC NUMBER'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'SHKZG'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'SHKZG'. "'DOC NUMBER'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'DMBTR_S'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Credit'. "'DOC NUMBER'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'DMBTR_H'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Debit'. "'DOC NUMBER'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'MONAT'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'PERIOD'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'DH'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'DH'. "'DOC NUMBER'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'DS'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'DS'. "'DOC NUMBER'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
      WA_FCAT-FIELDNAME = 'BAL'.
      WA_FCAT-TABNAME = 'IT_ITAB'.
      WA_FCAT-SELTEXT_M = 'Accumlated Bal'.
      APPEND WA_FCAT TO IT_FCAT.
      CLEAR WA_FCAT.
    WA_FCAT-FIELDNAME = 'SGTXT'.
    WA_FCAT-TABNAME = 'IT_ITAB'.
    WA_FCAT-SELTEXT_M = 'Text'. "'DOC NUMBER'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
      ls_layout-info_fieldname = 'LINE_COLOR'.
    ENDFORM.                    " SUB_FIELDCAT
    *&      Form  SUB_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_DISPLAY .
      IF NOT IT_ITAB[] IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM = 'SY-REPID'
            IT_FIELDCAT        = IT_FCAT
            I_SAVE             = 'A'
            is_layout          = ls_layout
          TABLES
            T_OUTTAB           = IT_ITAB
          EXCEPTIONS
            PROGRAM_ERROR      = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SUB_DISPLAY
    *&      Form  SUB_CALC_1
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_CALC_1 .
      LOOP AT IT_ITAB WHERE FLAG = 'Y'.
          it_itab-line_color = 'C603'.
          MODIFY IT_ITAB INDEX SY-TABIX.
          CLEAR IT_ITAB.
      ENDLOOP.
    ENDFORM.                    " SUB_CALC_1

    This is the Report which i am trying to do....please help me with this Report....
    *& Report  ZVENDOR_RECONCILLATION
    REPORT  ZVENDOR_RECONCILLATION.
    *ALV
    TYPE-POOLS: SLIS.
    *TYPE-POOLS icon.
    DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
    DATA: TOP TYPE slis_t_listheader,
          END TYPE slis_t_listheader,
          EVENTS TYPE slis_t_event.
    DATA : NAME1 LIKE T001W-NAME1,
          WERKS LIKE T001W-WERKS  .
    DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
    DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
          LCAT TYPE SLIS_FIELDCAT_ALV.
    TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
    *INTERNAL TABLE
    DATA: BEGIN OF sd_bsak,
            bukrs TYPE bsak-bukrs,
            lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
          END OF sd_bsak.
    DATA: BEGIN OF sd_bsik,
            bukrs TYPE bsik-bukrs,
            lifnr TYPE bsik-lifnr,
            umsks TYPE bsik-umsks,
            umskz TYPE bsik-umskz,
            augdt TYPE bsik-augdt,
            augbl TYPE bsik-augbl,
            zuonr TYPE bsik-zuonr,
            gjahr TYPE bsik-gjahr,
            belnr TYPE bsik-belnr,
            buzei TYPE bsik-buzei,
            budat TYPE bsik-budat,
            bldat TYPE bsik-bldat,
            xblnr TYPE bsik-xblnr,
            blart TYPE bsik-blart,
            monat TYPE bsik-monat,
            bschl TYPE bsik-bschl,
            zumsk TYPE bsik-zumsk,
            shkzg TYPE bsik-shkzg,
            gsber TYPE bsik-gsber,
            dmbtr TYPE bsik-dmbtr,
            wrbtr TYPE bsik-wrbtr,
            sgtxt TYPE bsik-sgtxt,
            saknr TYPE bsik-saknr,
            hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
          END OF sd_bsik.
    DATA: BEGIN OF it_lfa1,
            lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
          END OF it_lfa1.
    DATA: BEGIN OF sd_lfc1,
            lifnr TYPE lfc1-lifnr,
            bukrs TYPE lfc1-bukrs,
            gjahr TYPE lfc1-gjahr,
            erdat TYPE lfc1-erdat,
            usnam TYPE lfc1-usnam,
            umsav TYPE lfc1-umsav,
          END OF sd_lfc1.
    DATA: BEGIN OF sd_lfc3,
            lifnr TYPE lfc3-lifnr,
            bukrs TYPE lfc3-bukrs,
            gjahr TYPE lfc3-gjahr,
            shbkz TYPE lfc3-shbkz,
            saldv TYPE lfc3-saldv,
            solll TYPE lfc3-solll,
            habnl TYPE lfc3-habnl,
          END OF sd_lfc3.
    *FINAL INTERNAL TABLE DECLARATION
    DATA: BEGIN OF IT_FINAL,
            gsber TYPE bsak-gsber,
            bukrs TYPE bsak-bukrs,
            lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
           gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
            DMBTR_S  TYPE BSAK-DMBTR,
            DMBTR_H  TYPE BSAK-DMBTR,
            DS       TYPE P DECIMALS 2,
            DH       TYPE P DECIMALS 2,
            SUB      TYPE P DECIMALS 2,
            ADD      TYPE P DECIMALS 2,
            BAL      TYPE P DECIMALS 2,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
                   lifnr TYPE lfc1-lifnr,
           bukrs TYPE lfc1-bukrs,
           gjahr TYPE lfc1-gjahr,
            erdat TYPE lfc1-erdat,
            usnam TYPE lfc1-usnam,
            umsav TYPE lfc1-umsav,
                   lifnr TYPE lfc3-lifnr,
           bukrs TYPE lfc3-bukrs,
           gjahr TYPE lfc3-gjahr,
            shbkz TYPE lfc3-shbkz,
            saldv TYPE lfc3-saldv,
            solll TYPE lfc3-solll,
            habnl TYPE lfc3-habnl,
    END OF IT_FINAL.
    DATA: BEGIN OF SD_FINAL,
            lifnr TYPE bsak-lifnr,
            bukrs TYPE bsak-bukrs,
           lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
                   bukrs TYPE bsik-bukrs,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
                   lifnr TYPE lfc1-lifnr,
           bukrs TYPE lfc1-bukrs,
           gjahr TYPE lfc1-gjahr,
            erdat TYPE lfc1-erdat,
            usnam TYPE lfc1-usnam,
            umsav TYPE lfc1-umsav,
                   lifnr TYPE lfc3-lifnr,
           bukrs TYPE lfc3-bukrs,
           gjahr TYPE lfc3-gjahr,
            shbkz TYPE lfc3-shbkz,
            saldv TYPE lfc3-saldv,
            solll TYPE lfc3-solll,
            habnl TYPE lfc3-habnl,
    line_color(4) TYPE c,
    END OF SD_FINAL.
    DATA IT_STD_BSAK  LIKE TABLE OF SD_BSAK  WITH HEADER LINE.
    DATA IT_STD_BSIK  LIKE TABLE OF SD_BSIK  WITH HEADER LINE.
    DATA IT_STD_LFA1  LIKE TABLE OF IT_LFA1  WITH HEADER LINE.
    DATA IT_STD_LFC1  LIKE TABLE OF SD_LFC1  WITH HEADER LINE.
    DATA IT_STD_LFC3  LIKE TABLE OF SD_LFC3  WITH HEADER LINE.
    DATA IT_STD_FINAL  LIKE TABLE OF IT_FINAL  WITH HEADER LINE.
    DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
    *SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
    PARAMETERS:  P_BUKRS LIKE BSAK-BUKRS OBLIGATORY,
                 P_GJAHR LIKE BSAK-GJAHR OBLIGATORY.
               P_EBELN LIKE EKPO-EBELN .
    *PARAMETER: PA_RPT AS CHECKBOX DEFAULT 'X'.
    SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
    SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
    SELECTION-SCREEN END OF BLOCK HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'STATUS'.
      PERFORM DATA_RETRIVAL.
      PERFORM FIELD.
      PERFORM SORT USING IT_SORT.
      PERFORM EVENTS USING EVENTS.
    PERFORM EVENTS_1 USING EVENTS.
    PERFORM HEADER USING TOP.
      PERFORM LAYOUT.
      PERFORM DISPLAY.
      END-OF-PAGE.
    *&      Form  DATA_RETRIVAL
         text
    -->  p1        text
    <--  p2        text
    FORM DATA_RETRIVAL .
      SELECT BUKRS  LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
             MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
        FROM BSAK INTO TABLE IT_STD_BSAK
        WHERE BUKRS = P_BUKRS
              AND GJAHR = P_GJAHR AND ZUMSK = ''
        AND LIFNR IN S_LIFNR
        AND MONAT IN S_MONAT.
      IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
               BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
        FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
        WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR AND ZUMSK = ''.
      ENDIF.
    IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT LIFNR NAME1
               FROM LFA1  INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
               WHERE LIFNR = IT_STD_BSAK-LIFNR.
      ENDIF.
    IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT LIFNR BUKRS GJAHR ERDAT USNAM UMSAV
               FROM LFC1  INTO TABLE IT_STD_LFC1 FOR ALL ENTRIES IN IT_STD_BSAK
               WHERE LIFNR = IT_STD_BSAK-LIFNR AND BUKRS = IT_STD_BSAK-BUKRS AND GJAHR = IT_STD_BSAK-GJAHR.
      ENDIF.
    IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT LIFNR BUKRS GJAHR SHBKZ SALDV SOLLL HABNL
               FROM LFC3  INTO TABLE IT_STD_LFC3 FOR ALL ENTRIES IN IT_STD_BSAK
               WHERE LIFNR = IT_STD_BSAK-LIFNR AND BUKRS = IT_STD_BSAK-BUKRS AND GJAHR = IT_STD_BSAK-GJAHR.
      ENDIF.
      LOOP AT IT_STD_BSAK.
        IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
    READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
      IF SY-SUBRC = 0.
        IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
      ENDIF.
    READ TABLE IT_STD_LFC1 WITH KEY  LIFNR = IT_STD_FINAL-LIFNR
                                     BUKRS = IT_STD_FINAL-BUKRS
                                     GJAHR = IT_STD_FINAL-GJAHR.
        IF SY-SUBRC = 0.
          IT_STD_FINAL-ERDAT = IT_STD_LFC1-ERDAT.
          IT_STD_FINAL-USNAM = IT_STD_LFC1-USNAM.
          IT_STD_FINAL-UMSAV = IT_STD_LFC1-UMSAV.
        ENDIF.
    *READ TABLE IT_STD_LFC3 WITH KEY LIFNR = IT_STD_FINAL-LIFNR
                                   BUKRS = IT_STD_FINAL-BUKRS
                                   GJAHR = IT_STD_FINAL-GJAHR.
       IF SY-SUBRC = 0.
         IT_STD_FINAL-SHBKZ = IT_STD_LFC3-SHBKZ.
         IT_STD_FINAL-SALDV = IT_STD_LFC3-SALDV.
         IT_STD_FINAL-SOLLL = IT_STD_LFC3-SOLLL.
         IT_STD_FINAL-HABNL = IT_STD_LFC3-HABNL.
       ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_BSIK.
    IF SY-SUBRC = 0.
        IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
        IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
        ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_LFC3.
       IF SY-SUBRC = 0.
         IT_STD_FINAL-SHBKZ = IT_STD_LFC3-SHBKZ.
         IT_STD_FINAL-SALDV = IT_STD_LFC3-SALDV.
         IT_STD_FINAL-SOLLL = IT_STD_LFC3-SOLLL.
         IT_STD_FINAL-HABNL = IT_STD_LFC3-HABNL.
       ENDIF.
       APPEND IT_STD_FINAL.
       CLEAR IT_STD_FINAL.
    ENDLOOP.
    LOOP AT IT_STD_FINAL.
        IF IT_STD_FINAL-SHKZG = 'S'.
            IT_STD_FINAL-DMBTR_S  = IT_STD_FINAL-DMBTR.
        ELSE.
        IF IT_STD_FINAL-SHKZG = 'H'.
          IT_STD_FINAL-DMBTR_H  = IT_STD_FINAL-DMBTR.
          ENDIF.
        ENDIF.
        IT_STD_FINAL-DMBTR = ''.
        MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
    "VAR.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
      LOOP AT IT_STD_LFC3.
    *AT NEW LIFNR.
        IF SY-SUBRC = 0.
          IT_STD_FINAL-LIFNR = IT_STD_LFC3-LIFNR.
          IT_STD_FINAL-BUKRS = IT_STD_LFC3-BUKRS.
          IT_STD_FINAL-GJAHR = IT_STD_LFC3-GJAHR.
          IT_STD_FINAL-SHBKZ = IT_STD_LFC3-SHBKZ.
          IT_STD_FINAL-UMSAV = IT_STD_LFC3-SALDV.
          IT_STD_FINAL-DMBTR_S = IT_STD_LFC3-SOLLL.
          IT_STD_FINAL-DMBTR_H = IT_STD_LFC3-HABNL.
        ENDIF.
    *ENDAT.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
    ENDLOOP.
    LOOP AT IT_STD_FINAL.
         IT_STD_FINAL-DS  = IT_STD_FINAL-DMBTR_S.
         IT_STD_FINAL-DH  = IT_STD_FINAL-DMBTR_H.
         IT_STD_FINAL-SUB = ( IT_STD_FINAL-DS ) - ( IT_STD_FINAL-DH ).
         IT_STD_FINAL-ADD =  ( IT_STD_FINAL-UMSAV ) + ( IT_STD_FINAL-SUB ).
    MODIFY IT_STD_FINAL.
    ENDLOOP.
    ENDFORM.                    " DATA_RETRIVAL
    *&      Form  FIELD
         text
    -->  p1        text
    <--  p2        text
    form FIELD .
      LCAT-FIELDNAME = 'LIFNR'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor No'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'NAME1'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor Name'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GJAHR'.                "MATERIAL GROUP
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Fiscal Year'.
    *LCAT-REF_TABNAME = 'LFA1'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GSBER'.                "MATERIAL GROUP
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'BussArea'.
    *LCAT-REF_TABNAME = 'LFA1'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'SHBKZ'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'S G/L'.
      LCAT-REF_TABNAME = 'LFC3'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'UMSAV'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Bal Carry Forward'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_S'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Debit Balanace'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_H'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Credit Balance'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'ADD'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Accumulated Balance'.
    *LCAT-REF_TABNAME = 'EKKO'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
    LOOP AT FIELDCAT INTO LCAT WHERE FIELDNAME = 'DMBTR_S'.
    LCAT-DO_SUM = 'X'.
    MODIFY FIELDCAT FROM LCAT." TRANSPORTING DO_SUM.
    ENDLOOP.
    LOOP AT FIELDCAT INTO LCAT WHERE FIELDNAME = 'DMBTR_H'.
    LCAT-DO_SUM = 'X'.
    MODIFY FIELDCAT FROM LCAT." TRANSPORTING DO_SUM.
    ENDLOOP.
    LOOP AT FIELDCAT INTO LCAT WHERE FIELDNAME = 'ADD'.
    LCAT-DO_SUM = 'X'.
    MODIFY FIELDCAT FROM LCAT." TRANSPORTING DO_SUM.
    ENDLOOP.
    endform.                    " FIELD
    *&      Form  DISPLAY
         text
    -->  p1        text
    <--  p2        text
    form DISPLAY .
      CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 , IT_STD_LFC1, IT_STD_LFC3.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    I_INTERFACE_CHECK                = ' '
    I_BYPASSING_BUFFER                = ' '
    I_BUFFER_ACTIVE                  = ' '
        I_CALLBACK_PROGRAM                = SY-REPID
    I_CALLBACK_PF_STATUS_SET          = 'STATUS '
    I_CALLBACK_USER_COMMAND          = ' '
    I_CALLBACK_TOP_OF_PAGE            = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE      = ' '
    I_CALLBACK_HTML_END_OF_LIST      = ' '
    I_STRUCTURE_NAME                  =
    I_BACKGROUND_ID                  = ' '
    I_GRID_TITLE                      =
    I_GRID_SETTINGS                  =
        IS_LAYOUT                        = LAYOUT
        IT_FIELDCAT                      = FIELDCAT[]
    IT_EXCLUDING                      =
    IT_SPECIAL_GROUPS                =
          IT_SORT                          = IT_SORT
    IT_FILTER                        =
    IS_SEL_HIDE                      =
    I_DEFAULT                        = 'X'
    I_SAVE                            = ' '
    IS_VARIANT                        =
        IT_EVENTS                        = EVENTS
    IT_EVENT_EXIT                    =
    IS_PRINT                          =
    IS_REPREP_ID                      =
    I_SCREEN_START_COLUMN            = 0
    I_SCREEN_START_LINE              = 0
    I_SCREEN_END_COLUMN              = 0
    I_SCREEN_END_LINE                = 0
    I_HTML_HEIGHT_TOP                = 0
    I_HTML_HEIGHT_END                = 0
    IT_ALV_GRAPHICS                  =
    IT_HYPERLINK                      =
    IT_ADD_FIELDCAT                  =
    IT_EXCEPT_QINFO                  =
    IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER          =
    ES_EXIT_CAUSED_BY_USER            =
        TABLES
       t_outtab                          = IT_CHARG
          t_outtab                          = IT_STD_FINAL
    EXCEPTIONS
    PROGRAM_ERROR                    = 1
    OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "DISPLAY
    *&      Form  EVENTS
         text
    -->  p1        text
    <--  p2        text
    form EVENTS USING P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'TOP_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    endform.                    " EVENTS
    *&      Form  TOP_OF_PAGE
         text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = TOP.
    ENDFORM.                    "TOP_OF_PAGE
    **&      Form  SORT
         text
         -->P_IT_SORT  text
    form SORT  using    p_sort TYPE SLIS_T_SORTINFO_ALV.
      DATA : LT_SORT TYPE slis_sortinfo_alv.
      LT_SORT-fieldname = 'LIFNR'.
      LT_SORT-tabname = 'IT_STD_FINAL'.
      LT_SORT-up = 'X'.
    LT_SORT-SUBTOT      = 'X'.
      APPEND LT_SORT TO P_SORT.
      CLEAR LT_SORT.
      LT_SORT-fieldname = 'GSBER'.
      LT_SORT-tabname = 'IT_STD_FINAL'.
      LT_SORT-up = 'X'.
      LT_SORT-SUBTOT      = 'X'.
      APPEND LT_SORT TO P_SORT.
      CLEAR LT_SORT.
      LT_SORT-fieldname = 'UMSAV'.
      LT_SORT-tabname = 'IT_LFC3'.
      LT_SORT-up = 'X'.
    LT_SORT-SUBTOT      = 'X'.
      APPEND LT_SORT TO P_SORT.
      CLEAR LT_SORT.
    endform.                    " SORT
    *&      Form  LAYOUT
         text
    -->  p1        text
    <--  p2        text
    form LAYOUT .
    LAYOUT-ZEBRA = 'X'.
      LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      APPEND LAYOUT." TO LAYOUT.
    endform.                    " LAYOUT
    *&      Form  EVENTS_1
         text
         -->P_EVENTS  text
    FORM EVENTS_1  USING    P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      WRITE: SY-UNAME.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'END_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    ENDFORM.                    " EVENTS_1
    waiting for ur reply...

  • Vendor - change of reconciliation account

    Hello
    I have search a read a lot of articles about this problem, but unfortuantely without success.
    My problem is that some vendors shall be have another reconciliation account, so I have changed the account in vendor master data. I know that this have no influence on existing vendor items, but will it be possible to change the reconciliation account for existing records via F101. I mean that the old reconciliation account will balance to 0 and instead be listed under the new reconciliation account?
    I have tried to execute F101, but without success. The records on the vendor account is still linked to the old rec account. Is it possible to do anything automatically?
    Best regards
    Søren Kirch
    LOGSTOR

    Hello Søren Kirch,
    The below two stepped approach may let you solve the issue.
    a) Change the Reconciliation Accounts either using the TCode XK07 or by the Function Module VENDOR_CHANGE_ACCOUNTGROUP in bulk
    b) Transfer either the Open Items (Item by Item) or the Balances accumulated on the Old Recon Account to the New Recon Account using the Program SAPF101. Ofcourse, this might need a little bit of customizing in OBBW. (The Transaction Key 'A00' has to be configured to determine the Adjustment Account for the original recon account and also the Posting Keys)
    Though I have not done this myself, I believe and wish that this will work for you.
    With Regards
    VG

  • Vendor return in case of procurment against cost centre

    All SAP Gurus,
    We have procured some spares against Cost Center.
    Goods are received.
    But later we found that these are defective, so need to be send back to the vendor.
    How this can be done in SPA (because do not we  have these components in stock as these are procured against Cost center)?
    Regards,

    In real time what happens is for an account assigned PO the stock gets consumed.So the stock doest show in any storage location in the system as the system thinks that since u have processed an costcenter assigned PO it is not present in the system.
    But practically in ur shop floor the material may be present.For this the return to vendor by reversing the original mat doc shouldnot happen.So we do a return PO which returns the material against the original PO by deducting the material value from the cost centre where it has been originally accumulated.
    Please try the process in your test system.
    regards,
    indranil

  • Wht tax amount exceeds the customer/vendor line item amount 001Mess no7Q321

    Dear Experts,
    We are also getting same error in production"Withholding tax amount exceeds the customer/vendor line item amount 001 Message no. 7Q321"
    Please gudie me how to resolve this issue, while posting vendor invoice in T-code - F-43 i am getting bellow error message why because we client requirement is accumulation activity required so is there any solution for this with out changing accumulation activity.
    We need to use this accumulation activity.
    I would be greatful if you could help us to resolve this issue.
    thanks
    Seshu

    If its relating to TRM- Transaction manager, please implement note no " 1961340 - Calculation of withholding tax for 2nd or 3rd local currency "
    Regards
    Anil

  • 1099 amounts not being combined when more than one vendor same TIN

    I have multiple vendors within the same company code with the same tax id number. When the 1099's are generated, the amounts for both vendore are not getting combined. So if for one of the vendors, he has been paid $4850.00 on one vendor number, and on his other vendor number, he has been paid $500. His 1099 should be $5350.00, but it is being generated for only $4850.00.
    This is only one example of this problem. Does anyone have any idea what could be causing this? Everything I have read says the 1099's should combine based on tax id number.But this is not happening.
    Thanks
    Alicia

    Sorry to keep dwelling on this subject. I was able to accumlate the totals for 8 vendors with the same tax id sucessfully. However, all of the payment amounts exceeded the mininum for the 1099 tax type royalty.
    I have not been able to take two vendors, one with let's say 6453.02 in payments, and another with the same tax id number, who only has a payment of $500.00. The $500 is below the misc limit. The 1099 form and file only show 6453.02, however the report does show the two amounts. These vendors are in different company codes.
    In the define withholding tax codes, I have set the accumulation type to be combined accumulation. Still the two amounts are not beng added together on the form.  Using the help for the field "combined accumulation", there is a statement "these vendors may belong to different company codes if these company codes are assigned to one tax on sales/purchases group".
    Can someone tell me where I would assign this? My company is not currently using either sales or purchasing.
    Thanks
    Alicia

  • Vendor - Tax deduction at lower rate - MIRO & FB60

    Hi all,
    Currently we are having one issue of u201CTax deduction at lower rateu201D for a Vendor who is having such certificate with him.
    For amount purpose we have set the SPRO setting but the user is asking for the date control also since the Vendor is having the relevant certificate till 31.03.2012 and after that, lower rate Tax deduction will not be allowed.
    Simple option is to change the Vendor Master with the original tax type+ Tax code (Normal Rate) combination to calculate tax at the normal rate. But if could not cross the amount limit before 31.03.2012 then that will be difficult to keep an eye on date i.e. 31.03.2012 and then change the master data of u201CNu2026u201D No. of Vendors .
    We want to put a condition in a system as; system should check the system date with the tax type date to get a date control. We have restricted the date of u201Cnewly created tax typeu201D till 31.03.2012.
    In case of MIRO testing, we have use a user exit which is correctly comparing the system date with the tax type date in runtime. If the tax type date is older than system date then system is throwing an error to change the master date (FK02 / XK02) of subject vendor.
    In case of FB60 we are facing a problem since not able to cross confirm the tax type date with the system date. We are trying BTE u2013 1140 for FB60 but in runtime we are not able to get the tax related details / tables.
    Is there any workaround or way in BTE u2013 1140 for FB60?
    Regards,
    Shridhar
    Edited by: Shridhar Sawant on Nov 2, 2011 2:23 PM

    Hi Ramesh,
    In the SAP Std. setting of Formula we are maintaining one more line for same TAX TYPE + TAX CODE + COUNTRY combination but for the ending date of lower rate tax deduction.
    Since there is no "To date" option in Formula setting, we are maintaining one more line For e.g. in the 1st line we have a date as 01.04.2011 (i.e. Valid from) and in the other line we have mentioned date as 01.01.2012 (i.e. To date) since Vendor is having the lower rate tax deduction certificate uptill 31.12.2011.
    In the first line of formula (Valid from 01.04.2011) we have maintain :
    To Base amt              W/tax    Reduction base amt.
    175,000.00                 3.00               -
    9,999,999,999.00     10.00     175,000.00
    In the second line (Valid from 01.01.2012) of formula we have maintain :
    To Base amt             W/tax    Reduction base amt.
    9,999,999,999.00    10.00               -
    Cross confirming the various scenarios since date accumulation of tax setting is on in Tax Type that we are considering.
    Will confirm to you the change suggest by you.
    If these changes doesn't work then we have to go to the option of User exit or BTE for MIRO and FB60 testing.
    Have any idea about the above mention settings ?
    Regards,
    Shridhar

  • Change of WHT Codes as per the vendor invoice and vendor payment amount

    Hi,
    my user is having a requirement where the SAP system should change the extended withholding tax codes as per the amount which is invoice and paid to the vendor.
    Eg: Upto 10 lacs- rate is 2% (WHT rate)
          Above 10 lacs- rate is 2.5%.
    suppose i have paid the vendor Rs 8 lacs till yesterday, as the amount is below 10 lacs iam calculating 2% tds. Assume that iam paying 4 lacs today. so the total amount paid is Rs 12 lacs as of now, as the total exceeds Rs 10 lacs i have to collect TDS at 2.5% on Rs 4 Lacs. i need my SAP system to calculate the 0.5 % (2.5% - 2% ) TDS on the Rs 8 lacs which is invoiced / paid till yesterday.
    ? is it possible in SAP, if yes pls let me know.
    Note: sap version 4.7ee

    Hi,
    my user is having a requirement where the SAP system should change the extended withholding tax codes as per the amount which is invoice and paid to the vendor.
    Eg: Upto 10 lacs- rate is 2% (WHT rate)
    Above 10 lacs- rate is 2.5%.
    suppose i have paid the vendor Rs 8 lacs till yesterday, as the amount is below 10 lacs iam calculating 2% tds. Assume that iam paying 4 lacs today. so the total amount paid is Rs 12 lacs as of now, as the total exceeds Rs 10 lacs i have to collect TDS at 2.5% on Rs 4 Lacs. i need my SAP system to calculate the 0.5 % (2.5% - 2% ) TDS on the Rs 8 lacs which is invoiced / paid till yesterday.
    ? is it possible in SAP, if yes pls let me know.
    Note: sap version 4.7ee
    For this purpose you have to  define Formula for Calculating Withholding type
    Pre conditions:
    While defining Tax code , WT formula field must be selected during calculation
    config
    EWT> Calculation> Withholding Tax codes---> Define Formulas for Calculating WT:
    country key
    select new entries
    WT type
    WT Code
    WCty
    Valid from
    Select Header data for Formula than select Formula for calculation
    To Base amount : 1000000
    WH Tax             : 2%
    Red base from    : 0
    To base amount : Maximum
    WH Tax            : 2.5%
    Red base from   : 1000000
    Check accumulation type in Withholding tax type definition
    Edited by: Ramesh Reddy Nalamada on Apr 22, 2008 12:05 PM

  • Withholding tax not captured for a single Vendor during Invoice

    Dear SAP Gurus,
    Withholding tax is not captured during MIRO for a particular Vendor.  The Vendor Master has been assigned with the relative tax codes. Program RFWT0010 has been run.  Tax Types have been
    checked.  Error message was changed to Warning in OBA5.  Message 7Q321 Withholding tax
    amount exceeds amount in Vendor line item 001.  Relative SAP notes referred. Withholding tax
    type at the time of payment Central Invoice & I ppmt checked.  OBC4 reconciliation account
    G067 field status group checked for taxes - optional.   Please give solution.
    Thanks and regards,
    Sadashivan

    Hi,
    Check with the minimum amount of the withholding tax code.
    Check accumulation activated or not.
    If you are using portary dependencies check the base withholding tax code given.
    While defining the withholding tax code check the posting indicator and check withholding tax formula is activated or not. if it is active then check the amount given in withholding tax code formulas.
    Still problem continue revert back.
    Regards,
    Sankar

  • S_ALR_87012082 sort by vendor

    Dear all,
    I am using this report to generate all inactive vendor list.
    1) Am i correct to select the inactive vendor list by checking the 'Accounts not posted'?
    2) May i know how do i sort the list by vendor. Since i have many entities using the same vendor. There are some cases where this vendor is active in entity A but not in entity B. I would like to know output as a whole not just by entity.
    3) Another doubt is the 'Accumulated balance' field. What does this means? Because there are accumulated balances shown in this report. But while i check in Vendor line item report 'FBL1N', there is no outstanding amount. All invoices already paid.
    4) The 'Balance carryforward' field is the cmount brought forward from the previous year, am i right?
    5) Does anyone have the guide for all the checkboxes option? or any guide documentation on this transaction code?
    Your help is much appreciated. Please advise.
    Thanks

    1/ you get ALSO the inactive one's, not ONLY
    2/ go to output variants and click configure to have your desired layout/sorting, ...
    3/ Compare with FK10N
    4/ yes
    5/ use help function for the fields or check documentation for program RFKSLD00

  • TDS down payment at teh time of vendor down payment not working

    Hi All
    Can any one suggest why TDS is not getting deducted at the time of vendor down payment.
    TAx type and tax code has been created for payment and GL account assigned for this for paid over. These codes are assigned to company code and vendor master data as well. In vendor masterdata it has been ticked on 'liable' also.
    But when making doc with F-48 for vendor down payment, it is not populating for TDS deduction and hence no tds has been deducted.
    Can anyone suggest if any more settings is required.
    We are in ECC6, and using extended withholding tax for India.
    Refgards
    Mukta

    Hi Venkat
    Actually all the mentioned steps already followed. I removed tax code from vendor master , but it doesn't help.
    At the time of invoice posting TDS is working fine, but at the time of advance payment it is not working.It is not populating withholding tax popup at all.
    In the tax type below are the settings- (standard SAP settings)
    calculation--
    base amount- Gross amount
    Rounding Rule- Round w/tax amnt up
    Cash discount- c/disc pre w/tx
    Post w/tax amount --  checked
    Accumulation type-
    No accumulation - selected
    Control data-
    W/tax base manual - checked
    Manual w/tax amnt- checked
    w/tax for pmnts- checked
    No cert numbering- checked
    Define minimum/max amounts
    w/tax code level- selected
    withholding tax amount-
    w/tax code level- selected
    Central Invoice
    No cent invoice - selected
    Minimum check-
    Minimum check at item level- selected
    Withholding tax code settings--
    Base amount - 100%
    Posting ind -  1
    with tax rate- 2%
    These all are in extended withholding tax settings.
    Can you please check why at the time of advance payment it is not asking for any withholding tax.
    Regards
    Mukta

  • Withholding Tax Type for Payment Posting - Customer Accumulation -

    We are using the Withholding Tax Type for Payment Posting for customer with the accumulation per month and checking the minimum/maximum withholding tax base amount to calculate the tax.
    When we run the F110 transaction (Automatic Payment) the system creates a BIll of Exchange as Noted items and keep the accounting document created from the SD opened. After the customer pay the bill, the bank send a file informing the payment, then we clearing the accounting document. 
    But the system updated the WITH_ITEM Table and filled the fields AUGBL(Clearing Document) and AUGDT (Clearing Date) with the number and date of the BIll of Exchange that was created during the F110 running.
    I am confused about this situation because according the Withholding Tax Type for Payment Posting, the system only could updated the table  WITH_ITEM  with an accounting document. Noted items are not an accounting document.
    I would like to konw if the system is working properly, or can have something wrong in our configuracion?
    Thanks and regards
    Augusto

    Hi ,
    In some countries there is requirement that you need to deducted Withholding tax either at time of Invoice or payment which ever is ealier . so if you get Invoice first then you deduct the Withholding tax on Invoice and define the tax type and assign to company . but if you make paymnet first which we called advance or down payment then we configure Withholding tax on payment .
    If a vendor is liable for withholding tax on invoice it may be liable for payment as well if you think you may pay some advances .
    Please let me know if you need more information

  • Process of reclaiming discount given to customer from manufactuer/vendor

    Can anybody help me in defining this process of reclaiming from manufactuer/vendor
    1. Our company is in Trading, Customer will get approved discount copy from XYZ Manufacturer Company and this manufacturer is a vendor for us and we are official dealers for these products.
    2. We create the sales order, delivery and invoice for the same and will be provided the discount (Header-% or Value) as per the approval copy of XYZ manufacturer/Vendor
    3. At the end of the month we will provide the Invoice copy along with the approval copy to manufacturer/Vendor to claim the approved discount given by this manufacturer to customer.
    4. How to track this sales and claims
    5. Is it a kind of accruals and managing it through Financials.

    Hi,
    What I understood from your explanation is given below:
    Your company ABC gets material from your vendor XYZ and sells to the Customers.
    Let us consider the vendor XYZ offers 10% discount to the customer and it is disclosed.
    The vendor XYZ offers 20% trade discount on MRP to your company ABC. In this, you have to bear 10% to the customer.
    In a transaction, your vendor XYZ supplies a material having MRP value $100 by deducting 10% discount. So, the net value is $90.
    You are selling the same material to a customer. Your bill will show that MRP is $100 minus discount 10%; so the net value is $90.
    After submitting the entire customer invoices to your vendor XYZ, you will get back 10% discount say $10 in this case.
    How to map this in SAP:
    You can track the sale detail by the condition types. For example, if you are using the condition type PR00 for the MRP and condition type ZK07 for giving discount, the accumulated value of ZK07 will be the value to be received from your vendor.
    You can not make the value ZK07 as an accrual value in the pricing procedure as it is not concerned with the vendor.
    In every transaction, if you have made any profit, it will be tracked in the u2018Profit marginu2019 given in the pricing procedure.
    In my opinion, you have to accumulate the value of ZK07 and claim the amount by making a debit note to the vendor.
    Hope this may throw some ideas.
    Regards,
    K Bharathi

  • Consolidated Payment to Vendors

    Hi all,
    We have a scenario, where in our client issues  cheque for a consolidated amount to the Bankers for payment to vendors. The Bankers in turn will issue different DD's to the vendors.
    I shall explain this with an example:
    The client issues a single cheque for Rs.200000/- to the Bank for payment to 5 vendors @ Rs.40000/- each. The Bank in turn will issue 5 DD's to these vendors.
    Please advice me as to how to accomodate this scenario in SAP?
    Thanks,
    Sajan C P

    Hi,
    Use Tcode F-53.
    Process bank detail with consolidated figure and if any bank charges AND specify the vendor 1 Account
    Step 1
    click the push button "PROCESS OPEN ITEM"
    step 2.
    go back without selecting anything
    Step 3
    click the push button "CHOOSE OPEN ITEM"
    Specify the vendor 2 Account
    then similarly follow the step 2 and step 3 specifying the vendor 3,4,5 account
    Now all the vendor account will get accumulated in the process open item.
    find / sort list the required document number and clear it off
    Step 4
    Simulate & POST
    pls revert back, if any further quires you have
    Regards
    Sandeep Acharya

Maybe you are looking for

  • Please help me to run a submitted job in database

    Hi, Guys: I need your help for a problem: I need to have a job runnning every day midnight to update a column in a table, so I wrote a procedure to do it, submit job as follows: set serveroutput on; declare   n_jobno BINARY_INTEGER; begin   dbms_job.

  • Acrobat Forms in Web Browsers

    Hi, I'm made a simple form for a pricelist in InDesign and exported it to PDF where I'm added some simple form actions to multiple the price by the quantity giving a subtotal, and to add the subtotals together for a grand total. It works fine in Acro

  • How to Redeploy a new version of a JAR Shared Library

    Hello, I have deployed successfully a JAR shared library with the following MANIFEST file Extension-Name: myPackageSharedLibrary Specification-Version: 1.0 Implementation-Version: 1.0 Now when I try to modify it and redeploy a newer version from the

  • Photo interlacing issue

    Hello, I recently got my wife a iphone 5c. Seems fine in every respect except when you take photos. They end up with an odd interlacing like a bad scan or something. I tried searching for a similar issue but seems everything I saw was about an interl

  • IPhone 4s Screen Flickering since updating to IOS 7.0.4

    Hi Guys, I recently updated my iPhone 4s to iOS 7.0.4 and ever since then the screen is flickering in all four corners. I have been through all the forums about this issue and I have tried the trouble shooting techniques that are mentioned ie; turn o