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 selection paramter

Former Member
0 Likes
852

Hi all,

I am developing a simple report.

For selection screen, i have defined as follows.

selection-screen: begin of block block1 with frame title text-001.

select-options: s_date for i_table-zdate obligatory.

parameters: p_projid like ztab1-projid obligatory.

selection-screen: end of block block1.

The SELECT statement as follows..

select empid name zdate projid actid hrs remarks into

corresponding fields of table i_table

from ztab1

where zdate in s_date

and projid eq p_projid.

Now while execution, i am facing few problems...

If i enter "444" in the selection screen for P_PROJID, the report will be blank, even thought the table is having values as "0000444".

In the database table, the corresponding field has been defined as follows...

projid cats_cproject_guid char 32

How to come out of this issue?

Please Help me.....

Regard

Pavan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
792

Hi you have to use conversion exit,

call function CONVERSION_EXIT_ALPHA_INPUT.

exporting

input = P_PROJID

importing

output = P_PROJID.

just use this before your select stmt.

6 REPLIES 6
Read only

Former Member
0 Likes
792

Hi,

if you see the table

and double clik on the data element there will be an conversion routine -- alpha

will be there

so use the function module

conversion_exit_alpha_input

to convert the given value into the format which is stored in data base

then you will get the sy-subrc eq 0.

it wil be working fine...

regards,

Venkatesh

Read only

Former Member
0 Likes
793

Hi you have to use conversion exit,

call function CONVERSION_EXIT_ALPHA_INPUT.

exporting

input = P_PROJID

importing

output = P_PROJID.

just use this before your select stmt.

Read only

0 Likes
792

Hi All,

I have coded as follows and facing few difficulties.

In the selection screen, i have to enter date and Project ID.

*********

selection-screen: begin of block block1 with frame title text-001.

select-options: s_date for i_table-zdate.

parameters: p_projid like zpoc_time-projid obligatory.

selection-screen: end of block block1.

select empid name zdate projid actid hrs remarks into

corresponding fields of table i_table

from ztime

where zdate in s_date

and projid eq p_projid.

**********

NO, if i enter '406' in the project ID field, the pgm will retrive the value with '406' only from table. If the entry is having value as '00000406', it will not be selected.

How to overcome this issue...????

Message was edited by:

Pavan Sanganal

Read only

0 Likes
792

How did you declare PROJID in table ZTIME? Use the same reference in Selection screen.

Read only

0 Likes
792

I have defined projid in the ZTIME table as follows.

field data element

projid CATS_CPROJECT_GUID char 32

In the selection screen definition,

selection-screen: begin of block block1 with frame title text-001.
 select-options: s_date for i_table-zdate.
 parameters: p_projid like zpoc_time-projid obligatory.
selection-screen: end of block block1.

I dont know whats wrong with this code...!!!!

Regards

Pavan

Read only

Former Member
0 Likes
792

before select statement...

put the following statement...

overlay '0000000' with p_projid.