• 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

Get filename and extension from full path

Details
Written by Łukasz Pęgiel
Category: How to...
Published: 13 April 2013
Hits: 19031
5 1 1 1 1 1 Rating 100% (1 Vote)
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
Written by Łukasz Pęgiel
Category: Tricks
Published: 12 April 2013
Hits: 36269
5 1 1 1 1 1 Rating 100% (4 Votes)
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
Written by Łukasz Pęgiel
Category: How to...
Published: 11 April 2013
Hits: 12062
1 1 1 1 1 Rating 0% (0 Votes)
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
Written by Łukasz Pęgiel
Category: Tricks
Published: 10 April 2013
Hits: 13283
5 1 1 1 1 1 Rating 100% (2 Votes)
Attachments:
Access this URL (http://abapblog.com/files/nugg/ZCL_ABAPBLOG_COM.nugg)ZCL_ABAPBLOG_COM.nugg
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
SAPGUI SET FUNCTIONCODE BAPI OBJCL CHANGE ALV GRID IN THE NUTSHELL ALV GRID EMPHASIZE REUSE ALV GRID DISPLAY ABAP DEVELOPMENTS TOOLS VRM VALUES CHECKBOX ALV POPUP ALV Grid in the nutshell Field catalog - sp group - Group key ITM CREATE COPY VARIANT ADT PROVIDE PATH MSC7 PROGRESS INDICATOR VS direct call of SAPGUI INDICATOR SELECTED CELLS LOAD COMPLEX TSK CURRENT CELL VIA RM07DOCS GUI FRONTEND SERVICES EXECUTE UPPER CASE ICON SELECTION-SCREEN FUNCTION KEY LVC FCAT CSRF token validation failed QUANTITY CREATED DELETE MTK ECLIPSE FALV LEARN ABAP ABAP4 CALL TRANSACTION JSON2ABAPtype HTML VIEWER GET DDIC FIELD LIST PURCHASE REQUISITION Dynamic GUI STATUS TITLE with ABAP code GUI TITLE Custom selection-screen fields for MD07 MS07 MB51 ENHANCEMENT SAP TechEd Developer Hero 2016 Field catalog - edit mask SALV TABLE BCS MESSAGE ESDUS OUT BOM COPY CTMS DDB VAL FROM OBJECT FIELDCATALOG Field catalog - checkbox CMD API EXTRACT PRINTOUTS GOS MANAGER DARK THEME
  • Laserowe usuwanie blizn Tychy
  • Laserowe usuwanie zmarszczek Tychy
  • Paznokcie hybrydowe Tychy
  • Paznokcie tytanowe 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

  • 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
  • ALV Grid in the nutshell: Field catalog - rollname

Most Read

  • Create XLSX/MHTML file from internal table in background
  • Refresh ALV GRID and keep position and current cell
  • Call standard F4 search help with customized parameters
  • FALV (Fast ALV Grid)
  • Dynamic GUI STATUS & TITLE with ABAP code
  • Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  • Link Attachments of Purchase Requisition to Purchase Order
  • GOS - How to add business documents at creation of object
  • Subtotal lines of ALV GRID OO as content separator
  • Create fieldcatalog from internal table
  • Endless loop in BADI ME_PROCESS_PO_CUST
  • EWB Components allocation to routing operation (multilevel BOM)
  • Save message with attachment in Outlook's Drafts
  • How to access private or protected data and methods of CL_GUI_ALV_GRID
  • 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.