06-17-2008 12:28 PM
Dear gurus,
i have written a bdc for order creation then i extract order no from message i.e.BDCMSGCOLL-MSGV1.
then i have have search data from vbap from that order no.
if ( m_tab1-MSGID = 'V1' and m_tab1-msgnr = 311 ).
orderno = m_tab1-msgv2.
endif.
then
data : orderno like vbap-vbeln.
select single * from vbap
where vbeln = orderno.
if sy-subrc = 0.
shippoint = vbap-VSTEL.
endif.
but problem is that its not finding the data as vbeln is extract frm msgv2.
for : orderno = 200017445
so while debuggin when i put 0 in order no i.e - 0200017445
then its working fine.
please can u help me , how to handle this code ?
while de
06-17-2008 12:40 PM
Hi,
1. declare numc variable of length 10.
2. pass the order number to numc variable.
3. use the numc variable in your select statement.
Data: n_c(10) type n,
order_no type BDC_VTEXT1.
n_c = order_no.
select ...
vbeln = n_c.
Reward if found helpful.
Regards,
Boobalan Suburaj
06-17-2008 12:31 PM
Hi,
Use 'conversion_exit_alpha_input' function module to get resolve your problem. Pass the order number in the message variable and use the same for your further process.....
Rgds,
Bujji
Edited by: Bujji on Jun 17, 2008 1:32 PM
06-17-2008 12:37 PM
Hi,
if ( m_tab1-MSGID = 'V1' and m_tab1-msgnr = 311 ).
orderno = m_tab1-msgv2.
endif.
use conversion exit here:
call function module 'CONVERSION_EXIT_ALPHA_INPUT'
then pass the returned value to the select statement.
data : orderno like vbap-vbeln.
select single * from vbap
where vbeln = orderno.
if sy-subrc = 0.
shippoint = vbap-VSTEL.
endif.
Thanks,
Keerthi.
06-17-2008 12:39 PM
Hi,
Please see the code below
Declare the data types as required
DATA : v_input TYPE bdcmsgcoll-msgv2,
v_output TYPE vbeln.
I have taken up the example you had given
v_input = '200017445'.
Call the FM to convert the number to proper format
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_input
IMPORTING
output = v_output.
The varible would have the formatted value
This should solve your purpose.
Thanks
Barada
06-17-2008 12:40 PM
Hi,
1. declare numc variable of length 10.
2. pass the order number to numc variable.
3. use the numc variable in your select statement.
Data: n_c(10) type n,
order_no type BDC_VTEXT1.
n_c = order_no.
select ...
vbeln = n_c.
Reward if found helpful.
Regards,
Boobalan Suburaj
06-17-2008 12:44 PM
Hi,
data : orderno like vbap-vbeln.
DATA : L_ORDNO(10).
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = ORDERNO
IMPORTING
OUTPUT = L_ORDNO.
select single * from vbap
where vbeln = L_ORDNO.
if sy-subrc = 0.
shippoint = vbap-VSTEL.
endif.