cancel
Showing results for 
Search instead for 
Did you mean: 

Layers (tabs) using a Single Model

Former Member
0 Kudos

I have a single model that I want to share by different Layers (Tabs). At runtime, when a tab is selected, the model will be updated with the applicable data for the selected tab.

How can I capture the Tab name selected at runtime and pass an associated value to a BAPI data service in the shared model?

Also, how can I have this BAPI automatically executed when a tab is selected? (Do I set the link into the BAPI Event Name = Select)

For instance, if I have 6 divisions that I want to display Profit and Loss data (charts/tables), can I build the 6 layers and have a single model that is used to display each divisions data after the Tab Name is selected? Or will I have to copy the same model 6 times?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

First issue

You can try a work around by capturing the tab name in a hidden input field and then pass the tab name to BAPI

Second issue

If you connect the BAPI to start point of model providing all the necessary values and the output of BAPI to the form which is in the layer(tab), i think you can solve the issue. On selecting the tab, you will be able to execute the BAPI

Third issue

As far as i know you can use 6 layer in a single model .

Thanks

Harsimran

Former Member
0 Kudos

How do I capture the tab name in a hidden input field?

Former Member
0 Kudos

Hi

In each tab, you can put hidden input field and initialize it with the tab name . This can be done during design time only. Assign the default value of Input field to tab name.So, whenever the user selects the tab, the value of that input field can be passed.

Award points if it helps !

Thanks

Harsimran

Former Member
0 Kudos

Since I'm fairly new to VC, can you provide the steps for creating a hidden input field to capture a tab name?

Former Member
0 Kudos

Hi Shawn,

you have to drag a form and add in this form an input field. Then you can set the hidden option to true under the input field settings.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcei,

I figured out how to create the hidden input field, but didn't know how to get the input field value to be set the the selected tab name. Am I able to have one input field that waits for a signal that a tab has been selected?

If you have an example, that would be great.

Thanks,

Shawn

Former Member
0 Kudos

Hi

Create a input field on the form .

Set it default value to the name of the tab in the properties of the input field.

Check the checkbox for hidden in the properties of the input field.

Thanks

Harsimran

Former Member
0 Kudos

Hi Shawn,

there is a field called default value in this field you can enter the name of the tab at design time.

Best Regards,

Marcel

Former Member
0 Kudos

I have the default value set to the tab names, but at runtime, how can I capture which of the 6 tabs is selected?

Do I create an input for for each of the 6 tabs?

Do I place the input form inside the layer?

Can I have one input form with 6 input fields for each tab? With the input form on the iView vs inside the layer.

Former Member
0 Kudos

Hi

At runtime, the tab which is selected only the input field present in that tab will pass its value further. So by this way you will come to know which tab is selected.

Ya, you need input field for each of 6 tabs.

Yes, the input form should be present inside the layer

If you will have same input form with 6 fields, then you wont come to know which tab is selected.

Thanks

Harsimran

Former Member
0 Kudos

Hi,

I thought about this case and I think you could also use a data store and if you call a tab the value of the data store should modified.

Best Regards,

Marcel

Former Member
0 Kudos

Hi

So now you have 2 work arounds. Try anyone of them which ever is suitable in your case

Either pass value of hidden fields in each form

Use data store and check the value of data store.

Both are equivalent good work around and the choice of work around depends on your understanding and your issue.

Thanks

Harsimran

Former Member
0 Kudos

I will give these options a try.

Thanks for everyones responses.

Answers (0)