• 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

A new hope for dark side with Darkest Dark Theme for Eclipse

Details
Łukasz Pęgiel
How to...
27 February 2017
Hits: 17132
Tags: ECLIPSE , AiE , DARK THEME , ABAP IN ECLIPSE , ADT , ABAP DEVELOPMENTS TOOLS , SAP DEVELOPMENT TOOLS FOR ECLIPSE , DARKEST DARK THEME

Dark theme is available in Eclipse since a long time, but there were many problems with easy setting of all colors in editors, windows and popups.

Sometimes you had to even adjust your system settings to be able to adjust some colors.

This discouraged many persons to switch to the dark side of eclipse.

But now there is a new hope for it! 

Darkest Dark Theme by Genuitec which can be found in eclipse marketplace hits the spot here. It's not only changing the background colors of editors and windows, but it's adjusting the color settings for fonts, it changes a lot of standard icons and the display of many elements of eclipse.

Personally I didn't like the color settings for ABAP, so I've used my old files which you can find in this article AiE (ADT) dark theme settings, but this is my personal opinion, so for you the default settings may looks ok. There is also one big added value for Darkest Dark Theme: during installation you get also icon editor which can be used to customise all icons in eclipse! Your changes after synchronisation with Genuitec accounts can be used as a default settings for Darkest Dark theme (of course they must be accepted by moderator firstly).

So how does it looks like now?

You'll spot the change directly on logon screen, where there is no white/grey background places anymore.

Add a comment
Read more ...

Copying is not poss.because an entry is missing in Table TVCPL VL473

Details
Łukasz Pęgiel
How to...
15 February 2017
Hits: 28126
Tags: BAPI_OUTB_DELIVERY_CREATENOREF , VL473 , TVCPL , V_TVCPLAK , V_TVCPLAP

This time the problem which I solved was not an ABAP problem, although at the beginning I thought it is, as while creating of deliveries without reference in standard transaction were done correctly without any issues, then when I tried to do it in ABAP, I always received the error VL473 - Copying is not poss.because an entry is missing in Table TVCPL. 

I thought that this is some kind of nonsense as with standard t-code it was working correctly, so I tried several FM to create deliveries without reference but always with the same result as you can see on picture bellow. 

Then I did what I should do from beginning. I used where used function to display where TVCPL table is used and I found two views V_TVCPLAK and V_TVCPLAP.

Add a comment
Read more ...

Re-explode or delete purchase order line subcontracting BOM

Details
Łukasz Pęgiel
Tricks
04 February 2017
Hits: 14912
Tags: ME_COMPONENTS_MAINTAIN , ME_COMPONENTS_UPDATE_PREPARE , CL_PO_HEADER_HANDLE_MM , IF_PURCHASE_ORDER_MM , ME_COMPONENTS_REFRESH , MEREQS_EBAN_LOOKUP , ME_COMP_REQUIREMENT_DATE
To continue previous two posts about re-exploding and deleting subcontracting BOM of purchase requisition item, let me describe you how to do the same thing with subcontracting BOM of purchase order line.
 
The main part is again to use FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE , but this time there is no easy way to fill MDPA and MDLB structures which are needed here.
So I had to use CL_PO_HEADER_HANDLE_MM and IF_PURCHASE_ORDER_MM to fetch all data from purchase order and to move them to MDPA and MDLB structures. Once it was ready the rest was peanuts and I could get rid of using this two buttons :-)
 
 
Add a comment
Read more ...

Deletion of subcontracting BOM in Purchase Requisition

Details
Łukasz Pęgiel
Tricks
03 February 2017
Hits: 9727
Tags: ME_COMPONENTS_UPDATE_PREPARE , ME_COMPONENTS_MAINTAIN , IF_PURCHASE_REQUISITION , IF_BOM_MM , ME_COMPONENTS_REFRESH , ME_FILL_MDPA_FROM_EBAN , ME_FILL_MDLB_FROM_EBAN , CL_MESSAGE_HANDLER_MM
In previous post I've shown how to re-explode subcontracting components of purchase requisition using FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE . Using very similar code you can delete completly it's BOM. 
 
