FM CONVERT MMYY TO MMYYYY
Hi,
We have an interface from other system with AS400 and DB2, one of the field has the data type number 4.0 with this information MMYY. But in sap we need have YYYYMM. I am seeing the problem is in convert YY to YYYY.
Someone knows some funtion module or bapi to manage this.
Thanks.
Victoria
Hi Victoria,
check this
data date like sy-datum.
CALL FUNCTION 'RP_FORMATING_DATE'
EXPORTING
date_i = '092990'
BIRTH_DATE = 'X'
IMPORTING
DATE_O = date
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write date.
to get only year use date(4).
29.09.90 and the output is 29.09.1990
date(4) = 1990.
reward to all useful answers
Similar Messages
-
Convert date value in 1 column help
Am on 10g.
I have a column: STAMP_DATE with these values:
I need to leave LEGACY as it is, but everything else, I need to convert it to: MMYYYY as in: 092010 for example.
So 9-Sep stands for Sep-2009. The digit is the year, I am trying to fix this.
Any SQL help would be appreciated, thank you!
STAMP_DATE
"LEGACY"
"9-Sep"
"9-Oct"
"9-Nov"
"9-May"
"9-Mar"
"9-Jun"
"9-Jul"
"9-Dec"
"9-Aug"
"9-Apr"
"10-May"
"10-Mar"
"10-Jan"
"10-Feb"
"10-Apr"
These values were imported from Excel using SQLLDR, so it kinda made them like that.maybe this might help.
SQL> select to_char(to_date(lg.stamp_date||'-'||to_char(sysdate,'yyyy'),'dd-mon-yyyy'),'mmyyyy') STAMP_DATE
2 from (select 'LEGACY' STAMP_DATE from dual union all
3 select '9-Sep' STAMP_DATE from dual union all
4 select '9-Oct' STAMP_DATE from dual union all
5 select '9-Nov' STAMP_DATE from dual union all
6 select '9-May' STAMP_DATE from dual union all
7 select '9-Mar' STAMP_DATE from dual union all
8 select '9-Jun' STAMP_DATE from dual union all
9 select '9-Jul' STAMP_DATE from dual union all
10 select '9-Dec' STAMP_DATE from dual union all
11 select '9-Aug' STAMP_DATE from dual union all
12 select '9-Apr' STAMP_DATE from dual union all
13 select '10-May' STAMP_DATE from dual union all
14 select '10-Mar' STAMP_DATE from dual union all
15 select '10-Jan' STAMP_DATE from dual union all
16 select '10-Feb' STAMP_DATE from dual union all
17 select '10-Apr' STAMP_DATE from dual) lg
18 where lg.stamp_date != 'LEGACY'
19 union all
20 select lg.stamp_date STAMP_DATE
21 from (select 'LEGACY' STAMP_DATE from dual union all
22 select '9-Sep' STAMP_DATE from dual union all
23 select '9-Oct' STAMP_DATE from dual union all
24 select '9-Nov' STAMP_DATE from dual union all
25 select '9-May' STAMP_DATE from dual union all
26 select '9-Mar' STAMP_DATE from dual union all
27 select '9-Jun' STAMP_DATE from dual union all
28 select '9-Jul' STAMP_DATE from dual union all
29 select '9-Dec' STAMP_DATE from dual union all
30 select '9-Aug' STAMP_DATE from dual union all
31 select '9-Apr' STAMP_DATE from dual union all
32 select '10-May' STAMP_DATE from dual union all
33 select '10-Mar' STAMP_DATE from dual union all
34 select '10-Jan' STAMP_DATE from dual union all
35 select '10-Feb' STAMP_DATE from dual union all
36 select '10-Apr' STAMP_DATE from dual) lg
37 where lg.stamp_date = 'LEGACY';
STAMP_DATE
092010
102010
112010
052010
032010
062010
072010
122010
082010
042010
052010
032010
012010
022010
042010
LEGACY
16 rows selected
SQL> -
How to convert MMYYYY to 0FISCPER format
Hi,
I would like to know how can I convert the following format, MMYYYY from a flat file into 0FISCPER format.
What conversion routine, routine or formula should I use?
BTW, this is an ASCII file and not CSV.
Thanks!Hi Fulham FC
If am understanding you properly then your issue is u r
having a field calmonth/year now u need to convert it
to fiscper..
Please go through the following link i think first one is more help ful for you then
the second link..
Re: How to Obtain Fiscper from Cal month in Update routine
Re: Funcion Module to get Fiscal period
if any let me know..
Dont for get to assign points if it help ful..
Regards
R M K
***Assigning points is the only way of saying thanx in SDN ***
Message was edited by:
R M K -
How to convert yyyymm -mmyyyy format
Hi All,
How do I convert 0Fiscper format from yyyymm to mmyyyy in transformation rules
Thanks
NauHello,
Create routine:
Fiscper is usually in yyyymmm format...
CONCATENATE SOURCE_FIELDS-FISCPER5(2) SOURCE_FIELDS-FISCPER0(4) INTO RESULT.
Beware that calmonth is stored in yyyymm format.
BR
Ondrej
Edited by: Ondrej Vach on Mar 8, 2011 2:45 PM -
Converting a Date into a Period
Hi Experts, I have this requirement where I have to convert a Transaction Date (format MM-DD-YYYY) into a Period (MMYYYY) just like Fiscal Year/Period. I'm dealing with non-sap source system and they hav no field in the source system that has period. Please help me with on how I should deal with this. I beleive I have to write a routine in transformations to do so but is there a built-in routine that I can use to accomplish this?
If not them please provide me a sample code that I can use to get this done. Any help is appreciated.You can make use of the below FM
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = <result_fields>-/bic/<IO>
I_MONMIT = 00
i_periv = lv_periv
IMPORTING
e_buper = lv_buper
e_gjahr = lv_gjahr
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4
CONCATENATE lv_buper lv_gjahr INTO lv_period.
This is a sample correct the code as per your need. -
Converting Oracle query to Sql Server with date manipulation
The following SSIS statement works great in Oracle, and it parses successfully in the "Sql Task" window. In Oracle it returns
this result:
FROM_DT THRU_DT
16-Jan-2014 23-Jan-2014
select
case
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=7 then to_date('24'||to_char(add_months(sysdate,-1),'mmyyyy'),'ddmmyyyy')
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=15 then to_date('01'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=23 then to_date('08'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
else to_date('16'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
end as from_dt,
case
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=7 then trunc(last_day(add_months(sysdate,-1)))
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=15 then to_date('07'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=23 then to_date('15'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
else to_date('23'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
end as thru_dt
from sys.dual
How can I convert this to Sql Server ?>>You mean you get the data from Oracle and tries to insert it into SQL Server?
- no, sorry, I want to convert the syntax to Sql Server
>>Are
you running the query in OLEDB provider connected to the Oracle's database?
- yes, this works fine now (after fixing this redundancy:
to_char(to_date(sysdate,'dd-mon-yyyy'),'dd')change toto_char(sysdate,'dd') -
I Purchased Three Printers
1.
HP LaserJet Enterprise 500 MFP M525dn(CF116A)
2.
HP Color LaserJet Enterprise CP4025n Printer(CC489A)
3.
HP LaserJet P2055d Printer (CE457A) -
All of them three operates on 110v USA. but i need them to use in 220V . Can anyone recommend me any good Voltage converter ?
This question was solved.
View Solution.Hi,
Before go out to buy a converter/transformer (you need over 2KW for all 3 of them), please check the switches at the back, they may have switches to switch from 110V to 220V. I don't know your market, my suggestion: talk with an electrician who knows the real world much better.
Regards.
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem. -
ALL MY DESKTOP APPS CONVERTED TO PDF FILES.
After sending an urgent email attachment in Adobe PDF to Government Offcom, all my Desktop applications in windows 7 64 bit have been converted to PDF files and cannot be opened. The attachment used was sent to me by my Secretary remotely using an old MAC.
I can return my laptop to normal operation by un installing my Adobe Reader 11 app, but the problem returns when I re Download Adobe Reader
11 again. After discussing this with Adobe Technical in London they advised me to raise this issue with your Adjudicators in this Forum.
Please assist asap as this is very urgent right now for several genuine reasons.
Many thanks. Derek Horder.See if anything in here helps: https://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html
-
Which is best app to convert voice memos to text?
There must be a way to import iPhone 5s voice memos, some 20 minutes long into editable text. Recommendations would be appreciated.
SORRY! WHAT I MEANT TO ASK WAS "I WANT TO EXPORT YOUTUBE & FACEBOOK VIDEOS TO ITUNES. WHAT IS THE BEST APP. TO USE TO CONVERT THESE VIDEOS INTO A FORMAT THAT IS ACCEPTABLE TO ITUNES. WHAT IS THE BEST FORMAT TO USE. THANK YOU
-
Need to convert JApplet to JFrame
I need to write code for where I have 60 balls bouncing around inside a window. The client will then be able to select a button and it will pull out a ball with the number 1-60 written on it. The user will be able to do this up to 7 times. Each time it is done the past numbers that have already appeared can not reappear. What I am stuck on right now is geting my balls into a JFrame. Can anyone give advice or show how to. I currently have my 60 balls running in a JApplet. Here is the JAVA code and the HTML code. Thanks!
Here is the JAVA code
import java.awt.*;
import java.applet.*;
import java.util.*;
import javax.swing.*;
class CollideBall{
int width, height;
public static final int diameter=20;
//coordinates and value of increment
double x, y, xinc, yinc, coll_x, coll_y;
boolean collide;
Color color;
Graphics g;
Rectangle r;
//the constructor
public CollideBall(int w, int h, int x, int y, double xinc, double yinc, Color c){
width=w;
height=h;
this.x=x;
this.y=y;
this.xinc=xinc;
this.yinc=yinc;
color=c;
r=new Rectangle(150,80,130,90);
public double getCenterX() {return x+diameter/2;}
public double getCenterY() {return y+diameter/2;}
public void alterRect(int x, int y, int w, int h){
r.setLocation(x,y);
r.setSize(w,h);
public void move(){
if (collide){
double xvect=coll_x-getCenterX();
double yvect=coll_y-getCenterY();
if((xinc>0 && xvect>0) || (xinc<0 && xvect<0))
xinc=-xinc;
if((yinc>0 && yvect>0) || (yinc<0 && yvect<0))
yinc=-yinc;
collide=false;
x+=xinc;
y+=yinc;
//when the ball bumps against a boundary, it bounces off
if(x<6 || x>width-diameter){
xinc=-xinc;
x+=xinc;
if(y<6 || y>height-diameter){
yinc=-yinc;
y+=yinc;
//cast ball coordinates to integers
int x=(int)this.x;
int y=(int)this.y;
//bounce off the obstacle
//left border
if(x>r.x-diameter&&x<r.x-diameter+7&&xinc>0&&y>r.y-diameter&&y<r.y+r.height){
xinc=-xinc;
x+=xinc;
//right border
if(x<r.x+r.width&&x>r.x+r.width-7&&xinc<0&&y>r.y-diameter&&y<r.y+r.height){
xinc=-xinc;
x+=xinc;
//upper border
if(y>r.y-diameter&&y<r.y-diameter+7&&yinc>0&&x>r.x-diameter&&x<r.x+r.width){
yinc=-yinc;
y+=yinc;
//bottom border
if(y<r.y+r.height&&y>r.y+r.height-7&&yinc<0&&x>r.x-diameter&&x<r.x+r.width){
yinc=-yinc;
y+=yinc;
public void hit(CollideBall b){
if(!collide){
coll_x=b.getCenterX();
coll_y=b.getCenterY();
collide=true;
public void paint(Graphics gr){
g=gr;
g.setColor(color);
//the coordinates in fillOval have to be int, so we cast
//explicitly from double to int
g.fillOval((int)x,(int)y,diameter,diameter);
g.setColor(Color.white);
g.drawArc((int)x,(int)y,diameter,diameter,45,180);
g.setColor(Color.darkGray);
g.drawArc((int)x,(int)y,diameter,diameter,225,180);
public class BouncingBalls extends Applet implements Runnable {
Thread runner;
Image Buffer;
Graphics gBuffer;
CollideBall ball[];
//Obstacle o;
//how many balls?
static final int MAX=60;
boolean intro=true,drag,shiftW,shiftN,shiftE,shiftS;
boolean shiftNW,shiftSW,shiftNE,shiftSE;
int xtemp,ytemp,startx,starty;
int west, north, east, south;
public void init() {
Buffer=createImage(getSize().width,getSize().height);
gBuffer=Buffer.getGraphics();
ball=new CollideBall[MAX];
int w=getSize().width-5;
int h=getSize().height-5;
//our balls have different start coordinates, increment values
//(speed, direction) and colors
for (int i = 0;i<60;i++){
ball=new CollideBall(w,h,50+i,20+i,1.5,2.0,Color.white);
/* ball[1]=new CollideBall(w,h,60,210,2.0,-3.0,Color.red);
ball[2]=new CollideBall(w,h,15,70,-2.0,-2.5,Color.pink);
ball[3]=new CollideBall(w,h,150,30,-2.7,-2.0,Color.cyan);
ball[4]=new CollideBall(w,h,210,30,2.2,-3.5,Color.magenta);
ball[5]=new CollideBall(w,h,360,170,2.2,-1.5,Color.yellow);
ball[6]=new CollideBall(w,h,210,180,-1.2,-2.5,Color.blue);
ball[7]=new CollideBall(w,h,330,30,-2.2,-1.8,Color.green);
ball[8]=new CollideBall(w,h,180,220,-2.2,-1.8,Color.black);
ball[9]=new CollideBall(w,h,330,130,-2.2,-1.8,Color.gray);
ball[10]=new CollideBall(w,h,330,10,-2.1,-2.0,Color.gray);
ball[11]=new CollideBall(w,h,220,230,-1.2,-1.8,Color.gray);
ball[12]=new CollideBall(w,h,230,60,-2.3,-2.5,Color.gray);
ball[13]=new CollideBall(w,h,320,230,-2.2,-1.8,Color.gray);
ball[14]=new CollideBall(w,h,130,300,-2.7,-3.0,Color.gray);
ball[15]=new CollideBall(w,h,210,90,-2.0,-1.8,Color.gray);*/
public void start(){
if (runner == null) {
runner = new Thread (this);
runner.start();
/* public void stop(){
if (runner != null) {
runner.stop();
runner = null;
public void run(){
while(true) {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
try {runner.sleep(15);}
catch (Exception e) { }
//move our balls around
for(int i=0;i<MAX;i++)
ball[i].move();
handleCollision();
repaint();
boolean collide(CollideBall b1, CollideBall b2){
double wx=b1.getCenterX()-b2.getCenterX();
double wy=b1.getCenterY()-b2.getCenterY();
//we calculate the distance between the centers two
//colliding balls (theorem of Pythagoras)
double distance=Math.sqrt(wx*wx+wy*wy);
if(distance<b1.diameter)
return true;
return false;
private void handleCollision()
//we iterate through all the balls, checking for collision
for(int i=0;i<MAX;i++)
for(int j=0;j<MAX;j++)
if(i!=j)
if(collide(ball[i], ball[j]))
ball[i].hit(ball[j]);
ball[j].hit(ball[i]);
public void update(Graphics g)
paint(g);
public void paint(Graphics g)
gBuffer.setColor(Color.lightGray);
gBuffer.fillRect(0,0,getSize().width,getSize().height);
gBuffer.draw3DRect(5,5,getSize().width-10,getSize().height-10,false);
//paint our balls
for(int i=0;i<MAX;i++)
ball[i].paint(gBuffer);
g.drawImage (Buffer,0,0, this);
Here is the HTML code
<html>
<body bgcolor="gray">
<br><br>
<div align="center">
<applet code="BouncingBalls.class" width="1000" height="650"></applet>
</div>
</body>
</html>In the future, Swing related questions should be posted in the Swing forum.
First you need to convert your custom painting. This is done by overriding the paintComponent() method of JComponent or JPanel. Read the Swing tutorial on [Custom Painting|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html].
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting. -
AiO Remote iOS - Google drive convert file automatically
Hello Expert!
when i scan and upload on my google drive, google drive automatically convert the file in google docs format.
i already disabled the automatic convert in goole drive settings but same issue.
only aio remote - last version on app store installed - has this problem.
Any suggestion?
ThanksHello,
I tried to duplicate the issue you're seeing and I can't. Here's what I did... used the AiO Remote app, took a pic of a handwritten note, saved as a PDF, and then shared to my Google Drive. The file type is still a PDF.
What type of files are you working with? Does the extension change happen on everything you send to Google Drive?
Miles
HP Employee -
I need to convert PDF file to Word Document, so it can be edited. But the recognizing text options do not have the language that I need. How I can convert the file in the desired of me language?
The application Acrobat provides no language translation capability.
If you localize the language for OS, MS Office applications, Acrobat, etc to the desired language try again.
Alternative: transfer a copy of content into a web based translation service (Bing or Google provides a free service).
Transfer the output into a word processing program that is localized to the appropriate language.
Do cleanup.
Be well... -
Emac Fire Wire to RCA DV Converter
Is there a Converter out there like the "Apple Mini-DVI to Video Adapter" for the Emac?
The same converter should also work on your eMac.
-
Just subscribed to pdf to xls converter; can't get it to work
Just subscribed to pdf to xls converter but cannot use it. Just keep getting the log in page
HI,
Thank you for your subscription.
Please try to log in at https://cloud.acrobat.com with your Adobe ID and password and let me know if you still cannot log in.
Thank you.
Hisami -
How to edit a Animated Gif file and convert to SWF
I am using the creative cloud with fireworks. I chose the free trial with buying in mind if I saw it work properly. I simply want to upload an animated GIF file and then download it as a SWF file. I saw someone on youtube do this and it's not that if I get on the correct page I would not know how to do that but I just cannot find how to get the GIF into the software to edit. It has just simply put them in the creative cloud folder which can open them on IE> How do i make it available to edit and convert to SWF please? Thanks in advance.
You will likely get better program help in a program forum
The Cloud forum is not about using individual programs
The Cloud forum is about the Cloud as a delivery & install process
If you will start at the Forums Index https://forums.adobe.com/welcome
You will be able to select a forum for the specific Adobe product(s) you use
Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll
Maybe you are looking for
-
"Buy" function no longer works in Itunes Store
I have iTunes 10.7 on two different computers, and I am no longer able to "Buy" songs from the iTunes Store as of 2OCT. I am able to buy songs via my iPhone 5. The OS on my MacAir is 10.8.5 and on my iMac desktop is 10.6.8. Not sure what has been
-
How to gain full access to an external HD
I'm new to mac. My external HD is read only. How can I be able to add/delete files on it?
-
Need help with slideshow widget appearing online
Hey out there a big thanks in advance for this. I have slideshow widgets set up for my artwork and graphics pages on my website and they were working fine before the last Muse update. I then went into Muse to add more images to said slideshows and e
-
SQL Server and Database Sequence
I am trying to use the Database Adapter to insert rows into a SQL Server table and have followed the directions in the other post on this topic. Those directions are specific to inserting into an Oracle Database. If I don't insert the <sequence-numbe
-
EP 6.0 SP2 P4 J2EE Cluster - 503! - Initialization of Dispatcher failed
Hello, I have the following problem: SAP EP-Version: J2EE Cluster with SAP EP 6.0 SP2 Patch 4 and J2EE PL23 After the Installation on the second Clusternode, -> "Additional SAP J2EE System for a portal Cluster" I get after the call of the URL: "http: