Bu yazımda kullanımı kolay ve nesne yönelimli bir ALV sınıfı olan SALV'den bahsetmek istiyorum.
( E : In this article, I would like to talk about SALV, an easy-to-use and object-oriented ALV class.)
⭐ SALV, nesne odaklı tasarıma ve kodlamaya uygundur.
( E : SALV is suitable for object-oriented design and coding. )
⭐ Factory-Method tasarım desenine göre oluşturulmuş bir modeldir. Bu tasarım modelinde bir nesne oluşturulur ancak hangi sınıfın örnekleneceğine alt sınıflar karar verir.
( E : It is a model created according to the Factory-Method design pattern. In this design pattern, an object is created, but subclasses decide which class to instantiate. )
⭐ Farklı yapılarda ALV oluşturabileceğimiz 3 farklı SALV sınıf türü vardır. Bu yazımda CL_SALV_TABLE sınıfı ile ilgili basit bir demo paylaşacağım. SALV'nin diğer türlerinden ve özelliklerinden başka yazılarımda bahsedeceğim.
( E : There are 3 different types of SALV classes that we can create ALV in different structures. In this article, I will share a simple demo of the CL_SALV_TABLE class. I will talk about other types and features of SALV in my other articles. )
Simple 2D Table
Display |
CL_SALV_TABLE |
Hierarchical ALV
Display |
CL_SALV_HIERSEQU_TABLE |
Tree ALV Display |
CL_SALV_TREE |
Tüm sınıf türlerinde ALV örneğinin oluşturulmasını sağlayan ve statik bir metot olan FACTORY metodu kullanır. Bu metot, ALV nesnesini yukaridaki tabloda belirttiğimiz çeşitli şekillerde oluşturmamızı sağlar. Örneğin ağaç veya hiyerarşik görünümlü ALV oluşturabiliriz. İşte bu nesne yönelimli bir tasarım deseni olan Factory-Method tasarım deseninin ne olduğudur.
( E : It uses the FACTORY method, which is a static method that enables the creation of ALV instances in all class types. This method allows us to create the ALV object in various ways that we have mentioned in the table above. For example, we can create a tree or hierarchical ALV. This is what the Factory-Method design pattern is, which is an object-oriented design pattern. )
⭐ Screen veya field catalog oluşturmamıza gerek kalmadan kendisi bizim için bunları otomatik olarak oluşturur. Yapmamız gereken tek şey bir internal table oluşturmak ve bu internal table'ı SALV objemize bağlamaktır. Bu özelliği sayesinde daha az satır kod yazarak raporlar oluşturabiliriz.
( E : It automatically creates them for us, without the need for us to create a screen or field catalog. All we have to do is create an internal table and connect this internal table to our SALV object. Thanks to this feature, we can create reports by writing less lines of code.)
SALV ile ilgili demo programların kodlarını Github hesabımda paylaştım.
( E : I shared the codes of demo programs related to SALV on my Github account.)
Bu yazımda değindiğim basit bir SALV kullanımına dair kodlara ZDEV_R_SALV programından erişebilirsiniz.
( E : You can access the codes for a simple SALV usage that I mentioned in this article from the ZDEV_R_SALV program. )
Demo programa ait ekran görüntüsü aşağıdaki gibidir.
( E : The screenshot of the demo program is as follows. )
Teşekkürler. 😊
Thank you. 😊
Hilal KARAGÖZLÜ
SAP ABAP Consultant
Yorumlar
Yorum Gönder