Copy or Upload Excel Journal Entry to SAP
SAP F.02 Copy from .XLS Excel Journal Entry
You can copy journal entries from Excel (.xls) and & paste them into SAP FB50 and F-02.
-when in FB50, fill out the required header rows,
-then choose menu path ENVIRONMENT -> COMPLEX POSTING (F6)

-Click "FAST DATA ENTRY" button this will give you the old GL fast entry screen which have 20 journal lines
or faster way is to go to SAP T-code F-02 directly.

If you can shrink your windows screen controls, you should be able to double the number of entry lines available. (depending on your screen resolution)
To move from cell to cell in Fast entry screen , use TAB key instead of "Enter" .

SAP F-02 fast entry display more journal lines and for allocating Debit or Credit journal entries , you enter posting keys in your excel sheet and copy manually to SAP F.02 screen.
If it is regular , you may create a program to upload excel data (.xls) to SAP.
There are two function modules you can use:
(1)'ALSM_EXCEL_TO_INTERNAL_TABLE'
(2) 'KCD_EXCEL_OLE_TO_INT'.
Very similar but the first function module (ASLM) used in for foregroundprocessing
Example from Marc Hoffmann*Internal table to receive excel data
Data: Begin of in occurs 0.
include structure ALSMEX_TABLINE.
Data: End of in.
*internal table with result (your 3 field-table)Data: begin of ex occurs 0,
f01(32), "max
f02(32),
f03(32),
.....
End of ex.
Data: fname(10).
Field-symbols:.
* so now you call the function to receive the data from EXCEL into table IN
* after that:Fname = 'EX-F'.
Loop at in. "per column one line entry
at new row. Clear: ex. Endat.
move in-col+2 to fname+4(2).
assign (fname) to.
move in-value to.
at end of row.
append ex2.
Clear: ex.
endat.
Endloop.
* result: your table EX is filled matching your EXCEL sheetThat works flexible for whatever number of column you will receive (in my example max 99).
If you use ALSM_EXCEL_TO_INTERNAL_TABLE
Then:
parameters: p_fname LIKE rlgrap-filename
default 'C:\temp\cpv25000.xls' obligatory.
form upload_one_sheet.
Data: st_col type i value 1,
st_row type i value 1,
en_col type i value 90,
en_row type i value 9999. "max number of lines
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_fname
I_BEGIN_COL = st_col
I_BEGIN_ROW = st_row
I_END_COL = en_col
I_END_ROW = en_row
TABLES
INTERN = in
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
case sy-subrc.
when 0.
when 1. message e016(38) with 'Inconsistent parameters'.
when 2. message e016(38) with 'Error upload OLE'.
when others. message e016(38) with 'Error'.
endcase.
endform.
SAP F.02 Copy from .XLS Excel Journal Entry
You can copy journal entries from Excel (.xls) and & paste them into SAP FB50 and F-02.
-when in FB50, fill out the required header rows,
-then choose menu path ENVIRONMENT -> COMPLEX POSTING (F6)
-Click "FAST DATA ENTRY" button this will give you the old GL fast entry screen which have 20 journal lines
or faster way is to go to SAP T-code F-02 directly.
If you can shrink your windows screen controls, you should be able to double the number of entry lines available. (depending on your screen resolution)
To move from cell to cell in Fast entry screen , use TAB key instead of "Enter" .
SAP F-02 fast entry display more journal lines and for allocating Debit or Credit journal entries , you enter posting keys in your excel sheet and copy manually to SAP F.02 screen.
If it is regular , you may create a program to upload excel data (.xls) to SAP.
There are two function modules you can use:
(1)'ALSM_EXCEL_TO_INTERNAL_TABLE'
(2) 'KCD_EXCEL_OLE_TO_INT'.
Very similar but the first function module (ASLM) used in for foregroundprocessing
Example from Marc Hoffmann*Internal table to receive excel data
Data: Begin of in occurs 0.
include structure ALSMEX_TABLINE.
Data: End of in.
*internal table with result (your 3 field-table)Data: begin of ex occurs 0,
f01(32), "max
f02(32),
f03(32),
.....
End of ex.
Data: fname(10).
Field-symbols:
* so now you call the function to receive the data from EXCEL into table IN
* after that:Fname = 'EX-F'.
Loop at in. "per column one line entry
at new row. Clear: ex. Endat.
move in-col+2 to fname+4(2).
assign (fname) to
move in-value to
at end of row.
append ex2.
Clear: ex.
endat.
Endloop.
* result: your table EX is filled matching your EXCEL sheetThat works flexible for whatever number of column you will receive (in my example max 99).
If you use ALSM_EXCEL_TO_INTERNAL_TABLE
Then:
parameters: p_fname LIKE rlgrap-filename
default 'C:\temp\cpv25000.xls' obligatory.
form upload_one_sheet.
Data: st_col type i value 1,
st_row type i value 1,
en_col type i value 90,
en_row type i value 9999. "max number of lines
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_fname
I_BEGIN_COL = st_col
I_BEGIN_ROW = st_row
I_END_COL = en_col
I_END_ROW = en_row
TABLES
INTERN = in
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
case sy-subrc.
when 0.
when 1. message e016(38) with 'Inconsistent parameters'.
when 2. message e016(38) with 'Error upload OLE'.
when others. message e016(38) with 'Error'.
endcase.
endform.
No comments:
Post a Comment