mustafayalcin.com

Tag: abap

XML formating after SAP Simple Transformation

by on Ağu.05, 2011, under SAP

Merhaba,

XML konusunda küçük bir püf noktasını paylaşmak istiyorum. Geçenlerde yaptığı fason üretim bilgilerini XML haline dönüştürüp sFTP ile müşteri sistemine aktarmak isteyen bir müşterim için bir takım geliştirmeler yaptım.  

İlk aşama XML çıktısını elde etmekti. SAP Simple Tranformation ile bu konuyu hallettik. İkinci aşama SFTP’ye SAP standard FTP komutları ile ulaşmaktı. Bu konuyu FTP-SFTP bridge ile hallettik.

En son istek olarak XML formatı oldu. SAP ST ile XML üretildiğinde;

<TAG1><TAG2> … </TAG2><TAG1>

şeklinde bir dosya oluşuyordu.

Onların istedikleri;

<TAG1>

  <TAG2>

     …

  </TAG2>

<TAG1>

şeklinde bir dosya formatıydı. Bu konuyu çözmek için de ID_INDENT transformation’ unu kullandık.

CALL TRANSFORMATION ID_INDENT
SOURCE XML = l_xml_input
RESULT XML     l_xml_output.
 

Belki birgün işinize yarar …

http://sapboard.ru/forums/viewtopic.php?f=13&t=39777

XML formating after SAP Simple Transformation için yorumlar kapalı :, , , , , , , , , , , more...

SAP SFTP (SSH & SSH2) connection

by on Tem.10, 2011, under SAP

Eğer ABAP ile SFTP yapmak istiyorsanız ve HTTP proxy kullanmak zorundaysanız SFTP yapmak çok zor bir hal alabilir. Çok basit bir uygulama ile bu sorunu çözüp ABAP ile FTP yapar gibi SFTP yapabilirsiniz ( SAP Windows İşletim Sistemi üzerine kurulu olmalı )

Uygulamanın web adresi : http://www.bitvise.com/tunnelier

 

SAP SFTP (SSH & SSH2) connection için yorumlar kapalı :, , , , , more...

SY-BINPT

by on Haz.07, 2011, under SAP

SY-BINPT

X while a batch input session is running and when an ABAP program is called using CALL TRANSACTION USING, otherwise space.

SY-BINPT için yorumlar kapalı :, , , more...

SY-TFILL

by on Haz.07, 2011, under SAP

SY-TFILL:

After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.

SY-TFILL için yorumlar kapalı :, , , , more...

Path Split & Filename Split

by on Mar.25, 2011, under SAP

CALL FUNCTION ‘CRM_KW_SPLIT_FILENAME’
EXPORTING
iv_path = lv_path
IMPORTING
ev_filename = lv_filename
ev_extension = lv_file_extension.

Path Split & Filename Split için yorumlar kapalı :, , , , more...


ABAP Bitmap Image Processing Class

by on Haz.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

ABAP Bitmap Image Processing Class için yorumlar kapalı :, , , more...

Mass Download

by on Eki.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

Mass Download için yorumlar kapalı :, , , , more...

How to Refresh ALV List?

by on Şub.21, 2009, under SAP

In ALV, to refresh the table you have to call the method “refresh_table_display”.  It has the syntax very similar to creating the table. It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) or if you want to refresh only the icons around the grid (the data is not refreshed – this option is mostly not used in day to day applications).

the syntax is :

call method grid (name of grid )->refresh_table_display

exporting

IS_STABLE = (THIS IS FOR DATA REFRESHING)

I_SOFT_REFRESH = (THIS IS FOR ICON REFRESHING).

How to Refresh ALV List? için yorumlar kapalı :, , , , , , , more...

Creating an ALV Grid in 3 lines

by on Oca.21, 2009, under SAP

DATA: l_alv      TYPE REF TO   cl_gui_alv_grid,
         lt_sflight TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE lt_sflight.
* automatically use the full screen to display the grid,
* NO CONTAINER DEFINITION IS REQUIRED !
CREATE OBJECT l_alv EXPORTING i_parent = cl_gui_container=>screen0.
CALL METHOD l_alv->set_table_for_first_display
     EXPORTING i_structure_name = ‘SFLIGHT’
     CHANGING  it_outtab        = lt_sflight.
* You have to create an EMPTY screen
CALL SCREEN 100.

Creating an ALV Grid in 3 lines için yorumlar kapalı :, , , 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...