Skip to Content
author's profile photo Former Member
Former Member

Type conversion problem

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:31 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:37 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 11:39 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:44 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.