‎2007 Oct 22 8:27 AM
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
‎2007 Oct 22 8:31 AM
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.
‎2007 Oct 22 8:30 AM
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
‎2007 Oct 22 8:31 AM
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.
‎2007 Oct 22 8:42 AM
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
‎2007 Oct 23 5:26 AM
How did you declare PROJID in table ZTIME? Use the same reference in Selection screen.
‎2007 Oct 23 5:47 AM
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
‎2007 Oct 22 8:41 AM
before select statement...
put the following statement...
overlay '0000000' with p_projid.