HI FRIENDS, significance of record set name in flat file process
1)significance of record set name in flat file process
hi ganga,
recordset specifies the logical structures in a flat file. A recordset can contain multiple types of substructures identified by logical names.
We can use the recordset in Node functions
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
regards,
nikhil bos
Similar Messages
-
Does IXOS record the name of the file uploaded in a R3 table?
Does IXOS record the name of the file uploaded in a R3 table?
Hi Christiana,
When you perform a file upload to IXOS, the filename is not being record. The archivelink table (toa*) will keep track the document type of the file only.
Hope this help.
thanks,
Jess -
Extract records to Desktop in flat file
How to Extract records to Desktop in flat file.
I am not able to do it from Syndicator,i tried many options.Some one can help.
I want to extract the records from MDM to Desktop in Excel/Flat file format,whether it is from Data Manage or Syndicator.
Immediate req.Hi Shifali,
I want to extract the records from MDM to Desktop in Excel/Flat file format,whether it is from Data Manage or Syndicator
- MDM syndicator is the tool to export data in MDM .
- Data in MDM repository can be viewed and managed in MDM Data manager.
- What ever data is present in data manager will be exported outside using MDM syndicator.using your search criteria.
How to Extract records to Desktop in flat file.
I am not able to do it from Syndicator,i tried many options.Some one can help.
- Master data in MDM rep can be syndicated using MDM syndicator using 2 main formats Flat and XML.
- For local syndication to your desktop in flat format you need to follow the bewlo steps:
1) Create destination items manually in Syndicator under destination item tab.
2) Map this destination item to the source fields whcih are your mdm rep fields.
3) Use a serach critera if you wnat to filter records.
4) Click the export button in the syndicator
5) It will ask for the output file name and format
6) Give a name and select teh format form dropdown in the window (it can be text,excel.access any thing)
7) You output file is syndiacted to your local desktop.
Follow the below link for Flat syndication:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60ebecdf-4ebe-2a10-cf9f-830906c73866 (Flat Syndication)
Follow the below link for XML syndication:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e04fbbb3-6fad-2a10-3699-fbb40e51ad79 (XML Syndication)
This will give you the clear distinction between the two.
Hope It Helped
Thanks & Regards
Simona Pinto -
File record number in a Flat file
Hi Guys,
I am working on Idoc to file scenario and generating a file at the target.
at the file...for each line i have to add a line count.
i have 2 header and 5 detail records set..and details are repeating multiple times.
For Ex:
H1........001
H2....002
D1------003
D2----
004
D3----
005
D4-------006
D5----
007
Footer-----008
Could someone help me in resolving this issue?
Thanks
sahilHi Sahil,
You can write UDF as follow
AbstractTrace trace= (AbstractTrace)container.getTrace();
GlobalContainer globalContainer = container.getGlobalContainer();
String str = (String) globalContainer.getParameter ("COUNTER");
if(str!=null){
int tempRowCounter =(new Integer (str)).intValue();
globalContainer.setParameter("COUNTER",tempRowCounter++);
return tempRowCounter+"";
}else{
globalContainer.setParameter("COUNTER", "1");
return "1";
Regards
Ritu -
Changing the file name n Flat file Extraction
Hi,
Currently i am using flat file extraction for my forecast data and i am sending the file through application server.
I have created directory successfully and now everyday morning i receive a file thru FTP server with name 20060903.csv and this name is based on one field in my flat file data. ex. /interface/asf/20060903.csv
During mid off month we have cut off date, and this cut off date varies for each month. During this time file name changes in the FTP and a file with different name i.e 20061002.csv will be existing in the application server.
Now in the infopackage i also need to set the deletion settings like if the file name is same delete the previous requests. I could achieve this if i could get the file name changed.
Lets say if i am not chnaging the file name how do i set deletion condition, like it should not delete if the field(scenario) changes. ie from 20061002 to 20061101. I should have only one file for 20061002 and one file for 20061101 etc... If the scenario is same it should delete.
Any one kindly advise. Very urgent and critical.
Tks & regards,
Bhuvana.Hi Bhunva,
Try the following abap code in routine under External data tab in infopackage.
data: begin of i_req occurs 0,
rnr like RSICCONT-rnr,
end of i_req.
select * from RSICCONT UP TO 1 ROWS
where ICUBE = <datatargetname>
order by TIMESTAMP descending.
i_req-rnr = rsiccont-rnr .
append i_req.
clear i_req.
endselect.
loop at i_req.
select single * from RSSELDONE where RNR eq i_req-rnr and
filename = p_filename.
if sy-subrc = 0.
CALL FUNCTION 'RSSM_DELETE_REQUEST'
EXPORTING
REQUEST = i_req-rnr
INFOCUBE = <datatargetname>
EXCEPTIONS
REQUEST_NOT_IN_CUBE = 1
INFOCUBE_NOT_FOUND = 2
REQUEST_ALREADY_AGGREGATED = 3
REQUEST_ALREADY_COMDENSED = 4
NO_ENQUEUE_POSSIBLE = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE ID sy-MSGID TYPE 'I' NUMBER sy-MSGNO
WITH sy-MSGV1 sy-MSGV2 sy-MSGV3 sy-MSGV4.
else.
message i799(rsm1) with i_req-rnr 'deleted'.
ENDIF.
endif.
let me know if you get any problem in this logic.
regards,
Raju -
How to find out duplicate record contained in a flat file
Hi Experts,
For my project I have written a program for flat file upload.
Requirement 1
In the flat file there may be some duplicate record like:
Field1 Field2
11 test1
11 test2
12 test3
13 test4
Field1 is primary key.
Can you please let me know how I can find out the duplicate record.
Requirement 2
The flat file contains the header row as shown above
Field1 Field2
How our program can skip this record and start reading / inserting records from row no 2 ie
11 test1
onwards.
Thanks
S
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.Can you please let me know how I can find out the duplicate record.
you need to split the records from flat file structure into your internal table ans use a delete ADJACENT duplicates comparing fields
split flat_str into wa_f1 wa_f2 wa_f2 at tab_space. -
Dynamic Column Names in Flat File Destination
Hello,
Inside a Data Flow Task, I have an ADO.Net data source which executes a stored procedure that provides results in 5 columns.
The requirement is to have it connect to a flat file destination, such that the column names is dependent on what data was pulled by the data source. There is a variable indicator which identifies the data that was pulled. For example:
If the indicator is 0, then the columns names will be A,B,C,D,E. Otherwise, if the indicator is 1, then column names will be V,W,X,Y,Z.
Any suggestions will be of great help.
AJIf you only have two variations then use a branched execution (based on precedence constraints) and direct it to one DFT or another based on the result returned by the stored procedure.
Otherwise use .net
code to create one package or another dynamically.
PS: I suggest not to bother using SSIS for such a simplistic scenario.
Arthur My Blog -
Issue with characterset setting in OWB flat file target
an OWB mapping reads from the database source and writes to flat file target in unix os but junk characters are displayed for non english characters in the target file . The database table contains french,spanish,german,arabic characters.The nls db parameter setting is AL32UTF8. The same setting has been applied to OWB target also but still junk values are appearing for non english characterset.different charactersets like al32utf8,utf8,utf18,us7ascii have been tried at owb target setting but nothing is wroking out to remove junk characters. Please suggest
Edited by: 943807 on 30 Jun, 2012 10:43 PMPlease provide some input on the issue
-
Changing the setting name in the file name
How do I change en masse the file name in a compressor batch?. Say, instead of having the default codec name, IE "Apple Pro Res," I could choose something unique for myself.
Or how do I just get rid of it the setting tag without using a custom destination?
Studio X wrote:
"You can permanently solve the issue by making a simple change in the Preset.
Click on your preset to load it into the Inspector in Compressor
Click on the "actions" icon underneath the Names & Descriptions fields.
Go down to Default Destinations and set it to " Source w:o additional names"
Save the preset.
Now every time you apply the preset you'll get the file placed back into the source folder without the additional info in the file name.
One caveat - make sure that your new file name does not exactly match (including the suffix) the original file. If it does, you'll overwrite the original.
x"
However I did not find this "w:o additional names" option.
I am running Compressor V 3.5.3 - is that the reason?
Cheers,
EdwinCould be a version thing.
In 3.5.3 it works like this:
You first need to create a new Destination:
In compressor select the Destination Tab (1), then press the PLUS sign (2).
Select Local (if it's going to be on your computer) or Remote (if it's on a network)
Compressor will ask you which folder. In this example I created a new folder, called 'testingfolder' (3).
In the Inspector then you can choose the naming options. Which is now right by default (4). So you don't have to alter that.
Now do all steps as Studio X described, but a slightly different:
"You can permanently solve the issue by making a simple change in the Preset.
Click on your preset to load it into the Inspector in Compressor
Click on the "actions" icon underneath the Names & Descriptions fields.
Go down to Default Destinations and set it to " Source w:o additional names"
...set it to 'testingfolder'
Save the preset.
Now every time you apply the preset you'll get the file placed back into the source folder without the additional info in the file name.
One caveat - make sure that your new file name does not exactly match (including the suffix) the original file. If it does, you'll overwrite the original.
[The latter is only true if the destination folder is the same as the source folder, which I'd strongly advise not to do.]
Rienk -
CR & LF characters at the end of records when using delimited flat file (CR is missing)
Hi All,
I have a requirement where data of SQL query needs to be loaded to a CSV file.
The row delimiter of the CSV file has to be CR-LF.
In the flat file connection manager, I have mentioned Header Row delimiter as "{CR}{LF}" and under columns section, row delimiter is specified as "{CR}{LF}".
But when I open the detsnation CSV file using notepad++, I see only "LF" at the end of all rows.
Can you please let me know how can I get both CR & LF at the end of each row
Below is the screen shot of the flat file connection manager which I have used for CSV destination file:
RakshaHi Raksha,
Just as Vaibhav said, I’m curious why you need use “CR & LF” as row delimiter in Flat File Connection Manage. Since you can use "CR" as row delimiter in Flat File Connection Manager and it worked fine, you can directly specify "CR"
as row delimiter in Flat File Connection Manage.
Besides, if you still want to replace “LF” with “CR & LF” in the text file, we can use Notepad++’s Find/Replace feature or Edit -> EOL Conversion to achieve the goal. Then we can specify "CR & LF" as row delimiter in Flat File
Connection Manage.
The following blog about conversion between “LF” and “CR & LF” row delimiter in Notepad++ is for your reference:
http://sqlblog.com/blogs/jamie_thomson/archive/2012/08/07/replacing-crlf-with-lf-using-notepad.aspx
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Trying to change the name of 1 file
I have searched the topic and have not found a solution that works for me,
I am trying to write an AppleScript that will change the name of a single file from path:old.txt to path:new.txt
I have tried
tell application "Finder"
set name of file "work.txt" to PartA & PartG & ticker & ".txt"
end tell
among others and always either receive an error message, access denied or unable to set old file name to new file nameYou're missing the point.
set name of file "work.txt" to PartA & PartG & ticker & ".txt"
When you set the name of the file, the Finder needs two things - the original file that you're trying to rename, and the new name you want it to take.
In your revised script you're specifying the existing name (not path) of the file you want to change, and specifying its path along with the new name. That's the wrong way around.
Think of this command in the following manner:
set name of (original file specification) to (new file name)
Now, in the case of the 'original file specification' you need to provide enough information for the Finder to identify the file. You're just saying 'work.txt', but that is not enough (and that's why it's complaining). There could be a hundred 'work.txt' files spread around in different directories on your disk. How is the Finder supposed to know which one you want to change?
A better format would be:
tell application "Finder"
set name of (file "work.txt" of path to desktop) to "ABC.txt"
end tell
In this way the Finder can absolutely identify which file you want to change (the file 'work.txt' that's on your desktop) and the new name you want it to take.
Now, if the file is not on your desktop you can amend the script to include the relevant path, e.g.:
tell application "Finder"
set name of (file "work.txt" of folder "blah" of disk "disk name") to "ABC.txt"
end tell
This tells the Finder to look in the folder 'blah' on the specified disk.
You can also do this by including the path to the file in the form:
tell application "Finder"
set name of (file "disk name:blah:work.txt) to "ABC.txt"
end tell
where you use : to delimit each folder in the path.
Hope that helps. -
Errors in flat file records? how can i handle them?
Hi All,
I am new for BDC. I am uploading customer(XD01) records using BDC caltransaction method.my problem is when i am running the program, some times my program is not updating the records because of my flat file errors. after i correcting the error records and if i run the same program already updated records not processing. my program not running. what i need to do? how can i handle the flat file for reprocessing the error records?
i have around 50,000 records in my flat file.your program accepts a flat file say the structure of it is structure_load and you create another structure similar to structure_load and name it structure_error.
loop at itab_load.
call transactions...
if success..
commit work and wait X sec.
else.
move-corresponding field to structure_error
append structure_error.
endif.
endloop.
write the file stru_error to PC or app server and make the changes to the data and use the str_error as input to your code again.. -
Program name for E-mail processing routines for o/p type NEU
Hi Friends ,
What is the program name for E-mail processing routines for o/p type NEU for purchase order . This i want use this for send PO for vendor .
RBHi
Program SAPFM06P
Form Routine ENTRY_NEU
Form MEDRUCK
Transmission Medium - External Send -
Flat file name from Sender Side Dynamically into subject of Receiver Mail
Hi All,
I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
Thanks in AdvanceHi....
You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
DynamicConfiguration conf = (DynamicConfiguration) param.get(
StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// read value
String Filename = conf.get(KEY_FILENAME);
Regards,
Leela -
Hi Experts,
I am working with BDC
I want to get the flat file name also .
how to get that
Regards,Hi above all
Thanks for your reply,
I want only flat file name .
for ex:If i am working with this file
C:\Documents and Settings\pri\Desktop\INPUT.xls
i have to populate only The name of Flat file(INPUT) In Ztable
like that how many flat files i work with my program
all the names should be populated in ztable
I am successfully populating the data of flat file into ztable
I need only the FLAT FILE NAME
Regards,
Edited by: abap learner on Jul 8, 2008 11:35 AM
Maybe you are looking for
-
Even I cant believe this is happening again! i'm once again asking for help with my account. Since im very sick I ask that u look into my account and read the hell verizon has put me through and assist ending the hell once and for all even if that m
-
Sound does not work in Photoshop Album PDF
I have a 5 yr old pdf made with Photoshop Album 2. The sound does not work and also an attached video does not play (only shows as a still image). This pdf used to work perfectly when I got it but since of course I have change computer, os and acroba
-
Attaching pdf to demo_mail
I know this has been asked before but I'm having issues getting a pdf attached to an email using the demo_mail package. Perhaps someone could point me in the right direction or suggest an better alternative. I have been using the demo_mail package to
-
Populating dropdown list from an XML file
Hi! I want to prepopulate a dropdown list in a form from an XML file. Typically something like: A B C Is this the correct way to specify the list's values in XML? How do I specify the binding property of my dropdown list, to put the values A, B
-
Hi, I have following 2 tables CREATE TABLE a sr_no INT CREATE TABLE b sr_no INT, startdate DATE, remark VARCHAR2(30) One to many mapping relationship exists between the two tables. for each sr_no in table a ther exists multiple/no record in table b.