2021 Jul 19 6:12 AM

as u can see in the above image the posting date and entered at(time) is not proper please help me to correct this.
Hello ,
For the time field try using the WRITE TO options. Also for your time field CPUTM is field length 6. Increase your data type length. Should work fine for you
Regards,
Juby
2021 Jul 19 7:14 AM
There's a bug in your code. Unfortunately, I can't fix it for you because you didn't share it. 😉
2021 Jul 19 7:16 AM
Without knowing how you're loading the data or what the exact data was in Excel nobody will be able to help you.
2021 Jul 19 8:56 AM
data : date type string value '16.07.2021'.
data: posting_date type budat.
posting_date = date.
================================
data : time type string value '11:00:00'.
data : entered_at type cputm.
entered_at = time.
Please help me now
2021 Jul 19 9:51 AM
The column is too narrow for the text to be properly displayed: widen both columns and it will be ok. You could set a minimum width in the catalog, if necessary.
2021 Jul 19 9:58 AM
Try debugging your code and you might find the problem yourself.
2021 Jul 19 11:07 AM
BUDAT is a 8 CHAR field where as DATE is a string with value 10 Char. This assignment is not correct. So correct your code and explain the requirement properly for us to help you out.
2021 Jul 19 11:47 AM
thanks i have made the changes in date by passing it to fm convert_exit_idate_input. now its working properly.
but i am still facing the issue with time .
when i am passing the excel to fm TEXT_CONVERT_XLS_TO_SAP and getting it into internal table .The time column in excel which have value 11:00:00 is showing as 0.45823 in internal table .
i have taken time field as type string in internal table.
Please help brother.
2021 Jul 19 12:22 PM
Hello ,
For the time field try using the WRITE TO options. Also for your time field CPUTM is field length 6. Increase your data type length. Should work fine for you
Regards,
Juby
2021 Jul 19 3:58 PM
So, you are saying that (in duplicate question error in internal table field while getting data from excel using TEXT_CONVERT_XLS_TO_SAP | SAP Comm...😞
2021 Jul 19 4:05 PM
If you declare you time field as type T instead of STRING, it should work, SAP will convert the number 0.45722 (Excel internal value for time 10:58:24) into ABAP time 10:58:24.
2021 Jul 19 5:12 PM
Hi akshayd1998, great! c5e08e0478aa4727abc4482f5be390b2 and aparisius gave you the best answers! God Look!
Best Regards!
Roberto FORTI Santos
IT Engineer Certified (SAP/PYTHON/SAP)
2021 Jul 20 6:53 AM
In your internal table, declare date and time fields respectively as type D and T instead of STRING, TEXT_CONVERT_XLS_TO_SAP will convert Excel internal values into ABAP date and time format.
e.g. for time 10:58:24, Excel internal value is the number 0.45722 (0 means 00:00:00 and 1 means 24:00:00), it will be converted into ABAP time 10:58:24.
For date 22 08 2011, Excel internal value is the number 40777 (number of days since January 1st, 1900), it will be converted into ABAP date 22 08 2011.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |