Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Prompt with ALL value option

Hi All,

I have a object - Service Code which have values (1001, 1002, 1003, 1004, 1005,1006, 1007) and have created a new object new_service_code based on the service code with condition applied to have only a few set of values.

Service Code          New_Service_Code

1001                         1001

1002                         1003

1003                         1006

1004

1005

1006

1007


I am trying to creating a pre defined condition in universe with a prompt having the option of choosing ALL values with the below syntax:


@Select (scodes\new_service_code) IN @Prompt('Select Service Code or enter ALL','A',{'1001', '1003, '1006'},Multi,Free) OR 'ALL' IN @Prompt('Select Service Code- Unlisted or enter ALL','A',{'1001', '1003', '1006'},Multi,Free)


When I use the new_service_code as filter and choose from the list of values its working fine but when i select ALL its displaying data for all the values (1001,1002,1003,1004,1005,1006,1007) instead of (1001,1003,1006).


Instead of hard coding the list of values when I am choosing the class\objectname in the third parameter as below it is throwing a message as "undefined scalar objects @select"


@Select (scodes\new_service_code) IN @Prompt('Select Service Code or enter ALL','A',@select(scodes\new_service_code),Multi,Free) OR 'ALL' IN @Prompt('Select Service Code- Unlisted or enter ALL','A',@select(scodes\new_service_code),Multi,Free)




Is my syntax wrong or am I missing some thing


Thanks


replied


ALL in your instance means all codes, not just the ones that you want it to be.

What you'd probably need is:

@Select (scodes\new_service_code) IN @Prompt('Select Service Code or enter ALL','A',{'1001', '1003, '1006'},Multi,Free) OR ('ALL' IN @Prompt('Select Service Code- Unlisted or enter ALL','A',{'1001', '1003', '1006'},Multi,Free) AND @Select (scodes\new_service_code) IN ('1001', '1003', '1006'))


The bit that I've added will tie the ALL down to the three codes that you want it to be.

Regards,

Mark

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question