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

problem with data type

Hi friends

I have requirement where i need to relate

ekpo-bednr and

ekpo-afnam

with vbrp- AUBEL and

vbrp-aupos

i wanted to do

for all entries select with these two tables; meaning for all entries of ekpo-afnam and ekpo-bednr need to select vbrp-aubel and vbrp-aupos..

but the difficuty is the data type of afnam and aupos is diffrent , it says this cannot be used FOR all ENTRIES in purpose...

could any of you please let me know , for anyother way to get this query?

Thanks in advance

RInky.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 08:16 PM

    Hi,

    Check this example..

    DATA: BEGIN OF ITAB_EKPO OCCURS 0,

    BEDNR LIKE EKPO-BEDNR,

    AFNAM LIKE EKPO-AFNAM,

    END OF ITAB_EKPO.

    DATA: BEGIN OF ITAB_VBRK OCCURS 0,

    AUBEL LIKE VBRP-AUBEL,

    AUPOS LIKE VBRP-AUPOS,

    END OF ITAB_VBRK.

    • Lets say if you have the po detail in the internal table...You cannot directly use the internal table for the vbrk as the data type will not match..Instead populate the values from the PO internal table to the ITAB_VBRK internal table and then use the FOR ALL ENTRIES...

    LOOP AT ITAB_EKPO.

    ITAB_VBRK-AUBEL = ITAB_EKPO-BEDNR.

    ITAB_VBRK-AUPOS = ITAB_EKPO-AFNAM.

    APPEND ITAB_VBRK.

    ENDLOOP.

    • SELECT THE DATA.

    SELECT * FROM VBRP

    INTO TABLE T_VBRP

    FOR ALL ENTRIES IN ITAB_VBRK

    WHERE AUBEL = ITAB_VBRK-AUBEL

    AND AUPOS = ITAB_VBRK-AUPOS.

    Hope this is what you want..

    THanks,

    Naren

    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.