Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Wrong table name or table alias name table alias name

Former Member
0 Likes
5,646

Hi ,

When i activate the programme ,i get this message 'Wrong table name or table alias name table alias name 'P''. Can you help me for the below code ?

BR

SELECT v~vbeln AS kdauf

            p~posnr AS kdpos

            v~kunnr v~auart

            k~name1 k~land1

            b~matnr AS matnr2

            b~kdmat

            p~edatu

            b~kwmeng

            FROM vbak AS v

            JOIN kna1 AS k ON v~kunnr = k~kunnr

            JOIN vbap AS b ON v~vbeln = b~vbeln

                          AND p~posnr = b~posnr

            JOIN vbep AS p ON v~vbeln = p~vbeln

                          AND p~etenr = '000001'

*          LEFT OUTER JOIN vbkd AS d ON b~vbeln = d~vbeln

*                                   AND b~posnr = d~posnr

            INTO CORRESPONDING FIELDS OF TABLE lt_mus

            FOR ALL ENTRIES IN lt_plaf

           WHERE v~vbeln = lt_plaf-kdauf

             AND b~posnr = lt_plaf-kdpos

             AND p~edatu IN s_edatu.

8 REPLIES 8
Read only

FredericGirod
Active Contributor
2,155

Hi,

maybe it's because you use P before declare it :

                          AND p~posnr = b~posnr

            JOIN vbep AS p ON v~vbeln = p~vbeln

regards

Fred

Read only

0 Likes
2,155

Hi,

You are right. Thank you so much.

BR

Read only

vinodkumar_thangavel
Participant
0 Likes
2,155

Hi,

Try the below code

SELECT v~vbeln AS kdauf

             p~posnr AS kdpos

             v~kunnr v~auart

             k~name1 k~land1

             b~matnr AS matnr2

             b~kdmat

             p~edatu

             b~kwmeng

             FROM vbak AS v

             JOIN kna1 AS k ON v~kunnr = k~kunnr

             JOIN vbep AS p ON v~vbeln = p~vbeln

                           AND p~etenr = '000001'

             JOIN vbap AS b ON v~vbeln = b~vbeln

                           AND p~posnr = b~posnr                         

           LEFT OUTER JOIN vbkd AS d ON b~vbeln = d~vbeln

                                    AND b~posnr = d~posnr

             INTO CORRESPONDING FIELDS OF TABLE lt_mus

             FOR ALL ENTRIES IN lt_plaf

            WHERE v~vbeln = lt_plaf-kdauf

              AND b~posnr = lt_plaf-kdpos

              AND p~edatu IN s_edatu.

Thanks & Regards,

Vinodkumar.

Read only

0 Likes
2,155

Thank you so much.. Your coding is true. it was activated.

BR

Read only

0 Likes
2,155

This message was moderated.

Read only

0 Likes
2,155

Hi  Vinodkumar

Where can i vote u ?

BR

Read only

0 Likes
2,155

U can do this by clicking the Correct answer icon so that this Post will be shown as Answered.

Read only

0 Likes
2,155

i know this icon but i can't see in my page so i can't vote

i think i opened this question from discussion part.If i opened from blog post this icon will be shown.