You may wonder why would need to delete subcontracting BOM? This is not possible in standard transaction ME52N and in most cases it makes no sense to have the subcontracting item without BOM. But in the case that you don't want that components are taken into consideration by MRP until you really need this then it could be helpful.
 
The code is 99% same like during the re-exploding the BOM, the difference is that FM ME_COMPONENTS_MAINTAIN is called with parameter i_vorga = 'D'  and message check at the end is bit different.
Add a comment
Read more ...

Re-explosion of subcontracting BOM in Purchase Requisition

Details
Łukasz Pęgiel
Tricks
02 February 2017
Hits: 14197
Tags: ME_COMPONENTS_UPDATE_PREPARE , ME_COMPONENTS_MAINTAIN , IF_PURCHASE_REQUISITION , IF_BOM_MM , ME_COMPONENTS_REFRESH , ME_FILL_MDPA_FROM_EBAN , ME_FILL_MDLB_FROM_EBAN , CL_MESSAGE_HANDLER_MM
I faced lately a small issue in one of the process in our company, I needed to re-explode the BOM of subcontracting item in purchase requisition. Normally users goes to ME52N and press "Explode BOM" button, but I needed to do this from ABAP side. 
 
I started with IF_PURCHASE_REQUISITION but although there is a method "explode_bom" for item, then it was calling the screen with the results instead of selecting and updating components in the database. IF_BOM_MM didn't helped as well.
 
I started to dig in the standard transactions and local classes of ME52N and finally I have figure out how to do this in backgroud. The solution was to run FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE in correct way together with message handler to not interrupt whole process.
Add a comment
Read more ...

#SAPTechEd 2016 Barcelona

Details
Łukasz Pęgiel
Thoughts
10 November 2016
Hits: 6769
Tags: SAP TechEd , SAP TechEd 2016 , TechEd
Hola!
although I'm still in Barcelona and the event just finished, I'd like to share with you some first thoughts I have about SAP TechEd 2016 event.
 
 
Add a comment
Read more ...

SAP TechEd Developer Hero 2016

Details
Łukasz Pęgiel
Thoughts
09 October 2016
Hits: 7916
This year in July I received an email from SAP Developer Relation team that I was nominate for one of thirty SAP TechEd Developer Heroes 2016.
 
This was quite unsuspected but at the same time very pleasure information. I was nominated for Contributing to ABAP and OS projects, I guess because of FALV project ( my part in abap2xlsx is too small ). To be honest there are many other developers who should get the Developer Hero title and I hope they will do next year, just don't be afraid to vote for them ( I'll not ).
 
Add a comment
Read more ...

How to handle CL_GUI_ALV_GRID events in SALV

Details
Łukasz Pęgiel
Tricks
09 October 2016
Hits: 48861
Tags: CL_GUI_ALV_GRID , CL_SALV_TABLE , IF_ALV_RM_GRID_FRIEND
If you follow my blog, then you probably noticed that I'm not keen of SALV class, as it's not editable and you cannot handle all events that you can in cl_gui_alv_grid class. With a small trick you can make your SALV editable and you can handle all the events you want from underlying cl_gui_alv_grid object.
 
What you need to do, is to set handler for event after_refresh for all instances of cl_gui_alv_grid and to force refreshing of SALV just after creation of the object.  Then inside the handler for after_refresh event you can set up handlers for other events just for current instance and you can modify layout or field catalog settings to make it editable.
 
Please check following code to see example of usage:
Add a comment
Read more ...

Why I like to code in ABAP in Eclipse

Details
Łukasz Pęgiel
Thoughts
27 May 2016
Hits: 28471
Tags: ADT , ABAP in Eclipse , AiE
Why I like to code ABAP in Eclipse?
 
 
 
 
I was receiving this question very often in the past, but I really thought that most of the developers who can use AiE, are using it. But seems that I was wrong. Still a lot of you use SE80. I don’t mind it, I also use it myself in some circumstances, but sooner or later you’ll need to switch to AiE, for example when you work with HANA.
That’s why I’ve decided to write about why I use AiE. What I like in it and what I dislike. AiE is not perfect (yet) but there are some advantages which you should consider.
 

