Tuesday, May 26, 2009

SAP FI Reports - Must Known

Transaction Description
S_ALR_87012279 Structured Account Balances (Balance Sheet & P&L Account in FS Version Format)
S_ALR_87012301 GL Account Balances (Totals & Balances )
S_ALR_87012282 GL Line Items
S_ALR_87012332 Statements for GL Accounts, Customers & Vendors
S_ALR_87012287 Document Journal
S_ALR_87012289 Compact Document Journal
S_ALR_87012291 Line Item Journal
S_ALR_87012293 Display of Changed Documents
S_ALR_87012341 Invoice Numbers assigned Twice
S_ALR_87012342 Gaps in Document Number Assignments
S_ALR_87012344 Posting Totals Document Type wise
S_ALR_87012346 Recurring Entry Documents
S_AL:R_87012326 Chart of Accounts
S_AL:R_87012328 GL Account List
S_ALR_87012308 Display Changes to GL Accounts
FSE2 Financial Statement Version
FCH6 Check Information List
FCHN Check Register
S_P99_41000102 Check Number Ranges
J1I7 List of Internally generated Excise Invoices
J2I8 Capital Goods Transfer of Credit
J1IGR List of GRs without Excise Invoice
J1IFR List of SubContract Challans
J2I9 CENVAT Register
J1I5,J2I5,J2I6 Registers : RG 23A/C Part I &II , RG1, PLA
S-ALR_87009987 Bill Holdings (Bill of Exchange Receivable List with ALV facility)
S_ALR_87012172 Customer Balances in Local Currency
S_ALR_87012197 Customer Line Items
S_ALR_87012168 Due Dates Analysis for Open Items
S_ALR_87012173 List of Customer Open Items
S_ALR_87012176 Customer Evaluation with Open Item Sorted List
S_ALR_87012177 Customer Payment History
S_ALR_87012178 Customer Open Item Analysis (Overdue Items Balance)
S_ALR_87012198 List of Customer Cleared Line Items
S_ALR_87012199 List of Down Payments open at key date
S_ALR_87012287 Debit & Credit Notes Register - Monthly
S_ALR_87012186 Customer wise Sales
S_ALR_87012082 Vendor Balances

Wednesday, May 20, 2009

Create PDF file from SMTF without spool number

REPORT ZISI_TEST.


DATA: cparam TYPE ssfctrlop,

      outop TYPE ssfcompop,
     
fm_name TYPE rs38l_fnam,
     
my_tabix TYPE sy-tabix,
     
file_size TYPE i,
     
bin_filesize TYPE i.



DATA: tab_otf_data TYPE ssfcrescl,
     
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
     
otab TYPE TABLE OF sflight WITH HEADER LINE,
     
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE.



START-OF-SELECTION.

  outop-tddest = 'LP01'.

  cparam-no_dialog = ''.

  cparam-preview = space.

  cparam-getotf = 'X'.



*****************for the first smartform********************************

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

      formname           = 'I18N_PRINT_TEST_SF_EN'

    IMPORTING

      fm_name            = fm_name

    EXCEPTIONS

      no_form            = 1

      no_function_module = 2

      OTHERS             = 3.



  CALL FUNCTION fm_name

    EXPORTING

      control_parameters = cparam

      output_options     = outop

      user_settings      = space

    IMPORTING

      job_output_info    = tab_otf_data

    EXCEPTIONS

      formatting_error   = 1

      internal_error     = 2

      send_error         = 3

      user_canceled      = 4

      OTHERS             = 5.

  tab_otf_final[] = tab_otf_data-otfdata[].

  CALL FUNCTION 'CONVERT_OTF'

    EXPORTING

      format                = 'PDF'

      max_linewidth         = 132

    IMPORTING

      bin_filesize          = bin_filesize

    TABLES

      otf                   = tab_otf_final

      lines                 = pdf_tab

    EXCEPTIONS

      err_max_linewidth     = 1

      err_format            = 2

      err_conv_not_possible = 3

      err_bad_otf           = 4

      OTHERS                = 5.



*************downloading the converted PDF data to your local PC********



  CALL FUNCTION 'GUI_DOWNLOAD'

    EXPORTING

      bin_filesize            = bin_filesize

      filename                = 'D:\TEST.PDF'

      filetype                = 'BIN'

    IMPORTING

      filelength              = file_size

    TABLES

      data_tab                = pdf_tab

    EXCEPTIONS

      file_write_error        = 1

      no_batch                = 2

      gui_refuse_filetransfer = 3

      invalid_type            = 4

      no_authority            = 5

      unknown_error           = 6

      header_not_allowed      = 7

      separator_not_allowed   = 8

      filesize_not_allowed    = 9

      header_too_long         = 10

      dp_error_create         = 11

      dp_error_send           = 12

      dp_error_write          = 13

      unknown_dp_error        = 14

      access_denied           = 15

      dp_out_of_memory        = 16

      disk_full               = 17

      dp_timeout              = 18

      file_not_found          = 19

      dataprovider_exception  = 20

      control_flush_error     = 21

      OTHERS                  = 22.




Tuesday, May 19, 2009

Read IDoc

*&---------------------------------------------------------------------*
*& Form f_readidoc
*&---------------------------------------------------------------------*
* Read IDOC
*----------------------------------------------------------------------*
FORM f_readidoc.
DATA: lt_idoc TYPE STANDARD TABLE OF edidc-docnum,
lt_edidd
TYPE STANDARD TABLE OF edidd,
ls_docnum
LIKE edidc-docnum,
l_ze1nthdr
LIKE ze1nthdr,
wa_edidd
TYPE edidd,
wa_idoc_dt
TYPE str_idoc_dt.

SELECT docnum
FROM edidc
INTO TABLE lt_idoc
WHERE idoctp = c_idoctp
AND status = c_status.

*-- Find Z2 QN in IDOC
LOOP AT lt_idoc INTO ls_docnum.
REFRESH lt_edidd.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = ls_docnum
TABLES
int_edidd = lt_edidd
EXCEPTIONS
document_not_exist =
1
document_number_invalid =
2
OTHERS = 3.
IF sy-subrc = 0.
LOOP AT lt_edidd INTO wa_edidd WHERE segnam = c_segnam.
l_ze1nthdr = wa_edidd-sdata.
IF l_ze1nthdr-qmart = c_qmart.
*-- Assign IDoc Number
wa_idoc_dt-docnum = ls_docnum.
wa_idoc_dt-qmnum = l_ze1nthdr-qmnum.
APPEND wa_idoc_dt TO gt_idoc_dt.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.

ENDFORM. "f_readidoc