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

mapping

Former Member
0 Likes
874

HI

i need to map for vbpa-adrnr and

BEGIN OF i_adrc,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc,

I had written this code but its not working

SELECT addrnumber

name1

name2

city1

post_code1

street

country FROM adrc into table i_adrc

for all entries in i_vbpa

where ADDRNUMBER = i_vbpa-adrnr.

5 REPLIES 5
Read only

Former Member
0 Likes
832

Hi salaman

i_adrc is not a internal table its a structure as you declared, so declared it as internal table by :

BEGIN OF i_adrc occurs 0,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc.

rgds

Deepak Rana.

Read only

Former Member
0 Likes
832

hi

try this code once n let me know.

data:

BEGIN OF i_adrc,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc,

data:

t_adrc like standard table of i_adrc.

if i_vbpa[] is not initial.

SELECT addrnumber

name1

name2

city1

post_code1

street

country FROM adrc into table t_adrc

for all entries in i_vbpa

where ADDRNUMBER = i_vbpa-adrnr.

endif.

the prerequisite for all entries is that the table i_vbpa must caontain data fulfilling the above condition.

it may be that ur table i_vbpa doent have the data fulfilling the condition.

regards,

kiran kumar.

Message was edited by:

kiran kumar kamati

Message was edited by:

kiran kumar kamati

Message was edited by:

kiran kumar kamati

Read only

Former Member
0 Likes
832

Hi....

Try this code....

BEGIN OF i_adrc occurs 0,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc,

if i_adrc is not initial.

SELECT addrnumber

name1

name2

city1

post_code1

street

country FROM adrc into table i_adrc

for all entries in i_vbpa

where ADDRNUMBER = i_vbpa-adrnr.

endif.

Reward points if useful......

Suresh....

Read only

Former Member
0 Likes
832

Hi,

My sujjestion is, if u r new to abap,u debug the code first , analyse why it not fetching data. then u will neve land up in sudh issues later.

declare the i_adrc as an internale tbale.

Sudha

Read only

Former Member
0 Likes
832

data : BEGIN OF i_adrc occurs 0,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc.

SELECT addrnumber

name1

name2

city1

post_code1

street

country FROM adrc into table i_adrc

for all entries in i_vbpa

where ADDRNUMBER = i_vbpa-adrnr.

OR

TYPES : BEGIN OF i_adrc ,

name1 TYPE ad_name1,

name2 TYPE ad_name2,

street TYPE ad_street,

post_code1 TYPE ad_pstcd1,

city1 TYPE ad_city1,

country TYPE land1,

addrnumber TYPE ad_addrnum,

END OF i_adrc.

data: i_adrc type standard table of i_adrc with header line.

SELECT addrnumber

name1

name2

city1

post_code1

street

country FROM adrc into table i_adrc

for all entries in i_vbpa

where ADDRNUMBER = i_vbpa-adrnr.

Check this code...

Thanks

Sasmita