1.       My first touch with ABAP in Eclipse

 
It was not the love from the first sight. Although I liked very much the idea of using Eclipse for developing in ABAP. When I’ve read about it, I said – “Finally, a proper development environment for ABAP”. But the reality at least for me was not that bright at the moment. Eclipse was working quite slow at the time or at least at the system installation I was using. I’ve been trying Eclipse Juno at that time, and after 2-3 days I gave up.
 

2.       Return


I’ve return to Eclipse after month or two, when Kepler release was out together with new version of AiE. I’ve said at the time: “I’ll try to work with Eclipse for one month, if it will not convince me, then I’ll not try it at least to the next Eclipse version (they appear regularly each year)”.
But after one week of working with Eclipse and ABAP OO, I was sure that this is the correct way of working, although there were still some improvements to do.
 

3.       AiE Support and development


Before I will write about the tool itself, I’d like to mention whole AiE development team with Thomas Fiedler on the top of it. Whole team is doing really good job and they are really open on all suggestions and remarks. It happened not once that after a suggestion on SCN or Twitter some new option was added. And when you face a bug in Eclipse, they are also there to help and solve the issue.
 
Cannot say more than BRAVO!
Add a comment
Read more ...

How to access private or protected data and methods of CL_GUI_ALV_GRID

Details
Łukasz Pęgiel
Tricks
26 May 2016
Hits: 57628
Tags: CL_GUI_ALV_GRID , IF_ALV_RM_GRID_FRIEND , FALV
Please be aware that accessing private or protected data may have unpredictible consequences! Use it at your own risk.
 
From time to time, it happens that you want to access private data or methods from CL_GUI_ALV_GRID, which is normally not possible.
 
When you look into the class definition you'll notice that there is only one global friend - interface IF_ALV_RM_GRID_FRIEND which has no attributes or methods declared. Quite strange, isn't it?
 
 
When you'll search were this interface is used then you'll notice that it's helping to get access to private grid data. So why not to use it the same way?
 
Add a comment
Read more ...

Send mail in BADI or User-Exit without commiting

Details
Łukasz Pęgiel
Tricks
22 February 2016
Hits: 34751
Tags: CL_BCS , CL_BCS_MESSAGE , SBCS_SEND , SBCS_SEND_UPDATE , RSBCS_EXAMPLE_EMAIL , RSBCS_EXAMPLE_EMAIL_SIMPLE
Everybody sends mails from SAP, some are still using old FM SO_NEW_DOCUMENT_ATT_SEND_API1 but some CL_BCS class. This class is really powerful but it has one disadvantage - it does commit work, and not only when sending emails but also during adding of attachments. In this case it's really not safe to use this class in BADIs or User-Exits, but there is one replacement for CL_BCS -> CL_BCS_MESSAGE. This class only collects the data, and when send method is run then calling a FM SBCS_SEND with destination NONE, or SBCS_SEND_UPDATE in update task, depending what attributes are passed to the class. It means you can use it also in BADIs or User-Exits where commits are not welcomed.
 
 
Add a comment
Read more ...

WYSIWYG HTML Editor in ABAP

Details
Łukasz Pęgiel
Tricks
20 January 2016
Hits: 30720
Tags: CL_GUI_HTML_VIEWER , GUI HTML EDITOR , ABAP HTML
I was lately trying to find an HTML WYSIWYG editor for ABAP, but I failed. I though or this was not needed so far, or the solution was not posted anywhere. So I've tried several times and thanks to NICEdit and this tread on SCN I found the way to make HTML WYSIWYG editor for ABAP.
 
My editor use CL_GUI_HTML_VIEWER to display NICEdit in container, and then thanks to POST method I put changes back to SAP. ZCL_HTML_EDITOR class, which is attached to this post, raises an event whenever someone click on save button in the editor, so you can easily handle it and then use new HTML for your purposes. Video bellow shows the demo of usage.
 
 
Add a comment
Read more ...

