LSMW - Read Data vs Convert Date for DATES
Hi everybody,
I have a problem with my LSMW for a <b>date field</b>.
In the .txt file it is defined as 01.01.1900.
(I can change it, e.g. make 01011900 but at the end SAP wants to have 01.01.1900 as input)
In the 'Maintain Source Fields' of my LSMW I defined it as a DDMY(010) field.
When 'Reading the Data' you can choose to check Date Value -> YYYYMMDD
When I <u>check</u> it, it gives:
For 'Display Read Data': 19000101
And after 'Convert Data' : 01011900
When I <u>don't check</u> it, it gives:
For 'Display Read Data': 01.01.1900
And after 'Convert Data' : 191.01.0 (?!?)
The fact is that in SAP it needs to be in following format: 01.01.1900 (so DD.MM.YYYY) so none of both solutions is right.
Can anybody tell me how I should configure this LSMW that I can transfer dates properly?
Thank you very much!
Kind Regards,
Caroline
Hi Caroline,
before doing upload change ur system settings to yyyy.mm.dd (just go to menu bar click on System->user profile->own data in this go for default ) and save it and do log off and log in ,
and then go for source fields and specify the Date field length as 8 char,
and then in mapping step for that particular field write the code as per the below
just change as per ur Target structure and Source structure and field name .
Make sure that in ur input file the Date field is in the format of yyyy.mm.dd
if not as91_ztable-AKTIV is initial.
replace '.' with '' into as91_ztable-AKTIV.
replace '.' with '' into as91_ztable-AKTIV.
condense as91_ztable-AKTIV no-gaps.
BALTD-AKTIV = AS91_ZTABLE-AKTIV.
else.
baltd-aktiv = '/'.
endif.
Thanks
Naveen khan
Message was edited by:
Pattan Naveen
Similar Messages
-
Mixed Data Type Table Control for Data Entry
Hi Guys --
I'm attempting to do error-checked data entry,
My data is mixed: path, boolean, and numeric. The natural organization is an array of clusters. For instance, the cluster element would look like "path, boolean, numeric, numeric" and I would have many rows of this data cluster. To further complicate things I have to dynamically define the number of numeric elements in the cluster (tricky already) and also dynamically define the length of the array.
I find the table control to be ideal to handle the dynamic nature of the data for editing. I can easily use scroll bars to navigate to the appropriate part of the data. I can delete rows and columns etc.
On the other hand, the table can only handle string data. I find that doing data checking and type conversion on the table elements to be extremely cumbersome.
I think what I'm looking for is a Table Control with ability to handle controls as elements. From what I've read in this list and personally experienced, that functionality doesn't exist.
Does LV have in-built functionality that I'm overlooking to resolve this problem? Is there a third-party library that would do the job?
Thanks,
JohnHi Ben --
I think perhaps that I wasn't clear in my description.
As I pointed out, my data is organized naturally as an Array of Clusters. More descriptively, my data looks like spreadsheet data; some text, some numbers. I need to add rows and columns dynamically. I need to be able to resize column widths dynamically... and while the program is executing.
The Table Control does all of this. The intuitive way that the Table Control permits a user to enter data is also good for my user. The Array of Cluster data looks like spreadsheet data and a Table looks close enough to a spreadsheet. A Table permits one to insert and delete rows, resize columns widths, and scroll around.
I don't see that I get these features with an Array of Clusters Control.
The issue with the Table Control is the lack of in-built data types, so I spend an inordinate amount of time doing type-conversion and range-checking.
At this point I'm pretty much convinced that LV doesn't have the in-built capability that I'm looking for.
I am curious if there are any LV libraries or Active-X controls somewhere that would implement the functionality that I require? -
Date management: XML-editor for Date Rules
Hello,
I'm looking for any documentation on the XML-editor for date rules (tags, attributes and so on).
Please send to [email protected]
Regards,
RomanHello,
I'm still looking it...
Any help will be appreciated.
Regards,
Roman -
Hi,
I'm using java to read from oracle and Netezza and I'm wondering:
Is there a method for capturing a row in a variable in order to print that entire row out to a data file or a UNIX file in this case.
Right now I have this code I'm working with:
//STEP 4: Execute a query
System.out.println("Creating statement...");
stmt = connection.createStatement();
String sql;
sql = "SELECT SRC_ID, SRC_CD, SRC_DSC, CKA_SUB_ID FROM SRC";
ResultSet rs = stmt.executeQuery(sql);
//STEP 5: Extract data from result set
while(rs.next()){
//Retrieve by column name
String SRC_ID = rs.getString("SRC_ID");
String FIRST_ROW = SRC_ID+", "+SRC_CD+", "+SRC_DSC+", "+CKA_SUB_ID;
//Display values
System.out.print("SRC_ID: " + SRC_ID);
System.out.println(", FIRST_ROW: " + FIRST_ROW);
Is there a way I can replace the getString with a "getRow"?
Right now the best I can do is to create and use the FIRST_ROW variable. However I want to be able to do this generically so I can read different tables and write them to data files.
Thanks!Is there a method for capturing a row in a variable in order to print that entire row out to a data file or a UNIX file in this case.
Is there a way I can replace the getString with a "getRow"?
No - there is no such 'ROW' entity in Oracle.
Download and use Oracle's free Sql Developer and you can use a simple query like this:
select /*csv*/ * from SCOTT.EMP
That will produce a comma-delimited result set with one record for each row. Then you can save the result set to a file.
Oracle SQL Developer Downloads
See this article by Jeff Smith that shows how to get result sets as CSV (and several other) formatted data.
http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/ -
Trying to find epoch dates and convert them to dates
I'm trying to find every epoch time in a string and convert them to a date. I have tried the below with no luck.
SELECT REGEXP_REPLACE('1315617396271 Impacting: CISCO SAN SWITCH1315617396271 Impacting: CISCO SAN SWITCH'
,'([[:digit:]]{10,10})',unixts_to_date('\1'))
FROM dual
Result
Error - ORA-01722: invalid number
I know the dates are good and the function works fine from the below test.
select unixts_to_date('1315617396') from dual
result
10 September 2011 01:16:36 AM
Any help with this would be much appreciated!Hi,
I was not able to copy-and-paste your example due to unknown characters (which are displayed as squares on my Ubuntu laptop).
I modified them replacing those characters by spaces.
Maybe that won't totally fit your needs, or might behave differently on your system.
Anyway, I propose the following :Scott@my11g SQL>l
1 with t as (
2 select '1315617396 271 Impacting: CISCO SAN SWITCH 1315617396 271 Impacting: CISCO SAN SWITCH ' str from dual
3 union all select '1315417396 123 Impacting: CISCO SAN SWITCH 1315317396 123 Impacting: CISCO SAN SWITCH ' from dual
4 union all select 'I went to France from 1123456789 to 1234567890 and it was great !' from dual
5 )
6 ------ end of sample data ------
7 select
8 str
9 ,listagg(strdt) within group (order by n) newstr
10 from (
11 select
12 str
13 ,n
14 ,regexp_replace(sstr,'(.*?)\d*$','\1') || (to_date('1970101','yyyymmdd') + regexp_substr(sstr,'\d{10}',1)/3600/24) strdt
15 from (
16 select
17 str
18 ,n
19 ,regexp_substr(v.str,'.*?(\d{10}|$)',1,v.n) sstr
20 from (
21 select t.str,
22 m.column_value n
23 from t
24 ,table(cast(multiset(select level
25 from dual
26 connect by level <= regexp_count(t.str,'.*?\d{10}')+1) as sys.OdciNumberList)) m
27 ) v
28 )
29 )
30* group by str
Scott@my11g SQL>/
STR NEWSTR
1315417396 123 Impacting: CISCO SAN SWITCH 1315 06 June 2012 05:43:16 PM 123 Impacting: CIS
317396 123 Impacting: CISCO SAN SWITCH CO SAN SWITCH 05 June 2012 01:56:36 PM 123
Impacting: CISCO SAN SWITCH
1315617396 271 Impacting: CISCO SAN SWITCH 1315 09 June 2012 01:16:36 AM 271 Impacting: CIS
617396 271 Impacting: CISCO SAN SWITCH CO SAN SWITCH 09 June 2012 01:16:36 AM 271
Impacting: CISCO SAN SWITCH
I went to France from 1123456789 to 1234567890 and I went to France from 07 May 2006 11:19:49 P
it was great ! M to 13 November 2009 11:31:30 PM and it was grea
t ! -
Advantages of using BAPI over LSMW for data transfer
Hellow,
Can anybody please give an input for advantages of using BAPIs in data transfer compare to LSMW. If we use BAPI for data transfer of master and transaction data how it is more usefull compare to LSMWs developed.
Thanks in advance
RaghavHi Raghavendra,
Refer the links..may help.....
[http://www.*******************/search?q=BAPIandLSMW+comparision]
[http://www.*******************/search?q=bapi]
Regards,
Mdi.Deeba -
Blank field getting converted into wrong date
Dear All,
I have one date field in SAP table in which there are some entries and some blank entries.
when Proxy is sending this data from ECC blank entries are converted into 00000000 and through XI in file
this
00000000 entry for date getting converted into wrong date like 30.11.0002 in file.
I have taken data type as string do I need to take data type as date.
My doubt is if there is no entry in table why it is convertng to 00000000 and after passing from XI why it is converting into
30.11.0002 .
RegardsHi ,
My date format like this
source --yyyyMMDD
target-DD.MM.YYYY
so if
source is
00000000
should comes like this
target
00.00.0000
but it is converting into
30.11.0002
every where in file values for 00000000 is coming like 30.11.0002
Regards -
Effective format for dates in a JFormattedTextField
Hello!
How can I configure a JFormattedTextField to accept dates while showing the mask for dates? I mean, the first time, when the field is empty, it shows only the mask: __/__/___. When the user edit the field it automatically skips the literal characters, going to the place of the numbers. I don't want to force the user to type the date separator characters. I don't want to do just something like this:
DateFormat format = new SimpleDateFormat("yyyy/MM/dd");
DateFormatter df = new DateFormatter(format);
JFormattedTextField ftf1 = new JFormattedTextField(df);
ftf1.setValue(new Date());This code doesn't really adds the '/' as a mask.
Thank you.
MarcosLike a mentioned before there is are data pickers out
there that make is one line for the programmer and
even easier for the user. (Who want to type in a
date).I don't want to user thirdy party components just to handle dates.
Basic things should be simple. Why?Because we do them all the time. The Java language is simple. I'm just complaining about the Swing API.
In programming, I have found that instead that things
that should be simple normally aren't.
I agree with you, but a component that just accept dates with a mask for dates is a simple thing today and always will be. Why don't provide an easy way for you to accomplish this?
Everyday things should be simple.
Why this API is so taugh? I don't know what taugh means.
I mean hard to use.
It s a pain to program in Swing, it even hurts. Have you ever tried AWT?,
We loose a big time searching for ways to do simplethings.
Sorry to here, that, but it sounds like a personal
problem. Use, the API, the tutorials, and pratice
practice pratice.
I think that Swing, even with its problems, is the right visual api to use. I'm just saying that it makes you write lots of code to things that could be done with less code.
I think you will find that Swing's inabitlity to be
simple allows it to be very flexiable.
I know, its flexible, but most of the time we don't need the flexibility that it offers. Most of the time we are doing basic things and should use its flexibility only when needed. -
Hi guys..
I'm currently testing out on LSMW
I'm trying to create new material for transaction MM01.
But when i click on Step 9: Read Data
i get a shortdump
What happened?
The current ABAP program had to be terminated becaus
ABAP processor detected an internal system error.
The current ABAP program "/1CADMC/SAP_LSMW_READ_0000
because the ABAP
processor discovered an invalid system state.
1: SQL error
2: Invalid value in call
3: Screen number in header (field DNUM) and in ID
4: Internal error in the database interface
8: Memory filled (used up)
16: Buffer too small for data
32: Unkown table in call
64: Invalid selection
128: Object with this key exists more than once
Here is my source Fields
Source Fields
MM01SS MM01 Source Structure
MATNR C(018) Material
MBRSH C(001) Industry Sector
MTART C(004) Material Type
MEINS C(003) Base Unit Of Measure
MAKTX C(040) Material Description
Below are links to the field mapping stuff
<a href="http://img93.imageshack.us/img93/4043/1ju0.jpg">Screen shot 1</a>
<a href="http://img167.imageshack.us/img167/3240/2rn4.jpg">Screen shot 2</a>
the dummy.txt is having :
MATNR MBRSH MTART MEINS MAKTX
AC26 I aa BAG xxx1
AC27 I bb BAG xxx2
AC28 I aa BAG xxx3
AC29 I bb BAG xxx4
AC30 I aa BAG xxx5
AC31 I bb BAG xxx6
AC32 I aa BAG xxx7
AC33 I bb BAG xxx8
AC34 I aa BAG xxx9
AC35 I bb BAG xxx10
AC36 I aa BAG xxx11
AC37 I bb BAG xxx12
AC38 I aa BAG xxx13
AC39 I bb BAG xxx14
AC40 I aa BAG xxx15
AC41 I bb BAG xxx16
AC42 I aa BAG xxx17
AC43 I bb BAG xxx18
AC44 I aa BAG xxx19
AC45 I bb BAG xxx20
AC46 I aa BAG xxx21
AC47 I bb BAG xxx22
AC48 I aa BAG xxx23
Did i leave out anything?oh yea, one more thing , the file assigning part
Files
Legacy Data On the PC (Frontend)
Test data C:\Documents and Settings\XXXXXXX\Desktop\dummy.txt
Data for One Source Structure (Table)
Separator Tabulator
Field Names at Start of File
With Record End Indicator (Text File)
Code Page ASCII
Legacy Data On the R/3 server (application server)
Imported Data File for Imported Data (Application Server)
Imported Data TEST_CREATE_MATERIAL.lsmw.read
Converted Data File for Converted Data (Application Server)
Converted Data TEST_CREATE_MATERIAL.lsmw.conv
Wildcard Value Value for Wildcard '*' in File Name -
i have LR from 2 through 4.4, I am simply trying to adjust CR2s, and convert the them JPEG. LR says my Perfectly Clear is expired but my update is up to date and all paid for. What is Perfectly Clear and how do i get this puppy to be part of the team?
Perfectly Clear is a 3rd party commercial plugin for Lightroom.
http://www.athentech.com/products/plugins/
Have you ever installed it as a trial in the past? -
Convert string to date for Ms Access
I have some date in a textFile!!!
I get them via Buffered and FileReader into my java application and put them into a Vector!
Every date is formatted as Strings and I want to convert them into a date format(YYYYMMDD).
The date are not used for " System.out.println", but I want to insert them into a Access-database(use a jdbc/odbc bridge).
The Access database seems only to accept YYYY-MM-DD, the only formatting way is how you choose to "show" the dates (short, long etc) but anyway....(:-)
I�ve tried following example with format.getTime() and it works. But I want to insert the date from
my textfiles instead.
Here some examples from my code with the getTime()method!!!
String str = String.valueOf(fields.get(3));
String ar = str.substring(0,4)+"-";
String m = str.substring(4,6)+"-";
String d = str.substring(6,8);
String datum = ar+m+d; //this is my date in a String format!!!
Calendar calendar = new GregorianCalendar();
Date date = calendar.getTime();//this objectref. takes the sys.date i want my string date instead(:-)
DateFormat localFormat = DateFormat.getDateInstance();
DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd" );//the only format for Access I think!
for (int j=0; j<(fields.size()-1); j++){//pos. from my vector
sql = sql + "'" + fields.get(j) + "'" + "," ;
sql = sql + "'" + format1.format( date ) "'" ; //the last field i the db
db myTest = new db();
myTest.executeDML("insert into tblBooks values "+sql+")");
Sorry for my "bumpy" English(:-) And thanks! EvaIf you tell us what the format if the dates in the file is, we might be able to suggest something :)
-
Best Practices for converting SAP HR data (4.7 to ECC)
Hello Experts ...
We are going from 4.6 to ECC ... no upgrade ..it will be a new implementation ...
I am looking for best practices to convert SAP HR data from one sap instance(4.6) to another(ECC) ...
I am not sure if direct input or LSMW or any other method/tool is the best way ...
Will really appreciate and award point if I can get good advise or documentation ...
Let me know if my question is not clear enough.
Thanks,Hi
You can check SAP Marketplace and there follow the download link. You will require a SAP Marketplace login to download the Best Practices. Fortunately Best practices for ECC 5.00 and 6.00 are available there but they are country specific versions. I know HCM for US is available there.
Reward points, if helpful.
Regards
Waz -
LSMW Read Data behaving differently in production and in ECC
Hi All,
I have writte a LSMW for CJ12 longtext and it is working fine in development but in production it giving error message at 13th step as BDC_INSERT, Transaction code .. is invalid and when i try to simulate the issue i found that in Read Data step i found the difference as transactions read in development are 399 where as the transactions read in production are 267 for the same file.And i debugged the Display Read program and observed that the read program used GUI_UPLOAD to read the data from the text file.and there itself the GUI_UPLOAD internal table contains 399 in development and 267 in production.I tried to simulate why this is happening but coldn't figure out.Can any one help me why this has happened.And we are using ECC6 with EHP4 in development and EHP3 in production and it has to upgrade to EHP4.if you are really certain about the source file (I doupt too) then there are only 2 more possibilities
a) your LSMW object is different (transport it again from developement to production, only so you can be sure that LSMW object and source will be the same)
b) a real SAP error because of different release levels. Open a ticket at SAP to get help. -
hi,i m upoladed the data lsmw through. i already Assign the files in lsmw,but when i import the data through Execut- import data for z92.fi, vendor. and when i execut the import data The " Errors, Unable to write to file 'd:\Z92_FI_VENDORS.lsmw.read'
Message no. /SAPDMC/LSMW804
so, if anybody knows then reply very soon.
because its very urgent
Reagrds,
pritesh
9898986357Hi,
I have posted one invoice for vendor which has reconcialtion A/c 28000.
Now i have changed the Reco. A/c in vendor master from 28000 to 28100.
now the problem is that i want to transfer the posted entries ,which was in A/c 28000 (Reco. A/c), to 28100 (Reco. A/c)
So, how can i transfer the same and if any t.code to run then whic is the t.code for the same.
Its very urgent
Regards,
Pritesh -
User enters the paremter for the year, need help converting that to date
Hello!
I have a report that asks for the user what data they want to see based on the year. They will then enter 2007 for example. My problem is that when I use that parameter in the where clause I get an error -
ORA-01722 Invalid Number
Here is the line of code -
AND (TRANSACTIONS.po_no IS NULL OR (TO_CHAR(req.open_date,'YYYY') ) = (TO_CHAR(:p_year,'YYYY')))
The :p_year is what I am referring to, I know if I hard code 2007 in there it works just fine. I've tired converting it to a char, converting it to a date, and even converting to a date and back to a char, but it is not working.
Any help would be appreciated!! Thanks!!It all depends whether your input parameter is NUMBER, CHAR, DATE or SOMETHING_ELSE.
a) NUMBER
AND (TRANSACTIONS.po_no IS NULL OR
TO_CHAR(req.open_date,'YYYY') = TO_CHAR(:p_year,'FM9999')
)b)STRING
AND (TRANSACTIONS.po_no IS NULL OR
TO_CHAR(req.open_date,'YYYY') = TRIM(:p_year)
)c) DATE assumption then is 01.01. of this year)
AND (TRANSACTIONS.po_no IS NULL OR
trunc(req.open_date,'year') = :p_year
)d) something else - like not a bind variable but literal or script parameter
AND (TRANSACTIONS.po_no IS NULL OR
(req.open_date >= to_date('01/01/&p_year','dd/mm/yyyy') AND
req.open_date < to_date('31/12/&p_year','dd/mm/yyyy')+1
)
Maybe you are looking for
-
How to generate XLIFF File from RTF file
Hi, I have my rtf file template. I need this report in English as well as in Russian. Ho to generate the xliff file for Russian translation. Thanks in advance! Arvind
-
Want to buy new IMAC COnsidering 1TB Fusion OR 256 Flash storage + External thunderbolt 1TB Used mostly in Audio intensivle projects
-
Hi, My son has a problem in that he cannot access a school Web site from his home machine. When he logs in and tries to access an exercise page we get the red cross in a window. (Windows XP with IE7) Running Java console we see the following; load: c
-
Hi, Right now we are using one Zxx movement type for Sales returns to Unrestricted stock Requirement is to change the stock type for same Zxx movement type i.e Sales returns to Blocked stock instead of Unrestricted stock, as this movement type is use
-
My macbook pro 15 (2009 released) has recently installed OS X 10.5.8 Leopard but not OS X Snow Leopard. Can I still upgrade this to OS X Mavericks? What should I do? Should I need to install Snow leopard v10.6.8 first? So I need to get/buy the softwa