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

SQL command Question

Hello all!

Is my bold condition on sql statement bellow correct?

select vbeln posnr aubel aupos vgbel vgpos matnr into table it_vbrp

from vbrp

for all entries in it_mseg_vbfa

<b> where vgbel = it_mseg_vbfa-xblnr(10)</b>

and matnr = it_mseg_vbfa-matnr

and vgpos < 900000.

If not, how can I correct it? Creating a temporary table to build the records of XBLNR(10) to compare with VGBEL?

Detail: the ABAP Editor does not give a error with this command...

Michel Khouri

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jul 13, 2007 at 08:50 PM

    If you are not getting a syntax error, then it may work. But I am concerned about the actual placement of the value in the field, is it the first 10 digits, or is it the last 10 digits?

    Regards,

    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2007 at 08:56 PM

    It may not be giving a hard error, but is it giving a warning that the length specification will be ignored?

    In any event, I'd create an additional field in the original table with the correct attributes and move xblnr to it and use that field in the SELECT.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 13, 2007 at 09:03 PM

    if its giving error or check in deburg mode, if it is not taking the same value what u want, then u can do like this too

    loop at it_mseg_vbfa.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    input = it_mseg_vbfa-xblnr

    IMPORTING

    OUTPUT = it_mseg_vbfa-xblnr(10)

    .

    modify it_mseg_vbfa

    endloop.

    Thanks & Regards

    vinsee 😊

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 13, 2007 at 09:04 PM

    sorry sorry it shuld be opposite

    loop at it_mseg_vbfa.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    input = it_mseg_vbfa-xblnr(10)

    IMPORTING

    OUTPUT = it_mseg_vbfa-xblnr

    .

    modify it_mseg_vbfa

    endloop.

    Thanks & Regards

    vinsee

    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.