• Home
  • About me
  • FALV
  • ALV Grid in the nutshell
    • Basic Information
    • Field catalog
  • Articles
    • Tricks
    • FALV (Fast ALV Grid)
    • ALV Grid in the nutshell
    • Tips
    • How to...
    • For beginners
    • Thoughts
  • By Topic
    • ALV
    • ALV OO
    • SALV
    • GOS
    • Selection screen
    • Purchase Requisitions
    • Purchase Orders
    • Attachments
    • Others
    • Characteristics
    • Sample Programs
    • ZIP
    • OLE
    • Mails
    • Routings
    • EWB
    • Excel
  • Keywords
  • RSS
  • Download
  • Home
  • Articles
  • How to...

Downloading Exchange Rates from Central Bank of Turkey

Details
Łukasz Pęgiel
How to...
06 April 2020
Hits: 11507
Tags: BAPI_EXCHANGERATE_CREATE , CL_HTTP_CLIENT , CALL TRANSFORMATION

One of the standard requests that comes with every SAP implementation is automatic download of exchange rates to your system. Today I will show you on an example of Central Bank Of Turkey, how to transform XML from bank site into internal table, which can be then used inside your code to populate values of  BAPI_EXCHANGERATE_CREATE FM.

There are few ways to download the XML to your ABAP code, I prefer to create an RFC destination (lets call it here Z_DESTINATION_TO_TCMB), as on many servers you need to provide credentials for PROXY and it is safer to keep it saved inside RFC destination, than in your ABAP code in plain text.

So lets assume you have an RFC destination that points to https://tcmb.gov.tr/kurlar/today.xml. It will look like this:

Add a comment
Read more ...

Downloading Exchange Rates from NBP (National Bank of Poland)

Details
Łukasz Pęgiel
How to...
06 April 2020
Hits: 9927
Tags: BAPI_EXCHANGERATE_CREATE , CL_HTTP_CLIENT , CALL TRANSFORMATION

Following the example of downloading exchange rates from Central Bank Of Turkey using transformations, please find bellow the same way for National Bank of Poland.

Again, lets create an RFC destination (lets call it here Z_DESTINATION_TO_NBP) tha will point to https://www.nbp.pl/kursy/xml/lasta.xml, where the last exchange rates are posted.

Add a comment
Read more ...

ABAP Extensions - Automatic Logon

Details
Łukasz Pęgiel
How to...
04 January 2020
Hits: 20404
Tags: ECLIPSE , ADT , PLUGIN , ABAP EXTENSIONS , AUTOMATIC LOGON

Yesterday I've announced that I'm working on automatic logon to SAP systems on Eclipse. Today the changes in the plugin ABAP Extensions for Eclipse are published and you can use the first version of the automatic logon on your installations.

 

ABAP Extensions plugin you can find in Eclipse Marketplace or by doing direct installation from this link http://abapblog.com/eclipse/plugin/ABAPFavorites/ or by using the install button which you can find on the right side of this page.

 

After installation of update will be able to set the preference if you want to do automatic logon at start of Eclipse and if you want to logon automatically only to the systems, for which you have stored the password already. These are also default settings for the plugin. The logon happens in the background job. So if you have several systems in your workspace, it will take a while to logon to all the systems. The progress you can follow in the Progress View.

 

Add a comment
Read more ...

ZCL_CMD_CUSTOMER -> Wrapper for CMD_EI_API classes

Details
Łukasz Pęgiel
How to...
06 June 2019
Hits: 23024
Tags: CMD_EI_API , CMD_EI_API_EXTRACT , ZCL_CMD_CUSTOMER

If you know CMD_EI_API class, you are aware of its power. It's very helpful for the manipulation of customer master data, all master data including contacts. I have played with this class many times and although I got use to the structure of it, I thought one day that it would be handy to have a wrapper or framework to use it. So I've started to build it.

As a result I have now more handy (but not perfect) class to handle the creation or update of customer master data with CMD_EI_API=>MAINTAIN_BAPI method.

The whole source code is available as current version on Github, from where you can instal this class (and all supporting ones) with abapGit https://github.com/fidley/Customers. 

As there is no much documentation about this class yet, I will extend this article in future with more details, for now just the basics information how to start with it. 

Add a comment
Read more ...

SAP Fiori - HTTP request failed403,,CSRF token validation failed

Details
Łukasz Pęgiel
How to...
06 June 2019
Hits: 14478
Tags: FIORI , CSRF Token , SAP WebIDE

I've started some time ago a journey with SAP Fiori and first Fiori apps. It was not that smooth as I've expected, but now with experience received during that period I feel more and more comfortable with it. That's why when I've heard that I need to create an simple app in Fiori to create new incident in our helpdesk system. 

 

