10-16-2008 11:38 AM
Hi experts,
Greetings of the Day.
This is my first thread in SDN.SAP .com .
I am making a smartform having i have to dynamically print both soldto and shipto address.
I am passing the internal tables from my print program but i am writing the code for address fetching in smartform only .
I write the following query .
tables: vbak,kna1,adrc.
types:begin of sItabaddr,
vbeln type vbak-vbeln,
addrnumber type adrc-addrnumber,
end of sitabaddr.
data:itabaddr TYPE TABLE OF sitabaddr.
data: wa_itabaddr type sitabaddr.
select vbeln addrnumber from it_vbak
inner join kna1 on it_vbak-kunnr = kna1-kunnr
inner join adrc on adrc-adrnr = kna1-adrnr
into table itabaddr.
But i got the following error.
""Global Definitions: "IT_VBAK" is not defined in the ABAP Dictionary as a table, projection view or database view.""
Can anyone please tell me how to pass the address number in address node and how to resolve the above error .however i tried to pass the itabaddr-addrnumber by checking the checkbox dynamic address in Address window.But still error is coming.
10-16-2008 12:00 PM
hi,
check if u have defined the internal table and its work area in the form interface and global definition of the smartforms...if not then define and then activate and execute...
Edited by: siddharth kumar on Oct 16, 2008 1:00 PM
10-16-2008 12:00 PM
hi,
check if u have defined the internal table and its work area in the form interface and global definition of the smartforms...if not then define and then activate and execute...
Edited by: siddharth kumar on Oct 16, 2008 1:00 PM
10-16-2008 12:10 PM
HI ,
I have defined the internal table and work area in form interface.
10-16-2008 12:08 PM
hi,
in global definition of the smartform declare the internal table and work area and also in form interface
hope this will help
regards
prashanti
10-16-2008 12:09 PM
Hi Premraj,
In one of your select statement you are joining an internal table with database tables.
select vbeln addrnumber from it_vbak
inner join kna1 on it_vbak-kunnr = kna1-kunnr
inner join adrc on adrc-adrnr = kna1-adrnr
into table itabaddr.
These is not the right way.
u join VBAK table and KNA1 table based on KUNNR, and get ADRNR filed from KNA1.
in smartform pass these ADRNR number to the address node to the address number field, the rest address details are fetched by the address node.
or else.
use for all entries and fetch the required data from ADRC table.
Comment on it.
Regards
Kumar M
10-16-2008 12:14 PM
10-16-2008 12:19 PM
hI mukesh,
i teried as yuor words. but still error is coming .
what should i give into input and output parameter.
Rgds,
Premraj
10-16-2008 1:19 PM
hi,
in the command line where input and output parameters option is there mention the name of the intenal table and table that u r fetching the data from like in ur case it_vbak ,kna1,adrc and in output parameters itabaddr ,the internal table in which u r storing the selected data.
10-16-2008 12:11 PM
hi premraj,
i think u dont have defined ur it_vbak internal table in global definition of samrt form which is in navigation window at left side.
check it.
thanx.
Sachin