Dashboard on Flat File system
Hi Experts,
Requirement: To develop a dashboard on flat files, where every 15 days a new flat file will be saved in a particular directory.
Is there any possibility to develop a dashboard on multiple flat files (because every 15 days new file is adding in a directory)?
Can any one explain what is the best approach for such requirements.
Thanks Regards
Ramakrishna Kamurthy
Hi Ramakrishna,
unfortunately there is no way that you can dynamically change the settings and/or amount of data sources in Xcelsius. You will have to merge those flat files into one (e.g. from your source system).
@Waqas:
They have a video on youtube for the csv connector::
http://www.youtube.com/v/Vs_iNNGJgB4&hl=en&fs=1&
Centigon Solutions Quote:
CSV Connector for Xcelsius 2008 provides direct connectivity to any CSV file with point and click simplicity. Enabling you to bypass XML configuration or web services, CSV connector is the perfect solution for loading external data into your Xcelsius dashboards on your desktop. Whether loading CSV data from a web server or your local file system, CSV connector provides connectivity quickly, without any additional server-side installation.
Regards
Victor
Similar Messages
-
Infocube data extract to a flat file
Hi,
I have a requirement to extract data from a infocube into a flat file and send it to a 3rd party. The data in infocube is coming from erp and another 3rd party system. This combined data in inficube needs to be extracted and send to another 3rd party system in a flat file system. Is there any generic function module that can be used or I have to extract from underlying tables directly. Pl. let me know your experiences.
Thanks,
Jassi.Hi,
You can solve the problem using info spokes. Below are some of the links related to info spoke.
Hope the following links will be helpful to u
INFOSPOKES:
http://help.sap.com/saphelp_nw04/helpdata/en/66/76473c3502e640e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c5/03853c01c89d7ce10000000a11405a/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/59/90070982d5524b931ae16d613ac04a/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/c2463c6796e61ce10000000a114084/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/43f92595-0501-0010-5eb5-bb772d41ffa4
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e830a690-0201-0010-ac86-9689620a8bc9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f12a03d-0401-0010-d9a7-a55552cbe9da
http://help.sap.com/saphelp_nw04/helpdata/en/66/76473c3502e640e10000000a114084/frameset.htm
***Assign points if helpful***
Regards,
Amith -
HUGE amount of data in flat file every day to external system
Hello,
i have to develop several programs to export all tables data in a flat file for external system ( EG. WEB).
I have some worries like if is possible by SAP export all KNA1 data that contains a lot of data in a flat file using the extraction:
SELECT * FROM KNA1 ITO TABLE TB_KNA1.
I need some advices about these kind of huge extractions.
I also have to extract from some tables, only the data changes, new record, and deleted records; to do this I thought of developing a program that every day extract all data from MARA and save the extraction in a custom table like MARA; the next day when the programs runs compare all data of the new extraction with the old extraction in the ZMARA table to understand the datachanges, new records or deleted record.. It's a righ approach? Can have problems with performance? Do you now other methods?
Thanks a lot!
Byeyou should not have a problem with this simple approach, transferring each row to the output file rather than reading all data into an internal table first:
open dataset <file> ...
select * from kna1 into wa_kna1
transfer wa_kna1 to <file>
endselect
close dataset <file>
Thomas -
What is the diff b/w flat file and legacy system?
Hi everyone,
when v say v r working on scenario FILE to FILE? which format of file r v usually working on? and what is the diff b/w flat file and legacy system?
thanxHi,
<i>when v say v r working on scenario FILE to FILE? which format of file r v usually working on?</i>
>>>Many a times it will be a Flat file with CSV format,Tab delimited format, fixedlength fields.
<i>what is the diff b/w flat file and legacy system?</i>
>>>We can not differeniate like this..
Flat file may come from any systems, it may be live system or legacy system.
Legacy system- is something like old, or past one. If you talk about SAP , then older versions of SAP can be called as a legacy system.
So it may be a file system, or any system which is old version but it doesnot mean it is not in use,
Regards,
Moorthy -
How to skip first record while inserting data from a flat file to BW system
Hi Experts,
In my project we have to upload flat file into a BW system. I have written a program and it is working fine.
Now we have got another requirement. The flat file will have a header record (first row). While uploading the flat file we have to skip this record. How I can do so?
The code is as below:
FORM upload1.
DATA : wf_title TYPE string,
lt_filetab TYPE filetable,
l_separator TYPE char01,
l_action TYPE i,
l_count TYPE i,
ls_filetab TYPE file_table,
wf_delemt TYPE rollname,
wa_fieldcat TYPE lvc_s_fcat,
tb_fieldcat TYPE lvc_t_fcat,
rows_read TYPE i,
p_error TYPE char01,
l_file TYPE string.
DATA: wf_object(30) TYPE c,
wf_tablnm TYPE rsdchkview.
wf_object = 'myprogram'.
DATA i TYPE i.
DATA:
lr_mdmt TYPE REF TO cl_rsdmd_mdmt,
lr_mdmtr TYPE REF TO cl_rsdmd_mdmtr,
lt_idocstate TYPE rsarr_t_idocstate,
lv_subrc TYPE sysubrc.
TYPES : BEGIN OF test_struc,
/bic/myprogram TYPE /bic/oimyprogram,
txtmd TYPE rstxtmd,
END OF test_struc.
DATA : tb_assum TYPE TABLE OF /bic/pmyprogram.
DATA: wa_ztext TYPE /bic/tmyprogram,
myprogram_temp TYPE ziott_assum,
wa_myprogram TYPE /bic/pmyprogram.
DATA : test_upload TYPE STANDARD TABLE OF test_struc,
wa2 TYPE test_struc.
DATA : wa_test_upload TYPE test_struc,
ztable_data TYPE TABLE OF /bic/pmyprogram,
ztable_text TYPE TABLE OF /bic/tmyprogram,
wa_upld_text TYPE /bic/tmyprogram,
wa_upld_data TYPE /bic/pmyprogram,
t_assum TYPE ziott_assum.
DATA : wa1 LIKE test_upload.
wf_title = text-026.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = wf_title
default_extension = 'txt'
file_filter = 'Tab delimited Text Files (*.txt)'
CHANGING
file_table = lt_filetab
rc = l_count
user_action = l_action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
OTHERS = 3. "#EC NOTEXT
IF sy-subrc <> 0.
EXIT.
ENDIF.
LOOP AT lt_filetab INTO ls_filetab.
l_file = ls_filetab.
ENDLOOP.
CHECK l_action = 0.
IF l_file IS INITIAL.
EXIT.
ENDIF.
l_separator = 'X'.
wa_fieldcat-fieldname = 'test'.
wa_fieldcat-dd_roll = wf_delemt.
APPEND wa_fieldcat TO tb_fieldcat.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
CLEAR wa_test_upload.
Upload file from front-end (PC)
File format is tab-delimited ASCII
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
has_field_separator = l_separator
TABLES
data_tab = i_mara
data_tab = test_upload
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
EXIT.
ELSE.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
IF test_upload IS NOT INITIAL.
DESCRIBE TABLE test_upload LINES rows_read.
CLEAR : wa_test_upload,wa_upld_data.
LOOP AT test_upload INTO wa_test_upload.
CLEAR : p_error.
rows_read = sy-tabix.
IF wa_test_upload-/bic/myprogram IS INITIAL.
p_error = 'X'.
MESSAGE s153 WITH wa_test_upload-/bic/myprogram sy-tabix.
CONTINUE.
ELSE.
TRANSLATE wa_test_upload-/bic/myprogram TO UPPER CASE.
wa_upld_text-txtmd = wa_test_upload-txtmd.
wa_upld_text-txtsh = wa_test_upload-txtmd.
wa_upld_text-langu = sy-langu.
wa_upld_data-chrt_accts = 'xyz1'.
wa_upld_data-co_area = '12'.
wa_upld_data-/bic/zxyzbcsg = 'Iy'.
wa_upld_data-objvers = 'A'.
wa_upld_data-changed = 'I'.
wa_upld_data-/bic/zass_mdl = 'rrr'.
wa_upld_data-/bic/zass_typ = 'I'.
wa_upld_data-/bic/zdriver = 'yyy'.
wa_upld_text-langu = sy-langu.
MOVE-CORRESPONDING wa_test_upload TO wa_upld_data.
MOVE-CORRESPONDING wa_test_upload TO wa_upld_text.
APPEND wa_upld_data TO ztable_data.
APPEND wa_upld_text TO ztable_text.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM ztable_data.
DELETE ADJACENT DUPLICATES FROM ztable_text.
IF ztable_data IS NOT INITIAL.
CALL METHOD cl_rsdmd_mdmt=>factory
EXPORTING
i_chabasnm = 'myprogram'
IMPORTING
e_r_mdmt = lr_mdmt
EXCEPTIONS
invalid_iobjnm = 1
OTHERS = 2.
CALL FUNCTION 'MESSAGES_INITIALIZE'.
**Lock the Infoobject to update
CALL FUNCTION 'RSDG_IOBJ_ENQUEUE'
EXPORTING
i_objnm = wf_object
i_scope = '1'
i_msgty = rs_c_error
EXCEPTIONS
foreign_lock = 1
sys_failure = 2.
IF sy-subrc = 1.
MESSAGE i107(zddd_rr) WITH wf_object sy-msgv2.
EXIT.
ELSEIF sy-subrc = 2.
MESSAGE i108(zddd_rr) WITH wf_object.
EXIT.
ENDIF.
*****Update Master Table
IF ztable_data IS NOT INITIAL.
CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
EXPORTING
i_iobjnm = 'myprogram'
i_tabclass = 'M'
I_T_ATTR = lt_attr
TABLES
i_t_table = ztable_data
EXCEPTIONS
attribute_name_error = 1
iobj_not_found = 2
generate_program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'E'
txtnr = '054'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
MESSAGE e054(zddd_rr) WITH 'myprogram'.
ELSE.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'S'
txtnr = '053'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
ENDIF.
*endif.
*****update Text Table
IF ztable_text IS NOT INITIAL.
CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
EXPORTING
i_iobjnm = 'myprogram'
i_tabclass = 'T'
TABLES
i_t_table = ztable_text
EXCEPTIONS
attribute_name_error = 1
iobj_not_found = 2
generate_program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CALL FUNCTION 'MESSAGE_STORE'
EXPORTING
arbgb = 'zddd_rr'
msgty = 'E'
txtnr = '055'
msgv1 = text-033
EXCEPTIONS
OTHERS = 3.
ENDIF.
ENDIF.
ELSE.
MESSAGE s178(zddd_rr).
ENDIF.
ENDIF.
COMMIT WORK.
CALL FUNCTION 'RSD_CHKTAB_GET_FOR_CHA_BAS'
EXPORTING
i_chabasnm = 'myprogram'
IMPORTING
e_chktab = wf_tablnm
EXCEPTIONS
name_error = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
****Release locks on Infoobject
CALL FUNCTION 'RSDG_IOBJ_DEQUEUE'
EXPORTING
i_objnm = 'myprogram'
i_scope = '1'.
ENDIF.
ENDIF.
PERFORM data_selection .
PERFORM update_alv_grid_display.
CALL FUNCTION 'MESSAGES_SHOW'.
ENDFORM.
Please let me know how I can skip first record of the flat file?
Regards,
Sgo through this hope u can get some idea
REPORT ztest no standard page heading line-size 255.
Declaration *
TYPES t_itab1 TYPE alsmex_tabline.
types: begin of t_csks,
kostl like csks-kostl,
end of t_csks.
types: begin of t_cska,
kstar like cska-kstar,
end of t_cska.
data: begin of t_flatfile,
docdate like COHEADER-BLDAT,
postdate like COHEADER-BUDAT,
doctext like COHEADER-BLTXT,
costele like RK23F-KSTAR,
amount like RK23F-WTGBTR,
scostctr like RK23F-SKOSTL,
rcostctr like RK23F-EKOSTL,
rintorder like RK23F-EAUFNR,
end of t_flatfile.
data: begin of t_flatfile1,
docdate like COHEADER-BLDAT,
postdate like COHEADER-BUDAT,
doctext like COHEADER-BLTXT,
costele like RK23F-KSTAR,
amount like RK23F-WTGBTR,
scostctr like RK23F-SKOSTL,
rcostctr like RK23F-EKOSTL,
rintorder like RK23F-EAUFNR,
NUM LIKE SY-INDEX,
end of t_flatfile1.
data: itab like table of t_flatfile with header line.
data: itab2 like table of t_flatfile1 with header line.
DATA: it_itab1 TYPE STANDARD TABLE OF t_itab1 WITH HEADER LINE,
MESSTAB1 LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,
MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
data: begin of bdcdata occurs 0.
include structure bdcdata.
data: end of bdcdata.
data:t_lin type i VALUE '0',
u_rec type i VALUE '0',
s_rec type i VALUE '0'.
data: it_csks type standard table of t_csks,
wa_csks type t_csks.
data: it_cska type standard table of t_cska,
wa_cska type t_cska.
*Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
parameters: p_docdat LIKE COHEADER-BLDAT obligatory,
p_postda LIKE COHEADER-BUDAT obligatory,
p_doctxt LIKE COHEADER-BLTXT.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-011.
parameters: p_file LIKE RLGRAP-FILENAME obligatory,
DIS_MODE LIKE CTU_PARAMS-DISMODE DEFAULT 'N'.
SELECTION-SCREEN END OF BLOCK b2.
A T S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_local_file_name USING p_file.
*Start of Selection
START-OF-SELECTION.
Perform get_Excel_data.
perform validate_data.
Perform Process_Data.
end-of-selection
end-of-selection.
perform display_data.
*& Form get_local_file_name
text
-->P_P_FILE text
FORM get_local_file_name USING P_P_FILE.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file.
ENDFORM. " get_local_file_name
*& Form get_Excel_data
text
--> p1 text
<-- p2 text
FORM get_Excel_data .
FIELD-SYMBOLS : <FS>.
DATA : V_INDEX TYPE I.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = 2
i_begin_row = 1
i_end_col = 256
i_end_row = 9999 "65536
TABLES
intern = it_itab1
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
Message text-013 type 'E'.
ENDIF.
IF IT_ITAB1[] IS INITIAL.
Message text-001 type 'E'.
else. "IF IT_ITAB1[] IS INITIAL.
data: itab2 like itab occurs 0 with header line.
SORT IT_ITAB1 BY ROW COL.
LOOP AT IT_ITAB1.
MOVE :IT_ITAB1-COL TO V_INDEX.
ASSIGN COMPONENT V_INDEX OF STRUCTURE itab2 TO <FS>.
MOVE : IT_ITAB1-VALUE TO <FS>.
AT END OF ROW.
MOVE-CORRESPONDING itab2 TO itab.
APPEND itab.
CLEAR:itab,itab2.
ENDAT.
endloop.
describe table itab lines t_lin.
endif. "IF IT_ITAB1[] IS INITIAL.
ENDFORM. " get_Excel_data
*& Form Process_Data
text
--> p1 text
<-- p2 text
FORM Process_Data .
data:l_tabix type sy-tabix.
data:l_periv like t001-periv,
l_monat like bkpf-monat,
l_gjahr like bkpf-gjahr,
l_amt(21) type c.
data: l_ddate(10),
l_pdate(10).
WRITE p_docdat TO l_ddate.
WRITE p_postda TO l_pdate.
clear: l_periv,l_monat,l_gjahr.
select single periv from t001 into l_periv where bukrs = '5000'. "P_bukrs
if sy-subrc eq 0.
l_gjahr = p_postda+0(4).
call function 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = p_postda
i_bukrs = '5000' "p_bukrs
i_periv = l_periv
i_gjahr = l_gjahr
IMPORTING
e_monat = l_monat.
clear:l_periv.
endif.
loop at itab2.
refresh:bdcdata.
clear:bdcdata.
l_tabix = sy-tabix.
perform bdc_dynpro using 'SAPLK23F1' '1200'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'COHEADER-SEND_REC_REL'
'10SAP'.
perform bdc_field using 'RK23F-STATUS'
'S'.
perform bdc_field using 'COHEADER-BLDAT'
itab-docdate.
l_ddate.
perform bdc_field using 'COHEADER-BUDAT'
itab-postdate.
l_pdate.
perform bdc_field using 'COHEADER-PERIO'
l_monat. "'9'.
perform bdc_field using 'COHEADER-BLTXT'
itab-doctext.
p_doctxt.
perform bdc_field using 'RK23F-KSTAR'
itab2-costele.
WRITE itab2-amount TO l_amt.
l_amt = itab-amount.
condense l_amt no-gaps.
perform bdc_field using 'RK23F-WTGBTR'
l_amt.
itab-amount.
perform bdc_field using 'RK23F-WAERS'
'USD'.
*perform bdc_field using 'RK23F-SGTXT'
itab-doctext.
perform bdc_field using 'RK23F-SKOSTL'
itab2-scostctr.
perform bdc_field using 'BDC_CURSOR'
'RK23F-EAUFNR'.
perform bdc_field using 'RK23F-EKOSTL'
itab2-rcostctr.
perform bdc_field using 'RK23F-EAUFNR'
itab2-rintorder.
perform bdc_dynpro using 'SAPLK23F1' '1200'.
perform bdc_field using 'BDC_OKCODE'
'=POST'.
perform bdc_field using 'COHEADER-SEND_REC_REL'
'10SAP'.
perform bdc_field using 'RK23F-STATUS'
'S'.
perform bdc_field using 'COHEADER-BLDAT'
itab-docdate.
l_ddate.
perform bdc_field using 'COHEADER-BUDAT'
itab-postdate.
l_pdate.
perform bdc_field using 'COHEADER-PERIO'
'9'.
l_monat.
perform bdc_field using 'COHEADER-BLTXT'
itab-doctext.
p_doctxt.
perform bdc_field using 'BDC_CURSOR'
'RK23F-KSTAR'.
perform bdc_field using 'RK23F-WAERS'
'USD'.
CALL TRANSACTION 'KB15N' USING BDCDATA MODE DIS_MODE MESSAGES INTO MESSTAB.
If sy-subrc = 0.
s_rec = s_rec + 1.
ELSE.
u_rec = u_rec + 1.
move ITAB2-NUM to messtab1-msgv1.
concatenate itab2-costele ' | ' itab2-scostctr ' | ' itab2-rcostctr ' | ' itab2-rintorder into messtab1-msgv2.
condense messtab1-msgv2.
condense messtab1-msgv1.
append messtab1.
endif.
clear:itab2.
endloop.
ENDFORM. " Process_Data
BDC_DYNPRO *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
BDC_FIELD *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> ''. "NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form display_data
text
--> p1 text
<-- p2 text
FORM display_data .
skip 2.
write:/15 text-002.
skip 2.
write:/8 text-003.
SKIP.
write:/12 text-008,
25 P_DOCDAT.
SKIP.
write:/12 text-009,
25 P_POSTDA.
SKIP.
write:/12 text-012,
25 P_DOCTXT.
SKIP.
write:/12 text-004,
25 p_file.
skip 2.
write:/8 text-005,
60 t_lin.
skip.
write:/8 text-006,
60 s_rec.
skip.
write:/8 text-007,
60 u_rec.
skip.
write:/10 'row no',
20 'Information'.
skip.
loop at messtab1.
write:/10 messtab1-msgv1,
20 messtab1-msgv2.
clear:messtab1.
endloop.
ENDFORM. " display_data
*& Form validate_data
text
--> p1 text
<-- p2 text
FORM validate_data .
data: l_tabix1 type sy-tabix.
data: l_tabix2 type sy-tabix.
if not itab[] is initial.
select kostl from CSKS into table it_csks.
if sy-subrc eq 0.
sort it_csks by kostl.
endif.
select kstar from CSKA into table it_cska.
if sy-subrc eq 0.
sort it_cska by kstar.
endif.
loop at itab.
l_tabix1 = sy-tabix.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = itab-scostctr
IMPORTING
OUTPUT = itab-scostctr .
read table it_csks into wa_csks with key kostl = itab-scostctr.
if sy-subrc ne 0.
u_rec = u_rec + 1.
L_TABIX2 = l_tabix1 + 1.
move l_tabix2 to messtab1-msgv1.
move l_tabix1 to messtab1-msgv1.
move itab-rintorder to messtab1-msgv2.
concatenate itab-costele ' | ' itab-scostctr ' | ' itab-rcostctr ' | ' itab-rintorder into messtab1-msgv2.
condense messtab1-msgv2.
condense messtab1-msgv1.
append messtab1.
clear:wa_csks.
CLEAR:L_TABIX2.
continue.
endif.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = itab-rcostctr
IMPORTING
OUTPUT = itab-rcostctr .
read table it_csks into wa_csks with key kostl = itab-rcostctr.
if sy-subrc ne 0.
u_rec = u_rec + 1.
L_TABIX2 = l_tabix1 + 1.
move l_tabix2 to messtab1-msgv1.
move l_tabix1 to messtab1-msgv1.
concatenate itab-costele ' | ' itab-scostctr ' | ' itab-rcostctr ' | ' itab-rintorder into messtab1-msgv2.
condense messtab1-msgv2.
condense messtab1-msgv1.
append messtab1.
clear:wa_csks.
CLEAR:L_TABIX2.
continue.
endif.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = itab-costele
IMPORTING
OUTPUT = itab-costele .
read table it_cska into wa_cska with key kstar = itab-costele.
if sy-subrc ne 0.
u_rec = u_rec + 1.
L_TABIX2 = l_tabix1 + 1.
move l_tabix2 to messtab1-msgv1.
move l_tabix1 to messtab1-msgv1.
concatenate itab-costele ' | ' itab-scostctr ' | ' itab-rcostctr ' | ' itab-rintorder into messtab1-msgv2.
condense messtab1-msgv2.
condense messtab1-msgv1.
append messtab1.
clear:wa_csks.
CLEAR:L_TABIX2.
continue.
endif.
move-corresponding itab to itab2.
MOVE l_tabix1 TO ITAB2-NUM.
append itab2.
clear: itab2.
clear:itab.
endloop.
else.
message 'No records in File' type 'S'.
endif.
ENDFORM. " validate_data -
Extract work order data from r/3 system in flat file(csv)and export to BI
Hi,
I am new in interface.
I need to extract data regarding actual cost and quantities of work assigned to Service Providers from SAP system and send it to BI for reporting purposes.
This interface will extract Master data as well as transactional data. Extraction of Master data will be a full extract and that of transactional data will be Delta Extraction.
Custom development will extract the data from different fields and will export it to flat files (CSV format). This program will amalgamate all the flat files created into one big file and export it to BI system.
Export of data to BI system will be done by schedule program Control M, which will export the data from SAP system to BI system in batches. Control M is expected to run daily at night.
Please provide the step-by-step proces to do this.
Thanks
Suchi
Moderator message: anything else? please work yourself first on your requirement.
Edited by: Thomas Zloch on Mar 25, 2011 1:21 PMHi Ravi,
you've got to set up the message type MDMRECEIPT for the Idoc distribution from R/3 to XI. Check chapter 5.2 in the IT configuration guide available on <a href="http://service.sap.com/installmdm">MDM Documentation Center</a>. It describes the necessary steps.
BR Michael -
Upload of Campaign and Leads from flat file into SAP CRM system
Hi Gurus,
We need to upload Campaign and Leads from our legacy systems to SAP CRM systems. The source data will be available in the form of flat files (tab delimited)
Please let me know the possible ways of doing this.
Reward points are assured.
Thanks in advance.Hi
you can use external list management functionality in CRM 5.0 useing the flat file tab delimited you can upload the contacts and create business partners followed by lead transaction types with business partners created and also external list management will allow you to create target groups for executing the campaigns in SAP CRM
please do reward points if helpful
regards
Dinaker vikas -
Flat File Extract - SAP BW System Directory
Hi,
I want to export a flat file using data manager so that it is saved in the SAP BW System Directory i.e. the /SAP/ directories.
How can I do this? When i use data manager it only gives me options to save in the SAP BPC directory structure.
Cheers,Hi Leo,
Look on the chain CPMB/EXPORT_TD_TO_APPL
Vadim -
Flat file upload (from local system) to internal table
I am trying to use BAPI to create sales order. for that I have to upload flat file containing header and item data from the local system (not from application server). please suggest me if any functional module is available for this.
Thanks,
RajanHi rajan,
Try this,
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_filename " File name
filetype = 'ASC'
has_field_separator = cl_abap_char_utilities=>horizontal_tab
HEADER_LENGTH = 0
READ_BY_LINE = G_MARKED
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADERf
TABLES
data_tab = gt_table "internal table with fields from the flat file.
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
Regards,
Shobana.K -
Upload PO data into SRM system from flat file
Hi all,
I need to create conversion program to upload Open Purchase order data from flat file to System.
I am trying to create po using bapi BAPI_POEC_CREATE. but getting error .
should any one give the details of parameter need to pass the bapi .
Thanks in advance
SharadSharad,
Not the very best piece of code, but should be helpful.
REPORT zkb_po_create.
DATA: ls_po_header TYPE bapi_po_header_c.
DATA: ls_e_po_header TYPE bapi_po_header_d.
DATA: ls_po_items TYPE bapi_po_item_c.
DATA: ls_po_accass TYPE bapi_acc_c.
DATA: ls_po_partner TYPE bapi_bup_c.
DATA: ls_po_orgdata TYPE bapi_org_c.
DATA: ls_return TYPE bapiret2.
DATA: lt_po_items TYPE TABLE OF bapi_po_item_c.
DATA: lt_po_accass TYPE TABLE OF bapi_acc_c.
DATA: lt_po_partner TYPE TABLE OF bapi_bup_c.
DATA: lt_po_orgdata TYPE TABLE OF bapi_org_c.
DATA: lt_return TYPE TABLE OF bapiret2.
* Header Details
ls_po_header-businessprocess = 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ls_po_header-businessprocess
IMPORTING
output = ls_po_header-businessprocess.
ls_po_header-process_type = 'EC'.
ls_po_header-doc_date = sy-datum.
ls_po_header-description = 'Test for BAPI_POEC_CREATE'.
ls_po_header-logsys_fi = 'Backend'.
ls_po_header-co_code = '1000'.
ls_po_header-currency = 'GBP'.
* Item Details
ls_po_items-item_guid = 2.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ls_po_items-item_guid
IMPORTING
output = ls_po_items-item_guid.
ls_po_items-parent = ls_po_header-businessprocess.
ls_po_items-product_guid = '4678E74FFFC380AD000000000A8E035B'.
ls_po_items-product_id = '400030'.
ls_po_items-product_type = '01'.
ls_po_items-category_guid = '4627B461073F40FC000000000A8E035B'.
ls_po_items-category_id = '1.04.0500'.
ls_po_items-quantity = 10.
ls_po_items-deliv_date = sy-datum + 10.
ls_po_items-price = '25'.
APPEND ls_po_items TO lt_po_items.
* Account Assignment
ls_po_accass-guid = 3.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ls_po_accass-guid
IMPORTING
output = ls_po_accass-guid.
ls_po_accass-parent_guid = ls_po_items-item_guid.
ls_po_accass-distr_perc = 100.
ls_po_accass-g_l_acct = '<gl acc>'.
ls_po_accass-cost_ctr = '<cost centre>'.
ls_po_accass-co_area = '<Ctrl area>'.
APPEND ls_po_accass TO lt_po_accass.
* Partner Functions
ls_po_partner-partner_fct = '00000019'.
ls_po_partner-partner = 'Vendor'.
ls_po_partner-parent_guid = ls_po_items-item_guid.
APPEND ls_po_partner TO lt_po_partner.
ls_po_partner-partner_fct = '00000016'.
ls_po_partner-partner = 'Requester'.
ls_po_partner-parent_guid = ls_po_items-item_guid.
APPEND ls_po_partner TO lt_po_partner.
ls_po_partner-partner_fct = '00000020'.
ls_po_partner-partner = 'Receipient'.
ls_po_partner-parent_guid = ls_po_items-item_guid.
APPEND ls_po_partner TO lt_po_partner.
ls_po_partner-partner_fct = '00000075'.
ls_po_partner-partner = 'Location'.
ls_po_partner-parent_guid = ls_po_items-item_guid.
APPEND ls_po_partner TO lt_po_partner.
ls_po_orgdata-proc_org_ot = 'O'.
ls_po_orgdata-proc_org_id = 'Pur Org'.
ls_po_orgdata-proc_group_ot = 'O'.
ls_po_orgdata-proc_group_id = 'Pur Group'.
ls_po_orgdata-parent_guid = ls_po_items-item_guid.
APPEND ls_po_orgdata TO lt_po_orgdata.
CALL FUNCTION 'BAPI_POEC_CREATE'
EXPORTING
i_po_header = ls_po_header
IMPORTING
e_po_header = ls_e_po_header
TABLES
i_po_items = lt_po_items
i_po_accass = lt_po_accass
i_po_partner = lt_po_partner
i_po_orgdata = lt_po_orgdata
return = lt_return.
READ TABLE lt_return INTO ls_return WITH KEY type = 'E'.
IF sy-subrc NE 0.
COMMIT WORK AND WAIT.
WRITE:/ ls_e_po_header-doc_number, ': created successfully'.
ELSE.
WRITE:/ 'The below errors occurs during PO creation.'.
LOOP AT lt_return INTO ls_return.
WRITE:/ ls_return-message.
ENDLOOP.
ENDIF.
Regards, Kathirvel -
How to create source system for flat file loads
How do I create a source system to load flat file?
I have a screen that asks for the following:
Logical system name
Source system name
Type and release
What should I enter for these?
I am not Basis and Basis was supposed to set this up.hi sam.
STEPS TO CREATE FLAT FILE SOURCE SYSTEM
step:1 select source systems under modeling in AWB.
step:2 select Source Systems root node.
|---> context menu
|--->create......
step:3 select your required source system Icon.
(in your case it is PC Icon).
there it askes for a logical.......and source system name...
here u can specify any name of ur wish
for example:-
logical sys name --- PC_FF
source system name --- flat file source system*
*press Continue * button.
Observe the activation icon to confirm the successfull creation(_glowing lamp icon_ symbol) -
How to upload CSV file(Flat File) in SAP system.
Hi All,
Please guide me how to upload flat file into SAP system.
Regards
AvinavUse following syntax -
DATA L_P_FILE TYPE STRING.
L_P_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_P_FILE <-------Your PC file name
FILETYPE = u2018ASCu2019
HAS_FIELD_SEPARATOR = u2018Xu2019
TABLES
DATA_TAB = P_I_DATA[] <-----Your internal table
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
Endif -
No PSA for Infosource X and source system Y. Here Y is the flat file source
Hi,
We are facing an issue while transporting from dev s/m to quality. There is no PSA for Infosource X and source system Y. Here Y is the flat file source system this issue we are getting while transporting transfer rules.We are checked in OSS notes 518426. Its not helpful.
Thanks
ManjulaHi
Try RS_TRANSTRU_ACTIVATE_ALL (SE38).
You may also check SAP Note 861890 - ODS tables disappear during the upgrade -
and activate all ODS Objects before the upgrade and run the program RSDG_ODSO_ACTIVATE.
also that with Stack 14 an extended version of this program is available together with the
Program RSUPGRCHECK. If errors occurs, consult also SAP Note 518426 and run transaction
RSSGPCLA for the regeneration of the RSDRO_* Objects.
Recheck whether you have Exported with correct parameters or not -- Try to Re Export the Same with all necessary objects .
Try Note 524554 and 325525 also
Hope it helps and clear -
Need to create a flat file source system in bi?
Hi all,
i need to load the data from a flat file to an ods? can anyone pls tell me the steps to create the flat file source system in bi?
ThanksHello,
http://help.sap.com/saphelp_nw70/helpdata/en/43/01ed2fe3811a77e10000000a422035/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/80/1a6581e07211d2acb80000e829fbfe/frameset.htm
steps:
create source system file (if you haven't)
- create ods
- create update rules for ods and activate
- create infosource
- assign infosource with datasource (source system file)
- maintain transfer rules - maintain infoobject in sequence as flat file to transfer structure. map infoobject in transfer rules. activate transfer rules
- create update rules ods-infosource and activate
- create infopackage, specify external data path (recommended file put in application server)
hope this helps.
Regards, -
Heterogeneous systems flat file correlation
Hey guys,
I have a question regarding the following scenario:
Portal(WebDynpro) XML file->XI>ftp server->legacy system(outside the organization LAN)>ftp server(response file with errors )->correlation XI->portal database\portal iView.
I need to create a synchronous scenario with error handling and rollback of the process.
The flat file is created per entity (user data entered on the portal,Employee data,etc..)
I'm talking about 5000 files created per hour from the portal (there are also file processes needed to be correlated sending from the legacy system).
My question is : is it reasonable to use correlation in ordered to create this synchronous scenario?there are gonna be many bpm process open and waiting to be continued...
What do you recon????
NimrodNimrod
I dont see an issue unless you have duplicate correlations..We have tested it with similar loads , it works perfectly fine!!
Maybe you are looking for
-
In Elements 7.0, how can I delete multiple photos at the same time?
In Adobe Photoshop Elements 7.0, how can I delete multiple photos at the same time? Please be a little specific so I can follow your instructions as I'm not real smart at computers; I'm an intermediate user. Thank you.
-
Can I Create a New Structured App that's a Copy of a Current One?
Here's the situation: I am new to using Dita in Framemaker, but have become competent with the authoring process. I do not understand the development end of things very well, however. What I want to do is to have a second dita structured application
-
What can i do for an error 1935 while trying to install Lightroom 4?
I am trying to reinstall Lightroom on my laptop and I got the Error 1935 while it was going. Please help! I am using a disc I got from Adobe to install this and it's going on a laptop with Windows 8.1
-
Hello, everyone. I hope anyone can help me. I got an iMac for Christmas, so I'm still very new to this. I am from Lithuania and I have turned on lithuanian language. But when I turn it on, I can't type symbols like ! @ £ $ % ^ & * ( ). If I need to t
-
I have created an application to generate script UI. In order to create dialog, one would add controls to treeview in app change properties in propertygrid and click Preview to view dialog with either Indesign, Illustrator or Photoshop. I am interest