cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the which configuration selected when we have multiple configurations

Former Member
0 Kudos

Hi,

i am calling creation activity (BT126H_APPT/apptdetails)page from planned activity(BP_BPBT) result list by clicking one button1,

when i am clicking this button2, i need to call the same activity creation page(BT126H_APPT/apptdetails), but i need to show some different field values.

i have created 2 subtypes for object type, and created 2 configurations for BT126H_APPT/apptdetails component, and i have written the code in do_config_determination() based on subtype i am passing the values to fields.

my problem is what ever the button1/button2 clicked same page is coming but i don't know how to display config1 for button1, config2 for button2.

please help me on this, i am new to CRM.

Thanks,

Neelam

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Habe you tried to set a global variable in the on-click event and use this variable in do_config_determination?

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

Thanks for your reply,

do you want me to create one global variable in IMPL class of BP_BPBT component, then inside the do_config_determination()  i have to use ?

i don't know how to use this variable in do_config_determaination.

could you please explain more.

Former Member
0 Kudos

Hello,

I would do it like this:

Do_config_determination:

If gv_variable = ‘Z’.

  me->set_config_keys( iv_object_type                = ‘X1’
                                      iv_object_sub_type         = ‘X2’
                                      iv_propagate_2_children = abap_true ).


Else.

...

Endif.

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

Thanks for your quick reply,

i have multiple configurations in BT126H_APPT/Apptdetails, when i am clicking on button1 from BP_BPBT/accountactivitiesOV....i need to display Configuration1

same way when i am clicking button2 from BP_BPBT/accountactivitiesOV...i need to display configuration2.

here in do_config_determination() of BT126H_APPT/apptdetails component ....i don't know how to find which button clicked from BP_BPBT/activityOV ....

pls help me on this.

Thanks,

Neelam

Former Member
0 Kudos

Hello,

In the on_click_event for button1 you do

gv_variable = ‘1’.

In the on_click_event for button2 you do

gv_variable = ‘2’.

...and in do_config_determination you do

If gv_variable = ‘1’.

  me->set_config_keys( iv_object_type                = ‘X1’
                                      iv_object_sub_type         = ‘X1’
                                      iv_propagate_2_children = abap_true ).


ElseIf gv_variable = ‘2’.

  me->set_config_keys( iv_object_type                = ‘X2’
                                      iv_object_sub_type         = ‘X2’
                                      iv_propagate_2_children = abap_true ).

.

ElseIf ...

Endif.

Of course you define also configurations with object_type X1 and X2 and syb_types X1 and X2 and declare gv_variable in the impl-class

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

thanks for your reply,

i think your code will wok only when i want to display multiple configurations with in the component.

Here i am calling BT126H_APPT component from BP_BPBT...

so i have multiple configurations in BT126H_APPT

i have buttons in BP_BPBT,

pls help me on this..

Thanks,

Neelam

Former Member
0 Kudos

Hello,

Sorry, I misunderstood.

So the problem is to transfer the information from BT126H_APPT to BP_BPBT.

What about creating a new context node and transfer the information with WD_USAGE_INITIALIZE?

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

i need to transfer information from BP_BPBT to BT126H_APPT.

i am able to call the BT126H_APPT from BP_BPBT when i am clicking on button1, button2...

but problem is when i am clicking on button1/button2 i am displaying same creation page.

actually i want to display different field vaues when i am clicking on button2.

in BT126H_APPT  to set the right configuration for each button, i don't know how to find which button clicked,

here i am facing the problem.

pls help me on this.

Thanks,

Neelam

Former Member
0 Kudos

Hi Thomas,

i have one idea, i can able to catch the event name and pass it to global variable in IMPL class of BP_BPBT...

now i can read that value in BT126H_APPT,

but i don't know how to read variable value from one (componnet)IMPL class to another component IMPL class...

pls help me on this,

Thanks,

Neelam

Former Member
0 Kudos

Hello Neelam,

Can you put the information into a value node of the component controller and pass it via WD_USAGE_INITIALIZE?

Best regards,

Thomas Wagner

Former Member
0 Kudos

Hi Thomas,

Thanks for your reply,

i don't know how to store it, can you pls explain the steps.

Thanks,

Neelam