Currancy
hi all,
how can earning foreign curruncy enter on account of sales and purchase?
Hi
Question is not clear.exactly what do u want?
nag
Similar Messages
-
Hi
after run f.05 program....foreign currancy valuation gain/loss balance not showing in particular g/l account
give me solution
please send foreign currancy valuation configuration step by step...
regar ds
sshi,
customizaton is at OB59, OBA1
after run the F.05, foreign currency gain/loss accounts(assigend in OB51) will be updated.
rgds, -
How to change currancy in primavera
hi ,
i want to know how to change Currency Symbole i want to change Indian currancy Rs to New ruppes sign
ThanksDear,
you can go to admin-currencies and choose a currency for your project .If your currency is not in the list you can create your currency by entering the exchange value with base currency.The base currency you can choose at the time of installation -
Balance in transaction currancy
Dear All,
While making the excise JV in J1IH for other other adjustment the systme is giving the error "BALANCE IN TRANSECTION CURRANCY" .If we try to save this it is givin the dump error.
Please give the inputs.
Thanks and regards.
deeptiHi,
This error generally comes when the excise accounts are not assigned to the correspondint excise transaction types in J_1ITRNACC table, goto SM30 and check whether all accounts are assigned for the corresponding excise transaction type(TR6C, GRPO,...).
Alternatively if you are using a higher upgraded system.
Ensure that you have applied the note 831876
regards,
Siddharth. -
Outgoing Payment Local Currancy not Display
Hello Experts,
I am Using SAP 2007 B PL 15
My Local Currency is INR and MY System Currency is USD
I Have Creating the A/P Invoice in Local Currency (INR)
But when Doing the Outgoing Payment that Time My Invoice Amount (Total Payment ) Column Display in USD Currency
I wants to Display Invoice Amount in Local Currency not USD Currency in Outgoing Payment Documents
SO Please Help Me.
Dixit PatelHello Dixit Patel,
Please close your duplicate posts.
Thanks,
Gordon -
The local and system currency for the Database in questions is in AUD.
A EURO bank account has been in operation for quite some time.
A USD transaction was posted to this bank account / GL. Ever since this time, the cumulative FC value is * and does not tally.
Can you please advise how we can being the use the FC cumulative balance again please.
Cheers lisaHi Lisa,
It is much better to define a specific currency for a bank account. Once you have mulit currencies trasnacted, you will not see a value.
I suggest closing this GL account and opening a new Euro account and transferring open items -
Age reports in 8.81 what does Translate leading currancy at Age date do ???
Just wondered what this new button did on the age report. ??
Does anyone know. ??Hi Jo,
please see SAP Note 1552673 for a detailed explanation.
All the best,
Kerstin -
Regarding foreign currancy revaluation
Hi Gurus
This is regarding foreign exchange revaluation.
After using tcode f.05 that balance amount whether gain/loss
This will be affected profit and loss account gain/loss account
As well as balance sheet( they want to be affected two places 1. balance sheet ( A/R gain or Loss another A/P gain or loss) 2. Profit and loss
Balance sheet gain IF A/R a/c1111110(gain)
A/R a/c 1111112(loss)
(Or)
IF A/P 2222220(gain)
A/R 2222222(loss)
As well as profit and loss account
Gain 5555555f
Loss 5555550
Above like that how to configured
Please tell me hw and where to assign g/ls and
In Tcode OBA1 where I want to give assignment above gls
Regards
SS.Hi Supriya,
You can use Transaction KDF on T-Cod OBA1. In this for each reconciliation account you have to define the GL setting as per e.g., shown below
Chart of Accounts XYZ1
G/L Account 5210100 (AR / AP Reconciliation GL account)
Currency
Currency type
Exchange rate diff realized:
Loss 2400002
Gain 2400002
Valuation:
Val.loss 1 2400001
Val.gain 1 2400001
Bal.sheet adj.1 2400004
You can set different Valuation accounts for AR & AP reconciliation accounts.
Hope this helps
Cheers,
Som -
Deactivate tax & reporting currancies
How can I deactivate tax in company code and Change the currencies from EU to USD.
Hi Marali,
You try with the transaction codes FTXA and FTXP . For transaction codes FTXP you can deactivate Tax Code line item for country wise.
Check that.
Thanks.
Ramesh Choragudi -
Hi Friends,
I have the following 2 problems in ALV report
1) Logo is not getting displayed in the report.
2) When i click on the Purchase order number in the report the interactive report is not working,i am not able to see report of First interactive level.
can you help it out friends.
Thanks and regards
Dinesh
REPORT YSDBALV1
tables: ekko , ekpo .
type-pools: slis .
Table for Display Header
data:i_header type slis_t_listheader with header line.
*Fieldcat Declaration
data:fieldcatalog type slis_T_fieldcat_alv WITH HEADER LINE.
*Table of Events
data:i_event type slis_t_event with header line .
For Layout
data:i_layout type slis_layout_alv .
data: text(30) .
*Internal Table Declaration
data: begin of it_final occurs 0 ,
ebeln like ekko-ebeln , "Purchasing Document No.
bedat like ekko-bedat , "Purchasing Document Date
matnr like ekpo-matnr , "Material No.
netwr like ekpo-netwr , "Net Order Value in PO Currancy
meins like ekpo-meins , "UOM
chk(1) ,
light(1) ,
change like ekpo-menge ,
end of it_final .
**select option Declaration
selection-screen begin of block block.
select-options: s_ebeln for ekko-ebeln .
selection-screen end of block block .
selection-screen begin of block block1 .
parameters:grid radiobutton group r .
parameters:list radiobutton group r .
selection-screen end of block block1 .
at selection screen
at selection-screen .
select single * from ekko where ebeln in s_ebeln .
if sy-subrc <> 0 .
message e000(8I) WITH 'No Data Exists' .
endif .
start-of-selection .
if grid = 'X' .
perform get_data .
perform event using i_event[] .
perform field using fieldcatalog[] .
perform layout using i_layout .
perform grid_display .
endif .
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
*DATA Retrieval from tables
SELECT EKKO~EBELN
EKKO~BEDAT
EKPO~EBELP
EKPO~MATNR
EKPO~NETWR
EKPO~MEINS
EKPO~MENGE
EKPO~BPRME
INTO CORRESPONDING FIELDS OF table IT_FINAL
FROM EKKO INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
WHERE EKKO~EBELN IN S_EBELN.
APPEND IT_FINAL.
endform. " get_data
*Getting the Event for Top of Page display.
*& Form event
text
-->P_I_event[] text
form event using p_i_event type slis_t_event.
clear p_i_event .
refresh p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = p_i_event
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
read table p_i_event with key name = slis_ev_top_of_page into i_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE_PO' to i_event-form.
modify p_i_event from i_event index sy-tabix transporting form.
endif.
clear i_event.
endform. " event
*Display Top-of Page Details and Logo
form top_of_page_po .
clear i_header .
refresh i_header .
write sy-datum to text.
i_header-typ = 'H'.
i_header-info = 'PURCHASE OREDER DETAILS'.
append i_header.
*Logo Display
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header[]
I_LOGO = 'ENJOYSAPLOGO'.
endform .
*Field Catalog Append
*& Form field
text
-->P_fieldCATALOG[] text
form field using p_fieldcatalog type slis_t_fieldcat_alv.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order No'.
fieldcatalog-col_pos = 1.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'BEDAT'.
fieldcatalog-seltext_m = 'PO Date'.
fieldcatalog-col_pos = 2.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material No'.
fieldcatalog-col_pos = 4.
fieldcatalog-outputlen = 20.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'NETWR'.
fieldcatalog-seltext_m = 'Net Value '.
fieldcatalog-col_pos = 5.
fieldcatalog-outputlen = 20.
fieldcatalog-do_sum = 'X'.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Units'.
fieldcatalog-col_pos = 6.
fieldcatalog-outputlen = 4.
append fieldcatalog .
clear fieldcatalog.
endform. " field
*& Form layout
text
form layout using p_i_layout TYPE SLIS_LAYOUT_ALV .
i_layout-zebra = 'X'.
i_layout-lights_fieldname = 'LIGHT'.
i_layout-lights_tabname = 'IT_FINAL'.
i_layout-box_fieldname = 'CHK'.
i_layout-box_tabname = 'IT_FINAL'.
i_layout-edit = ' '.
endform.
*To display Buttons in the MENU BAR if needed
FORM SET_PO_PF_STATUS USING P_I_EXTAB TYPE
SLIS_T_EXTAB.
SET PF-STATUS 'MENUPO'.
ENDFORM.
*Event for Interactive display of ALV report
form USER_COMMAND using r_ucomm like sy-ucomm
rs_selfield type slis_selfield .
if r_ucomm = '&IC1'.
READ TABLE IT_FINAL index rs_selfield-tabindex.
write:/ IT_FINAL-ebeln.
endif.
endform .
*Parameters of FM REUSE_ALV_GRID_DISPLAY
*& Form grid_display
text
--> p1 text
<-- p2 text
form grid_display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PO_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = FIELDCATALOG[]
IT_EVENTS = I_EVENT[]
TABLES
t_outtab = IT_FINAL.
endform. " grid_display*& Report YSDBALV1
REPORT YSDBALV1.
tables: ekko , ekpo .
type-pools: slis .
Table for Display Header
data:i_header type slis_t_listheader with header line.
*Fieldcat Declaration
data:fieldcatalog type slis_T_fieldcat_alv WITH HEADER LINE.
*Table of Events
data:i_event type slis_t_event with header line ,
wa_event type line of slis_t_event.
For Layout
data:i_layout type slis_layout_alv .
data: text(30) .
*Internal Table Declaration
data: begin of it_final occurs 0 ,
ebeln like ekko-ebeln , "Purchasing Document No.
bedat like ekko-bedat , "Purchasing Document Date
matnr like ekpo-matnr , "Material No.
netwr like ekpo-netwr , "Net Order Value in PO Currancy
meins like ekpo-meins , "UOM
chk(1) ,
light(1) ,
change like ekpo-menge ,
end of it_final .
**select option Declaration
selection-screen begin of block block.
select-options: s_ebeln for ekko-ebeln .
selection-screen end of block block .
selection-screen begin of block block1 .
parameters:grid radiobutton group r .
parameters:list radiobutton group r .
selection-screen end of block block1 .
at selection screen
at selection-screen .
select single * from ekko where ebeln in s_ebeln .
if sy-subrc <> 0 .
message e000(8I) WITH 'No Data Exists' .
endif .
start-of-selection .
if grid = 'X' .
perform get_data .
perform event using i_event[] .
perform field using fieldcatalog[] .
perform layout using i_layout .
perform grid_display .
endif .
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
*DATA Retrieval from tables
SELECT EKKO~EBELN
EKKO~BEDAT
EKPO~EBELP
EKPO~MATNR
EKPO~NETWR
EKPO~MEINS
EKPO~MENGE
EKPO~BPRME
INTO CORRESPONDING FIELDS OF table IT_FINAL
FROM EKKO INNER JOIN EKPO ON EKKOEBELN = EKPOEBELN
WHERE EKKO~EBELN IN S_EBELN.
APPEND IT_FINAL.
endform. " get_data
*Getting the Event for Top of Page display.
*& Form event
text
-->P_I_event[] text
form event using p_i_event type slis_t_event.
clear p_i_event .
refresh p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = p_i_event.
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
read table p_i_event with key name = slis_ev_top_of_page into wa_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE_PO' to i_event-form.
modify p_i_event from i_event index sy-tabix transporting form.
endif.
clear i_event.
endform. " event
*Display Top-of Page Details and Logo
form top_of_page_po .
clear i_header .
refresh i_header .
write sy-datum to text.
i_header-typ = 'H'.
i_header-info = 'PURCHASE OREDER DETAILS'.
append i_header.
*Logo Display
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header[]
I_LOGO = 'ENJOYSAP_LOGO'.
endform .
*Field Catalog Append
*& Form field
text
-->P_fieldCATALOG[] text
form field using p_fieldcatalog type slis_t_fieldcat_alv.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order No'.
fieldcatalog-col_pos = 1.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'BEDAT'.
fieldcatalog-seltext_m = 'PO Date'.
fieldcatalog-col_pos = 2.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material No'.
fieldcatalog-col_pos = 4.
fieldcatalog-outputlen = 20.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'NETWR'.
fieldcatalog-seltext_m = 'Net Value '.
fieldcatalog-col_pos = 5.
fieldcatalog-outputlen = 20.
fieldcatalog-do_sum = 'X'.
append fieldcatalog .
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Units'.
fieldcatalog-col_pos = 6.
fieldcatalog-outputlen = 4.
append fieldcatalog .
clear fieldcatalog.
endform. " field
*& Form layout
text
form layout using p_i_layout TYPE SLIS_LAYOUT_ALV .
i_layout-zebra = 'X'.
i_layout-lights_fieldname = 'LIGHT'.
i_layout-lights_tabname = 'IT_FINAL'.
i_layout-box_fieldname = 'CHK'.
i_layout-box_tabname = 'IT_FINAL'.
i_layout-edit = ' '.
endform.
*To display Buttons in the MENU BAR if needed
FORM SET_PO_PF_STATUS USING P_I_EXTAB TYPE
SLIS_T_EXTAB.
SET PF-STATUS 'MENUPO'.
ENDFORM.
*Event for Interactive display of ALV report
form USER_COMMAND using r_ucomm like sy-ucomm
rs_selfield type slis_selfield .
if r_ucomm = '&IC1'.
READ TABLE IT_FINAL index rs_selfield-tabindex.
set parameter id 'VL1' field it_final-ebeln.
call transaction 'ME23N'.
endif.
endform .
*Parameters of FM REUSE_ALV_GRID_DISPLAY
*& Form grid_display
text
--> p1 text
<-- p2 text
form grid_display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PO_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = FIELDCATALOG[]
IT_EVENTS = I_EVENT[]
TABLES
t_outtab = IT_FINAL.
endform. " grid_display
Regards,
Rusidar S. -
Error on bapi_acc_document_post
Hi experts,
when i executing this bapi_acc_document_post, am getting error " FI/CO interface: Line item entered several times" i mention code below so please give me suggestion.
*& Report ZSAMPLE
REPORT ZSAMPLE.
data: BEGIN OF WA_HEADER,
ID TYPE I,
KUNNR TYPE n LENGTH 10,
INV_DATE TYPE c LENGTH 10,
PST_DATE TYPE c LENGTH 10,
REF TYPE invfo-xblnr,
AMT_DOCCUR TYPE PA2010-BETRG,
TXT(40),
END OF WA_HEADER.
DATA : IT_HEADER like WA_HEADER OCCURS 0 WITH HEADER LINE.
data: BEGIN OF WA_ITEM,
ID TYPE I,
GL_ACCOUNT TYPE n LENGTH 10,
ITEM_TEXT TYPE BAPIACGL09-ITEM_TEXT,
BUS_AREA TYPE BAPIACGL09-BUS_AREA,
AMT_DOCCUR TYPE BAPIACCR09-AMT_DOCCUR,
KOSTL TYPE CSKT-KOSTL,
* VAT(2),
END OF WA_ITEM.
DATA : IT_ITEM like WA_ITEM OCCURS 0 WITH HEADER LINE.
* value of excel-cell
TYPES: ty_d_itabvalue TYPE alsmex_tabline-value,
* internal table containing the excel data
ty_t_itab TYPE alsmex_tabline OCCURS 0,
* line type of sender table
BEGIN OF ty_s_senderline,
line(4096) TYPE c,
END OF ty_s_senderline,
* sender table
ty_t_sender TYPE ty_s_senderline OCCURS 0.
CONSTANTS: gc_esc VALUE '"'.
DATA temp_row TYPE I.
DATA TEMP(4).
INCLUDE lalsmexf01.
DATA: it_data1 TYPE ty_t_itab.
DATA: it_data2 TYPE ty_t_itab.
DATA: it_data_wa LIKE LINE OF it_data1.
DATA: it_data_wa2 LIKE LINE OF it_data1.
* DATA DECLARATION
data: st_rw_s1 TYPE i VALUE '2'.
data: st_cl_s1 TYPE i VALUE '1'.
data: st_rw_s2 TYPE i VALUE '2'.
data: st_cl_s2 TYPE i VALUE '1'.
data: ed_rw_s1 TYPE i VALUE '3'.
data: ed_cl_s1 TYPE i VALUE '7'.
data: ed_rw_s2 TYPE i VALUE '5'.
data: ed_cl_s2 TYPE i VALUE '8'.
DATA: excel_tab TYPE ty_t_sender,
excel_tab1 TYPE ty_t_sender.
DATA: ld_separator TYPE c.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
range TYPE ole2_object,
worksheet TYPE ole2_object.
DATA: h_cell TYPE ole2_object,
h_cell1 TYPE ole2_object.
DATA: ld_rc TYPE i.
TYPE-POOLS ole2.
*AT SELECTION-SCREEN.
PARAMETERS: filename LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM value_help.
sTART-OF-SELECTION.
* CASE sy-ucomm .
* WHEN 'ONLI'.
PERFORM execute.
PERFORM bapi.
* ENDCASE.
* MESSAGE DEFINATION
DEFINE m_message.
case sy-subrc.
when 0.
when 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
when others. raise upload_ole.
endcase.
END-OF-DEFINITION.
*& Form VALUE_HELP
* text
* --> p1 text
* <-- p2 text
FORM VALUE_HELP .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',*.*,*.*.'
mode = 'O'
title = ' '
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
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. " VALUE_HELP
*& Form EXECUTE
* text
* --> p1 text
* <-- p2 text
FORM EXECUTE .
* PARAMETER CHECK
IF st_rw_s1 > ed_rw_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s1 > ed_cl_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_rw_s2 > ed_rw_s2.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s2 > ed_cl_s2.
RAISE inconsistent_parameters.
ENDIF.
CLASS cl_abap_char_utilities DEFINITION LOAD.
ld_separator = cl_abap_char_utilities=>horizontal_tab.
* OPENING EXCEL FILE
IF application-header = space OR application-handle = -1.
CREATE OBJECT application 'Excel.Application'.
m_message.
ENDIF.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
workbook
'Open'
EXPORTING
#1 = filename.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* MARKING OF WHOLE SPREADSHEET
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s1
#2 = st_cl_s1.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s1
#2 = ed_cl_s1.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy marked area (SHEET1) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab it_data1
USING ld_separator.
* Clear the clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
* Working in Second Excel Work Sheet
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 2.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* Mark Sheet2
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s2
#2 = st_cl_s2.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s2
#2 = ed_cl_s2.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy Marked Area (Sheet2) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read Clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab1
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab1 it_data2
USING ld_separator.
* Clear Clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab1
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4
* Leaving Application
CALL METHOD OF
application
'QUIT'.
m_message.
FREE OBJECT application.
m_message.
LOOP AT it_data1 INTO it_data_wa2.
IF temp_row ne it_data_wa2-ROW AND temp_row IS NOT INITIAL.
temp_row = it_data_wa2-ROW.
APPEND IT_HEADER.
ELSE.
temp_row = it_data_wa2-ROW.
ENDIF.
CASE it_data_wa2-COL.
WHEN '0001'.
IT_HEADER-ID = it_data_wa2-VALUE.
WHEN '0002'.
IT_HEADER-KUNNR = it_data_wa2-VALUE.
WHEN '0003'.
IT_HEADER-INV_DATE = it_data_wa2-value.
WHEN '0004'.
IT_HEADER-PST_DATE = it_data_wa2-VALUE.
WHEN '0005'.
IT_HEADER-REF = it_data_wa2-VALUE.
WHEN '0006'.
IT_HEADER-AMT_DOCCUR = it_data_wa2-VALUE.
WHEN '0007'.
IT_HEADER-TXT = it_data_wa2-VALUE.
ENDCASE.
ENDLOOP.
APPEND IT_HEADER.
CLEAR:temp_row.
LOOP AT it_data2 INTO it_data_wa ."WHERE ROW = it_data_wa2-ROW.
IF temp_row ne it_data_wa-ROW AND temp_row IS NOT INITIAL.
temp_row = it_data_wa-ROW.
APPEND IT_ITEM.
ELSEIF ( temp_row NE it_data_wa-ROW AND temp_row IS INITIAL ).
temp_row = it_data_wa-ROW.
* ELSE
ENDIF.
CASE it_data_wa-COL.
WHEN '0001'.
IT_ITEM-ID = it_data_wa-VALUE.
WHEN '0002'.
IT_ITEM-GL_ACCOUNT = it_data_wa-VALUE.
WHEN '0003'.
IT_ITEM-AMT_DOCCUR = it_data_wa-value.
WHEN '0004'.
IT_ITEM-ITEM_TEXT = it_data_wa-VALUE.
WHEN '0005'.
IT_ITEM-BUS_AREA = it_data_wa-VALUE.
WHEN '0006'.
IT_ITEM-KOSTL = it_data_wa-VALUE.
* WHEN '0007'.
* IT_ITEM-VAT = it_data_wa-VALUE.
ENDCASE.
ENDLOOP.
APPEND IT_ITEM.
ENDFORM. " EXECUTE
*ENDLOOP.
*& Form BAPI
* text
* --> p1 text
* <-- p2 text
FORM BAPI .
DATA: it_acc_gl LIKE bapiacgl09 OCCURS 0 WITH HEADER LINE,
it_acc_ap LIKE bapiacap09 OCCURS 0 WITH HEADER LINE,
it_acc_aR LIKE bapiacaR09 OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
it_curr_amt LIKE bapiaccr09 OCCURS 0 WITH HEADER LINE,
it_doc_header LIKE bapiache09 OCCURS 0 WITH HEADER LINE,
it_acc_tax LIKE bapiactx09 OCCURS 0 WITH HEADER LINE,
obj_type LIKE bapiache09-obj_type,
obj_key LIKE bapiache09-obj_key,
obj_sys LIKE bapiache09-obj_sys,
pstng_date LIKE it_doc_header-pstng_date,
doc_date LIKE it_doc_header-doc_date,
loop_cnt TYPE i VALUE 0,
gv_vendor(10) TYPE c,
gv_gl_acc(10) TYPE c.
DATA conv_s_amt TYPE BETRG.
DATA cur_line TYPE P.
data item_no type POSNR_ACC.
data item_no1 type POSNR_ACC.
CLEAR: obj_type, obj_sys, obj_key, pstng_date, doc_date, gv_vendor, gv_gl_acc.
* CLEAR: it_doc_header,it_acc_gl,it_curr_amt,IT_ACC_AR,IT_RETURN.
LOOP AT it_HEADER INTO WA_HEADER .
REFRESH it_doc_header.
it_doc_header-bus_act = 'RFBU'.
it_doc_header-username = sy-uname.
* it_doc_header = WA_HEADER-KUNNR." Customer Number
it_doc_header-header_txt = WA_HEADER-TXT." bdc_source-col_h. " Invoice Text
it_doc_header-comp_code = 'JPOL'."bdc_source-col_a. " Company Code
CONCATENATE WA_HEADER-INV_DATE+6(4) WA_HEADER-INV_DATE+3(2) WA_HEADER-INV_DATE(2)
into it_doc_header-doc_date.
CONCATENATE WA_HEADER-pst_date+6(4) WA_HEADER-pst_date+3(2) WA_HEADER-pst_date(2)
into it_doc_header-pstng_date.
it_doc_header-doc_type = 'DR'. " Return Order...?
it_doc_header-fisc_year = '2013'. " Return Order...?
it_doc_header-fis_period = '02'. " Return Order...?
it_doc_header-ref_doc_no = '123'."bdc_source-col_d. " Invoice Number
APPEND it_doc_header.
REFRESH it_acc_aR.
it_acc_aR-itemno_acc = '1'. " Invoice Number
it_acc_aR-customer = WA_HEADER-KUNNR. " Customer Number
it_acc_aR-comp_code = 'JPOL'. " Company Code
it_acc_aR-item_text = WA_HEADER-txt. " Line Item Text
APPEND it_acc_aR.
* it_acc_aR-itemno_acc = '4'. " Invoice Number
* it_acc_aR-customer = WA_HEADER-KUNNR. " Customer Number
* it_acc_aR-comp_code = 'JPOL'. " Company Code
* it_acc_aR-item_text = WA_HEADER-txt. " Line Item Text
* APPEND it_acc_aR.
REFRESH it_acc_gl.
REFRESH IT_CURR_AMT.
* ITEM_NO = 1.
"GL Information details collected
CLEAR : ITEM_NO,item_no1.
LOOP AT it_ITEM INTO WA_ITEM where id = wa_header-ID.
ITEM_NO = ITEM_NO + 1.
it_acc_gl-itemno_acc = ITEM_NO.
it_acc_gl-gl_account = WA_ITEM-GL_ACCOUNT."gv_gl_acc. " GL Account
it_acc_gl-item_text = WA_ITEM-ITEM_TEXT. "bdc_source-col_o. " Line Item Text
it_acc_gl-doc_type = 'DR'. " Return Order...?
it_acc_gl-comp_code = 'JPOL'."bdc_source-col_a. " Company Code
it_acc_gl-bus_area = WA_ITEM-BUS_AREA."bdc_source-col_a. " Company Code
it_acc_gl-CUSTOMER = WA_HEADER-KUNNR.
conv_s_amt = WA_ITEM-AMT_DOCCUR."bdc_source-col_f. " Invoice Amount
IF conv_s_amt < 0.
it_acc_gl-de_cre_ind = 'H'. " H-Credit
conv_s_amt = - conv_s_amt.
ELSE.
it_acc_gl-de_cre_ind = 'S'. " S-Debit
ENDIF.
APPEND it_acc_gl.
ITEM_NO1 = ITEM_NO1 + 1.
it_curr_amt-itemno_acc = ITEM_NO1 . " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = 'INR'. " Currancy
it_curr_amt-amt_doccur = conv_s_amt . " Line Item Amount
APPEND it_curr_amt.
ITEM_NO1 = ITEM_NO1 + 1.
it_curr_amt-itemno_acc = ITEM_NO1 . " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = 'INR'. " Currancy
it_curr_amt-amt_doccur = conv_s_amt * -1. " Line Item Amount
APPEND it_curr_amt.
ENDLOOP.
REFRESH it_return.
"Customer Invoice
* Do the post to GL Account and AP
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = it_doc_header
IMPORTING
obj_type = obj_type
obj_key = obj_key
obj_sys = obj_sys
TABLES
accountgl = it_acc_gl
currencyamount = it_curr_amt
accountreceivable = it_acc_aR
return = it_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
* Check for any errors
WRITE : obj_key.
LOOP at IT_RETURN WHERE TYPE = 'E'.
WRITE : / 'Error :', IT_RETURN-MESSAGE .
endloop.
ENDLOOP.
ENDFORM. " BAPI
Result:Hi
Thank you for your help i did small modification i mention code below
REPORT ZCUS_INVOICE.
data: BEGIN OF WA_HEADER,
ID TYPE I,
KUNNR TYPE n LENGTH 10,
INV_DATE TYPE c LENGTH 10,
PST_DATE TYPE c LENGTH 10,
REF TYPE invfo-xblnr,
PRD_TEXT TYPE BAPIACGL09-ITEM_TEXT,
CMP_CODE TYPE BAPIACGL09-COMP_CODE,
AMT_DOCCUR TYPE PA2010-BETRG,
TXT(40),
END OF WA_HEADER.
DATA : IT_HEADER like WA_HEADER OCCURS 0 WITH HEADER LINE.
data: BEGIN OF WA_ITEM,
ID TYPE I,
GL_ACCOUNT TYPE n LENGTH 10,
ITEM_TEXT TYPE BAPIACGL09-ITEM_TEXT,
BUS_AREA TYPE BAPIACGL09-BUS_AREA,
AMT_DOCCUR TYPE BAPIACCR09-AMT_DOCCUR,
KOSTL TYPE CSKT-KOSTL,
* VAT(2),
END OF WA_ITEM.
DATA : IT_ITEM like WA_ITEM OCCURS 0 WITH HEADER LINE.
* value of excel-cell
TYPES: ty_d_itabvalue TYPE alsmex_tabline-value,
* internal table containing the excel data
ty_t_itab TYPE alsmex_tabline OCCURS 0,
* line type of sender table
BEGIN OF ty_s_senderline,
line(4096) TYPE c,
END OF ty_s_senderline,
* sender table
ty_t_sender TYPE ty_s_senderline OCCURS 0.
CONSTANTS: gc_esc VALUE '"'.
DATA temp_row TYPE I.
DATA TEMP(4).
INCLUDE lalsmexf01.
DATA: it_data1 TYPE ty_t_itab.
DATA: it_data2 TYPE ty_t_itab.
DATA: it_data_wa LIKE LINE OF it_data1.
DATA: it_data_wa2 LIKE LINE OF it_data1.
* DATA DECLARATION
data: st_rw_s1 TYPE i value '2'.
data: st_cl_s1 TYPE i value '1'.
data: st_rw_s2 TYPE i value '2'.
data: st_cl_s2 TYPE i value '1'.
data: ed_rw_s1 TYPE i value '50'.
data: ed_cl_s1 TYPE i value '9'.
data: ed_rw_s2 TYPE i value '50'.
data: ed_cl_s2 TYPE i value '6'.
DATA: excel_tab TYPE ty_t_sender,
excel_tab1 TYPE ty_t_sender.
DATA: ld_separator TYPE c.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
range TYPE ole2_object,
worksheet TYPE ole2_object.
DATA: h_cell TYPE ole2_object,
h_cell1 TYPE ole2_object.
DATA: ld_rc TYPE i.
TYPE-POOLS ole2.
*AT SELECTION-SCREEN.
PARAMETERS: filename LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM value_help.
sTART-OF-SELECTION.
* CASE sy-ucomm .
* WHEN 'ONLI'.
PERFORM execute.
PERFORM bapi.
* ENDCASE.
* MESSAGE DEFINATION
DEFINE m_message.
case sy-subrc.
when 0.
when 1.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
when others. raise upload_ole.
endcase.
END-OF-DEFINITION.
*& Form VALUE_HELP
* text
* --> p1 text
* <-- p2 text
FORM VALUE_HELP .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',*.*,*.*.'
mode = 'O'
title = ' '
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
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. " VALUE_HELP
*& Form EXECUTE
* text
* --> p1 text
* <-- p2 text
FORM EXECUTE .
* PARAMETER CHECK
IF st_rw_s1 > ed_rw_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s1 > ed_cl_s1.
RAISE inconsistent_parameters.
ENDIF.
IF st_rw_s2 > ed_rw_s2.
RAISE inconsistent_parameters.
ENDIF.
IF st_cl_s2 > ed_cl_s2.
RAISE inconsistent_parameters.
ENDIF.
CLASS cl_abap_char_utilities DEFINITION LOAD.
ld_separator = cl_abap_char_utilities=>horizontal_tab.
* OPENING EXCEL FILE
IF application-header = space OR application-handle = -1.
CREATE OBJECT application 'Excel.Application'.
m_message.
ENDIF.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
application
'Workbooks' = workbook.
m_message.
CALL METHOD OF
workbook
'Open'
EXPORTING
#1 = filename.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 1.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* MARKING OF WHOLE SPREADSHEET
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s1
#2 = st_cl_s1.
m_message.
CALL METHOD OF
sheet
'Cells' = h_cell1
EXPORTING
#1 = ed_rw_s1
#2 = ed_cl_s1.
m_message.
CALL METHOD OF
sheet
'RANGE' = range
EXPORTING
#1 = h_cell
#2 = h_cell1.
m_message.
CALL METHOD OF
range
'SELECT'.
m_message.
* Copy marked area (SHEET1) into Clippboard
CALL METHOD OF
range
'COPY'.
m_message.
* Read clipboard into ABAP
CALL METHOD cl_gui_frontend_services=>clipboard_import
IMPORTING
data = excel_tab
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE a037(alsmex).
ENDIF.
PERFORM separated_to_intern_convert TABLES excel_tab it_data1
USING ld_separator.
* Clear the clipboard
REFRESH excel_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = excel_tab
CHANGING
rc = ld_rc
EXCEPTIONS
cntl_error = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
* Working in Second Excel Work Sheet
CALL METHOD OF
application
'Worksheets' = sheet
EXPORTING
#1 = 2.
m_message.
CALL METHOD OF
sheet
'Activate'.
m_message.
GET PROPERTY OF application 'ACTIVESHEET' = sheet.
m_message.
* Mark Sheet2
CALL METHOD OF
sheet
'Cells' = h_cell
EXPORTING
#1 = st_rw_s2
#2 -
Ideas for Dynamic Dashboard creation based on exchange rates
Hi,
There is a query to create dahboard for revenue details from various accounts (various sales companies with various currancies). The C-level executive would also like to view a consolidated graph (dashboard) for all comapnies with the options to select display currency as per his choice (USD/EUR/GBP etc) and the data would change according to the day's exchange rates (maintained in SAP C4C).
Now while a report can be made in which we give selection parameter based absolute parameter & exchange rate pick up date, the same is required at dashboard level to reduce the number of clicks & for ease of executive.
Can the experts guide me on creating such a dashboard...
Regards,
Rahulhi Rahul,
With the current capabilities in the dashboard, you cannot pass a selection criteria. This is something on our list as a planned future capability.
In the meanwhile, if you can arrive at the main two or three currencies that the C-level user is interested in using for monitoring analytics, then you can create multiple variants for each of the reports for each currency and create multiple dashboards enabling the respective variants for each dashboard. Its not the most optimal, but you could have one dashboard per currency and the user can just switch via the dropdown to view the dashboard in the next currency of interest.
Hope this helps.
Regards,
Sebastine -
Field Profit Ctr is a required field for G/L account
Hello Gurus,
I am getting the following error message "Field Profit Ctr is a required field for G/L account " at the time of settling Internal Order using KO88.I identified that this error message is due to invoice been
posted without reference to Purchase Order.Due to which Profit Ctr was not supplied.Please let me know
how to correct this and settle the I/O.
Thanks in advanceAny costing objects should be linked with profit center. You are settling the order against G/L account. Have the check of this FS00 t code either mentioned correctly thro FI team. The accounting currancy , sort key , Commitemnet item . Otherwise discuss with co ask them to link or create the Profit center (KE51 T code) . Here we are linking with controlling area
Then let me know
Thenna -
HI,
We have created BDC program, to upload Condtion Price. Since it has large volume data we can not check it one by one.
With T-code MEK1, we have uploaded data ( Through BDC program) for vendor, material, plant & condition type combination. Record is based on Material Info Record ( plant Specific).
Could any one tell me in which table all the data situated. Means I need to cross check all data are uploaded correctly or not?
Thanks In advance,
Regards,Hi,
I have tried as per above suggestion, But it is not showing uploaded value ( amount).
The selection criteria like,
Plant, material, vendor , currancy & valid from ( condition type).
Output should be all above along with amount that uploaded through BDC program.
Since we need to cross check it ( uploaded amount within one single screen).
Regards, -
hi sap masters,
i have some doubts belongs to new g/l concept.
1) is it different special g/l and new g/l
2) parrlel currancy is in the part of new g/l
3) is leading ledger max having 3 currancy?
4)if non leading ledgder how may max currencies we maintain.
5)when ever post document in leading ledger it will update non leading ledger, iis it correct
pl explain
with regartds
rajHi,
you can check in following link
http://www.sap.com/usa/solutions/business-suite/erp/financials/pdf/BWP_New_Gen_Ledger_Acct_Functions.pdf
Thanks
Kalyan
Maybe you are looking for
-
I need to reformat my old computer hard drive, I don't have any disks
how do I reformat my old MAC book 's hard drive, if I don't have the disks for the operative system?
-
Reading checkbox entries in classical report
Hi, I have a non-alv report. The report writes out the contents of an itab. The last field in the itab is checkbox field. The user can check the fields as expected. However how can I determine which ones were selected? I have tried using at lin
-
Trial question: Can't open .doc files from web page
I'm using Dreamweaver on a Mac, and I have a link on a page that should bring up a doc file. When I preview the page in Safari, it brings up a directory listing which highlights the file so that you can double-click and open the file. (Of course, I'd
-
What is the latest version of PC Suite that can be...
I have a Nokia 6131 and am using Nokia PC Suite Version 6.84. 10.3 English. My computer OS is MS Windows XP (English) with Service Pack 2 and I am using cable driver version 6.84. 4.0 I'd like to know if more recent versions of PC Suite will work wit
-
When I take albums into ipad they show a sperate songs for complation albums where artists are different - how can i display all songs in the album grouped by album