1

Is it possible to create an enumeration (enumeration) in ABAP?

 2 years ago
source link: https://www.codesd.com/item/is-it-possible-to-create-an-enumeration-enumeration-in-abap.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Is it possible to create an enumeration (enumeration) in ABAP?

advertisements

Is it possible to create an Enumeration (enum) in ABAP such as in Java ?

As far as I know, we can define a domain with fixed values, but they are only used for screens.


There is no native support for enums in ABAP, but you can simulate the same behavior with a few simple steps:

  1. Create your "enum" class;
  2. Set the instance constructor to private;
  3. Add the static attributes of TYPE REF TO <your_class> for each "enum object";
  4. Create a CLASS_CONSTRUCTOR and instantiate each "enum object" with the desired properties.

For instance, if you have a status enum, you may have a CL_STATUS class with CL_STATUS=>APPROVED and CL_STATUS=>REJECTED enum objects.

Related Articles

& Ldquo; Signature key required & rdquo; - Is it possible to create iOS applications using DreamWeaver CS6 Extended / PhoneGap on Windows?

I don't have a mac, but have just signed up for the iOS developer program as I understood it is possible to create iOS native apps using DreamWeaver CS6 and PhoneGap on Windows. The problem when I try to use the PhoneGap Build Service in DreamWeaver

Is it possible to create standalone Broadcastreceiver in Android?

I'm creating a service called WifiMonitoring which will turn off Wifi when the connection is lost. I'm using a broadcastreceiver to receive the intent, which in-turn call the service. But now I'm stuck. Can I disable the wifi on receiving the intent

Is it possible to create a docker image from a debian image

I am using google compute engine and want to use kubernetes I have created an image for my machine without using dockers. The command I used is sudo gcimagebundle -d /dev/sda -o /tmp/ --log_file=/tmp/ansible.log it results in this image file 6820b8b7

It is possible to create compilers for dynamic languages ​​without losing its dynamic characteristics?

Are there some set of reasons that make it impossible for dynamic languages ​​such as Python or Ruby to be compiled instead of interpreted without losing any of his dynamics characteristics? Of course one the requirements to that hypothetical compile

Is it possible to create mixins per instance in C ++ 11?

Is it possible to create mixins in C++ (C++11) - I want to create behavior per instance, not per class. In Scala I'd do this with anonymous classes val dylan = new Person with Singer If these were your existing classes: class Person { public: Person(

Is it possible to create a Func that takes the T parameter as runtime?

Is it possible to create a Func that has a generic T as runtime parameter? I'm using Func to create some instances that are using generics. I would like to do something like this: var myFunc = new Func<IEnumerable<T>>(x => new List<T>

Is it possible to create an alarm video in Iphone?

I need to create a video alarm in IPhone app. Is it possible to create such app ? ThanksIf you mean to play a video on a given time, it's only possible while the app is open and active.

Is it possible to create an ASP.NET HTML MVC typed HTML Helper?

I was wondering if it is possible to create a custom strongly typed HTML Helper in ASP.NET MVC 2? Creating a regular (read not-strongly-typed) helper is straightforward but i am having difficulty creating strongly typed versions. For example, I would

Is it possible to create an indexed view with SQL Server 2008 that selects from another indexed view?

Is it possible to create an indexed view with SQL Server 2008 which selects from another indexed view? create view V1 as (select 1 as abc) create view V2 as (select abc from V1 group by abc) I think the answer is "no, it is not possible". From M

Is it possible to create a dollop of fixed size?

is it possible to create a fixed size window using glut, so any changes with the window's dimensions will be disregarded. it's kinda too late for me switching back to SDL or anything similar.Apparently, it's not possible in a legit way, but you can u

Is it possible to create code in Delphi for Android for devices based on Intel Atom?

This question already has an answer here: Delphi Android Solution / ARM7 with NEON marketshare? [closed] 1 answer Is possible to create code in Delphi 10 Seattle for Android for devices based on Intel Atom?From docwiki.embarcadeo.com: ARM instruction

Is it possible to create an object of a class in a class definition without using the default constructor

Is it possible to create an object of a class, inside a class definition, without using default constructor? class Vector3D { public: Vector3D(int x, int y, int z); virtual ~Vector3D(); private: int m_X; int m_y; int m_z; }; class CustomClass { priva

Is it possible to create a Web page that works from a USB key or a USB drive?

I am wondering if it's possible to create a webpage which can be used only from a USB key or thumb drive. In fact, I want to create a little site where I can store my sheets of tips because I have a lot of folders and files and it becomes difficult t

Is it possible to create a subform and a fieldless group on zend forms?

is it possible to create subform and displaygroup without fieldset on zend forms?Why to do this? This is helpful accessibility feature? However, You may do this in many ways, e.g. subclassing Zend_Form and setting your own decorators, or using getDec

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK