cancel
Showing results for 
Search instead for 
Did you mean: 

Create New Activity From Opportunity

Former Member
0 Kudos

I'm trying to create a 'New' button for Activities (Component BTDOCFLOW) on the Opportunity screen just like on the Accounts screen.  When you click New, a popup comes up and you can select the kind of activity like task, phone call, or appointment.  Once you've selected the activity it should navigate to the create activity with the account information populated.  We've added the button and the popup is working, but I'm stuck on how to capture the data and navigate.  In other words,  how do you properly build the data collection to pass in the plug for this component?

I've searched SDN and found dynamic navigation to a specific activity type, but I don't think that will work.

Thanks,

Clint

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks everyone...

Lets say the requirement isn't negotiable would anyone be able to give me a recommendation on how to proceed or point me to documentation?

In other words, lets say this was a custom component, what are the high-level steps for passing the data to the new activity

Thanks again, I will close thread.

stephenjohannes
Active Contributor
0 Kudos

In your case you don't need to use the Web Client to pass the data.  Once again just create the new button that uses the followup code with hard coding to your desired target transaction type and let copy control/configuration pass the data through in the background.

Even if you are replicating the followup functionality, then only replicating the button push would be better than performing manual copy control.

Take care,

Stephen

Answers (4)

Answers (4)

Former Member
0 Kudos

- Yes, I looked at the create follow-up button logic.  Where I'm getting stuck is that component BT111H_OPT has a context node BTADMINH and its calling a method createFollowup (code below).  Component BTDOCFLOW does not have this context node or method and it was failing.  Can I just add the contect node to the component?  I tried this, but it didn't work.  Maybe I didn't add it properly.

lr_result = lr_entity->execute( iv_method_name = 'createFollowUp' "#EC NOTEXT

                                      it_param       = lt_params )

- Thank you for the tip.  I will research.

You can probably guess CRM Web UI enhancements are new to me....thank for the replies.

stephenjohannes
Active Contributor
0 Kudos

I'm going to chime in and say that "zero code" is needed for your requirement out of the box, if you use the standard SAP functionality correctly.  In this case you would choose create followup.  Then with proper copy control the user will be presented with a followup choices.  Next to get your partner data to come over, you need to configure the partner determination for the followup transaction type to use an access sequence that uses preceding document as the source.  Tell your users the right way is to use the follow-up button as SAP intended and so they can have you spend your time on something that does not recreate the standard features of SAP CRM.  Yes I'm going to say it but your business requirement is not valid .

No code needed.  In fact I would also not recommend to put any of this logic coded into the web client code in the first place(pre-populating data, etc).  If you need to do more weird stuff copying between transactiosn then I would recommend using the CRM_COPY_BADI and create your own copy routine.  If that doesn't work then some business transaction event function modules will do the trick.

On a side note Clint welcome to SCN and the world of SAP CRM enhancements.  The people who provided the answers above are great and more present community members than me lately, but feel free to reach out to me if you need some validation on your requirements from a process stand-point.

Take care,

Stephen

VishnAndr
Active Contributor
0 Kudos

Clint,

I do not suggest to put btadminh in this component because the component is quite a general one.

Better proceed as other members already told you: use follow-ups.

BTW, BPs have such button on the screen because they do not have 'follow-up' possibility as opportunities and other documents do.

Former Member
0 Kudos

As Sivaram said.. why did you add a button and wrote the logic? Copy control should be enough

Former Member
0 Kudos

Hello Clint,

Copy Control for thsi would work for your requirement.

It takes care of copying the data from one Transaction type to another .

VishnAndr
Active Contributor
0 Kudos

Hello, Clint.

Why do you think that dynamic navigation will not work?

Also have you tried to take the logic from "Create follow-up" button on overview screen of opportunity?