Você está na página 1de 4

19/02/2014

How to call one webdynpro component to another ... | SCN


Getting Started New sletters Store

Welcome, B.Sm ith Kum ar

1 points

Search the Community

Products Industries Lines of Business

Services & Support Training & Education University Alliances

About SCN Partnership Events & Webinars

Downloads Developer Center Innovation


Activity Brow se

3 Communications Create Actions

5 Replies Latest reply: 25-Jun-2012 10:54 by venkata krishna

Share

Tw eet

prabhu b

22-Jun-2012 12:13

How to call one webdynpro component to another component


This question is Not Answered. This is my requirement, 1.If i press the display related form.It will open a popup of 2nd component view. But how to populate the value from the 1st component to 2nd component..

Your

This is my first component view design part..

scn.sap.com/thread/3196577

1/4

Can u tell where i have to write code.Tell it in step by step process..........

Helpful Answers by venkata krishna, Monishankar Chatterjee, venkata krishna

628 View s

Topics: w eb_dynpro

Average User Rating (0 ratings)

My Rating:

venkata krishna 23-Jun-2012 05:41 (in response to prabhu b) Helpful Answer Re: How to call one webdynpro component to another component Hi Prabhu, Fallow below steps... ->component2 view-> methods-> create one method with enable interface. Bu using the above created method you can pass data from comp1 to comp2.

->double click on comp1 and mention the comp2 in used components.

->In comp1 create one view container..In windows controller select created view container and embed comp2 ->view. Now you can get comp2 view into comp1. ------------------------------------------------------------------------------------If u want to pass data from comp1 to comp2 we already created one interface method in comp2. call comp2 method in comp1 like below.... DATA lo_cmp_usage TYPE REF TO if_wd_component_usage. lo_cmp_usage = wd_this->wd_cpuse_staff_header( ). IF lo_cmp_usage->has_active_component( ) IS INITIAL. lo_cmp_usage->create_component( ). ENDIF. DATA lo_interfacecontroller TYPE REF TO ziwci_comp2. lo_interfacecontroller = wd_this->wd_cpifc_comp2( ). lo_interfacecontroller->method( ).

19/02/2014

How to call one webdynpro component to another ... | SCN


->In above method u can pass parameters also.. Depending up on values view display data in comp1... According to u r requirement u have to create interface node.... Regards, Venkat

Like (1)

prabhu b 25-Jun-2012 07:14 (in response to venkata krishna) Re: How to call one webdynpro component to another component Hi Venkat, U catch my requirement correctly.But i have one small doubt while creating the interface method.Inside the method wheather i have to write any code.It means what i have to write. Can u tell how to pass parameter in this method in step by step.. On which action i have to call this method.And small doubt in this image,

Like (0)

prabhu b 25-Jun-2012 08:18 (in response to prabhu b) Re: How to call one webdynpro component to another component Hi venkat, This is my interface method-Get_details. 1st component name - zdesign_form 2nd component name - zrequest_form component usage - zrequest_form can u tell how to read component usage and interface controller in step by step process......... can u arrange my component name and interface name according the above code and reply to me..

Like (0)

venkata krishna 25-Jun-2012 10:54 (in response to prabhu b) Helpful Answer Re: How to call one webdynpro component to another component Hi prabhu, There are so many ways to create method.. But usually these interface methods generated by using serivce calls using BAPIs and FM...Other wise u can create manually and make that method is interface method. If u use BAPI and FM their is no need to write the code in side method .Base on BAPI or FM it automatically generates the code.... I/O parameters are like FM.

scn.sap.com/thread/3196577

3/4

19/02/2014

How to call one webdynpro component to another ... | SCN


As monishankar said use the code wizard to generate the code.. and fallow the steps mentioned .. Regards, Venkat.

Like (0)

Monishankar Chatterjee 25-Jun-2012 08:28 (in response to prabhu b) Helpful Answer Re: How to call one webdynpro component to another component HI Prabhu, you can use code wizard to generate code like above then you can compare. Declare the 2nd component in your 1st component'c component usage & create a usage in the properties of your view. Then call the method in the required action ( like button to display the second component). In code wizard first instantiate the use component :-

Cal the method of the of the 2nd component to pass data

the above code will be generated. An alternate to above soln you can also make some of the 2nd component node as interface node and pass data to them from the first one. Regards, Monishankar C

Like (1)

Share

Tw eet

Site Index Privacy

Contact Us Terms of Use

SAP Help Portal Legal Disclosure

Copyright

Follow SCN

scn.sap.com/thread/3196577

4/4

Você também pode gostar