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

Populating Complete Table Structure into Internal Table

Former Member
0 Likes
593

Hi All,

DATA: BEGIN OF I_VBAP OCCURS 100.

INCLUDE STRUCTURE VBEPVB.

DATA: END OF I_VBAP.

SELECT * INTO I_VBAP FROM VBUP

WHERE VBELN = VBAP-VBELN

AND POSNR = VBAP-POSNR

ORDER BY PRIMARY KEY.

APPEND I_VBAP.

ENDSELECT.

In the following code above I am getting the error as

<b>"The Type of DB table and work area (Internal Table) I_VBAP are not

Unicode Convertiable".</b>

Can any one help me in this matter?

Thanks in advance.

4 REPLIES 4
Read only

suresh_datti
Active Contributor
0 Likes
554

data i_vbap type table of vbepvb.

SELECT * INTO table I_VBAP FROM VBUP

WHERE VBELN = VBAP-VBELN

AND POSNR = VBAP-POSNR

ORDER BY PRIMARY KEY.

~Suresh

Read only

Former Member
0 Likes
554

Hi Suresh,

After trying your solution I am getting error

<b>" You cannot Use Internal Table as Work Area".</b>

Reagrds

Jitendra

Read only

ferry_lianto
Active Contributor
0 Likes
554

Hi,

Please try this.


DATA: WA_VBAP LIKE I_VBAP.

SELECT * 
INTO CORRESPONDING FIELDS OF WA_VBAP 
FROM VBUP
WHERE VBELN = VBAP-VBELN
  AND POSNR = VBAP-POSNR
ORDER BY PRIMARY KEY.
APPEND WA_VBAP TO I_VBAP.
ENDSELECT.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
554

Hello Jitendra,

Try

data i_vbap type table of vbepvb.

SELECT * from VBUP

into corresponding fields of table i_vbap

WHERE VBELN = VBAP-VBELN

AND POSNR = VBAP-POSNR

ORDER BY PRIMARY KEY.

Regards

Greg Kern