Public Class in Web Dynpro
I have a little class
class OrgInfo
public String McShort;
public String Objid;
public String Stext;
public OrgInfo(String mcShort, String objid, String stext)
McShort = mcShort;
Objid = objid;
Stext = stext;
I'd like to call it from my views and component controller. How do I add the class?
Diane
Define the class as public and put it under src/packages/<your_package>.
Armin
Similar Messages
-
Assistance class in Web dynpro ABAP
step 1: Create WEB DYNPRO component. Example: Zwd_assist_class_test.
-save.
-Active.
step 2: Assistance class on component(Zwd_assist_class_test) screenwriter assist class name Example:Asistance_class.
step3: Select the Assistance class name click on pop up new window .
step4:Assistance class window methods give method name
step5: Select parameters of the methods giving importing exporting table ,objects.
step6:Select Attributes button given the attribute name Example:ET_MAR.
For example methods READ_ONLY.
coding for method: select * from <db_table> into table <ET_tab> where matnr between im_matnr1 and im_matnr2.
I want using MARA,VBAK,VBAP tables data display in single table,creating two search fields .these are VBELN, MATNR
how to write READ_ONLY method ?Hi Rajasekhar,
The exporting parameters which you have declared can take only one record as its declared as work area. Instead you need to identify the table type and use like
for MARA... MARA_TT
for VBAK... VBAK_T
for VBAP... VBAP_T
but, for your requirement, you need not required to pass mara, vbak, vbap table data, instead you need to put into final internal table ET_result.
I suggest you to create a table type ZTT_RESULT in SE11 which contains all your fields in the output.
Now, inside READ_DATA( ) method you can do as below ( just an example)
loop at lt_mara into ls_mara.
move-corresponding ls_mara to ls_result.
loop at lt_vbap into ls_vbap where matnr = ls_mara-vbeln.
move-corresponding ls_vbap to ls_result.
read table lt_vbak into ls_vbak with key vbeln = ls_vbap-vbeln.
if sy-subrc is initial.
move-corresponding ls_vbak to ls_result.
endif.
endloop.
append ls_result to ET_RESULT.
endloop.
Hope this helps you.
Regards,
Rama -
Create utility class in Web Dynpro project
How do I create my own utility java class but keep it in the Web Dynpro project?
Do I have to create a separate java project and have the WebDynpro classes import it or can I keep it in the Web Dynrpo project?
I tried adding my own java class to the Web Dynpro project and when I did a rebuild all, the generator erased it.
Ideally, I would like to keep everything in the same project if possible as this utility class will only be used by the WebDynpro project.Open Eclipse "Navigator" or "Package Explorer" view and put your class under folder src/packages.
Armin -
How to put a user defined class in Web dynpro
How and where can we create some user defined classes?
For example i wanted to create some utility classs for my project. Under what folder should i create this?Please create the .java files under src folder of the project
Go to PackageExplorer->expand the project->select src/packages and create the package under this and create java file.
Regards, Anilkumar -
To create a java class in Web dynpro
Hi,
I want to create a java class which can be used in multiple views. Where will i create it and how will i access it?
Can i create the class in Comp controller's imeplementation between "begin others"----
"end"?
Any help?
regards,
SujeshHi,
If you create the class within the begin others"----
"end" section, this class will not be accessible by any other class.
You can create a class in
Project/src/packages/<namespace>/<your component>/<create a new subdirectory>/Test.java.
This will be accessible to all other classes. Just make sure the first line of your java file is the proper package declaration. So in this case the 1st line dhould be:
package <namespace>.<your component>.<subdirectory name>;
Regards,
Satyajit. -
hi
i have a class ans i wont to add him to the program how & where i do that?
regardsThis all depends on what the class is for. If this class is to do all of your business logic, it should be implemented as an assistance class, otherwise, you could simply add the object reference directly into the coding of the METHOD and call the methods of your class. Again, if this class contains all of your business logic, you would want to use it as an assistance class within your component.
http://help.sap.com/saphelp_nw04s/helpdata/en/43/1f6442a3d9e72ce10000000a1550b0/content.htm
Regards,
Rich Heilman -
Using External Library in Web Dynpro - Error
Hello,
I want to use an external library in a web dynpro. I use WAS 6.40 SP12.
1. I have created an dc web dynpro app
2. I have created an dc external library app
3. I have importet the jar to the external library
4. I have published the jar as public part
5. I have imported the public part to web dynpro
If I build the project I get no error. If I deploy an run the project then I get an error stacktrace:
java.lang.NoClassDefFoundError: com/sap/netweaver/bc/rf/util/uuid/UUID
NoClassDefFoundError - I think the jar-file was not deployed. What is wrong?
Greetings
ThomasHi THomas,
Please explain how you are adding the jars into the publicpart of the Libary DC.
You need to create 2 public parts .
1. Assembly
2. Compilation
You need to add your jar to above two public parts.
Then you need to add above two publicparts to your webdynpro application.
Regards, Anilkumar -
ALV report web (BSP and Web Dynpro)
Hi,
I want to display report results in a BSP table using a list viewer component.
I've found some classes for web dynpro that use ALV to print data results. Is there any way to use the same within a BSP application?
(Web Dynpro example that use an ALV table:
'WDR_TEST_DYN_ALV_USAGE'.)
Thanks and regards,
Mariawhat ALV features you are looking for?
1. sorting - available in bsp tableview
2. filter - availalbe in bsp tableview
3. layout management (visible columns) - is doable with BSP (search weblog area for BSP personalize tableview)
4. export to excel - you can code that in BSP (code samples/special tag available in BSP weblog area)
but if you want a easy way out, as others mentioned, you can use integrated/standalone ITS to generate ALV and then use that its page as frame/iframe within you BSP
Raja -
Abap error when using Web Dynpro assistance class
Hello All,
I created Web Dynpro component with assistance class.
On the component controller I can see the attribute "WD_ASSIST".
I also can use Goto -> text symbols and create net text key.
But when I tried to read the text:
wd_assist->get_text( '001' ).
There is abap error:
Method get_text is unknown protected or private.
I can see the method get_text inside my assistance class like this:
IF_WD_COMPONENT_ASSISTANCE~GET_TEXT visibility - public.
I think I missed something while creating the assistance class?
Thanks in advanced for the help.
NirYour method call should be:
wd_assist->IF_WD_COMPONENT_ASSISTANCE~get_text( '001' ).
You have to supply the interface name or go into the class definition and create a public alias for that method. -
Shooping cart creation in SRM 7.0 using web dynpro ABAP classes.
Hi,
We have recently upgraded to SRM 7.0 from SRM 4.0. We are using customized portal application for the creation of the shopping cart.I am planning to create custom FM which will use the standard Web dynpro ABAP classes to create the shopping cart.
Could you please guide with the classes that are need to be implemented and the sequence of the classes used in the shopping cart creation.
I think these are the classes that are used in the standard web dynpro ABAP component.
CL_FPM_EVENT -> Creates an instance of this class based on an event ID.
CL_BADI_FLT_DATA_TRANS_AND_DB -> Data Handling: Transport and Database.
CL_EXITHANDLER -> Class for Ext. Services Within Framework of Exit Technique.
CL_EX_BBP_DOC_CHANGE_BADI -> BAdI Class CL_EX_BBP_DOC_CHANGE_BADI.
CL_BBP_OBJECTS_ACCESS -> Access Functions for Object Types.
/SAPSRM/CL_PDO_BO_SC -> Shopping Cart BO.
Your expert comments will be appreciated...
Regards,
NareshDear Poster,
As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
Best Regards,
SDN SRM Moderation Team -
How to add new class to existing DC (Web Dynpro project)
Hi,
How can I add new class to an existing DC (Web Dynpro project)?
I tried adding it using File - New - Other - Java - Class, but after a build of the DC the new class (and its contents ) was completely removed.
Then I created a new DC (java project) and created a new class in that DC. This went fine, but I got into problems because of circular referencing between the new & the old DC, so no build was possible.
This can't be difficult, does somebody knows how to do it?
My temporary solution is to add the classdefinition to an exisiting .java file. Very ugly.
Thanks,
JeroenHi Jeroen,
where did you create the class? If the *.java file is placed in the src/packages folder it should not be deleted by a build. (I suspect you created it in the gen_wdp folder?)
Regards,
Marc -
Calling a method in a public web dynpro DC from EP
Hi all,
I have a public web dynpro DC which exposes some methods. I want to call these methods from an EP application (JSP Dynpage). IS this possible to do?
Any info on this would be of great help.
Regards,
Naraharihi,
Step by step solution for calling a webdynpro application from portal is given.
this will help you ....
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7cf6a990-0201-0010-dd80-c09fc1438056
http://help.sap.com/saphelp_nw04/helpdata/en/d8/6ee03fc2269615e10000000a155106/frameset.htm
regards,
ganesh -
Calling a Web Dynpro Application from POWL feeder class
Hi,
I know this question is asked before but never answered, but I try again......
I have a own POWL feeder class where I defined a button in method IF_POWL_FEEDER~GET_ACTIONS.
I know that this action can be handled in method IF_POWL_FEEDER~HANDLE_ACTION.
When pressing the button I want do call another web dynpro application.
How can I do this? -> Any Example Coding?
Thank you and best regards, EdgarHi Vineet,
it works, thanks a lot!!!! Best Regards, Eddy
P.S.: Here is the coding for triggering the event and passing parameters for the selected POWL table line:
METHOD if_powl_feeder~handle_action.
DATA: ls_parameter TYPE powl_namevalue_sty.
DATA: lt_flights TYPE ty_flights.
DATA: ls_flight TYPE sflight.
DATA: ls_selected TYPE rstabix.
FIELD-SYMBOLS: <lt_fligts> TYPE STANDARD TABLE.
IF i_actionid = 'EDIT'.
* Important: this triggers the event
e_portal_actions-fire_wdevent = abap_true.
* Pass parameters to event
ASSIGN c_result_tab TO <lt_fligts>.
lt_flights = <lt_fligts>.
* Determine the first selected row
READ TABLE c_selected INTO ls_selected INDEX 1.
* Read selected POWL data
READ TABLE lt_flights INDEX ls_selected-TABIX INTO ls_flight.
CHECK sy-subrc = 0.
* Pass parameters
ls_parameter-key = 'ACTIONID'.
ls_parameter-value = 'I_ACTIONID'.
APPEND ls_parameter TO e_portal_actions-parameters.
ls_parameter-key = 'CARRID'.
ls_parameter-value = ls_flight-carrid.
APPEND ls_parameter TO e_portal_actions-parameters.
ls_parameter-key = 'CONNID'.
ls_parameter-value = ls_flight-connid.
APPEND ls_parameter TO e_portal_actions-parameters.
ls_parameter-key = 'FLDATE'.
ls_parameter-value = ls_flight-fldate.
APPEND ls_parameter TO e_portal_actions-parameters.
ENDIF.
ENDMETHOD. -
Model class deleting in Web Dynpro
Hi ,
I want to delete few model classes which I imported from RFC which are redundant. Is there any way I can delete these classes.
From the ABAP end also few RFCs have been deleted and now I am getting error at the Web Dynpro end.
Your reply greatly appreciated.
Regards,
RakeshHi,
Delete the model node from the custom controller which is bound to the RFC node during the mapping. and also delete the methods created in custom controller to call the execution of RFC. then remove the model from the used models area. Reimport the model and do the mapping steps.
regards
karthik -
Hi Experts.
I need a list of standard "Web Dynpro classes" delivered by SAP.
Does anyone know where I'm able to find it?
Thanks!
HideHi Hidenori,
You can go to the below link:
http://help.sap.com/javadocs/
You will find standard APIs available for NW CE 7.1, NW Portal 7.0, SAP MDM 7.1, SAP MDM 5.5 and loads of other apis.
Hope this helps!!
Cheers,
Arafat
Maybe you are looking for
-
BP creation to replicate in ECC
Hi Experts, I am working on bp replicatrion for crm to r/ 3 but while creating Bp in crm by tcode BP and selecting role sold t party, in the classification tab u201C The account group field is in grey mode. How to make this field active. Your help wi
-
Upload attachements to existing PDF file in server
Hi All, I need some information, How to add or delete attachments to existing pdf in server. I have already done Uploading files to server. But according to my project requirement, i have to add or delete attachments in existing pdf on server. Can an
-
OVD 11g: White pages application using OIM as datasource
Has anyone seen a good example of a white pages application that uses OIM Org structure and users to build a searchable white pages application? I'd like to allow users to search for users via the html interface to OVD, but use OIM to populate all of
-
Dear Sir, I want to know how to put conditions in vv11 so that i can take printout of sales order. Thanks Regards, Anuradha
-
Import webdynpro in nwds nw7.0
hello...! How can I import a webdynpro into the ndws which is located at the portal server? Can I import an WDA file? Which steps are necassery? Cheers, Christian