Skip to Content
author's profile photo Former Member
Former Member

FI REPORTS

i need fi reports if any

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 09:10 AM

    Hi,

    1. Develop the alv report to display the customer and vendor

    open items balance details,when both are same for the

    particular company(names and vat registration should be equal)

    Means: Display

    Vendor Number(LIFNR),

    Vendor Name(NAME1),

    VAT Registration(STCEG),

    Balance(PSWBT),

    Customer Number(KUNNR),

    Customer Name(NAME1),

    VAT Registration(STCEG),

    Balance(PSWBT).

    Net(Vendor-STCEG - Customer-STCEG).

    Use tables: LFA1,KNA1,BSIK,BSID.

    select-options: BUKRS,LIFNR,KUNNR.

    Regards,

    Chandu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 09:22 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 09:29 AM

    can i have some more

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Try this report :

      report z_fi_rep_000002.

      include z_fi_rep_000002_top. " Include for Global Data

      include z_fi_rep_000002_events.

      include z_fi_rep_000002_forms. " FORM-Routines

      type-pools slis.

      ...Internal data specific for g/l accounts............................

      types : begin of type_t001u,

      vbukr type vbukr, " Property Company Code

      end of type_t001u ,

      type_t_t001u type standard table of type_t001u .

      types : begin of type_bvor,

      bukrs type bukrs, " Company Code

      gjahr type gjahr, " FiscalYear

      Begin of Delete on Vinitia Jain

      belnr TYPE belnr, " Accounting Document Number

      End of Delete on Vinitia Jain

      Begin of Insert on Vinitia Jain

      belnr type belnr_d, " Accounting Document Number

      End of Insert on Vinitia Jain

      end of type_bvor,

      type_t_bvor type standard table of type_bvor.

      types : begin of type_bsik,

      lifnr type lifnr, " Account Number of Vendor

      belnr type belnr, " Accounting Document Number

      zfbdt type dzfbdt, "Baseline date for due date

      bstat type bstat, " Document Status

      zlspr type dzlspr, " Payment Block Indicator

      wrbtr type wrbtr, " Amount in document currency

      end of type_bsik,

      type_t_bsik type standard table of type_bsik.

      types : begin of type_lfa1,

      lifnr type lifnr, " Account Number of Vendor

      name1 type name1, " Name of Vendor

      end of type_lfa1,

      type_t_lfa1 type standard table of type_lfa1.

      types : begin of type_final,

      lifnr type lifnr, " Account Number of Vendor

      name1 type name1, " Vendor Description

      belnr type belnr, " Accounting Document Number

      zfbdt type dzfbdt, " Baseline date for due date

      bstat type bstat, " Cleared/Open Items Symbol

      zlspr type dzlspr, " Payment Block Key

      wrbtr1 type wrbtr, " for 1-30 days

      wrbtr2 type wrbtr, " for 31-60 days

      wrbtr3 type wrbtr, " for 60+ days

      amount type wrbtr, " Total Amount

      end of type_final ,

      type_t_final type standard table of type_final .

      -


      Structure Declaration

      -


      data : fs_layout type slis_layout_alv, "alv_layout

      fs_t001u type type_t001u ,

      fs_bvor type type_bvor,

      fs_lfa1 type type_lfa1,

      fs_final type type_final,

      fs_bsik type type_bsik.

      -


      Internal table Declaration

      -


      data : i_t001u type type_t_t001u, " table for T001u

      i_bvor type type_t_bvor, " table for bvor

      i_bsik type type_t_bsik, " table for bsik

      i_lfa1 type type_t_lfa1, " table for lfa1

      i_final type type_t_final , " final data table

      i_listheader type slis_t_listheader, " List header

      i_fieldcat type slis_t_fieldcat_alv, " Fieldcatalog

      i_sortinfo type slis_t_sortinfo_alv, " Sort

      i_events type slis_t_event. " Alv grid events

      Global varible declaration

      data : v_repid type sy-repid, " Program name

      v_bukrs type bukrs, " Company code

      v_zfbdt type dzfbdt, " Run date

      v_prctr type prctr. " Profit center

      -


      SELECTION SCREEN PARAMETERS

      -


      selection-screen begin of block main with frame title text-001.

      parameters : p_bukrs type bukrs.

      parameters : p_zfbdt type dzfbdt.

      select-options: s_prctr for v_prctr.

      selection-screen end of block main.

      &----


      *& Include Z_FI_REP_000002_EVENTS

      &----


      -


      INITIALIZATION

      -


      initialization.

      Assign Program name

      v_repid = sy-repid .

      -


      AT SELECTION-SCREEN.

      -


      at selection-screen.

      If Company Code is not entered then Error Message will display

      if p_bukrs is initial.

      set cursor field p_bukrs.

      MESSAGE e004. "Enter Company Code

      endif.

      -


      Start-of-selection event

      -


      start-of-selection.

      perform get_data.

      perform process_data.

      -


      End-of-selection event

      -


      end-of-selection.

      &----


      *& Include Z_FI_REP_000002_FORMS

      &----


      &----


      *& Form get_data

      &----


      text

      -


      --> p1 text

      <-- p2 text

      -


      form get_data .

      if p_zfbdt is initial.

      p_zfbdt = sy-datum.

      endif.

      select vbukr

      from t001u

      into table i_t001u

      where abukr eq p_bukrs.

      konts like 'V%'.

      check not i_t001u[] is initial.

      select bukrs

      gjahr

      belnr

      from bvor

      into corresponding fields of table i_bvor

      for all entries in i_t001u

      where bukrs eq i_t001u-vbukr.

      *loop at i_t001u into fs_t001u.

      *

      *select bukrs

      gjahr

      belnr

      from bvor

      into fs_bvor

      where bukrs eq fs_t001u-vbukr.

      *

      append fs_bvor to i_bvor.

      *

      *endselect.

      *

      *

      *endloop.

      check not i_bvor[] is initial.

      select lifnr

      belnr

      zfbdt

      bstat

      zlspr

      wrbtr

      from bsik

      into table i_bsik

      for all entries in i_bvor

      where bukrs = i_bvor-bukrs and

      gjahr = i_bvor-gjahr." and

      belnr = i_bvor-belnr.

      if not i_bsik[] is initial.

      select lifnr

      name1

      from lfa1

      into table i_lfa1

      for all entries in i_bsik

      where lifnr = i_bsik-lifnr.

      if sy-subrc eq 0.

      sort i_lfa1 by lifnr name1.

      endif.

      endif.

      endform. " get_data

      &----


      *& Form process_data

      &----


      text

      -


      --> p1 text

      <-- p2 text

      -


      form process_data .

      loop at i_bsik into fs_bsik.

      move-corresponding fs_bsik to fs_final.

      call function 'DAYS_BETWEEN_TWO_DATES'

      exporting

      i_datum_bis = p_zfbdt

      i_datum_von = fs_bsik-zfbdt

      importing

      e_tage = v_zfbdt

      exceptions

      days_method_not_defined = 1

      others = 2.

      if v_zfbdt between 0 and 30.

      fs_final-wrbtr1 = fs_bsik-wrbtr.

      elseif v_zfbdt between 31 and 60.

      fs_final-wrbtr2 = fs_bsik-wrbtr.

      else.

      fs_final-wrbtr3 = fs_bsik-wrbtr.

      endif.

      read table i_lfa1 into fs_lfa1 with key lifnr = fs_bsik-lifnr binary

      search.

      if sy-subrc eq 0.

      fs_final-amount = fs_final-wrbtr1 + fs_final-wrbtr3 + fs_final-wrbtr3 .

      collect fs_final into i_final.

      clear: fs_bsik, fs_final, fs_lfa1.

      endif.

      endloop.

      endform. " process_data

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 09:18 AM

    hi ,

    Check the report given below:

    Report created for displaying the Funds assigned to the funds center for the year.

    &----


    *& Report ZFI_ASSIGNED_FUNDS

    *&

    &----


    *&

    *&

    &----


    REPORT ZFI_ASSIGNED_FUND.

    TABLES: FMIT,FMCIT.

    TYPE-POOLS: SLIS.

    *ALV data declarations

    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,

    FIELDCATALOG1 TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,

    GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,

    GD_LAYOUT TYPE SLIS_LAYOUT_ALV,

    GD_REPID LIKE SY-REPID.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    SELECT-OPTIONS: RFISTL FOR FMIT-RFISTL,

    FIKRS FOR FMIT-FIKRS,

    RYEAR FOR FMIT-RYEAR.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA: BEGIN OF IT_FMIT OCCURS 0,

    RYEAR LIKE FMIT-RYEAR,

    FIKRS LIKE FMIT-FIKRS,

    RFISTL LIKE ZREV_BUDGET-KOSTL,

    RFIPEX LIKE ZREV_BUDGET-KSTAR,

    TSL01 LIKE FMIT-TSL01,

    TSL02 LIKE FMIT-TSL02,

    TSL03 LIKE FMIT-TSL03,

    TSL04 LIKE FMIT-TSL04,

    TSL05 LIKE FMIT-TSL05,

    TSL06 LIKE FMIT-TSL06,

    TSL07 LIKE FMIT-TSL07,

    TSL08 LIKE FMIT-TSL08,

    TSL09 LIKE FMIT-TSL09,

    TSL10 LIKE FMIT-TSL10,

    TSL11 LIKE FMIT-TSL11,

    TSL12 LIKE FMIT-TSL12,

    TSL13 LIKE FMIT-TSL13,

    TSL14 LIKE FMIT-TSL14,

    TSL15 LIKE FMIT-TSL15,

    TSL16 LIKE FMIT-TSL16,

    END OF IT_FMIT.

    DATA: BEGIN OF IT_FMIT1 OCCURS 0,

    RYEAR LIKE FMIT-RYEAR,

    FIKRS LIKE FMIT-FIKRS,

    RFISTL LIKE ZREV_BUDGET-KOSTL,

    RFIPEX LIKE ZREV_BUDGET-KSTAR,

    TOTAL LIKE FMIT-TSL01,

    END OF IT_FMIT1.

    DATA : BEGIN OF IT_BUDGET OCCURS 0,

    GJAHR LIKE ZREV_BUDGET-GJAHR,

    KOSTL LIKE ZREV_BUDGET-KOSTL, " COST CENTER

    KSTAR LIKE ZREV_BUDGET-KSTAR,

    APR_B LIKE ZREV_BUDGET-APR_B,

    MAY_B LIKE ZREV_BUDGET-MAY_B,

    JUN_B LIKE ZREV_BUDGET-JUN_B,

    JUL_B LIKE ZREV_BUDGET-JUL_B,

    AUG_B LIKE ZREV_BUDGET-AUG_B,

    SEP_B LIKE ZREV_BUDGET-SEP_B,

    OCT_B LIKE ZREV_BUDGET-OCT_B,

    NOV_B LIKE ZREV_BUDGET-NOV_B,

    DEC_B LIKE ZREV_BUDGET-DEC_B,

    JAN_B LIKE ZREV_BUDGET-JAN_B,

    FEB_B LIKE ZREV_BUDGET-FEB_B,

    MAR_B LIKE ZREV_BUDGET-MAR_B,

    END OF IT_BUDGET.

    DATA : BEGIN OF IT_BUDGET1 OCCURS 0,

    GJAHR LIKE ZREV_BUDGET-GJAHR,

    KOSTL LIKE ZREV_BUDGET-KOSTL, " COST CENTER

    KSTAR LIKE ZREV_BUDGET-KSTAR,

    TOTAL1 LIKE FMIT-TSL01,

    END OF IT_BUDGET1.

    DATA: BEGIN OF IT_FINAL OCCURS 0,

    FIKRS LIKE FMIT-FIKRS,

    RFISTL LIKE FMIT-RFISTL,

    RFIPEX LIKE FMIT-RFIPEX,

    TEXT LIKE FMCIT-TEXT1,

    ALLOC LIKE FMIT-TSL16,

    USED LIKE FMIT-TSL16,

    REMAIN LIKE FMIT-TSL16,

    END OF IT_FINAL.

    *************************************************************************

    *START-OF-SELECTION

    *************************************************************************

    START-OF-SELECTION.

    PERFORM GET_DATA.

    PERFORM PROCESS_DATA.

    PERFORM BUILD_FIELDCATALOG.

    PERFORM BUILD_LAYOUT.

    PERFORM DISPLAY_ALV_REPORT.

    &----


    *& Form GET_DATA

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM GET_DATA .

    SELECT RYEAR

    FIKRS

    RFISTL

    RFIPEX

    TSL01

    TSL02

    TSL03

    TSL04

    TSL05

    TSL06

    TSL07

    TSL08

    TSL09

    TSL10

    TSL11

    TSL12

    TSL13

    TSL14

    TSL15

    TSL16

    INTO TABLE IT_FMIT FROM FMIT

    WHERE RYEAR IN RYEAR

    AND FIKRS IN FIKRS

    AND RFISTL IN RFISTL.

    LOOP AT IT_FMIT.

    MOVE-CORRESPONDING IT_FMIT TO IT_FMIT1.

    IT_FMIT1-TOTAL = IT_FMIT-TSL01 + IT_FMIT-TSL02 + IT_FMIT-TSL03 + IT_FMIT-TSL04 + IT_FMIT-TSL05 + IT_FMIT-TSL06 + IT_FMIT-TSL07

    + IT_FMIT-TSL08 + IT_FMIT-TSL09 + IT_FMIT-TSL10 + IT_FMIT-TSL11 + IT_FMIT-TSL12 + IT_FMIT-TSL13.

    IT_FMIT1-TOTAL = IT_FMIT1-TOTAL * -1 .

    COLLECT IT_FMIT1.

    ENDLOOP.

    LOOP AT IT_FMIT1.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    INPUT = IT_FMIT1-RFISTL

    IMPORTING

    OUTPUT = IT_FMIT1-RFISTL.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    INPUT = IT_FMIT1-RFIPEX

    IMPORTING

    OUTPUT = IT_FMIT1-RFIPEX.

    MODIFY IT_FMIT1.

    ENDLOOP.

    SELECT GJAHR

    KOSTL

    KSTAR

    APR_B

    MAY_B

    JUN_B

    JUL_B

    AUG_B

    SEP_B

    OCT_B

    NOV_B

    DEC_B

    JAN_B

    FEB_B

    MAR_B

    INTO TABLE IT_BUDGET FROM ZREV_BUDGET

    FOR ALL ENTRIES IN IT_FMIT1

    WHERE GJAHR IN RYEAR

    AND KOSTL EQ IT_FMIT1-RFISTL

    AND KSTAR EQ IT_FMIT1-RFIPEX.

    LOOP AT IT_BUDGET.

    MOVE-CORRESPONDING IT_BUDGET TO IT_BUDGET1.

    IT_BUDGET1-TOTAL1 = IT_BUDGET-APR_B + IT_BUDGET-MAY_B + IT_BUDGET-JUN_B + IT_BUDGET-JUL_B + IT_BUDGET-AUG_B

    + IT_BUDGET-SEP_B + IT_BUDGET-OCT_B + IT_BUDGET-NOV_B + IT_BUDGET-DEC_B + IT_BUDGET-JAN_B +

    IT_BUDGET-FEB_B + IT_BUDGET-MAR_B.

    IT_BUDGET1-TOTAL1 = IT_BUDGET1-TOTAL1 * 100000.

    COLLECT IT_BUDGET1.

    ENDLOOP.

    ENDFORM. " GET_DATA

    &----


    *& Form PROCESS_DATA

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM PROCESS_DATA .

    LOOP AT IT_FMIT1.

    IT_FINAL-FIKRS = IT_FMIT1-FIKRS.

    IT_FINAL-RFISTL = IT_FMIT1-RFISTL.

    IT_FINAL-RFIPEX = IT_FMIT1-RFIPEX.

    IT_FINAL-USED = IT_FMIT1-TOTAL.

    READ TABLE IT_BUDGET1 WITH KEY KOSTL = IT_FMIT1-RFISTL KSTAR = IT_FMIT1-RFIPEX.

    IF SY-SUBRC EQ 0.

    IT_FINAL-ALLOC = IT_BUDGET1-TOTAL1.

    ENDIF.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    INPUT = IT_FMIT1-RFIPEX

    IMPORTING

    OUTPUT = IT_FMIT1-RFIPEX.

    SELECT SINGLE TEXT1 INTO IT_FINAL-TEXT FROM FMCIT WHERE SPRAS EQ 'EN'

    AND FIPEX EQ IT_FMIT1-RFIPEX.

    IT_FINAL-REMAIN = IT_FINAL-ALLOC - IT_FINAL-USED.

    APPEND IT_FINAL.

    CLEAR IT_FINAL.

    ENDLOOP.

    ENDFORM. " PROCESS_DATA

    &----


    *& Form BUILD_FIELDCATALOG

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM BUILD_FIELDCATALOG .

    FIELDCATALOG-FIELDNAME = 'FIKRS'.

    FIELDCATALOG-SELTEXT_M = 'Functional Mng Area'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'RFISTL'.

    FIELDCATALOG-SELTEXT_M = 'Fund Center'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'RFIPEX'.

    FIELDCATALOG-SELTEXT_M = 'Commitment Item'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'TEXT'.

    FIELDCATALOG-SELTEXT_M = 'Commitment Item Text'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'ALLOC'.

    FIELDCATALOG-SELTEXT_M = 'Allocated Budget'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'USED'.

    FIELDCATALOG-SELTEXT_M = 'Used Budget'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    FIELDCATALOG-FIELDNAME = 'REMAIN'.

    FIELDCATALOG-SELTEXT_M = 'Remaining Budget'.

    APPEND FIELDCATALOG TO FIELDCATALOG.

    CLEAR FIELDCATALOG.

    ENDFORM. " BUILD_FIELDCATALOG

    &----


    *& Form BUILD_LAYOUT

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM BUILD_LAYOUT .

    GD_LAYOUT-NO_INPUT = 'X'.

    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.

    ENDFORM. " BUILD_LAYOUT

    &----


    *& Form DISPLAY_ALV_REPORT

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM DISPLAY_ALV_REPORT .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = GD_REPID

    IS_LAYOUT = GD_LAYOUT

    IT_FIELDCAT = FIELDCATALOG[]

    I_SAVE = 'X'

    TABLES

    T_OUTTAB = IT_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_ALV_REPORT

    regards,

    venkat.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 10:05 AM

    thanks srinivas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.