There are 8 bits in a byte. There is No Shortcut to be A Great ABAP Programmer and It's Applies to All.
Monday, September 26, 2011
SAP-FICO: Company Codes and the Chart of Accounts
SAP-FICO: Company Codes and the Chart of Accounts
Though you can have multiple Charts of Accounts in SAP, company codes are assigned to only one chart of accounts. This is done in configuration (SPRO) (T-code: OB62 – Assign Company Code -> Chart of Accounts).
T-Code for Chart of Accounts
Credit to : http://www.whypad.com/posts/sap-fico-company-codes-and-the-chart-of-accounts/81/
T-Code for Chart of Accounts
- T-code: F.10 – Chart of Accounts
Report of accounts in a chart of accounts. Lots of ways to limit your results, but can’t limit by Company Code! You will definitely want to limit by chart of accounts. - T-code: OB62 – Assign Company Code -> Chart of Accounts
- T-code: OBY2 – Copy Company Code: G/L Accounts
When creating a new Company Code, just assigning it to a chart of accounts in OB62 doesn’t automatically create those accounts for the new company code. I.e. you won’t be able to post any entries until you’ve created the accounts for the company code. OBY2 lets you copy all of the accounts that were created for another company code to your new one. - GL Postings are assigned to only 1 company code
You can do “cross-company code” postings (i.e. DR CoCde A and CR CoCde B), but SAP will automatically generate the off-setting entries within each company code so that their books stay in balance (debits = credits). There is config around Intra-company postings to determine where you want those offsets to go. - T-code: FS00 – Edit G/L Account Centrally
This is usually the preferred t-code for manually creating GL Accounts since it allows you to create both the chart of accounts piece and the company code pieces. - In FS00, you may need to create an account for multiple company codes. This can be done by changing the CoCde and using the “Create with reference button” in FS00.
- T-code: FSS0 – Edit Accounts in Company Code
FSS0 allows you to edit just the Company Code (CoCde) portion of the GL Account. - T-code: FSP0 – Edit Account in Chart of Accounts
FSP0 allows you to edit just the Chart of Accounts portion of the GL Account. - T-code: CX16 - Consolidation Chart of Accounts – Hierarchy Display
CX16 allows you to create/edit financial statement items (FS Items) and their hierarchy for the Consolidated Chart of Accounts used in the EC-CS consolidation system.
Credit to : http://www.whypad.com/posts/sap-fico-company-codes-and-the-chart-of-accounts/81/
Sunday, September 25, 2011
CSV: Comma Delimited
Use the Function Module SAP_CONVERT_TO_CSV_FORMAT
to convert the internal table into Comma seperated format then download this
to convert the internal table into Comma seperated format then download this
Tuesday, September 20, 2011
Donwnload File - Dynamic Filename
Below is the code snippet
The type should be String as Character(C) data type will generate error
DATA: l_filename TYPE STRING.
CONCATENATE 'c:\MPF_REPORT' sy-datum sy-timlo sy-uname '.pdf' INTO l_filename.
CONDENSE l_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = l_filename "'c:\MPF_REPORT20110921063337.pdf' "'c:\test_pdf_sf.pdf'
FILETYPE = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = i_pdf
* FIELDNAMES =
* 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
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
The type should be String as Character(C) data type will generate error
DATA: l_filename TYPE STRING.
CONCATENATE 'c:\MPF_REPORT' sy-datum sy-timlo sy-uname '.pdf' INTO l_filename.
CONDENSE l_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = l_filename "'c:\MPF_REPORT20110921063337.pdf' "'c:\test_pdf_sf.pdf'
FILETYPE = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = i_pdf
* FIELDNAMES =
* 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
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Subscribe to:
Posts (Atom)