‎2009 Apr 13 10:39 AM
Hi all,
I have developed a BDC program to upload data into MIGO transaction. Now, I will be uploading date (from excel sheet) into the transaction. I want to validate this date just like how it is done in the screen.
For example, in screen, if the user enters 010109, after pressing enter key the date will be converted as 01.01.2009.
How can I achieve this?
Thanks,
Rajan
‎2009 Apr 13 10:43 AM
Hi,
You need to fix the date format before you upload the data using BDC. Before it is tedious to validate the date entered in the file. There are lot many probabilites needs to be checked.
The best way is to fix the format in the file and code for the same and maintain the documentation for this.
‎2009 Apr 13 10:43 AM
Hi,
You need to fix the date format before you upload the data using BDC. Before it is tedious to validate the date entered in the file. There are lot many probabilites needs to be checked.
The best way is to fix the format in the file and code for the same and maintain the documentation for this.
‎2009 Apr 13 10:44 AM
‎2009 Apr 13 10:44 AM
dear ,
take the parameter of the internal table as SY-DATUM and then take the excel data and pass it .
and also if u will pass this directly this should not gice error
thanks ankit
‎2009 Apr 13 10:44 AM
Hi, You can convert it using Date function modules and upload it to BDC. You need to use the FM for every line item exactly before entering date value or,
while recording MIGO transaction, after you enter the date say, 01012009 press enter, and the date will be automatically converted to 01.01.2009. Thereby this enter will be captured in BDC recording. when you run it through program, as you update the date, enter command will perfrom and the date will be automatically converted to the required format. You dont need to do anything apart from recording the enter code.
‎2009 Apr 13 10:45 AM
chk this FM
HRGPBS_HESA_DATE_FORMAT
DATE_CONV_EXT_TO_INT
http://www.sapfans.com/forums/viewtopic.php?f=13&t=280238
http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm
Regards,
Anil N.
‎2009 Apr 13 10:45 AM
Hi,
You can use Below FM :
CONVERT_DATE_TO_INTERNAL
This FM will convert date as internal format,i mean depends on user profile.
Regards,
Omkaram.
‎2009 Apr 13 10:49 AM
Hi Rajan,
First you convert the date from excel to SAP internal format i.e. YYYYMMDD and then use WRITE TO statement to get user default format(Like 13.04.2009).
Regards,
Raju.
‎2009 Apr 13 10:50 AM
Hi,
Try using Function Module:
CONVERT_DATE_TO_INTERNAL ,
this will convert your date into sap's
internal date format.
Hope it helps
Regards
Mansi
‎2009 Apr 13 11:25 AM
Hi all,
If the user enters date like this 1/2/09 (using slash) or 1:02:09 (using colon or semi colon) or if there is any typographical error, the program has to pick the value correctly.
is it possible to perform validation for all these cases? is there any FMs for this..?
Thanks,
Rajan
‎2009 Oct 19 10:10 AM
‎2011 Apr 29 5:32 AM
can u tell me rajan how did you solved this problem , coz i am facing same problem .
i have excel sheet in which date format is 20100405 means yearmonthday
and i want it to be 05.04.2010.
i have used fm convert_date_sap_internal
but it is converting date 05.04.1020 format . can u tell me what could be probable reason . it would be very nice of you .