FALV (Fast ALV Grid)

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
04 January 2016
Hits: 95878
Tags: FALV
 
Finally I've finished to work under FALV. You can find FALV classes in attachment and description under the links. But firstly let's go through few following points:
 
  1. Why I've created FALV although SALV classes are provided by SAP?

    I know SALV classes although I haven't used them often. The main reason was that they don't provide edit mode. So at the end I've always worked with cl_gui_alv_grid class so then whenever users decided that they need one of the field to be editable then I can do it in few seconds/minutes.
     
  2. But there is a way to make SALV editable!

    Yes, I know the solutions of Naimesh Patel (found here) and Paul Hardy (in his ABAP to the Future book) and some other folks to make SALV editable. But In my own opinion, especially when you're at least on 7.40 with SP5 making SALV editable is not needed as you can fast create ALV Grid which does everything you want. To be clear the big advantage of SALV, to call grid output of table in two, three lines when you goes to the code you'll see it's nothing more than call of REUSE_ALV_GRID_DISPLAY... really old FM, which at the end use CL_GUI_ALV_GRID.
     
  3. Direct reasons
     
    As I used CL_GUI_ALV_GRID so often then I came up with an idea to do some class which will make the creation faster, but I never had time to do it at work. You may know it, because of the time pressure you choose to create report/program/solution in the way you're doing from years ... and then comes another task....and another....

    So I've decided to do it at home.... yeah I'm crazy. But at least some of you can also use it.
     
  4. Advantages
     
    • Fast CL_GUI_ALV_GRID creation
    • Replacement of REUSE_ALV_GRID_DISPLAY and REUSE_ALV_GRID_DISPLAY_LVC for a simple editable reports to omit screen creation
    • All events are already handled and with redefinition of method I can faster use it
    • Faster setting of layout and field catalog attributes 
    • Easy switch and copy between popup, full screen and container version
    • Easy toolbar handling (in grid and in full screen/popup using Dynamic GUI STATUS & TITLE with ABAP code )
    • One place to handle user commands of full screen/popup call -> event user_command 
  5. Prerequisites

    I've worked on this on 7.40 SP8 but this should work also on SP5 as well. Sorry for the users bellow that versions but I'm so used to use new syntax that I couldn't force myself to use old way of coding.

    UPDATE: Thanks to Santi Moreno we have now 7.31 version, you can find it here as an attachment ZFALV_V1.1.0.zip. Also GitHub repository is now available here https://github.com/fidley/falv so if you'd like to join us, you're more than welcomed.
     
  6. Outcome
 
The outcome of this work is following:
  • Package ZFALV
    • Classes
      • ZCL_FALV - main class, inheriting from CL_GUI_ALV_GRID
      • ZCL_FALV_LAYOUT - layout class
      • ZCL_FALV_COLUMN - column (fcat) class
      • ZCL_FALV_DYNAMIC_STATUS - dynamic GUI status for full screen display
    • Function Group
      • ZFALV - screens, GUI STATUSES, TITLE, FMs for ZCL_FALV, local classes
    • Demo Programs
      • ZDEMO_FALV01 - FALV: Demo Simple Full Screen Call
      • ZDEMO_FALV02 - FALV: Demo with Redefinitions
      • ZDEMO_FALV03 - FALV: Demo Full Screen GUI Status Dynamic Partly
      • ZDEMO_FALV04 - FALV: Demo Full Screen GUI Status Dynamic Fully
      • ZDEMO_FALV05 - FALV: Demo Full Screen ALV Toolbar
      • ZDEMO_FALV06 - FALV: Demo Full Screen Layout
      • ZDEMO_FALV07 - FALV: Demo Full Screen Columns
      • ZDEMO_FALV08 - FALV: Demo Mass Replace Function
      • ZDEMO_FALV09 - FALV: Demo Cell Settings
      • ZDEMO_FALV10 - FALV: Demo Colors
      • ZDEMO_FALV11 - FALV: Demo Editable
      • ZDEMO_FALV12 - FALV: Demo Error Log
      • ZDEMO_FALV13 - FALV: Mix Demo + own screen and container usage
      • ZDEMO_FALV14 - FALV: Popup calls
 
