on 02-21-2014 2:04 PM
Hello everyone!
I am developing an app in WDA already created in "traditional ABAP" (And now i have to pass all the programs developed to WDA),
My problem is that I have several Functions module that were created, which performs "call screen"(not support) and they are quite long to create the dynpro 's in WDA all over again.
Is there any possibility to reuse them, whether by performing a submit to a Z Prgrm from WDA and executing it from there? or something?
I have attached the FM and the dynpro just as information.
*********
function zsci_acdc_show_remarks.
*"----------------------------------------------------------------------
*"*"Interface locale :
*" IMPORTING
*" VALUE(P_USER) TYPE SCI_USER
*" VALUE(P_NAME) TYPE SCI_NAME
*" VALUE(P_VERS) TYPE SCI_VERS
*" VALUE(P_INSPEXECDATE) TYPE DATS
*" VALUE(P_INSPUSERNAME) TYPE ZSCI_INSPNAME
*" VALUE(P_BUSUNIT) TYPE ZSCI_BUSUNIT
*" VALUE(P_PRJNAME) TYPE ZSCI_PRJNAME
*" VALUE(P_PRJLEAD) TYPE ZSCI_PRJLEAD
*" VALUE(P_MACNAME) TYPE ZSCI_MACNAME
*" VALUE(P_SYSID) TYPE ZSCI_SYSID
*" VALUE(P_CLIENT) TYPE ZSCI_CLIENT
*" VALUE(P_TOTAL_LINES) TYPE INT4
*" VALUE(P_COMMENT_LINES) TYPE INT4
*" VALUE(P_RATE_COMMENT) TYPE INT4
*" VALUE(P_NOTATION_ICON) TYPE CHAR5 OPTIONAL
*" VALUE(P_TENDENCY_ICON) TYPE CHAR5 OPTIONAL
*" VALUE(P_TESTS_TAB) TYPE ZSCI_TESTS_TAB OPTIONAL
*" VALUE(P_DEVUSERMOD) TYPE CHAR12 OPTIONAL
*" VALUE(P_PKGNAME) TYPE CHAR30 OPTIONAL
*" VALUE(P_INSPID) TYPE NUMC3 OPTIONAL
*" VALUE(P_INSPVER2) TYPE NUMC3 OPTIONAL
*" VALUE(P_INSPNAME) TYPE CHAR30 OPTIONAL
*" VALUE(P_OBJTYPE) TYPE CHAR4 OPTIONAL
*" VALUE(P_OBJNAME) TYPE CHAR40 OPTIONAL
*" EXCEPTIONS
*" EXC_RS_TOOL_ACCESS
*" INVALID_OBJECT_TYPE
*"----------------------------------------------------------------------
clear: v_index,
v_row_no.
* 1º block: System
v_dyn_busunit = p_busunit. "BU
v_dyn_prjname = p_prjname. "Projet
v_dyn_prjlead = p_prjlead. "Chef de Projet
v_usr_prjl = p_prjlead.
v_dyn_macname = p_macname. "Machine
v_dyn_sysid = p_sysid. "System ID
v_dyn_client = p_client. "Client
* 2º block: Inspection
v_dyn_inspname = p_inspname."name
* v_dyn_inspnotexist = p_inspnotexist.
v_dyn_inspid = p_inspid."id
v_dyn_inspexecdate = p_inspexecdate."date
v_dyn_inspver2 = p_inspver2."version
v_dyn_inspusername = p_inspusername.
v_dyn_objname = p_objname.
v_dyn_objtype = p_objtype.
* 3º block: Remarks types
v_dyn_nota_icon = p_notation_icon.
v_dyn_tend_icon = p_tendency_icon.
* 4º block: Remarks Status
v_total_lines = p_total_lines.
v_comment_lines = p_comment_lines.
v_dyn_rate_comment_sci = p_rate_comment.
v_devusermod = p_devusermod.
v_pkgname = p_pkgname.
v_user = p_user.
i_tests[] = p_tests_tab[].
* Recover the logged developer user
get parameter id 'PUSR' field v_usr_dev.
if v_usr_dev is initial.
v_usr_dev = sy-uname.
endif.
* Calling ALV with detected remarks data list
call screen 0100 .
*********
Thank you all!.
best regards
Nicolas.
I agree with Kiran that you can't do a CALL SCREEN from a WDA application. This pretty much defeats the whole purpose of WDA development.
Ideally, you should re-design your application to use WDA concepts and split the business logic from the UI logic (MVC design pattern).
Now, having said that, it could take you a very long time to re-design all of the good work you did in traditional ABAP. So, it is possible to call an ITS version of the ABAP transaction. To do so, you need to create an Object-Based Navigatin (OBN) reference to the ITS transaction. You can call OBN from within WDA methods. The OBN reference then triggers the corresponding object which could be a transaction, another WDA, etc. Keep in mind though that OBN will be asynchronous, meaning that the OBN target will be opened in a new window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello, and thank you Andullah for answering,
I'm a looking for information about OBN and i'm a bit lost how to send all the parameters to my trx, i have made a few ITS, but only with a few parameters.
Can you give me an example for my case please, how to put all my paremeters in?, i have look for example online but no one shows all the "frame" complete.
Thank you again for answering.
best regards
Nicolas.
That's a little tricky you can't do a SET PARAMETER / MEMORY ID from WDA to an ITS transaction. One quick way I can think of is to create a singleton object with a GET_INSTANCE method. The instance will have two methods like SET_DATA and GET_DATA. From the WDA application, you first call the GET_INSTANCE method to get the actual instance and then you call the SET_DATA on that instance. Then, in the ITS transaction, you call the GET_INSTANCE and then call the GET_DATA on that instance. This is something similar to beans if you are familiar with that concept. I think this should work.
Hi abdullah thanks again for answering_!,
But you told me about an OBN and i'm still working with this item.
Can you give me an example for my case/ any case, please?.
Sorry to insist int this...but i really can't find how to get this parameters...
* CALL METHOD lo_portal_manager->navigate_to_object
* EXPORTING
* system = l_obn_obj
* object_type = l_obn_sys
* operation = l_obn_op
i have tested a few from internet but they don't work..and also they don't show all the "frame" complete.
Thank you.
Nicolas.
Hi,
No, you cannot use the call screen statements in WDA. and in WDA for ALV, you have to use component usage and place the ALV table in View Container.
So, I would suggest you to take the gui statements out of FM( and adjust your traditional ABAP reports accordingly) and reuse the FM's or Create a New FM/ Class and copy the logic part to those new FM/ Class and use them in WDA.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.