mustafayalcin.com

SAP

ABAP System Field SY-DATAR

by Mustafa on Sep.03, 2010, under SAP

The ABAP System Field SY-DATAR is used in processing the input of a classical dynpro screen. Is set to ‘X’ (at PAI) if one or more input field were modified by the user, otherwise empty.

Ideal to check if a screen needs saving before an exit!

Implementation:

- In the PBO (right at the beginning) place the following code

IF sy-datar EQ ‘X’.

save = sy-datar.

ENDIF.

- then when it comes to exiting the screen

IF save EQ ‘X’. (…)

- now you can ask the user if he desires to save etc, just remember to “CLEAR save” whenever there is a reinitialization

should you have a screen that requires a lot of performance when saving, simply integrate sy-datar! Should the user already have saved the screen and then click save again (some users do so to be sure they have saved), you can simply exit the user-command if the global save variable is initial (as long as you also clear it when actually saving).

Comments Off :, , , , more...

Create PD Infotype (PPCI)

by Mustafa on Jul.16, 2010, under SAP

1.SE11′den HRIXXXX (örneğin HRI9001) structure’ını oluşturuyoruz.

2.PPCI transaction koduna giriyoruz.

3.Infotype (örnek :9001) ve Infotype Name (örnek: test infotype) alanlarını dolduruyoruz.

4.F5 (Create) ile devam ediyoruz. Gelen ekranda Infotype Category’de ”Field Infotype” seçip F5 tuşuna basıp infotype’ı oluşturuyoruz.

5.SM31′den T778T tablosuna giriyoruz.

6.Infotype’ımızı bulup “Infotype per object type”  ile girip hangi obje tipine ( O,S ) bağlayacaksak bakımını yapıp kaydediyoruz.

7. PP01 ile girip test yapabiliriz.

http://forums.sdn.sap.com/thread.jspa?threadID=699696

Comments Off :, , , , , , more...

Find Badies

by Mustafa on Jul.06, 2010, under SAP

Set a break point at CL_EXITHANDLER=>GET_INSTANCE.

Arif Arifoglu’ndan :)

Comments Off :, , , , , , more...

ABAP Bitmap Image Processing Class

by Mustafa on Jun.03, 2010, under SAP

Introduction

Last week Alvaro Tejada (Blag) posted a weblog posing the requirement to flip a bitmap using ABAP. Well I got all caught up in the fun challenge and now here are the results for your downloading pleasure.

What Blag wanted to do was simply flip an existing Bitmap that he was reading out of the BDS (Business Document Store).  The problem that he was facing is that there is no easy method for doing this in ABAP. He tried just reversing the Byte Stream, but quickly found out that this corrupted the image.  A bitmap isn’t just stored as a simple data stream – it has header information and a complex structure that must be taken into consideration when doing any manipulations on it.

But many other languages have simple processes for working with Bitmaps – what was wrong with ABAP.  Well these other languages just have libraries that have already been created that abstract the actual process of working with the Bitmap.  These libraries directly expose attributes like the bitmap height and width, so that programmers don’t have to know the detailed structure of the Bitmap header.  They also usually have methods to allow for basic manipulation of the Bitmap.

To my best knowledge, no one in ABAP had created such a library.  So while it was perfectly possible to manipulate the Bitmap at a low level in ABAP, it was more tedious than necessarily because it didn’t have one of these helper libraries.  Historically ABAP has been all about processing business data, so it hasn’t been a big issue that you couldn’t flip bitmaps or convert them to grey scale.  But with ABAP being used increasingly for forms output and web pages, this is functionality that might be useful from time to time.  So I decided to take the rough solution that I built for Blag and turn it into a reusable bitmap class.

Bitmap Processing

Before we get into the actual solution of the ABAP Bitmap Library, I thought I would cover some basics of the processing that is going on within the library.  If you are interested in how Bitmaps are stored and processed then keep reading this section. If you really couldn’t care less and just want to get started using the library, then skip down to the next section (after all the purpose of creating this library was so people wouldn’t have to care how a bitmap works internally).

When I started looking into Blag’s problem, I had no real experience with how bitmaps are structured.  So I started my investigation via the internet.  I found lots of good articles on Bitmaps, but probably the best summary of information I found was on Wikipedia.

The linked Wikipedia article does an excellent job of describing the inner layout of the Bitmap – how you have a section for the header information and then a separate section for the data.  It also describes for each pixel is stored.  The color of the pixel (in 24 bits per pixel) is stored as three separate integers – one each for Red, Green, and Blue.  It is important to understand that you can’t just manipulate data within the Bitmap at the byte level, but instead the pixel level so you can keep from altering the RGB color as you move bytes around.

The second complexity is that bitmaps are not stored top to bottom within the data area.  Instead the first visible row of data on the screen is stored as the list “line” in the bitmap data area.  All the data is also stored together in a single stream. Therefore for easier processing you generally break the stream down by horizontal row. But because processing is easier if divisible by 4, null-bytes are added to the end of the line to pad the file.  All of these aspects are especially important when trying to rotate a bitmap.

The final complexity that I faced in my processing was that much of the data in the bitmap header was stored as either 2 or 4 byte DWORDs. This meant that I couldn’t just cast these byte values into ABAP Integers.  Instead I had to create small macros to change the byte order.

The ABAP Bitmap Library

OK, enough of the deep stuff.  Now it is time to see just how easy we can make working with Bitmaps in ABAP.  For that purpose I have created a Class called ZCL_ABAP_BITMAP.

Devamı : http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7249

Comments Off :, , , more...

Enable password saving in SAPLOGON shortcut

by Mustafa on May.04, 2010, under SAP

