ABAP class method with dialogue
Hi all,
I want to use a ABAP class method within a Workflow definition with user interaction. The SAP help says, that is possible, but I couldn't find a way, to mark the method as "with dialogue".
For BOR-objects there is a checkbox in the details for the method definition. Can anybody tell me, how it can be done?
Thanks in advance
Nick
Hi Nicolas,
When you create the Task with the ABAP OO Method, you can select it as "Background Processing" else it will be a "Dialog Process".
If you notice here, "Background Processing" checkbox will be editable if ABAP OO Method is used, whereas in case of Business Objects it directly comes from method definition.
Reward points if useful.
Similar Messages
-
Calling ABAP class methods from JAVA application
Hi All,
I want to fetch ITS related information (SITSPMON Tcode) in my JAVA application. But i didnt find much BAPIs for the same. While debugging I came accross few class methods with help of which I can get the required information. So is there any way we can call and execute methods of ABAP classes through java application?
for e.g. I want to call GET_VERSION method of CL_ITSP_UTIL class.
Thanks,
Arati.Hi,
Yes, as per my knowledge the only way to interact is using BAPI exposed as RFCs. So try to invoke those class methods in one CUSTOM BAPI and expose that BAPI as RFC and consume that RFC to get those details.
Regards,
Charan -
Hi Friends,
Can i execute and abap oo method on commit work.
similiar to perform form on commit.
thanxHi Kaushik!
This should be possible, but with a little bit different approach:
You can implement an event handler for the commit event. Then you have to register this method for the commit event. Have a look at program SAPMSSY0. In routines %_before_commit, %_commit and %_after_commit you will find some events, e.g.
* Raise event 'Commit Requested' for Object Manager
CALL METHOD cl_os_transaction_end_notifier=>raise_commit_requested.
, for which you might like to register your method.
Regards,
Christian -
Binding ABAP Class Attribute with BUS2038 in a Standard WF task
Hi,
I need help as mentioned in the subject line.
In my standard task I am capturing event for BUS2038. In the General tab I have a ABAP class which has implemented IF_WORKFLOW. From BUS2038 I just need notification number.
Since my source is a BO and my target is a class. How do I make this conversion and pass the data to my class?
I know there are several solution but none have solved my concern.
Thanks,
Sridhar Karra.Hi,
If you want to access teh attributes of the BOR inside a class emthod then you have to make use of teh MACROS.
1. include INCLUDE CNTN01_SWC in the class local macros section. and in the type groupsof the class include SWC0.
2. Now if you know the key of the BOR instance then create a BOR object inside the class method as below
DATA lo_object TYPE SWC0_OBJECT.
SWC0_CREATE_OBJECT lo_object '<BUSXXXX>' '<Key of the BOR>.
the above line will create the instance of the bor inside the class method
now inorder to access the attributes of the BOR use the below code
DATA lv_notif_no TYPE <type of the notification>.
SWC0_GET_PROPERTY lo_object '<ATTRIBUTE NAME> lv_notif
In this way you can access the BOR attributes inside a class method.
Regards
Pavan
Edited by: Pavan Bhamidipati on Dec 15, 2011 11:01 PM -
BAPI diff Method in ABAP class
Dear friends
Coul any1 tel me hw BAPI differed frm a method whic used in an ABAP class , BAPI is also a method of a BOR.
And is it possible to replace a BAPI using a method of an ABAP class..
cheers
sakthiHello Sakthi
The concept of BOR methods is purely semantic and has nothing to do with ABAP-OO.
The so-called method of business objects are implemented by BAPIs.
The cannot be replaced by ABAP class methods. In particular, BAPIs are RFC-enabled whereas class methods cannot (yet) be called remotely.
Regards,
Uwe -
Hello,
I am writing method in ABAP class which I will link to the Workflow Step. I want to access values of one of the Workflow Element which is Multiline and refering to BOR Object Type. My queries are as below:
1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
2. If I change value of that Workflow Element (Multipline refering to BOR object type) in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
Edited by: Ashwin Sonkusare on Apr 1, 2011 3:35 PMHi,
1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
Please create a table type same as workflow multiline element type. ( You can also use standard table if present ).
Then use this table type as the type of the import parameter of the class.
Then u can pass the multiline element of workflow to abab calss
2. If I change value of that Workflow Element (Multipline refering to BOR object type) in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
If u change the Workflow Element (Multipline refering to BOR object type) in ABAP class method, then u need to update the values of the workflow multiline element through reverse binging ( binding abap class to WF ).
Thanks and regards,
SNJY -
Hi experts,
I am looking for a abap class/method to change Purchase order.
thanks in advance.Thanks for your reply.
I am still looking for the class to change PO. -
Download ABAP Class in 46C?
Hi,
Anyone know a tool for downloading ABAP class method codes/ attribute definitions to a local PC file for release 46C?
I know Direct Download, but for 46C version it's not possible to download Classes:-(
I know that via menu Goto-> Protected/Private/Public section I can dowload the generated class, but it's not really easy for several class.
Thanks in advance,
PeterHi,
Got from a link
Downloading ABAP code to your local PC
Creating Z* test programs is a popular method for conducting tests. However, when an environment is about to get shut down, keeping your test programs becomes tricky. You have to launch se38/37/24/80, select your programs one by one, and choose system -> list -> save -> local file, or use function module WS_DOWNLOAD. This is a lengthy procedure that does not even enable you to save screens, tables, or structures.
An ABAP program available for free download at http://www.dalestech.com/ can help you save your test programs.
Choose home -> R/3 entreprise -> direct download entreprise 1.2
download the .ZIP file,
Unzip
Cut and paste in an ABAP program
Compile and run
All your projects (including multiple classes, programs, function groups, screens and tables) can be saved in less than one minute.
If you want to backup your work in order to keep a certain stable version while you are programming, it might be preferable use a tool that is already embedded in the Workbench: in se38/37/24/80, choose utilities -> versions -> generate version
Thanks & Regards,
Judith. -
How to pass importing parameter of super class method to subclass method?
hi all,
i have defined a class
CLASS CUST_REPORT DEFINITION.
PUBLIC SECTION.
METHODS:DATA_RETRIVE IMPORTING CUSTID_LOW TYPE ZCUSTOMER-ZCUSTID
CUSTID_HIGH TYPE ZCUSTOMER-ZCUSTID.
DATA:IT_CUST TYPE TABLE OF ZCUSTOMER,
WA_CUST TYPE ZCUSTOMER.
ENDCLASS. "cust_report DEFINITION
The method DATA_RETRIVE in this class has two importing parameters named CUSTID_LOW and CUSTID_HIGH.
then i have defined subclas of this clas.
LASS CUST_ORD DEFINITION INHERITING FROM CUST_REPORT.
PUBLIC SECTION.
DATA:IT_ORD TYPE TABLE OF ZORDER.
METHODS:DATA_RETRIVE REDEFINITION,
DISPLAY.
ENDCLASS. "cust_ord DEFINITION
Method DATA_RETRIVE is redefined.
So how to pass importing parameteres of super class method to sub class method with the same name.
Thanks and Regards,
ArpitaHi,
I tried like this.
METHOD DATA_RETRIVE.
CALL METHOD SUPER->DATA_RETRIVE
EXPORTING
CUSTID_LOW = I_CUSTLOW
CUSTID_HIGH = I_CUSTHIGH.
ENDMETHOD.
But parameters I_CUSTLOW and I_CUSTHIGH are not getting values after call to method.
Thanks and Regards,
Arpita -
Need Help with command line arguments for a class method
Hey guys,
I'm fairly new to programming in java.
I want to a write a class method that adds up its command line arguments which are numbers. For example, if the input was .... 5 2 3....then the output would be 10.
I have been told to use the Convert to convert a string to a double. I'm ok for writing the class method but I have no idea how to use Convert and why I need it in the method.
Can anybody help please?Hey guys,
I'm fairly new to programming in java.
I want to a write a class method that adds up its
command line arguments which are numbers. For
example, if the input was .... 5 2 3....then the
output would be 10.Okay. So you would receive the numbers to add as the String[] argument to a main method. The steps are simple:
1) declare a variable for the count
2) for each String in the array:
2.1) extract the value as a double
2.2) add this to the count
3) output the resulting count
I have been told to use the Convert to convert a
string to a double.
I'm ok for writing the class
method but I have no idea how to use ConvertThere is no class Convert in the Java API.
and why
I need it in the method. Do you understand you need to somehow convert each String to a double (step 2.1)? Since Convert is unknown to me, maybe you should just take a look at class Double. It can help you do step 2.1, the rest should be trivial enough.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Double.html
Give it a go and feel free to post back with a specific problem you are having, accurately described if you please :-) -
Is it possible to call a class method using pattern in ABAP editor.
Hi,
Is it possible to call a class method using pattern in ABAP editor.
Thank U for Ur time.
Cheers,
SamYes,
Click patterns.
Then choose Abap objects patterns.
Click on the Tick
It will give a new screen
Here Give the name of the class first.
Then the object (instance of the calss)
And finally the method ..
it will give you the pattern
Hope this helps. -
Class-data versus data and methods versus class-methods in OO ABAP
Hi
I was going thorugh following OO ABAP code.
CLASS vessel DEFINITION.
PUBLIC SECTION.
METHODS: constructor,
drive IMPORTING speed_up TYPE i,
get_id RETURNING value(id) TYPE i.
CLASS-METHODS: start,
objects,
inheritance,
interfaces,
events.
PROTECTED SECTION.
DATA: speed TYPE i,
max_speed TYPE i VALUE 100.
PRIVATE SECTION.
CLASS-DATA object_count TYPE i.
DATA id TYPE i.
ENDCLASS.
Whats is difference between methods and class-methods ?
What is the difference between data and class-data ?Hi Rajesh,
There are two types of componenets in a class
1)Static components
2) Instance components
Instance components exist for every instance of the class, while static exist only once for any number of instances of the class.
Components of the class are methods, attributes, events etc.
static attributes are represented by CLASS-DATA and instance attributes are represented by DATA.
static methods hence are done by CLASS-METHODS and can access only static attributes.
Instance methods are done by METHODS and can access any attribute.
For eg: supposing that in a class, there is a static attribute. Suppose after one instance is created, we are setting this static attribute value as 10. Now we are creating another instance of the same class. Now when you try to display the value of this attribute, it will be 10.ie. it needs to be initialized once and can be shared between instances.
Just go through this document..You will get nice info from this.
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
If you want to go deeper, like object persistence and all, just refer this document.
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
Regards,
SP. -
Can't fill ByteArray in EJB-Method with generated Model-Class from WD-Model
Hello everybody,
i try to call an ejb-method with data from an FileUpload-UI-Element in WD. The EJB-Method is receiving the byte-data to create a document in KM via a Web-Service.
The ebj-methid has the following signature:
public FObject putFileDataSimple (byte [] btContent, String fullFileName, String username, String password)
After importing the Model and creating a context node i have the following structure:
Request_X_putFileDataSimple
+---btContent (Node)
+-- item
+ fullFileName
+ username
+ password
btContent is of the generated Type Byte_Item, which is itself a generated Model-Class of modelClassType ARRAY
item is of Type byte
But i simply have problems to fill the context node (or the binded model-object). i tried different ways and looked at thread [https://www.sdn.sap.com/irj/scn/thread?messageID=1954223] but i cant get it work.
So my Method in WD looks like this to fill the structure and start the ejb-method:
public boolean putKMDataSimple( com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource fin ) {
try
wdContext.currentRequest_X_putFileDataSimpleElement().setFullFileName("abc");
wdContext.currentRequest_X_putFileDataSimpleElement().setUsername("def");
wdContext.currentRequest_X_putFileDataSimpleElement().setPassword("xxx");
byte[] buffer = new byte[1];
InputStream in = fin.read(false);
int i = 1;
int j = 0;
while (i!=-1)
i = in.read(buffer);
if (i!=-1)
Byte_Item bi = new Byte_Item(mAlf); // mAlf ist global defined Model-Class-Instance
bi.setItem(buffer[0]);
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().addBtContent(bi);
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
Doing this results in Error-Messages like:
Model-Object is not a complex type for every byte added this way.
And finally an IllegalArgumentException at java.lang.reflect.Array.set(Native Method)
The second way i tried is:
public boolean putKMDataSimple( com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource fin ) {
try
wdContext.currentRequest_X_putFileDataSimpleElement().setFullFileName("abc");
wdContext.currentRequest_X_putFileDataSimpleElement().setUsername("def");
wdContext.currentRequest_X_putFileDataSimpleElement().setPassword("xxx");
byte[] buffer = new byte[1];
ArrayList<Byte> btlist = new ArrayList<Byte>();
InputStream in = fin.read(false);
int i = 1;
int j = 0;
while (i!=-1)
i = in.read(buffer);
if (i!=-1)
btList.add(buffer[0]);
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().setBtContent(btList);
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
Trying so results in:
java.lang.ClassCastException: class java.lang.Byte:null incompatible with interface com.sap.tc.cmi.model.ICMIModelClass:library:com.sap.tc.cmi(at-sign)[email protected]@alive
whenn calling the setBtContent Method
I don't what to do now to fill the context/model-object the right way.
Any helpfull hints are very welcome
Edited by: Matthias Hayk on Dec 1, 2008 5:51 PM
Edited by: Matthias Hayk on Dec 2, 2008 10:56 AMOk Vesselin and thanx for your idea,
so i adapted the source in the way you told like the following:
ArrayList<Byte_Item> btlist = new ArrayList<Byte_Item>();
byte[] buffer = new byte[1];
InputStream in = fin.read(false);
int i = 1;
int j = 0;
while (i!=-1)
i = in.read(buffer);
if (i!=-1)
// Byte gelesen
Byte_Item bi = new Byte_Item(mAlf);
bi.setItem(buffer[0]);
btlist.add(bi);
j++;
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().setBtContent(btlist);
wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
This results also in the following Exception when exceuting the WS-proxy:
execute
[EXCEPTION]
java.lang.IllegalArgumentException
at java.lang.reflect.Array.set(Native Method)
at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.getInputParameters(EJBGenericModelClassExecutable.java:215)
at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.execute(EJBGenericModelClassExecutable.java:112) -
Getting problem with DOMImplementation classes method getFeature() method
hi
getting problem with DOMImplementation classes method getFeature() method
Error is cannot find symbol getFeature()
code snippet is like...
private void saveXml(Document document, String path) throws IOException {
DOMImplementation implementation = document.getImplementation();
DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
LSSerializer serializer = implementationLS.createLSSerializer();
LSOutput output = implementationLS.createLSOutput();
FileOutputStream stream = new FileOutputStream(path);
output.setByteStream(stream);
serializer.write(document, output);
stream.close();
problem with getFeature() methodYou are probably using an implementation of DOM which does not implement DOM level-3.
-
Calling ABAP Class with Javascript (Example?)
Can anyone provide an example of calling an ABAP class with Javascript? I'm looking to retrieve a variable value from a Web Application
ThanksI need this too.
I have a Selection Screen in JAVA. And I want to fill the f4-help with a abap-function.
with kind regards
Maria Kiltz
Maybe you are looking for
-
How do I get spouses and children on to printed labels and envelops?
I store spouses and children in the fields provided for these names. When I go to print labels, Address Book puts the primary name and one randomly selected child name on the first line. So if the person is Jane Smith, I have her spouse listed as Joh
-
I have problems with installation of photoshop CC 2014 on Windows 8.1 PC
<PRE>Exit Code: 6 Please see specific errors below for troubleshooting. For example, ERROR: DF012, DF016,D ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 11 error(s) ----------- Payload:
-
Just bought the ipad mini and on my mail icon the red dot is appearing and I have no new messages, only sent one message and no saved messages. How do I get the red dot to go away. Thank you for any help you can give me.
-
SQL Server 2000 64-bit: x64-bit edition vs IA64 Itanium processor ?
Hi Forum, I do need SQL Server 2000 64-bit. So, I have used our premium MSDN subscription, and I have downloaded: SQL Server 2000 Enterprise Edition - 64-bit (English) SQL Server 2000 Developer Edition - 64-bit (English) However, Our DBA specialist i
-
HT4623 my iphone will not turn on
I bought a new iphone, when you open the box is not attached