Normally it looks very simple both from backend and UI point of view, but the issue was that I had to make the possible to use the app without the logon to SAP.

SSO is not possible yet in my company so I've setup the SICF node of the application to use specific credentials for logon, and here the surprise started :) 

 HTTP request failed403,,CSRF token validation failed error appear when I was calling oModel.create method......

Add a comment
Read more ...

Speed-up your Eclipse installation

Details
Łukasz Pęgiel
How to...
15 November 2018
Hits: 9863
Tags: ECLIPSE , ADT , ABAP IN ECLIPSE

I was many times disappointed about the time Eclipse needs to start, but I thought that's the way it should be, especially that my previous PCs were not the fastest one and with small amount of RAM-memory. I was cleaning the installations each time I was installing new version of IDE by removing not needed plug-ins, especially that I'm working in Eclipse mainly with ABAP and ADT tools. But even if the installation looks quite clean, still on my new PC which has lots of RAM and very nice processor the starting time of Eclipse was horrible. Also sometimes I've felt that the performance of the editor is not the best ( even if the connection to SAP backend was fast).

Add a comment
Read more ...

Creating ABAP type definition from JSON structure (JSON2ABAPtype)

Details
Łukasz Pęgiel
How to...
20 August 2018
Hits: 30993
Tags: /UI2/CL_JSON , JSON , JSON2ABAPtype

I'm playing lately with TFS web services in ABAP and as I'm lazy guy I wanted to make my life a bit easier while working with the JSON results.

There is already a nice class /UI2/CL_JSON available which can deserialize JSON and also it can generate a dynamic structure from JSON file but at the end to make programming easier you need to create local or global structure that will be matching the structure of JSON. 

Instead of spending time on creating manually all needed types, I've decided to create a small report that will do the work for me. Once done it will serve for long time.

The prerequisites for this program is to have class /UI2/CL_JSON in latest version that have a method GENERATE in the first place. On the server in which I was developing this program I had to implement two SAPNotes (2526405 ,2629179) in order to get correct results from the mentioned method. Once done the rest was quite easy.

 

Add a comment
Read more ...

Retro ASCII symbols in ALV Grid table

Details
Łukasz Pęgiel
How to...
03 June 2018
Hits: 8762
Tags: CL_GUI_ALV_GRID , CL_GUI_DOCKING_CONTAINER , SYM

The ALV Grid hides inside itself possibility to use ASCII symbols. All you need to do is to mark the one of fields in field-catalog as symbol and then use constants defined in TYPE-POOL SYM in order to display one of them. The image bellow shows few of them, of course they are not that nice like the ICONS, there is also not many of them, but it's good to know that such symbols exists, although I so far I've not used them at work.

Add a comment
Read more ...

More Articles ...

  1. ABAP Favorites Eclipse plugin
  2. Speed up your coding with ABAP in Eclipse (SITWRO 2017 session)
  3. A new hope for dark side with Darkest Dark Theme for Eclipse
  4. Copying is not poss.because an entry is missing in Table TVCPL VL473
  5. How to copy BOM using CEWB Function Modules
  6. Direct access quality notification attachments from action box
  7. AiE (ADT) dark theme settings
  8. Create fieldcatalog from internal table
  9. Battleships game (two players)
  10. Popup with multi-select ALV
  11. EWB Components allocation to routing operation (multilevel BOM)
  12. Reset rejection of Purchase Requisition
  13. Other checks on purchase requisition state
  14. How to check if for purchase requisition rejection can be reset?
  15. Characteristic's own input screen - Part 8 - example of use
  16. Characteristic's own input screen - Part 7 - save characteristic value to database
  17. Characteristic's own input screen - Part 6 - move reference data to bapi structures
  18. Characteristic's own input screen - Part 5 - show characteristic's own update screen
  19. Characteristic's own input screen - Part 4 - Move screen values to reference data
  20. Characteristic's own input screen - Part 3 - Move reference data values to screen
  21. Characteristic's own input screen - Part 2 - Clear Initial Line
  22. Characteristic's own input screen - Part 1 - Convert Values To Float
  23. Scan program for authority-check
  24. Call standard F4 search help with customized parameters
  25. Classifications - Part 4 - example of use
  26. Classifications - Part 3 - get all objects assigned to class
  27. Classifications - Part 2 - Get Object Details
  28. Classifications - Part 1 - prepare structure for class data
  29. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  30. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 2 - Customization
  31. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 1 - Chart Designer
  32. Load variant to single subscreen (selection screen)
  33. F4 Help for external date
  34. Save variant for single selection screen subscreen
  35. Delete Routing - piece of cake
  36. Creating editor for dynamic code (SE38 like)
  37. Download CV01N/2N/3N documents to PC
  38. ZIP a file using ABAP
  39. Get filename and extension from full path
  40. Convert date to and from external date type
