• 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

ZIP a file using ABAP

Details
Łukasz Pęgiel
How to...
13 April 2013
Hits: 28781
Tags: CL_BCS_CONVERT , CL_ABAP_ZIP , SCMS_STRING_TO_XSTRING

Although our connections are now so fast we may still need sometimes to compress data before attaching to mail or downloading into PC. SAP has possibilities to ZIP the content in class CL_ABAP_ZIP and I've used this class to create a method to simplify the process of zipping.

First of all class CL_ABAP_ZIP is zipping xstrings so I'll provide you the possibility to pass not only xstring variables but also a string, soli_tab or solix_tab. These are commonly used type when coding files content.

Add a comment
Read more ...

Get filename and extension from full path

Details
Łukasz Pęgiel
How to...
13 April 2013
Hits: 36207
Tags: FILENAME , EXTENSION

I guess all of us often had to work with files in ABAP usign some of available FM like 'GUI_UPLOAD', 'GUI_DOWNLOAD' etc. When doing so sometimes there is a need to display in ALV the filename with or without extension . There are plenty of FM that helps to do so but the have one disadvantage -> they base on 3 digit extension and sometimes they have limited path size.

But where stadard SAP cannot help you, then you have to helpyourself with ABAP. There is a really simple way to split filename/extension without any restrictions known from standard FM. Here is a code for a method, but you can use it also to create form or FM. 

Add a comment
Read more ...

Link Attachments of Purchase Requisition to Purchase Order

Details
Łukasz Pęgiel
Tricks
12 April 2013
Hits: 63141
Tags: CL_BINARY_RELATION=>READ_LINKS_OF_BINRELS , BINARY_RELATION_CREATE_COMMIT , BINARY_RELATION_CREATE

If during creation of purchase requisition you've attached some documents into requisition and you convert requisition to purchase order then the attachments aren't copy to PO. But you can do it either by daily job or by the implementation of user-exit if you know how to link GOS object to PO. I faced a request to copy attachments from PR to PO, but what I did was in fact just linking existing attachment to PO. In that way you do not double the same content on server. Bellow you can find the code of an function module which uses 'BINARY_RELATION_CREATE' and 'BINARY_RELATION_CREATE_COMMIT'.

  • Importing

I_EBELN TYPE EBELN -> Purchase Order number
I_COMMIT TYPE C     -> Do you want to do the commit?

  • Tables

T_EBAN STRUCTURE EBAN  -> Table with PR lines to check GOS relations

  • Exceptions

BINARY_RELATION_CREATE_ERROR

Add a comment
Read more ...

Convert date to and from external date type

Details
Łukasz Pęgiel
How to...
11 April 2013
Hits: 16927
Tags: PERIOD_AND_DATE_CONVERT_OUTPUT , PERIOD_AND_DATE_CONVERT_INPUT

You've seen many times that in standard SAP transactions the dates can be presented in days, weeks and months although in database it's saved as normal DATS type. For sure in same table you can find the field called "External date type" which is used to convert standard date to external one. If you're designing a program in which you want to use same functionallity then FM 'PERIOD_AND_DATE_CONVERT_OUTPUT' and 'PERIOD_AND_DATE_CONVERT_INPUT' comes with a help.

Add a comment
Read more ...

Free global data of a program at once

Details
Łukasz Pęgiel
Tricks
10 April 2013
Hits: 19918
Tags: RS_PROGRAM_INDEX , SCAN ABAP-SOURCE

At the very begining when I started to develop in ABAP I was wondering why I cannot clear all global data at once after I do all my calculations? As this is something that it's very useful when you create a report which just show some figures and you don't need anymore all the internal tables or objects that you used to prepare output table. So to free memory then just before calling ALV I was always refreshing all tables and clearing work areas, but this was something that had to be done manually so I was a little bit angry that I cannot automize it... and then I started to look for the way how to automize it.

I knew that SE80 is displaying all globals but I couldn't find how it's done there. As you may know debuggin the code which was done by SAP is creepy usually and after spending some hours on that I gave up. But it returned someday I just simply saw FM 'RS_PROGRAM_INDEX' and that was enough to create fast a method to free all global data for me. 

So let's start with definition. We will need a range type which we will use to call the method with objects to be excluded from clearing (like ALV output table or ALV objects)

Add a comment
Read more ...
Page 11 of 11
  • Start
  • Prev
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • Next
  • End


Łukasz Pęgiel
DARK THEME BAPI EXCHANGERATE CREATE FIELDCATALOG LOOP KEY SEL ALV GRID IN THE NUTSHELL MSC7 GUI ALV GRID ALV Grid in the nutshell Field catalog - rollname FRIEND ESDUS MEREQ GET FACTORY Classifications - Part 4 - example of use ALV GRID CHAR VALUE CHANGE2 RSFUNC TXT FALV SELTEXT Download CV01N 3N documents to PC CVAPI DOC CHECKOUTVIEW SAVE USER OBJECTS MS07 HTTP CLIENT TOOLTIP ROUND Field catalog - icon Use Reset rejection of Purchase Requisition REFRESH FROM SELECTOPTIONS OUT SMP DYNTXT SET SELECTED ROWS LVC FCAT CLASS READ CTMS DDB INTERNAL GLOBALS SLVC FULLSCR RM07DOCS SAPGUI PROGRESS INDICATOR OUTB DELIVERY CREATENOREF CALL TRANSFORMATION PARAMETERS ADT SETTINGS LOWER CASE ABAP GUI STATUS TRANSFER SLIS Range to search in lower case fields ZDEMO COMPONENTS CHECKBOX UPPER CASE MAINTAIN DELETE FUNCTIONCODE REDISPATCH READY FOR INPUT ROLLNAME Field catalog - key sel MAT BOM COPY PURCHASE ORDER
  • 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.