4
19/02/2014 How to call one webdynpro component to another ... | SCN 1/4 scn.sap.com/thread/3196577 Getting Started Newsletters Store Products Services & Support About SCN Downloads Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation 1 points Welcome, B.Sm ith Kum ar Search the Community Activity Communications 3 Actions Brow se Create 0 Tweet Tweet 0 5 Replies Latest reply : 25-Jun-2012 10:54 by venkata krishna Share Share 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.. This is my first component view design part.. prabhu b 22-Jun-2012 12:13

How to Call One Webdynpro Component to Another

Embed Size (px)

DESCRIPTION

webdynpro

Citation preview

Page 1: How to Call One Webdynpro Component to Another

19/02/2014 How to call one webdynpro component to another ... | SCN

1/4scn.sap.com/thread/3196577

Getting Started Newsletters Store

Products Services & Support About SCN Downloads

Industries Training & Education Partnership Developer Center

Lines of Business University Alliances Events & Webinars Innovation

1 pointsWelcome, B.Smith Kumar Search the Community

Activity Communications

33

Actions

Brow se Create

Your

0 TweetTweet 0

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

ShareShare

How to call one webdynpro component toanother componentThis 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..

This is my first component view design part..

prabhu b 22-Jun-2012 12:13

Page 2: How to Call One Webdynpro Component to Another

628 View s Topics: w eb_dynpro

Average User Rating

(0 ratings)

My Rating:

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

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( ).

Helpful Answer

venkata krishna 23-Jun-2012 05:41 (in response to prabhu b)

Page 3: How to Call One Webdynpro Component to Another

19/02/2014 How to call one webdynpro component to another ... | SCN

3/4scn.sap.com/thread/3196577

->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)

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 07:14 (in response to venkata krishna)

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)

prabhu b 25-Jun-2012 08:18 (in response to prabhu b)

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.

Helpful Answer

venkata krishna 25-Jun-2012 10:54 (in response to prabhu b)

Page 4: How to Call One Webdynpro Component to Another

19/02/2014 How to call one webdynpro component to another ... | SCN

4/4scn.sap.com/thread/3196577

Follow SCNSite Index Contact Us SAP Help Portal

Privacy Terms of Use Legal Disclosure Copyright

0 TweetTweet 0ShareShare

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)

Helpful Answer

Monishankar Chatterjee 25-Jun-2012 08:28 (in response to prabhu b)

As monishankar said use the code wizard to generate the code.. and fallow the steps

mentioned ..

Regards,

Venkat.

Like (0)