User’s SAP date format might a problem while using Excel VBA application connected to SAP . If SAP date format is different then Excel default format we will not able to make mathematics operation with dates.
Correct Excel date format is YYYY-MM-DD, but other world regions could have different approach. If Excel format date is YYYY-MM-DD when we downloading SAP data with different date format this is DD.MM.YYYY then Excel will see date as text. In order to check what format is using in SAP, SU3 has to be use.
To use code that has been created by me it is important to turn on SAP id controls in SAP settings. Thanks to this we could use this code or eventually customize it for our needs.
In order to get format date Excel has to be connected to SAP. Please see this post: Connection to SAP HANA via Excel VBA.
Private Sub GetSAP_DateFormat() ' Getting user's SAP date format ' There is need to turn on SAP id controls in SAP settings (manual will be add when get access to SAP) Dim IdDatySAP, TempDateFormat, FormatDatySAP Dim LicznikWierszyLX02 as Long On Error GoTo ErrorHapenned LicznikWierszyLX02 = 1 ' --------------------------------------------------------------------------- ' GETTING DATE FORMAT FROM SU3 Session.FindById("wnd[0]").Maximize Session.FindById("wnd[0]/tbar[0]/okcd").Text = "su3" Session.FindById("wnd[0]").SendVKey 0 Session.FindById("wnd[0]/usr/tabsTABSTRIP1/tabpDEFA").Select TempDateFormat = Session.FindById("wnd[0]/usr/tabsTABSTRIP1/tabpDEFA/ssubMAINAREA:SAPLSUID_MAINTENANCE:1105/cmbSUID_ST_NODE_DEFAULTS-DATFM").Text ' --------------------------------------------------------------------------- ' BACK TO SESSION MANAGER Session.FindById("wnd[0]/tbar[0]/okcd").Text = "/n" Session.FindById("wnd[0]").SendVKey 0 ' --------------------------------------------------------------------------- ' DATE FORMAT (don't have access to SAP now - possible changes required) ' Ustalanie formatu daty FormatDatySAP = Left(TempDateFormat, InStr(1, TempDateFormat, " ") - 1) IdDatySAP = FormatDatySAP ' Get format date - control id elimination 'If FormatDatySAP > 10 Then ' FormatDatySAP = Mid(TempDateFormat, 3, InStr(3, TempDateFormat, " ") - 3) 'End If ' --------------------------------------------------------------------------- ' SAP DATA PROCESSING IN EXCEL ' Here should be pasted code to import and paste SAP data ' --------------------------------------------------------------------------- ' DATE FORMAT EXCHANGE ' Don't have access to SAP, but I think code to change date to proper one should like as follow ' Code is using SAP controls id. ' Instead to use control ID, date format can be used ' Date has been pasted to cell earlier Select Case IdDatySAP Case 1 .Sheets(SheetName).Cells(LicznikWierszyLX02, 13) = Right(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4) & "-" & _ Mid(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4, 2) & "-" & _ Left(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 2) Case 2 .Sheets(SheetName).Cells(LicznikWierszyLX02, 13) = Right(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4) & "-" & _ Left(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 2) & "-" & _ Mid(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4, 2) Case 3 .Sheets(SheetName).Cells(LicznikWierszyLX02, 13) = Right(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4) & "-" & _ Left(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 2) & "-" & _ Mid(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), 4, 2) Case 4 .Sheets(SheetName).Cells(LicznikWierszyLX02, 13) = Replace(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), ".", "-", 1) Case 5 .Sheets(SheetName).Cells(LicznikWierszyLX02, 13) = Replace(.Sheets(SheetName).Cells(LicznikWierszyLX02, 13), "/", "-", 1) Case 6 ' correct format End Select Exit Sub ' ---------------------------------------------------------- ' POSSIBLE ERRORS HANDLING ErrorHapenned: ErrOpis = Err.Description ErrStatus = True ErlLine = Erl End Sub
Pingback: keto meals
Positive site, where did u come up with the information on this posting? I’m pleased I discovered it though, ill be checking back soon to find out what additional posts you include.
Pingback: gay fantasy dating sims
Pingback: aralen cheap
Pingback: latisse buy
Pingback: canadian pharmacies
Pingback: canadian prescription drugstore
Pingback: weruybsd.fireblogz.com39575666four-issues-to-do-immediately-about-online-pharmacies
Pingback: telegra.phHow-Has-The-COVID-19-Pandemic-Changed-Our-Lives-Globally-02-24
Pingback: gerweds.over-blog.com202203modeling-covid-19-mortality-risk-in-toronto-canada-sciencedirect.html
Pingback: canada pharmacies online
Pingback: gwertvb.mystrikingly.com
Pingback: telegra.phIs-It-Safe-To-Lift-COVID-19-Travel-Bans-04-06
Pingback: canadian pharmacies that ship to us
Pingback: https://chubo3.wixsite.com/canadian-pharmacy/post/what-parents-must-find-out-about-kids-and-covid-19
Pingback: canadian-pharmacies0.yolasite.com
Pingback: canada drug pharmacy
Pingback: https://kevasw.webgarden.com/
Pingback: https://62553dced4718.site123.me/
Pingback: seketu.gonevis.comhigh-10-tips-with-order-medicine-online-1
Pingback: site128620615.fo.team
Pingback: canadian pharmacy world
Pingback: hernswe.gonevis.comscientists-model-true-prevalence-of-covid-19-throughout-pandemic
Pingback: selomns.gonevis.coma-modified-age-structured-sir-model-for-covid-19-type-viruses
Pingback: fwervs.gumroad.com
Pingback: buy cialis cheap
Pingback: buy tadalafil no prescription
Pingback: 626106aa4da69.site123.meblognew-step-by-step-roadmap-for-tadalafil-5mg
Pingback: buy generic cialis pills
Pingback: https://hsoybn.estranky.sk/clanky/tadalafil-from-india-vs-brand-cialis---sexual-health.html
Pingback: skuvsbs.gonevis.comwhen-tadalafil-5mg-competitors-is-good
Pingback: hemuyrt.livejournal.com325.html
Pingback: site373681070.fo.team
Pingback: buy cialis usa
Pingback: https://ghswed.wordpress.com/2022/04/27/he-final-word-information-to-online-pharmacies/
Pingback: kerbgsw.mystrikingly.com
Pingback: https://kuebser.estranky.sk/clanky/supereasy-methods-to-study-every-part-about-online-medicine-order-discount.html
Pingback: https://kewertyn.wordpress.com/2022/04/27/expect-more-virtual-house-calls-out-of-your-doctor-thanks-to-telehealth-revolution/
Pingback: kerbiss.wordpress.com2022042714
Pingback: canada pharmacies
Pingback: https://sernert.estranky.sk/clanky/confidential-information-on-online-pharmacies.html
Pingback: https://kertubs.mystrikingly.com/
Pingback: https://626f977eb31c9.site123.me/blog/how-google-is-changing-how-we-approach-online-order-medicine-1
Pingback: https://canadian-pharmaceuticals-online.yolasite.com/
Pingback: https://online-pharmacies0.yolasite.com/
Pingback: https://6270e49a4db60.site123.me/blog/the-untold-secret-to-mastering-aspirin-in-just-7-days-1
Pingback: deiun.flazio.com
Pingback: kertyun.flazio.com
Pingback: https://kerntyas.gonevis.com/the-mafia-guide-to-online-pharmacies/
Pingback: canadian mail order pharmacies
Pingback: nanos.jpjmp?url=cialisonlinei.com
Pingback: ime.nucialisonlinei.com
Pingback: https://womed7.wixsite.com/pharmacy-online/post/new-ideas-into-canada-pharmacies-never-before-revealed
Pingback: canadian pharmacy viagra brand
Pingback: https://sekyuna.gonevis.com/three-step-guidelines-for-online-pharmacies/
Pingback: https://gewrt.usluga.me/
Pingback: canadian pharmacy meds
Pingback: canada medication
Pingback: canadian pharmacy king
Pingback: https://site656670376.fo.team/
Pingback: site561571227.fo.team
Pingback: site102906154.fo.team
Pingback: https://hekluy.ucraft.site/
Pingback: https://kawsear.fwscheckout.com/
Pingback: canada pharmacy
Pingback: list of reputable canadian pharmacies
Pingback: online pharmacy
Pingback: https://avuiom.sellfy.store/
Pingback: pharmacies.bigcartel.com
Pingback: canadian pharmacies online prescriptions
Pingback: canada viagra
Pingback: https://kqwsh.wordpress.com/2022/05/16/what-everybody-else-does-when-it-comes-to-online-pharmacies/
Pingback: http://site592154748.fo.team/
Pingback: lasert.gonevis.comrecommended-canadian-pharmacies-2
Pingback: http://aonubs.website2.me/
Pingback: dkyubn.bizwebs.com
Pingback: asebg.bigcartel.comcanadian-pharmacy
Pingback: canada pharmacies online
Pingback: kertvbs.webgarden.com
Pingback: disvaiza.mystrikingly.com
Pingback: highest rated canadian pharmacies
Pingback: https://kewburet.wordpress.com/2022/04/27/how-to-keep-your-workers-healthy-during-covid-19-health-regulations/
Pingback: https://kaswesa.nethouse.ru/
Pingback: https://628f789e5ce03.site123.me/blog/what-everybody-else-does-when-it-comes-to-canadian-pharmacies
Pingback: canadian-pharmaceutical.webflow.io
Pingback: psy-
Pingback: no 1 canadian pharcharmy online
Pingback: projectio
Pingback: moskva psiholog online
Pingback: slovar po psihoanalizu laplansh
Pingback: psy online
Pingback: pharmacy.prodact.site
Pingback: hub.docker.comrgservpharmacies
Pingback: uels ukrain
Pingback: https://hertb.mystrikingly.com/
Pingback: Canadian Pharmacies Shipping to USA
Pingback: https://selera.mystrikingly.com/
Pingback: ksorvb.estranky.skclankywhy-online-pharmacies-is-good-friend-to-small-business.html
Pingback: https://gevcaf.estranky.cz/clanky/safe-canadian-online-pharmacies.html
Pingback: https://kwersv.proweb.cz/
Pingback: DPTPtNqS
Pingback: qQ8KZZE6
Pingback: D6tuzANh
Pingback: SHKALA TONOV
Pingback: Øêàëà òîíîâ
Pingback: russianmanagement.com
Pingback: chelovek-iz-90-h
Pingback: sdtyli.zombeek.cz
Pingback: kwsde.zombeek.cz
Pingback: 3Hk12Bl
Pingback: 3NOZC44
Pingback: https://heklrs.wordpress.com/2022/06/14/canadian-government-approved-pharmacies/
Pingback: 01211
Pingback: tor-lyubov-i-grom
Pingback: film-tor-2022
Pingback: hd-tor-2022
Pingback: hdorg2.ru
Pingback: iercvsw.wordpress.com20220614canadian-pharmacies-the-fitting-manner
Pingback: JXNhGmmt
Pingback: Psikholog
Pingback: netstate.ru
Pingback: 2painted
Pingback: site955305180.fo.team
Pingback: Link
Pingback: site841934642.fo.team
Pingback: https://62b2f636ecec4.site123.me/blog/canadian-pharmaceuticals-online
Pingback: https://62b2ffff12831.site123.me/blog/canadian-pharmaceuticals-for-usa-sales
Pingback: tor-lyubov-i-grom.ru
Pingback: psy
Pingback: chelovek soznaniye mozg
Pingback: https://thefencefilm.co.uk/community/profile/hswlux/
Pingback: bit.ly
Pingback: https://anewearthmovement.org/community/profile/mefug/
Pingback: drugstore online
Pingback: canadianpharmacy
Pingback: herbsd.iwopop.com
Pingback: cleantalkorg2.ru
Pingback: canadian drugs
Pingback: bucha killings