‎2008 Oct 23 7:36 AM
hello experts,
i have a problem with a logic
here I have to pass the VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU, but here the FKDAT and GDATU are of not the same data type and another specification is that
>GDATU is in the inverted date format i have to convert it to date format but how ? and another problem is even if i convert it , i have one more specification given my functional consultant is that the FKDAT will be in some precise date like ( 23.10.2008) where as the GDATU will be in the starting date of the month like (01.10.2008 means it denotes the whole) , so here i have to make the FKDAT to the starting date of its months but how?.
please kindly help me with some detail explaination , here this is the specification given to me.
"To get the value part
Pass VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU for TCURR-KURST=ZCUS. Get UKURS for corresponding entry in INR"
please kindly explain me with 'for all entries' and the complete logic joining the two tables to achive the specification.
Thanks in advance
.
‎2008 Oct 23 7:50 AM
Hi,
As far as your date probelm is concerned
You can use the FM HR_JP_MONTH_BEGIN_END_DATE
This will provide you with the starting and ending date for the given date,
Hope this helps you out.
Thanks & Regards
‎2008 Oct 23 7:50 AM
Hi,
for date conversion you can take help from this..
CONVERSION_EXIT_PDATE_OUTPUT
Eg: input = 24012008 and output = 24.01.2008
CONVERT_DATE_FORMAT
Eg: input = 20080201 and output = 01.02.2008
CONVERSION_EXIT_SDATE_OUTPUT
Eg: input = 20070201 and output = 01.FEB.2007
CONVERSION_EXIT_IDATE_INPUT
Eg: input = 01.02.2008 and Output = 20080201
CONVERSION_EXIT_LDATE_OUTPUT
Eg: input = 20070301 and output = 01. March 2007
CONVERSION_EXIT_PDATE_OUTPUT
Eg: input = 20070301 and output = 03.01.2007
now to match the data type you can use the function module...
CONVERSION_EXIT_INVDT_INPUT Conversion exit routine for inverted date (INPUT)
CONVERSION_EXIT_INVDT_OUTPUT Conversion exit routine for inverted date (OUTPUT)
Regards,
Arunima
‎2008 Oct 23 7:50 AM
Hi,
As far as your date probelm is concerned
You can use the FM HR_JP_MONTH_BEGIN_END_DATE
This will provide you with the starting and ending date for the given date,
Hope this helps you out.
Thanks & Regards
‎2008 Oct 23 8:40 AM
Hi,
Use the following Logic and compare the fkdate_new with gdatu;
data : fkdate(10) type c,
fkdate_new type d.
fkdate = '23.10.2008'.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_INPUT'
EXPORTING
input = fkdate " 23.10.2008
IMPORTING
OUTPUT = fkdate_new. " will return 20081023
fkdate_new+6(2) = '01'. " will return 20081001 i.e. first Day of the MonthRevert Back if you have doubts.
Regards
Karthik D