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: 
Read only

Automatic filter on Selection Screen

0 Likes
903

Hello SAPients.

I have a selection screen with these two fields:

parameters:

pa_vkorg like tvko-vkorg. " Sales Organization

select-options:

so_werks for t001w-werks. " Plant

My question is: How can I code an automatic validation to ensure that in the Plant field the user only see plants that are related to the Sales Organization previously selected?

I have an idea of using Memory ID but I'm not sure that's the best way of doing it.

Thank you in advance.

Message was edited by: Ricardo Fernández Vázquez

4 REPLIES 4
Read only

Former Member
0 Likes
633

Hi,

Check this out..

s_werks FOR t001l-werks MODIF ID bbb,(Plant)

s_lgort FOR t001l-lgort MODIF ID bbb,(Storage Locations)

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'BBB'.

screen-active = '1'.

screen-input = '1'.

screen-output = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards

Vara

Read only

abdul_hakim
Active Contributor
0 Likes
633

hi

you need to use search help in this case.

Cheers,

Abdul Hakim

Read only

0 Likes
633

Hi Abdul,

Thanks for your help, that's exactly what I found and that's what I'm using.

The problem that I have now is that my search help doesn't receive the value of the Sales Organization unless a hit enter after populating the value of the SalOrg field.

That's because I'm receiving it in the parameter id VKO.

My new question is: Do you know other way to send this value to the search help? I also tried with set parameter id 'VKO'... in the "at selection-screen on value-request for so_werks-low" event. But I receive the error message 'The addition "ON VALUE-REQUEST FOR" is not allowed with PARAMETERS or SELECT- OPTIONS if MATCHCODE OBJECT is present'

By the way I'm working with SAP 4.6C.

Thank you.

Read only

0 Likes
633

hi ricardo,

i think using search help is the best way and you need to do give the sales.org value for determining the plant details.this is how the standard SAP system function also been implemented.

if you wanna diplay the plant as soon as the user enters the sales org then you need to achieve the same in the PAI event AT SELECTION-SCREEN by using SELECT clause to fetch the valid plants and you can display the valid plants to the user.Keep in mind that you are triggering PAI here also. The best approach is using Search Help..

Cheers,

Abdul Hakim