I really encourage you to try it and give me your feedback about FALV.
 
Cheers
Łukasz
Add a comment
Read more ...

FALV (Fast ALV Grid) - First blood

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
28 December 2015
Hits: 12351
Tags: CL_GUI_ALV_GRID , FALV , REUSE_ALV_GRID_DISPLAY , REUSE_ALV_GRID_DISPLAY_LVC
On one of my last tweets I have mentioned, that I'm working currently on some fast ALV Grid creation class. I know that we have SALV classes which does many of this what I'm trying to achieve here but, many doesn't mean everything. Especially that I really like CL_GUI_ALV_GRID class and this that without any tricks I can make it editable in easy way. 
 
My class in not yet finished but it has already some basic functions available, that's why I'm presenting you just short demo and some screen-shots of the code. I will of course put a nugget here as fast as I'll finish more than alpha release. 
 
Basically what I try to get from this class:
 
  • Fast CL_GUI_ALV_GRID creation
  • Replacement of REUSE_ALV_GRID_DISPLAY and REUSE_ALV_GRID_DISPLAY_LVC for a simple editable reports to omit screen creation
  • All events should be already handled and with redefinition of method I can faster use it
  • Faster setting of layout and field catalog attributes 
  • Easy switch and copy between popup, full screen and container version
  • Easy toolbar handling (in grid and in full screen/popup using Dynamic GUI STATUS & TITLE with ABAP code )
  • One place to handle user commands of full screen/popup call -> event user_command 
 
At the end of the work I'll be able to say: "I've made really good, unnecessary work! " :-)
Add a comment
Read more ...

More Articles ...

  1. How to teach ABAP ???
  2. How to copy BOM using CEWB Function Modules
  3. Direct access quality notification attachments from action box
  4. The SIN of progress indicator
  5. AiE (ADT) dark theme settings
  6. Dynamic GUI STATUS & TITLE with ABAP code
  7. Create fieldcatalog from internal table
  8. CL_PROGRESS_INDICATOR VS direct call of SAPGUI_PROGRESS_INDICATOR
  9. Battleships game (two players)
  10. Popup with multi-select ALV
Page 5 of 11
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
  • End


Łukasz Pęgiel
ALV Grid in the nutshell Field catalog - seltext MS07 PSEUDO COMMENTS CMD API ZCL FALV DYNAMIC STATUS - for full screen or popup ISOLATE SELSCREEN SCMS STRING XSTRING READ USER OBJECTS FREE SESSION CHECK FIELDCATALOG Create fieldcatalog from internal table Classifications - Part 2 - Get Object Details ABAP ELEMDESCR SBCS SEND CTMS DDB SET VAL FROM OBJECT ESRUO GUI ALV GRID SCROLL INFO VIA CHART ENGINE ALV GRID BATTLESHIPS IXML PARSER cookies Retro ASCII symbols in ALV Grid table DOCUMENT TSK UNLOCK JSON2ABAPtype STREAM FACTORY CVAPI DOC GETDETAIL ALV GRID IN THE NUTSHELL SAP DEVELOPMENT TOOLS FOR ECLIPSE ZIP a file using ABAP Create a nice looking chart with CL ENGINE - Part 2 - Customization ROWMARK REFRESH SELECTOPTIONS LVC FCAT ABAP IN ECLIPSE APPEND BINARY STRUCTDESCR ECLIPSE PLUGIN AT SELECTION-SCREEN OUTPUT CVIC MAP CONTACT SYNTAX-CHECK ZDEMO FALV08 - Mass replace function MEREQS EBAN LOOKUP OLE2 DFIELDNANE OUTPUTLEN GROUP ESDUS MB51 ENHANCEMENT LZERO SUM ATC Pseudo Comments list Unlock yourself on the DEV system TOTLINE COC1 FEATURE Field catalog - tabname RELATION GTREAD LINKS
  • 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.