‎2007 Jul 03 12:20 PM
Hi all
In my report program, i am calling a conversion exit dynamically(i.e) the name of the conversion exit for a particular data type is generated accordingly.
The data is converted by the conversion exit to the specified format( i used MATNR)
for a value 3 it converted to 000000000000000003 (which is the proper format for MATNR).
but still i am not able to fetch values on the basis of this.
But if in my select option i pass the value of MATNR as 000000000000000003 directly, the correct data is fetched.
Note: For all other fields (such as ebeln, correct data is fetched, so it rules out any problems with the select query)
Plz help.
Thanks & Regards
Ravish Garg
‎2007 Jul 03 12:25 PM
Hi
Paste the code of that Select statement where you are using the conversion exit for this Material
because nothing wrong with the Material and conversione xit
Reward points for useful Answers
Regards
Anji
‎2007 Jul 03 12:25 PM
Hi
Paste the code of that Select statement where you are using the conversion exit for this Material
because nothing wrong with the Material and conversione xit
Reward points for useful Answers
Regards
Anji
‎2007 Jul 03 12:29 PM
<b>* select statement to get the conversion exit name for the field *</b>
select convexit
into varconv_exit
from dd01l
where domname = vardomname.
endselect.
<b>
if conversion exit found for a field *</b>
concatenate 'CONVERSION_EXIT_'
varconv_exit
'_INPUT'
into
varconv_exit.
perform f_conversion_exit
using p_table
p_field
varconv_exit:
changing s_range-low,
s_range-high.
<b>&----
*& Form f_conversion_exit
&----
text
----
<--P_S_RANGE_LOW text
<--P_S_RANGE_HIGH text
----
form f_conversion_exit using p_tabname
p_fname
p_convexit
changing p_value1.
call function p_convexit
exporting
input = p_value1
importing
output = p_value1
exceptions
length_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " f_conversion_exit
<b>&----
*& Form get_data
&----
text
----
--> p1 text
<-- p2 text
----
form get_data .</b>
select * into corresponding fields of table <dyn_table>
from (p_table) where (it_where) .
if sy-dbcnt = 0.
write 😕 'No Data matching Your Criteria!'.
leave program.
endif.
endform. " get_data
When i put matnr in the filed name and a value for it,
it gets the right conversion exit name : "CONVERSION_EXIT_MATN1_INPUT" for matnr.
‎2007 Aug 14 8:17 AM
Hi
Do it like this:
if v_convexit ne ' '.
concatenate 'CONVERSION_EXIT_'
v_convexit
'_INPUT'
into
v_convexit.
A perform called to call a conversion exit function module
loop at s_range into wa_srange.
perform f_conversion_exit
using p_table
p_field
v_convexit :
changing wa_srange-low,
wa_srange-high .
modify s_range from wa_srange.
endloop.
endif.
Regards
Preeti