Creating custom javacript object
Hi
I was using Extendcript tool and i tried to declare a custom object to instanciate it like:
function MyObj()
this.name = "my name";
var myVar = new MyObj();
$.write(myVar.name);
I was expecting "my name" in the javascript console, but when i run the script in Extendscript tool the debug always halts saying "MyObj does not have a constructor".
Well, i'm pretty sure it does have a constructor, because when i try do get it from MyObj.prototype.constructor or when i test this code on a browser, it works fine.
I tried to set explicitly a constructor to it, but no luck.
Do someone have an explanation on why it does not recognize the constructor when instanciating a custom object?
or
Do someone have a better way to create custom objects in a way that i can use it to check "instanceof"?
Thanks
Griebel
MMmmmmm MY BAD!!!
in fact.... i was not using the word "MyObj".... i was using the word "Custom"... as "function Custom(){}"
soooo, i guess "Custom" is a reserved word for Extendscript.
Now testing my own example, it works fine! hahaha
any ideia on what "Custom" might be?
Thank you.
Similar Messages
-
How to create custom BOL object for dynamic query in CRM 7.0
Hi,
Could anyone please explain me with steps that how to create the custom BOL object for dynamic query in CRM 7.0, I did it in previous version but its throwing exception when i try to create the object of my dynamic query class. I just defined the entry of my in crmv_obj_btil to create the dynamic query BOL object. do i need to do any other thing also to make it work?
Regards,
Kamesh Bathla
Edited by: Kamesh Bathla on Jul 6, 2009 5:12 PMHi Justin,
First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
Thanks in Advance,
mallikj2. -
Want to create custom BOR object
I want to create a custom BOR object ZMSN in SWO1 so what value should I put in for these filed
1: super type
2:object name
3:name
4:program
5: applicationIf you are creating the Custom business object ZMSN then.......put the follwoing values in parameters
1: super type :--- Leave it blank ...it is used only when we are enhancing( create a deletgate BO)
standard business object
2:object name :-- Give any relevant name like ...ZMSN
3:name :-- Give any relevant name like ...ZMSN
4:program :-- Give any relevant name like ...ZMSN
5: application :-- Select the relevant functional area for which u r creating it....like 'F' --> finance
'H'> Human resource, 'R'-> if Function area is unknown -
HELP IN Creating customized Oracle Object from Java
How can I create a customized oracle object that has these 3 fields with data persistance:
NAME : VARCHAR2
INSER_DATE : DATE
OBJ:user-defined collection(oracle.sql.array)
using JAVA. Later, that oracle object is enqueue in Oracle avanced Queue.
I've been looking in this site for the answer but had no luck.
I am using Java 1.2 and Oracle 8.1.6.
Any help will be appreciated as I needed so badly. Thanks.
Robby
[email protected]Hi
I assume your attempting to generate a Java class with the approriate getters and setters. If so the JPulisher utility is what your after. You can access it from either JDeveloper or the command line... Its documented in the Oracle Java manuals (jdbc etc.)...
A piece of advice... especially if you using AQ and ADT's or oracle's jms implementation against AQ, make sure you use the Oracle 8.1.7 jdbc drivers, even if your accessing an 8.1.6 DBMS. The performance difference is significant
Dom -
Creating custom BOL object model for adding Search Parameter
Hi friends
Can any one guide me the steps through which i can add the new field in the search criteria by using the creation of custom BOL object model in Interaction Center Web Client.
That will be a grate help for me.
Regards
Pulkit
Message was edited by:
Pulkit AgrawalHi!
For maintaining CRMC_OBJECTS table you should use view CRMV_OBJECTS. (in transaction SM30).
Regards,
Alejandro. -
How to create custom attributes & object classes through ldif files in OID
Hi,
I have to create 4 attributes and one object class(custom) in OID. I want to creae these attributes and object class through LDIF file.
I tried creating an attribute through this command
ldapadd -p 389 -h localhost -D cn=orcladmin -w password -f D:/newattr.ldif
this ldif file contains inf. for creating a new attributes:
dn: cn=subschemasubentry
changetype: add
add: attributetypes
attributetypes: ( 1.2.3.4.5.6.10 NAME "xsUserType_new" DESC "User Type Definition" EQUALITY caseIgnoreMatch
SYNTAX "1.3.6.1.4.1.1466.115.121.1.15" )
I am getting error: Object class violation
Failed to find add in mandatory or optional attribute list.
Please help to find where I am going wrong...
Thanks.Hi Ajay,
Thank you for the help. Now i am able to create both attributes and object classes in OID through Ldif files.
I was getting constraint violation error because (I think) I was not giving proper naming convection for attributes and object classes. For OID, there are certain Ldap naming conventions. They are as follows:
# X below is the enterprise number assigned by IANA
1.3.6.1.4.1.X.1 - assign to SNMP objects
1.3.6.1.4.1.X.2 - assign to LDAP objects
1.3.6.1.4.1.X.2.1 - assign to LDAP syntaxes
1.3.6.1.4.1.X.2.2 - assign to LDAP matchingrules
1.3.6.1.4.1.X.2.3 - assign to LDAP attributes
1.3.6.1.4.1.X.2.4 - assign to LDAP objectclasses
1.3.6.1.4.1.X.2.5 - assign to LDAP supported features
1.3.6.1.4.1.X.2.9 - assign to LDAP protocol mechanisms
1.3.6.1.4.1.X.2.10 - assign to LDAP controls
1.3.6.1.4.1.X.2.11 - assign to LDAP extended operations
By using these conventions for attributes and object class, I did got any error and they were created in OID.
Thanks a zillion.
Kalpana. -
Create custom data object in BAM for a BPM project
I'm working with 11g (11.1.1.3)
I have created (via JDEV) a simple BPM process and I have inserted 3 business measurement
I have set ( as indicated in oracle documentation and in "Getting started") in BPM project :
project preference --> data target :
- enable BAM cheked
- BAM adapter JNDI name : eis/bam/soap
- in BATCH no cheked
- data object path : /Samples/Monitor Express
I have defined new data object in BAM --> Architect
I have renamed the default data object template in BI_DEFAULT_MyProject_MyProcess (is BI_DEFAULT_businessIndicator_businessIndicator)
I have added in layout my measurement; I have inserted in the bottom METRIC_myBI1, METRIC_myBI2, METRIC_myBI3 ( are METRIC_Segnalazione METRIC_nSegnalazioni METRIC_misura) of the same type indicated in BPM process
I have create few istance of the process, but :
- in the BI_DEFAULT_MyProject_MyProcess content there isn't anything
- in the default data objects ( COUNTER, INTERVAL, COMPONENT) I find the data of my process
please help me!!
I do not know what else to do
ElenaCLIENT
GUID
PARTNER
SALES_ORG
CHANNEL
DIVISION
POSTING_DATE
QUESTION
ANSWER
ANSWER_ID
SURVEY_ID
Rating
CREATED_AT
CREATED_BY CHANGED_AT
CHANGED_BY
Complete data source name as above. -
Creating Custom Environment Objects/Libraries
The more I learn about the environment and its objects the more I've come to appreciate it. I can program in some of the more popular object oriented languages: including Objective-C. A fun project might be creating some brand new environment objects.
Do any of you know where to get started. Is there an example somewhere?
Message was edited by: Francisco BidoBee Jay is right.
However, there are many amazing free environments available for download which combine existing environment objects to create interesting results:
I've created a parameter randomizer you can download it from here:
http://tnttutorials.macprovideo.com/fileexchange/overview
There are some other good ones available above and here:
http://www.logicprohelp.com/viewforum.php?f=9&sid=05a42bd27cc1fc0191255803bf53e5 7a
btw, you need to register to download environments from both these forums.
Cheers
Rounik -
Hi Experts,
I have requirement to create custom business object and create Web Service for that and use in external system (SAP ECC / SAP CRM / Third Party).
1) Is it possible to create custom object web service and used in external system ?
2) When we create the Web service from custom business object what the necessary steps(action : Create , Read , Update) require?
3) Sample Scenario :
My Custom Business Object
businessobject Custom_Integration {
element EP_VAL1 : LANGUAGEINDEPENDENT_MEDIUM_Text;
element EP_VAL2 : LANGUAGEINDEPENDENT_MEDIUM_Text;
element IP_RES : LANGUAGEINDEPENDENT_MEDIUM_Text;
I have created the Web Service using this custom business object.
3) How i can use this web service in external system? what are the prerequisite steps in external system to consume this service in it?
Please anyone have idea about this how to do this and how to achieve this using SDK and custom business object.
Many Thanks
MithunHello Mithun,
Does this section in the documentation help you:
SAP Cloud Applications Studio Help -> Developers Desktop -> Web Services
The entry "Task -> Create a Web Service" describes how to create a Web Service on your own BO
The entry "Task -> Test a Web Service" helps you how you can use it in a foreign tool / application.
HTH,
Horst -
Creation of Custom Change Object
Hi all,
I tried to create a custom change object from tcode- SCDO,but its asking for name space,
and even i dont know to create it like the tables it asking for.
I have successfully triggered a WF using standard change Object,but am not able to create custom
Change object.
Any one of you if have answer please help me.Hi Nivedita Yadav,
go through this link.
http://sample-code-abap.blogspot.com/2008/02/applying-change-document-technique-on.html
Regards,
Dheepak
Edited by: dheepak on Jan 21, 2009 4:03 PM
Edited by: dheepak on Jan 21, 2009 4:28 PM -
Mass activity running only once for custom parallel object
Hi
I have created custom parallel object EXT_UI and created mass activity for this but the report in triggered only once and not going for second interval .
Can any one help me out in this.
Thanks in advance.
Chetan
Message was edited by: CHETAN N P
Mass activity is running fine for standard object ANLAGE but not for custom one
Please share me steps to be followed in creating custom parallel object.
Regards,
ChetanHi Chetan,
I think you need to make changes in the Events which gets triggered by the mass activity.
Can you let me know the mass transaction code for which you have customised the activity,
Thanks,
Amlan -
Can we craeate custom Business objects
Hi All,
Can anybody please tell me wheather we can create custom business objects .
<b>I am not talking about the delegation of the standard business object to custom business object.</b>
If yes then
What can be the scenario where we are going to create custom businessobjects.
PLEASE GIVE ME A EXAMPLE.
ThanksHi Prabhu,
I would say you can view this case similar to other ABAP program development. i.e. You should search if there is any std BO available which can serve the purpose , if yes, try to use this by extending or as it is, otherwise you will have to create the Custom Object ( in similar way , as you create Custom Reports during development etc..)
e.g. Consider that you need to start the workflow based on Sales order creation, and assume in system you do not find any BO for Sales order, then you will go ahead and create the one for the Sales order, otherwise you will extend the existing one and use it.
Hope this helps to visualize the situation in which you need to create the BO from scratch.
Regds,
Akshay -
Custom Monitoring Objects in BPMon
Dear Experts,
As we know that there are some modules/submodules for which there are no SAP Std Monitoring Objects available in BPMon like FSCM, Asset Mgmt, Dispute Mgmt, HCM, PS, etc. so we need to go for custom monitoring objects. Would like to request you all to share your experiences in same subject.
Let me take one simple example, may not be very relevant but just to understand the concept for e.g. whenever Cost Center gets changed in Asset Master, an alert is required to be triggered. Is it possible to cater this requirement through creating custom monitoring object?
Please advice.
Thanks.
SMHi Malia
To fulfill customer's requirement, sometime I created custom monitors.
The monitors are sometime for checking transaction document and sometime for master data like your case.
Basically if you are able to identify the required data with some logic, you can enable the requirement by
using one of the following way.
1) Table Entry Counter :
Positive points. No coding required. Very easy to use.
By using this, you can access single table (standard/custom) or 1 data base view.
Negative point. Only simple query is possible. If you need to access several tables or need some logic,
you need to go to custom development.
Please also check this blog.
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20140
2a) Customer exit : Not using OO framework.
Please also check this blog.
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17437
2b) Customer exit : Using OO framework.
Please also check this blog.
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/28289
Positive point. If the requirement is technically possible, you can fulfill the requirement.
Negative point. Need some coding, And 1st you need to understand some steps to use customer exit.
But for both case, BPMon provides framework. So actually what you need is small coding.
(Setup guide provides sample).
If you use OO framework, you can also use BP Analytics based on custom monitor.
I have not analyze in detail, but seems you have some possibility to fulfill the requirement.
Idea)
Search the table ANLA(Asset Master Record Segment) where AEDAT = Today.
*Result of this, you can identify Asset master that have update today.
Then to check whether the change is for cost center or not, access to the change document tables (CDHDR/CDPOS).
CDHDR : OBJECTCLAS = ANLA, and TCODE = AS02, OBJECTID = Object ID
CDPOS : CHANGENR, FNAME = KOSTL
By the way, what kinf of things, do you want to enable for FSCM, Asset Mgmt, Dispute Mgmt, HCM, PS ?
Hope above information helps you.
Best Regards
Keiji -
How to attach event to custome workflow object ?
Hi Guys,
Could someone help me on how to raise event while creating custom workflow object.We can attach event to object in transaction swe2 . I would like to know how to create that event. Could some send sample custom workflow object with events.
Many thanks in advance.
Cheers,
Garrick.Here's an example using Business object BUS2080 Service notification
I delegated ZBUS2080 to BUS2080 (service notification). Added 2 Events REASSIGNED and MODIFIED.
Use transaction SWO1 for manipulating business objects.
The User performs an action on a service notification (IW52) say PUT IN SERVICE AGAIN.
When the user puts the service notification in service again the event triggered will start a (user defined) workflow which makes a call to a method in the business object ZBUS2080 which launches a batch job.
This batch job creates our user event REASSIGNED which in turn calls a new workflow to be executed.
This workflow performs the action I want -- in this case to re-assign the service notification to a new person, send an email and escalate the deadlines
Code samples are shown below.
So here's how it works.
First you need to set up some entries with table SWE2. I've assumed you've already defined the events to the Business object(s) you want to use.
In SWE2 define entries for BUS2080 (or ZBUS2080) For Events INPROCESSAGAIN and (our event) REASSIGNED.
IN SWE2 define the receiver call as a FUNCTION MODULE
For the receiver function modules for the SAP event (INPROCESSAGAIN) define the receiver module as SWW_WI_CREATE_VIA_EVENT
For the event REASSIGNED define the receiver module as SWW_WI_CREATE_VIA_EVENT_IBF.
I have no idea whatwhat the difference is between the two but the process works when it's done like this.
Ensure the linkage Activated box is clicked in both cases.
Put your workflow numbers in the RECEIVER TYPE in SWE2 table.
In the first workflow when the user puts the service notification in service ensure your workflow starts a batch job which raises another event
Note : You need to instantiate the object (I.e supply the key) to trigger the event correctly. The key is obtained from the WF and will be in the container anyway.
You can do this by adding this type of function module into the method of the business object you want to execute during the first workflow. The code here creates a batch job which submits the EVENT creating program.
function z_create_event_for_cs.
""Local interface:
*" IMPORTING
*" REFERENCE(OBJECT_KEY) LIKE SWOTOBJID-OBJKEY
*" REFERENCE(W_REASON) LIKE HRPXXXX-DUMMY
*" REFERENCE(W_ESCLEVEL) LIKE HRPXXXX-DUMMY
Create Batch job to run ZZREASSIGNCS
which creates event REASSIGNED in Customer query workflow.
data: jobnr like tbtcjob-jobcount,
jobname like tbtcjob-jobname,
pgmname like sy-repid,
w_key like viqmel-qmnum,
w_code type c,
w_num type c.
w_num = w_esclevel.
jobname = 'CREATEEVENT'.
pgmname = 'ZZREASSIGNCS'.
call function 'JOB_OPEN'
exporting
jobname = jobname
importing
jobcount = jobnr
CHANGING
RET =
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = object_key
importing
output = w_key.
w_code = w_reason.
if w_code = ' '.
w_code = 'Z'.
endif.
submit zzreassigncs
with p_key = w_key
with p_escl = w_code
with p_escnum = w_num
via job jobname number jobnr
and return.
call function 'JOB_CLOSE'
exporting
jobcount = jobnr
jobname = jobname
strtimmed = 'X'
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
others = 9
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endfunction.
For the actual program which creates the event use something like this
program zzreassigncs.
This program creates an event REASSIGN
This triggers a "clone" of the initial customer query workflow
which is now marked as completed.
The deadline and escalation level from the original workflow
should be passed to the new workflow via the event container
Program is submitted from the original workflow
Ensure transaction SWE2 has the event REASSIGN for bus object BUS2080
defined or the WF won't start even if the event is raised correctly
As this program is run as a background / batch task
you need to obtain the relevant notification number and pass it
as a parameter.
When run from the WF the you can get the notification number obtained
from the workflow / task container.
include <cntn01>. "For WF macros.
parameters: p_key like swotobjid-objkey, "Service notification number
p_escl type c,
p_escnum type c.
constants: c_event like swetypecou-event value 'REASSIGNED',
c_attrib like swotra-attribute value 'USRSTATUS',
c_object like swetypecou-objtype value 'BUS2080'.
data: w_object like swotobjid,
w_stat like tj30t-txt04.
data: rc like sy-subrc.
data: begin of event_cont occurs 0.
include structure swr_cont.
data: end of event_cont.
data: begin of return.
include structure swotreturn.
data end of return.
if running from WF rather than a batch job
swc_container container.
swc_get_element container 'Znumber' p_key.
w_object-objkey = p_key.
w_object-objtype = 'BUS2080'.
call function 'SWO_PROPERTY_GET'
exporting
object = w_object
attribute = c_attrib
changing
value = return.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
w_stat = return(4).
event_cont-element = 'Status'.
event_cont-value = w_stat.
append event_cont.
event_cont-element = 'Escalated'.
event_cont-value = p_escl.
append event_cont.
event_cont-element = 'Escalation'.
event_cont-value = p_escnum.
append event_cont.
Note WAPI calls only valid from rel 6.1 using Webflow engine
(part of standard WF since rel 6.1)
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = w_object-objtype
OBJECT_KEY = w_object-objkey
EVENT = 'REASSIGNED'
IMPORTING
RETURN_CODE = rc
EVENT_ID =
TABLES
INPUT_CONTAINER = event_cont.
if rc <> 0. "Houston ---We have a problem !! '
write: text-002 color col_negative.
exit.
endif.
even though no database / table is updated here by the event
we still need the commit work to initiate the event correctly
commit work.
You CAN use Objects (OO ABAP) but if you are fairly new to this sort of stuff just stick with standard BOR (Business objects) to parctice on until you've got the hang of the process.
It's actually a lot simpler than most people realize --which is why WF consultants get paid decently !!!!.
Cheers
Jimbo -
I am planning to create custom defined DSO Object & Info cube
Hi ,
i am planning to create custom defined DSO Object & Info cube.what ratio i can calculate what is the keyfields & what are the data fields in DSO.How can i calculate.
2. how can i create suitable dimensions, suitable characterstics for dimensions.what ratio i can decide.
Thanks,
chandu.Hi Diego Garu,
Thanks for your fast response.i
VBELN VBAP 2LIS_11_VAITM 0DOC_NUMBER
POSNR VBAP 2LIS_11_VAITM 0S_ORD_ITEM
KUNNR VBAK 2LIS_11_VAHDR 0SOLD_TO
VBELN VBRP 2LIS_13_VDITM 0BILL_NUM
FKDAT VBRK 2LIS_13_VDHDR 0BILL_DATE
INCO1 VBRK 2LIS_13_VDHDR(INCO1FieldNot Available in Data Source) 0INCOTERMS
ZTERM VBRK 2LIS_13_VDHDR(Payment terms field Not Available in Data Source) 0UCPYTERMS
NETWR VBRP 2LIS_13_VDITM 0NETVAL_INV.
here data is coming from the multible tables.that why i am planning to create custom defined data source based on view. here how can i calucate dso is suitable or cube is suitable.
suppose dso is suitable how can i decide which on is the data field and which one is the key field.
how can i decide how many dimensions are needed here.and which chara are suitable for that dimensions.
Thanks ,
chandu.
Maybe you are looking for
-
I woke up one morning and my i phone had a message for me: "your account is disabled due to security reasons". I follow the instructions to establish a new ID and password. It was confirmed on the i Phone, but when I try to download apps. or get upda
-
Can we use xsl:param element in XSLT mapping...?
Hi Guys Can we use <xsl:param> element in XSLT mapping in XI..? Is there any documentation out there for XSLT mapping? Thanking in advance
-
Just updated iphone 4 and now no tv shows are syncing
I updated my iphone and now no tv shows are showing on the iphone. They are showing in itunes, but here is the weird part, when Sync TV shows is DE-SELECTED it shows a certain amount of blue for audio, purple for video, same for photos, apps and othe
-
Does anyone know the name of this kind of design?
I've been trying different wordings trying to figure out how to find this specific design online, I've tried digital web, glitch web, can't really seem to find what this would be called. any ideas? http://fc04.deviantart.net/fs71/f/2013/0
-
If anyone has seen 300 or any recent action movies there will be these fight scenes that have a particular camera setting or effect that is achieved with the frames. Its almost like they are converting the frames down to 15 frames per second or adjus