How to read the duplicate files.
Hi Experts,
I have the requirement that i need to handle the duplicate files i.e. if there is more then one file present for a particular day then i need to discard the second file and to raise an alert also.
Can any one please suggest me the alternate ways to handle this.
Hi,
Hi,
For this type of requirement u need to use the lookup.
Follow the steps
1) Creat UDF which hold the file no from the input element and map the output of UDF to target root nod. the output which returns to this UDF is either True or fale so if its true then it will run the scenario and if it is false then it will reject that file and raise an alert.
2) pass file no to R3 system using.
3) Maintain one table in R3 which will hold the file no.
4) When the first time ur scenario rund the file no is passed through UDF to R3 system and in the FM u need to write a program which will update the file no in table.
5) For the second time again file no is passed to R3 and in the UDf u need to first select teh value from table and compare the value with the value which is passed if its not equal then update the new value and if it is equal then raise an alert using the SALERT_CREATE function module.
See the document for alert and lookup.
Alert:
For raising an alert you need to first configure the alert please follow the below weblog written by Michal Krawczyk
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
Configuration steps are: go to transaction ALRTCATDEF
1) Define Alert Category
2) Create container elements which are used for holding an error messages.
3) Recipient Determination.
Alert can be triggered in different ways.
1) Triggering by Calling a Function Module Directly.
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
Lookup:
RFC lookup using JCO (without communication channel)
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
RFC lookup with communication channel.
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Thnx
Chirag
Similar Messages
-
How to read the properties file available in Server File structure in webdy
hi all,
I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
Can i have code how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by maintain the iP addresses and users in properties file based on the key i want to read like below.
servername="abcServer"
username="john"
password="test123"
Please send me the code how to read this properties file from the file structure and how to read this values by key in webdynpro application
Regards
VijayHi Vijay,
You can try this piece of code too:
Properties props = new Properties();
//try retrieve data from file
//catch exception in case properties file does not exist
try {
props.load(new FileInputStream("c:\property\Test.properties")); //File location
String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
if(serverName==null)
//....do appropriate handling
} catch(IOException e)
e.printStackTrace();
Regards,
Alka. -
How to read the backup file of my own iphone...
how to read the backup file of my own iphone... becase I'm running out of space in my iphone so need to delete some photos. I wanna know do i have to copy photos to my computer or is it available in the back up file ????
Always move (copy and delete) your photos from Camera Roll to your computer.
Camera Roll is the digital camera card. -
How to Read the "text file and csv file" through powershell Scripts
Hi All
i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
Regards:
Rajeshreddy.kHi Rajeshreddy.k,
To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
$Users = Get-Content -Path 'C:\ListOfUsernames.txt'
$Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
Add-ADGroupMember -Identity $Group -Members $Users -
How to read the text file present in the Al11 server through our program?
My requirement is that , i have one file already present in the AL11 server. Now i want to take this file so that I can read this file .
So will you please help me , how to read the file from AL11 server in our program ?
Thankx in advanceHi..
I too agree to the above post .. SEARCH in SCN before posting..
DATA: lv_filename TYPE string, "File name
lv_line TYPE string. "One line entry in a file
lv_filename = iv_file_name.
IF iv_location = gc_application.
IF iv_record_count IS SUPPLIED.
Open file
IF gv_file IS INITIAL.
OPEN DATASET lv_filename FOR INPUT IN TEXT MODE
ENCODING DEFAULT.
ENCODING DEFAULT
IGNORING CONVERSION ERRORS.
IF sy-subrc <> 0.
RAISE file_open_error.
ENDIF.
gv_file = gc_check.
ENDIF.
Read data
DO iv_record_count TIMES.
READ DATASET lv_filename INTO lv_line.
IF sy-subrc <> 0.
Close file
CLOSE DATASET lv_filename.
IF sy-subrc NE 0.
RAISE file_close_error.
ENDIF.
CLEAR gv_file.
Exit from the loop
EXIT.
ENDIF.
Regards
Ansari -
How to Read the Source file instead of Dummy file
Hi All
We have LSMW in that they are Reading Dummy file instead of the Source file ...
But my requirement is, i want to read the source file in specify file step in stead of Dummy file,
how to do this ? can any one help me on this
Regards
SmithaNever heared that dummy files are used anywhere in LSMW.
Exchange the file in step 7 Spcify files to the file of your choice. -
How to read the AFP file in hex format
hi,
I am reading a AFP file in hexstring format.But it is out put is not perfect means it is showing output close to the real one.
How to read the file so taht i can get exact output in hex format.
try{
File inputFile = new File( "C:\\ACode\\afpfile.afp" ) ;
File outputFilehex = new File ( "C:\\ACode\\Hex.txt" ) ;
FileInputStream inputStream = new FileInputStream( inputFile );
Reader in = new InputStreamReader(inputStream,"Cp1252");
BufferedReader readableFile = new BufferedReader( in ) ;
FileOutputStream outputStreamhex = new FileOutputStream( outputFilehex );
Writer outhex = new OutputStreamWriter(outputStreamhex);
BufferedWriter writableFilehex = new BufferedWriter( outhex ) ;
int line;
String hext=new String();
while ((line= (readableFile.read()))!=-1)
writableFilehex.write(Integer.toHexString(line).toUpperCase());
} writableFilehex.close() ;
readableFile.close() ;
catch( IOException e ) {
System.out.println( e.getMessage() ) ;
while reading i am getting most of hex charters are same except some places like instead of taking 00 its writing 0 and instead of f8 its writing fff.
AFP is a IBM format for printing. Somehow i will be able to read that but how to covert it back to that format and store to that file.
by trying is just storing data in hex format only
Writer outhex = new OutputStreamWriter(outputStreamhex,"Cp1252");
is there anyother way to store it back to this format -
How to read the iak file in visual c#
I am trying to read the iak file from visual c#. How to parse the file?
I need to know how and what information is stored in the file.
Why?
We have Fieldpoints and every time we are moving them around, or the eqjuipment connected to them. Every time we have to go back and update the program reading the data from the Filedpoints. If the program can read the iak file, it will be better.AlbertJ,
With the Microsoft .NET Framework version 1.1 or later, you can
use NI-VISA to create applications using Visual C# and Visual Basic .NET without
Measurement Studio. You need Microsoft Visual Studio .NET 2003 for the API
documentation to be installed.
The installed documentation contains the NI-VISA API overview and
function reference. This help is fully integrated into the Visual Studio .NET
documentation. To view the VISA .NET documentation, go to
Start»Programs»National Instruments»VISA»NI-VISA .NET Framework 1.1
Help. Expand NI Measurement Studio Help»NI Measurement Studio
.NET Class Library»Reference»NationalInstruments.VisaNS to view the
function reference. Expand NI Measurement Studio Help»NI Measurement
Studio .NET Class Library»Using the Measurement Studio .NET Class
Libraries»Using the Measurement Studio VisaNS .NET Library to view
conceptual topics for using NI-VISA with Visual C# and Visual Basic .NET.
To get to the same help topics from within Visual Studio .NET
2003, go to Help»Contents. Select Measurement
Studio from the Filtered By drop-down list and follow
the previous instructions.Examples can be found at C:\Program Files\National Instruments\MeasurementStudio(version #)\DotNET\Examples\Visa. These examples are installed when you install the VISA driver with .NET support.
Test Engineer - CTA -
How to read the CSV Files into Database Table
Hi
Friends i have a Table called tblstudent this has the following fields Student ID, StudentName ,Class,Father_Name, Mother_Name.
Now i have a CSV File with 1500 records with all These Fields. Now in my Program there is a need for me to read all these Records into this Table tblstudent.
Note: I have got already 2000 records in the Table tblstudent now i would like to read all these CSV File records into the Table tblstudent.
Please give me some examples to do this
Thank your for your service
Cheers
Jofin1) Read the CSV file line by line using BufferedReader.
2) Convert each line (record) to a List and add it to a parent List. If you know the columns before, you might use a List of DTO's.
3) Finally save the two-dimensional List or the List of DTO's into the datatable using plain JDBC or any kind of ORM (Hibernate and so on).
This article contains some useful code snippets to parse a CSV: http://balusc.xs4all.nl/srv/dev-jep-csv.html -
How to read the data file and write into the same file without a temp table
Hi,
I have a requirement as below:
We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
But in 11.10 we want to restrict using temp table how can we achieve this.
Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
Any inputs are highly appreciated.
Thanks & Regards,
Lakshmi Kalyan Vara Prasad.Hello Gurus,
Let me tell you about my requirement clearly with an example.
Problem:
i am receiving a dat file from bank in below format
105A371273020563007 07030415509174REF3178503 001367423860020015E129045
in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
REF3178503 --- REF denotes it as Sales Order
ACC denotes it as Customer No
INV denotes it as Transaction Number
based on this 15 characters......my validation comes.
If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
Can this be handled by writing a pl/sql procedure ??
My findings:
May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
Any suggestions from Oracle GURUS is highly appreciated.
Thanks & Regards,
Lakshmi Kalyan Vara Prasad. -
SAP GRC - Exporting rules from GRC - how to read the .txt file generated ?
Hi there,
I am using GRC Compliance Calibrator and have downloaded the default Global rules defined in Compliance Calibrator using the Rule Architect -> Utilities->Export rules.
This gave me a massive txt file with a lot of tables and data. Reading through this forum, I did figure out that lines starting with M are the header rows for the tables and D rows are the data rows.
My question is, how do i figure out what each of the Virsa tables stand for (e.g. VIRSA_CC_FUNCACT, VIRSA_CC_FUNCPRM) ?
I tried SE11 and looking up these tables in the SAP environment associated with this CC install, however it says that the table was not found.
Could someone please point me to :
A) A list of the common Virsa CC tables and their descriptions ?
OR
B) How can i find what these tables stand for online or in the SAP environment?
Many thanks !Hi Santosh,
There is no option available to export only the customized rule sets to another system. The export rules option will give all the rules that are available in that system.
You can do in the below manner
a) Extract the data from Export rules
b) Open that text file in a spreadsheet and edit the spreadsheet [Remove the rule sets & the rules not required in production system]
c) Save the spreadsheet in UTF-8 text file
d) Upload them in the production.
The above procedure is bit complex and cumbersome -as changing the text file is risky. Even a space will not generate any rules in the RAR. I would suggest rename the new rule set in different naming convention and upload in your test environment before uploading the text files in Production.
But, using the Export and Import option you cannot upload only the customized rule set as the extract happens for the entire rules sets available in the system.
Thanks and Best Regards,
Srihari.K -
How to read the excel file using webdynpro abap?
Hi,
how to read and modify excel file using webdynpro abap?
Regards,
PavaniFor reading excel file follow the steps :
1. Use a File upload UI element and bind it with xstring.
2. Now your excel will be uploaded and stored in Xstring.
3. Convert Xstring to String data using FM 'HR_KR_XSTRING_TO_STRING'.
4. Now split the string at new line so as to make an internal table .
Ex . SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE it_table.
here it_table is type table of string.
5.now loop at the internal table and separate the content of this table separated by tab.
Ex. SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.
it_new type string_table.
6. For more info , refer this thread :
Re: How to upload excel file in Webdynpro application using ABAP -
Mail to File - how to read the attachment file name from the subject.
I need to use the SHeaderSUBJECT's value in the receiver file adapter's variable substitution.
This is a Mail to File scenario without design part where the attachment file name comes in the subject of the mail.
I see the below in the dynamicconfiguration section. How can i retrive the value from dynamicconfiguration section to the filename.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderSUBJECT">PlainAttachment.txt</SAP:Record>
</SAP:DynamicConfiguration>
Points will be rewarded.Try to use sthg like this in a UDF :
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String value = conf.get(key);
or in a JAVA mapping :
DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create((http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String keyValue = dynConf.get(dynKey);
param is the map object from the execute() method of your mapping ...
Hope this helps
Chris
Edited by: Christophe PFERTZEL on Apr 23, 2008 11:34 AM -
How will read the property file on dynamically?
hi,
I developed 2 java files...in both the files i am reading the some content from .property file(Notes.properties)....
I created the jar file call Aix.jar using the following command.
jar -cvf Aix.jar *.class(without specifying the notes.properties file)...
then i executed the java file using the folowing command
java -cp Notes.jar;Aix.jar NotesToolTest
now i am getting following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.util.MissingResourceException: Can't find bundle for base name Notes, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at NotesToolTest.<clinit>(NotesToolTest.java:28)
I got the problem why this happening...because notes.properties is not included in jar file...that's why the above exception is coming.
But my problem is can i run the java file that will take .prooperties file dynamically(if .property is available on the current directory)...
Thanks in advance,,,,
Regards,
Sankarbecause notes.properties is not included in jar file..Wrong. It is simply not available in the classpath.
The solution is either putting the properties file in the classpath of JVM used, or adding the system path to the propertiesfile to the classpath of the JAR. -
I interfaced ENA 5071B using labview with agena vi. I need to save the s2p file from the network analyzer.. I am requesting you guys to help me and pls suggest wat kind of vi i need to use from agena.....
ThanksThe PNA driver does not have the vi to full support what you want. The SCPI commands to do what you want are:
MMEMTOR:TRAC:FORMNP MA; - to format the data in Mag dB Phase linear.
CALC1ATA:SNPORTsave '1,2' , 'local file name on PNA file system.s2p' - to create PNA local files of s2p data
MMEMory:TRANsfer? 'controllerfilename.s2p' - to transfer the datafile from PNA to test controller using GPIB block transfer.
You will have to create these SCPI commads and VI's for yourself as the driver does not have them built in.
Good luck.
Maybe you are looking for
-
So I bought a show on iTunes and I was able to buy it but it won't let me download it . I was able to download songs and I worked perfectly it's just videos . It's on iPhone so I don't know what to do .
-
Hi I need to copy all photos from my ipad2 to macpro 2012. We have multiple apple id users in ipad2, so the photo sharing though on, not all photos are picked up in macbook pro. Please can you help
-
Expression Filters Performance
Hi, I'm trying to test the expression filters functionality using two tables: Env: Oracle 11g R2 (11.2.0.2) EE on AIX T1 is the data table and contains about 90 million rows with around 60 columns. Only 4 columns are evaluated in the filter with thre
-
Sequencs settings for hi-res photos ?
I have hi-res photos each is a different size. some are very large, 6000x3798, others not so large, 1920x1278. My client wants HD 1920x1080. what should my sequence settings be so as not to get something that looks anamorphic yet contain all the in
-
Need Adobe Flash player 10 ActiveX version 10.2.152.26
I need Adobe Flash player 10 ActiveX version 10.2.152.26 only for a specific requirement. I cant find this version. I am always on the latest version. Please share the link from where I can download Adobe Flash player 10 ActiveX version 10.2.152.26.