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

Load data onto table type structure through program

Former Member
0 Likes
1,148

Hi,

I have a table type declared XYZ , and table structure ABC .

i tried to declare it in a ABAP program and pass it on to a function module .

through SE37 i am able to retrive data , but through program i am not able to retrieve.

Can anyone based on your ecperience suggest ideas or any sample examples if you have . Please do suggest . Thanks in advance

Regards,

Ry

5 REPLIES 5
Read only

former_member202474
Contributor
0 Likes
787

Hi ,

Consider the standard table type 'CRMT_PARTNER_EXTERNAL_WRKT' with the structure 'CRMT_PARTNER_EXTERNAL_WRK'.

data declaration :

data : et_partner type CRMT_PARTNER_EXTERNAL_WRKT,

lw_partner type CRMT_PARTNER_EXTERNAL_WRK.

or(lw_partner like line of et_partner)

so et_partner acts as the internal table and lw_partner acts as the work area.

To get the data use

loop at et_partner into lw_partner.

endloop.

Revert back if you have any doubt.

**Reward if useful**

Regards,

Ruby.

Edited by: Ruby Chacko on Jun 21, 2008 5:44 AM

Read only

0 Likes
787

Hi Ruby,

Thanks for ur reply, when i pass this type of declaration into a function module . it is not giving an error but not pulling any data into it .

Can you please suggest .

Regards,

Ry

Read only

former_member202474
Contributor
0 Likes
787

Hi,

Can u explain me what exactly u r trying to do ???

r u passing the data into the function module thru abap program or retreiving the data from the function module in the program.

Where exactly r u trying to use this table types???

r they acting acting as anyexport,import parameters in ur FM??

orelse just send me ur code, i may help u out.

Regards,

Ruby.

Read only

0 Likes
787

Hi,

here is the code Ruby.

in the program i have declared like this .

data : it_xyz type table of xyz,

w_xyz like line of it_xyz.

data : it_abc type table of abc1.

w_abc like line of it_abc.

and i am passing these tables into the function module . its not returning any syntax error . but the table it_abc is not getting populated . where as when executed separately through SE37 it is pulling data .

In the function module the import parameters has xyz type xyz1.

the Tables section has abc type abc1.

Please suggest .

Regards,

Ry

Read only

former_member202474
Contributor
0 Likes
787

Hi ,

I will give my sample code plz see if this helps.

Code in the report

data : it_tab1 type CRMT_ORDERADM_H_WRKt,

wa1 like line of it_tab1 .

wa1-GUID = '132423425432534'.

wa1-OBJECT_ID = '1312'.

wa1-PROceSS_TYPE = 'adw'.

append wa1 to it_tab1.

CALL FUNCTION 'Z_FUCNTION'

EXPORTING

ET_ITAB1 = it_tab1

.

in the function module declare the importing parameters as

ET_ITAB1 TYPE CRMT_ORDERADM_H_WRKT.

You will be able to retrieve the values.I checked it.

      • Reward if useful ***

Regards,

Ruby.