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

Issue with Message & Matchcode

Former Member
0 Likes
1,137

Hi All,

I need help on 2 issues.

1. I have 2 checkboxes on the selection screen of a query & if user selects both, i want an error message to be displayed. I have entered the below code in 'Start of Selection' section of my infoset,

Code

IF P_OPTN1 NE SPACE AND P_OPTN2 NE SPACE.

MESSAGE E000 with 'Select only one option' TYPE 'S'.

ENDIF.

But system prompts this message -

"MESSAGE-ID xx" is missing in the "REPORT" statement.

2. In my selections tab, i have defined one input as 'Parameter' & want to have the feature, where when the user double clicks, the 'Select by initial value' pop up box appears where he can select relational operators (i.e. =, <, > etc).

I find this feature when i run transaction SE16 for MBEW table, for the field LBKUM when i double click i find this feature. So i entered MATCHCODE OBJECT VAL 'MBEW-LBKUM' for the parameter, but system prompts

'Unable to interpret "'MBEW-LBKUM'". Possible causes of error: Incorrect spelling or comma error.

Await inputs to resolve my problem.

Vivek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,049

hi,

1 : Create a message class ... and in the with report heading

ie report "program" message-id 'ZMSG'.

or u can rectify the error

message e000(8i) with 'Select only one option'.

2. Create a search help and

assign the search help to the parameter.

for eg: parameters: s_lbkum for mbew-lbkum matchcode id '<search help name>'.

regards,

Santosh Thorat

6 REPLIES 6
Read only

Former Member
0 Likes
1,049

Hi,

in the report statement u have define ur message class.

REPORT zcl_timesheet_approval MESSAGE-ID zcl_msg.

Plzz reward points if it helps.

Read only

Former Member
0 Likes
1,050

hi,

1 : Create a message class ... and in the with report heading

ie report "program" message-id 'ZMSG'.

or u can rectify the error

message e000(8i) with 'Select only one option'.

2. Create a search help and

assign the search help to the parameter.

for eg: parameters: s_lbkum for mbew-lbkum matchcode id '<search help name>'.

regards,

Santosh Thorat

Read only

0 Likes
1,049

Hi

Thanks for the inputs. The issue is i am trying to build a infoset-query in SQ02, so i do not have a report name as such. So how can i implement it?

I tried with message e000(8i) , the problem with this is, the system issues this message & takes me back to the query instead of remaining on the selection screen.

So how can i display this message & still remain on the selection screen for the user to make a fresh selection & execute the query.

Vivek

Read only

0 Likes
1,049

Hi,

DATA: mid TYPE sy-msgid VALUE 'SABAPDOCU',

mtype TYPE sy-msgty VALUE 'I',

num TYPE sy-msgno VALUE '888'.

MESSAGE ID mid TYPE mtype NUMBER num with 'ur text'.

Plzz reward points if it helps.

Read only

0 Likes
1,049

Hi Manjari,

Thank you very much for your help, it solved my problem. Keep the good work going...!!

Note for others: Thanks for your inputs as well.

Regards,

Vivek

Read only

Former Member
0 Likes
1,049

Hi Vivek

1. The first error "MESSAGE-ID xx" is missing in the "REPORT" is due to the fact that you must not have declared the message class to which this message number should refer to.

you can solve this issue by specifying the message class. Lets say it is X. so you can write the code as:

IF P_OPTN1 NE SPACE AND P_OPTN2 NE SPACE.

MESSAGE E000(X)th 'Select only one option' TYPE 'S'.

ENDIF

this will solve your problem.

2. I dont think attaching a matchcode object to this will help you get the desired functionality. you will have to debug and see how SAP has done it.

cheers

shivika