on 11-28-2007 5:52 PM
Hi Gurus,
I've written a Web Dynpro Abap Application to maintain CRM Opportunities, working with Transaction-ID and everything (read&write) works fine.
Now, I'd like to write the same Application in Web Dynpro Java.
I'm quite new in WDJ and thus would like to have some good Howtos & Guides (using the NWDI, CMS, CBS & DTR on a remote J2EE Engine) - e.g. how do I get information out of FMs I used in Abap, like CRM_ORDERADM_H_READ_OB when writing code in Java?
Thanks in Advice,
Farid
(help will always be rewarded)
hi Farid
After making few hit and trials, I figured out that Web Dynpro is not supporting Table Types made from the Data Element in Abap.
So first create a Structure with the Data Element and then create Table Type from the structure.
In ur case, create a structure Z_CRMT_OBJECT_GUID_STRU with the Data Element CRMT_OBJECT_GUID, now create a Table Type Z_CRMT_OBJECT_GUID_TAB of structure Z_CRMT_OBJECT_GUID_STRU.
Now use this Table Type Z_CRMT_OBJECT_GUID_TAB for import parameter IT_OBJECTS_TO_SAVE and export parameter ET_OBJECTS_NOT_SAVED.
I hope this will solve your problem.
If the problem still exist we will talk in skype.
Thanks & Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
someone an idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja,
The problem is I can not see them. I've tried the following procedure:
1. create a myModel and import Z_R_CRM_ORDER_SAVE
2. in my layout create a new model node CRM_ORDER_SAVE
3. in the context menu of this new model node I've choosen edit model binding
4. selected model class Z_R_CRM_ORDER_SAVE_INPUT and klicked next
there are 3 IV from the FM but no IT_OBJECTS_TO_SAVE.
same procedure for Z_R_CRM_ORDER_SAVE_OUTPUT (there is ET_OBJECTS_NOT_SAVED missing).
the missing nodes of course are not created and so I cannot bind InputFields to these (tried to).
this only happens with Z FMs, not with standard RFC enabled FMs.
Thanks!
Cheers,
Farid
Hi,
I've deleted the model, restarted the j2ee engine, created a new model in a new package, importet Z_R_CRM_ORDER_SAVE an get the following message:
[code]
[Warning]: Creating a connection with Metamodel language <en> failed. Continuing with language <DE>
[Fatal]: com.sap.mw.jco.JCO$Exception: Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx
[Info]: Creating Model: MyNewModel
[Info]: Creating Model Class: Z_R_Crm_Order_Save_Input
[Info]: Creating Model Class: Z_R_Crm_Order_Save_Output
[Info]: Creating Model Class Property: Cv_Log_Handle
[Info]: Creating Model Class Property: Cv_Log_Handle
[Info]: Creating Model Class: Crmt_Exception
[Info]: Creating Model Class: Balmsghndl
[Info]: Creating Model Relation: Crmt_Exception:Msg_Handle
[Info]: Creating Model Class Property: Log_Handle
[Info]: Creating Model Class Property: Msgnumber
[Info]: Creating Model Relation: Z_R_Crm_Order_Save_Output:Et_Exception
[Info]: Creating Model Class Property: Guid
[Info]: Creating Model Class Property: _Class
[Info]: Creating Model Class Property: Code
[Fatal]: java.lang.ClassCastException: com.sap.dictionary.types.mdi2metamodel.model.SimpleType
[Info]: Creating Model Class: Crmt_Return_Objects_Struc
[Info]: Creating Model Relation: Z_R_Crm_Order_Save_Output:Et_Saved_Objects
[Info]: Creating Model Class Property: Guid
[Info]: Creating Model Class Property: Object_Id
[Fatal]: java.lang.ClassCastException: com.sap.dictionary.types.mdi2metamodel.model.SimpleType
[Info]: Creating Model Class Property: Iv_No_Bdoc_Send
[Info]: Creating Model Class Property: Iv_Save_Frame_Log
[Info]: Creating Model Class Property: Iv_Update_Task_Local
[Info]: Creating Model Relation: Z_R_Crm_Order_Save_Input:Output:Z_R_Crm_Order_Save_Output
[/code]
and same problem as discribed above (no IT_OBJECTS_TO_SAVE etc.), even after restarting the j2ee engine a second time after importing.
Hello again,
meanwhile I tried this solution:
I made a new copy of CRM_ORDER_API with FM CRM_ORDER_SAVE and made it remote enabled.
In Z_R2_CRM_ORDER_SAVE i throw out all variables except IT_OBJECTS_TO_SAVE, ET_SAVED_OBJECTS, ET_EXCEPTION and ET_OBJECTS_NOT_SAVED (and IT_OBJECTS_TO_SAVE ist NOT marked optional!!).
within the source code of Z_R2_CRM_ORDER_SAVE, I just made a functioncall to the original CRM_ORDER_SAVE passing the variables mentioned above.
then I choose a new Web Dynpro, added a new model an importet Z_R2_CRM_ORDER_SAVE. but still the desired (and obligatory) import variable IT_OBJECTS_TO_SAVE is missing.
desperation grows...
Farid
close the thread, if your issue is resolved.
Raja T
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the prompt reply!
I'm using the following functions in my WDA:
CRM_ORDERADM_H_GUID_GET_OB
CRM_ORDERADM_H_READ_OB and
CRM_CUSTOMER_H_READ_OB.
I can not find these FMs when I try to select RFC modules in a model (connecting to CRM server). There are functions like CRM_ORDER_GET_ITEM_BY_EXT_KEY I could select, but thats not what I'm looking for. How do I get access to all FM available in SE37?
Thanks,
Farid
Refer this link: THis will explain how to access FM.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wdjava%20tutorials%20and%20articles%20archive/creating%20a%20web%20dynpro%20application%20accessing%20abap%20functions.pdf">Accessing ABAP Functions in Web Dynpro</a>
Raja T
Hi Raja,
I am using the same guide, and as shown on page 12 I try to get one of the FMs I listet above. CRM_CUSTOMER_H_READ_OB is absolutely not available and the ORDERADM_H FMs are also unavailable, but I can find e.g. CRM_ORDER_GET_ITEM_BY_EXT_KEY.
B.t.w. there are no green dots in front of the FMs like shown on page 12 but a yellow triangle.
What do you think is the problem?
greets
Farid
Sorry, there are still some questions using RFC enabled FMs.
I'm using CRM_ORDER_SAVE in my WDA:
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE = lt_objects_to_save
IMPORTING
ET_SAVED_OBJECTS = lt_saved_objects
ET_EXCEPTION = lt_exceptions
ET_OBJECTS_NOT_SAVED = lt_objects_not_saved
So I made a RFC enabled copy of this FM to Z_R_CRM_ORDER_SAVE.
Now, when I import the the FM to a model class in Dev. Studio I have only the following subtree:
Model Classes
- Balmsghndl
- Crmt_Exception
--- Msg_Handle
- Crmt_Return_Objects_Struc
- Z_R_Crm_Order_Save_Input
--- Output
- Z_R_Crm_Order_Save_Output
--- Et_Exceptions
--- Et_Saved_Objects
There is no IT_OBJECTS_TO_SAVE or ET_OBJECTS_NOT_SAVED I'm using in the ABAP WD.
Same Situation for CRM_ORDER_MAINTAIN and CRM_ORDER_READ: there are varables missing, especially tables.
Is there a way to get full functionality for WDJ?
And how is the situation, when a copied and RFC enabeld FM calls an other FM within his code (e.g. CRM_ORDER_READ calls CRM_ORDER_READ_OW). should one also copy the second (called) FM (here: CRM_ORDER_READ_OW) or os this done by the system?
Thanks in advice,
Farid
Look at below link:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">web Dynpro Sample Applications and Tutorials</a>
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Especially that link
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/a-c/creating%20your%20first%20web%20dynpro%20application.pdf">http://https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/a-c/creating%20your%20first%20web%20dynpro%20application.pdf</a>
helped me lot starting in WDJ.
Greets,
Domingo
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.