Page 1 of 6
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • End


Łukasz Pęgiel
LVC TRANSFER FROM SLIS FALV INTLEN FCAT SLICENSE Keywords ABAP in Eclipse - Install ALV Grid in the nutshell ALV GRID REFRESH TABLE DISPLAY ESRUO GUI ALV GRID BAPI CHARACT GETDETAIL ABAP ELEMDESCR DELETE USER OBJECTS Field catalog - qfieldname SAPGUI SET FUNCTIONCODE IXML ENCODING MB51 ENHANCEMENT FILL MDLB EBAN FIELDCATALOG SELECTOPTIONS SALV AGGREGATIONS TVCPLAK MEPO DOCUMENT FRONTEND SERVICES EXECUTE ESDUS Field catalog - ifieldname Field catalog - reptext Heading SCMS STRING XSTRING Other checks on purchase requisition state ZDEMO FALV12 - Error log LOOP AT SCREEN REDISPATCH Field catalog - edit mask HTML VIEWER BCS CONVERT Reset rejection of Purchase Requisition REPTEXT CSRF token validation failed ZIP a file using ABAP ALV GRID IN THE NUTSHELL Enhanced MB51 Part 1 - Goal and prerequisites Field catalog - col pos ISOLATE SELSCREEN COMPONENTS MAINTAIN STARTING NEW TASK ABAP Code Retreat HOTSPOT CTMS DDB VAL OBJECT CREATE COM GUI HTML EDITOR RESET REJ ALLOWED TABLEDESCR COVEXT Field catalog - no out PRAGMA MB51 FALV09 - Cell settings BINARY ALV POPUP RELEASABLE
  • Laserowe usuwanie blizn Tychy
  • Laserowe usuwanie zmarszczek Tychy
  • Salon Kosmetyczny Tychy
  • Trycholog Tychy
  • Wypadanie włosów Tychy
Tweets by abapblog

Eclipse Plugins for ABAP

ABAP Favorites

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP ADT Extensions

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP Quick Fixes

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

 

Latest Articles

  • ABAP in Eclipse - Install, Configure, Use, and Enhance Your ADT
  • ALV Grid in the nutshell: Field catalog - col_id - ALV control: Column ID
  • ALV Grid in the nutshell: Field catalog - dfieldname – Fieldname for column group
  • ALV Grid in the nutshell: Field catalog - Hotspot - ALV control: SingleClick-sensitive
  • ALV Grid in the nutshell: Field catalog - sp_group - Group key
  • ALV Grid in the nutshell: Field catalog - domname - Domain name
  • ALV Grid in the nutshell: Field catalog - reprep - ALV control: Value is selection criterion for rep./rep.intf.
  • ALV Grid in the nutshell: Field catalog - reptext – Heading
  • ALV Grid in the nutshell: Field catalog - lowercase - Lowercase letters allowed/not allowed
  • ALV Grid in the nutshell: Field catalog - intlen - Internal Length in Bytes
  • Downloading Exchange Rates from NBP (National Bank of Poland)
  • Downloading Exchange Rates from Central Bank of Turkey
  • ABAP Extensions - Automatic Logon
  • ALV Grid in the nutshell: Field catalog - inttype - ABAP data type (C,D,N,...)
  • ALV Grid in the nutshell: Field catalog - datatype

Most Read

  • Create XLSX/MHTML file from internal table in background
  • Refresh ALV GRID and keep position and current cell
  • Create XLSX file from internal table in background v2
  • FALV (Fast ALV Grid)
  • ATC Pseudo Comments list
  • Call standard F4 search help with customized parameters
  • Dynamic GUI STATUS & TITLE with ABAP code
  • Create fieldcatalog from internal table
  • Link Attachments of Purchase Requisition to Purchase Order
  • GOS - How to add business documents at creation of object
  • Endless loop in BADI ME_PROCESS_PO_CUST
  • Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  • How to access private or protected data and methods of CL_GUI_ALV_GRID
  • Subtotal lines of ALV GRID OO as content separator
  • Popup with multi-select ALV
feed-image Feed Entries

Latest Comments

ABAP code and articles provided on http://abapblog.com, if it is not statet otherwise, were created by Łukasz Pęgiel. You can use the code in your SAP instance for commercial and non-commercial use without any warranty from side of the author. You cannot sell the code as a full program or a part of it.
Replicating of the articles and code is prohibited unless the agreement of the author is given to you. 

Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.