Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple selection active not working

bharath_padmanabhan
Participant
0 Kudos
904

Experts,

I have a simply ALV report with a selection screen that has 2 search help fields, Company code and Plant.

User presses F4 in Company code and selects a value. At this point, I am using FM DYNP_VALUES_UPDATE to populate the corresponding Plants against the company code in Plant search help field.

S_CCODE is the name of the company code search help and S_WERKS is the name of the Plant search help.

I am populating multiple plant values in S_WERKS-LOW in a loop and using DYNP_VALUES_UPDATE I am able to successfully populate the plants on screen.

So far so good.

After populating multiple plant values, I see that Multiple selection button is not active(NOT GREEN in color). This makes me doubt if my code to populate multiple plants really worked. Now I click multiple selection button and I see all the plant values as expected. Now when I come out of that popup, I see that multiple selection is active(GREEN color and not GREY anymore).

Is there a way I can programmatically make multiple selection button as active?

Image: Multiple selection greyed out as shown below making it look as though there is only 1 plant value populated.

Image: Clicking extension button shows that Plant field correctly has multiple plant values filled.

Image: When we come out of the popup in Image 2, we see that multiple selection becomes active(GREEN color)

Thanks,

Bharath

5 REPLIES 5

Sandra_Rossi
Active Contributor
750

Programs usually don't fill the Plants in the select-options, it remains empty and the filtering is done during the execution of the program. Is there any reason why you need to show the plants?

bharath_padmanabhan
Participant
0 Kudos
750

Hi Sandra,

Thanks a lot for your reply.

As we know there can be multiple plants against a Company Code. So when the user selects the Company code, I am filling all the plants against the Company code in the Plants field. Say for example, there are 3 plants against 1 company code. Now user might decide to execute the report only for 2 plants against the company code. In this case, user will click the plant field, delete the 3rd plant and then execute the report ONLY for the 2 plants.

This is why we are giving a select option for Plant field in the selection screen.

Thanks

Bharath

bharath_padmanabhan
Participant
0 Kudos
750

In the scenario which you shared, report will execute for ALL the plants against the company code entered. So for example, if there are 10 plants against the company code, report will show the output for all the 10 plants. In case user wants to see the report only for 6 out of those 10 plants, he can filter those 6 plants in the selection screen.

raymond_giuseppi
Active Contributor
0 Kudos
750

AFAIK, DYNP_VALUES_UPDATE will only update the displayed record of the range, you may be require to append following entries to the internal table (append records to S_WERKS with SIGN = 'I' and OPTION = 'EQ')

(You could also try FM RS_SELECTIONSCREEN_READ and RS_SELECTIONSCREEN_UPDATE)

0 Kudos
750

Raymond,

Apologies for the delay in response. Thank you so much for your reply.

I tried RS_SELECTIONSCREEN_READ and RS_SELECTIONSCREEN_UPDATE FMs. I see that the behavior is still the same. So irrespective of whether we use DYNP_VALUES_UPDATE or RS_SELECTIONSCREEN_UPDATE, the values are getting populated as expected in select options for Plant(S_WERKS). This is the good part.

But say I am the end user, I would expect the multiple selection button to show in GREEN automatically when there is more than 1 value filled in S_WERKS-LOW. Currently, SAP is turning this button to GREEN when the user manually clicks the button to confirm if all the plants against Company code got filled. I was looking for a way to automate this via coding.

Makes me wonder that this behavior is event driven and can't be programmed. User click is the event upon which the extension button turns from Grey to Green.

In this development, I was able to convince the end user about this. But personally I would have loved to see this happen.

Thank you Sandra and Raymond - For your valuable inputs.