Standard SAP GUI doesn’t allows to save password in the shortcuts. This can be achieved by doing these two steps.
1.) Executing sapshcut.exe which normally exists at C:\Program Files\SAP\FrontEnd\SAPgui.
Once this step is done then the variables which needs to be modified in REGEDIT are available for editing.
2.) Go to Command Prompt and type in REGEDIT -> HKEY_CURRENT_USER –> Software –> SAP –> SAPShortcut –> Security, Change the variable Enable Password from O to 1.
 
Comments Off :, , , , , , , , , more...

Four ways to integrate Adobe Flex with SAP Netweaver

by Mustafa on Mar.21, 2010, under SAP

For quite some time now SAP and Adobe has presented different methods and initiatives you could use if you would like to integrate Adobe Flex and SAP Netweaver.  I will try to summarize four different scenarios you could consider.

Using SAP Flash Island scenario

If you are using Netweaver 7.0 EhP1 or 7.1 then you can use the SAP Flash Island framework to integrate Adobe Flex with SAP (read more about SAP Flash Island here). The framework will create a ‘bridge’ between a SAP WebDynpro application and Flex. In order to ‘connect to this bridge/framework’ – you need to use a library from SAP in your Flex project – I have created a template project you can use for this purpose click here. Flash Islands are best suited for smaller applications/components – especially for areas where you are missing UI functionality in the WebDynpro, e.g. could be advanced graphics, interactive maps, graphs and statistics. Authentication, User and session management will be handled by the WebDynpro application.

Using SAP BSP and an embedded Adobe Flex component

So what do you do if your application is SAP is not based on WebDynpro – then you will be missing the framework and bridge which will make it easy to communicate with an Adobe Flex application – or ? Well in SAP BSP you can use <object><embed> … </embed><object> to include an SWF application in the application – read more here.  But the data binding and event handling you will have to handle yourself in the BSP and in the Flex application. This kind of integration is also meant for smaller applications/components – especially for areas where you are missing UI functionality in SAP BSP, e.g. again could be advanced graphics, interactive maps, graphs and statistics. Authentication, User and session management will be handled by the SAP BSP application.

Using an HTTP REST backend application in SAP BSP – and an Adobe Flex RIA as Frontend

So… what do we do if we want to build a larger application in Adobe Flex (RIA) which should be integrated with SAP Netweaver? Well.. One possibility would be to build a set of backend services in SAP BSP using the HTTP REST approach/architecture (read more here). In SAP you will then be building normal BSP’s which will receive the input parameters in a HTTP request – and send the reply to the calling application as XML. These services can be called from Adobe Flex using the HTTP-request object. The work could be divided in two parts: the work regarding the design and implementation in SAP and the work with the design and implementation of the RIA using Adobe Flex. In between you need to describe and design the implementation of the interface. User and session management could be handled by the SAP BSP application if it’s running as a state full application. Regarding Authentication you need to consider how you would implement this in the application.

Using WebService enabled SAP BAPI’s as backend application – and an Adobe RIA as Frontend

In the last method you could consider using Webservice enabled BAPI’s instead of having to write BSP’s to communicate with the frontend. From Netweaver 6.40 and onwards all BAPI’s in SAP could be webservice enabled – and from 7.0 the functionality has been improved. And it’s possible to call these webservice enabled BAPI’s directly from Adobe Flex. You can use standard BAPI’s and/or make custom development for your own specific BAPI requests. User and session management should be handled by the Adobe Flex application. Regarding Authentication you need to consider how you would implement this in the application.

Comments Off :, , , more...

SMARTFORMS Translation

by Mustafa on Dec.30, 2009, under SAP

SMARTFORMS Translation

Translation transaction : SE63.
And use the menu :
Translation>R/3 Enterprise>Transport object
And set : R3TR | SSFO | <name of smartform>
And then set the source and destination languages

Comments Off :, , , , , more...

Mass Download

by Mustafa on Oct.17, 2009, under SAP

Mass Download is the successor to Direct Download, the same basic idea but with a totally new code base. The program has all the same features as before but has been updated to take advantage off some of the new features and changes that have arrived in the latest version of SAP.

This program is capable of downloading customer code at the push of a button. Mass Download was designed around a super fast source code scanner capable of finding as many items of code, text and documentation needed to successfully download pieces of work for off-line viewing. And if that wasn’t enough we give you the option of downloading in plain ASCII text or in hyperlinked HTML format.

Mass Download can retrieve all of the following items automatically whilst scanning program code, or they can be downloaded manually as separate entities:

•Program source + the following:
•Individual messages
•Selection texts
•Text elements
•Function modules
•Database tables and structures
•Global classes

•Global Classes + the following
•Database structures
•Database tables
•Programs
•Function modules
•Message classes
•Module pools
•Screens

•Function modules + the following:
•Global variable declarations
•Global includes
•Function includes
•Text elements
•Individual messages
•Database tables and structures
•Global classes
•Documentation

•Database structures and tables
•Function groups with all function modules
•Message classes

URL : http://www.dalestech.com/products/massdownload.htm
Download

Comments Off :, , , , more...

HR Infotype Maintenance Badi

by Mustafa on Jun.22, 2009, under SAP

Name of bus. add-in class : CL_EX_HRPAD00INFTY

Definition name :  HRPAD00INFTY
Definition short text : Update / Infotype maintenance

Comments Off more...

STRING_BAD_REF dump when starting BSP application

by Mustafa on May.29, 2009, under SAP

Symptom

After the service pack upgrade, the start of BSP applications,
which use model binding, fails with the short dump STRING_BAD_REF.

Solution

For a quick solution please run report TOUCHSRC, enter program name
CL_BSP_ELEMENT_CT_ATTR_VALID==CP, and press Execute.

Make sure that you use a 6.40 kernel patch level 48 or higher.

SAP Note : 869197

Comments Off :, , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...