Skip to Content
author's profile photo
Former Member

regarding select statement

Frnds,

i am getting error in this select statement why ?

the error is like

When using the addition "FOR ALL ENTRIES IN itab", the fields "POSNV"

and "IT_VBAP-POSNR" must have the same type and length . . . . . .

SELECT VBELV VBELN POSNV VBTYP_N FROM VBFA INTO CORRESPONDING FIELDS OF TABLE IT_DELV FOR ALL ENTRIES IN IT_VBAP WHERE VBELV = IT_VBAP-VBELN AND POSNV = IT_VBAP-POSNR AND VBTYP_N = 'J'.

Thanks,

karan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Oct 11, 2007 at 04:01 PM

    Hi,

    This error is because both the fields mentioed are not of same lenght and data type.Whenever you take this kind of statements you should check whether the fields are of smae length and data type then only you can compare them.

    Hope i am clear.

    <b><REMOVED BY MODERATOR></b>

    Regards,

    Harini.S

    Message was edited by:

    Alvaro Tejada Galindo

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 11, 2007 at 04:08 PM

    Hi,

    Chk how you defined your POSNR in it_vbap table.

    You shouldnt get the error as both are of same type.

    Make sure you define POSNR in it_vbap table as POSNR like VBAP-POSNR.

    Also make sure u define POSNV in it_delv table as POSNV like VBFA-POSNV.

    If not please post your table defnition part as well.

    Sri

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 11, 2007 at 04:09 PM

    HAI karan

    there is no error in the select statement and even both fields having same length just refer ur code once any other mistakes whether u have done while declarations

    Add comment
    10|10000 characters needed characters exceeded