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

Accessing cluster table

Former Member
0 Likes
742

Hi all,

I'm using the FM HR_FORMS_TIM_GET_B2_RESULTS to access a cluster table. This FM returns the structure HRF_TIM_B2 which contains several tables. I want to read the data in table FT_ZES. How do I declare the internal table and loop through the FM's result? I call the FM like this:

DATA: wa_tim_b2 TYPE hrf_tim_b2.

CALL FUNCTION 'HR_FORMS_TIM_GET_B2_RESULTS'

EXPORTING

pernr = p0001-pernr

begda = pnpbegda

endda = pnpendda

IMPORTING

tim_b2 = wa_tim_b2

I tried this code, but received the error: "Internal table "WA_TIM_B2-FT_ZES" has no Header line -specification...."

LOOP AT wa_tim_b2-ft_zes.

CASE wa_ft_zes-ztart.

WHEN '9005'.

WHEN '9006'.

ENDCASE.

ENDLOOP.

Thanks in advance,

Ivo

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
573

tried this code, but received the error: "Internal table "WA_TIM_B2-FT_ZES" has no Header line -specification...."

<b>data : wa_ft_zes like line of xyz.</b>

LOOP AT wa_tim_b2-ft_zes<b> into wa_ft_zes ---> here u have to take data into work area.</b>CASE wa_ft_zes-ztart.

WHEN '9005'.

this is sample code , please check the sytax.

Regards

Peram

3 REPLIES 3
Read only

Former Member
0 Likes
574

tried this code, but received the error: "Internal table "WA_TIM_B2-FT_ZES" has no Header line -specification...."

<b>data : wa_ft_zes like line of xyz.</b>

LOOP AT wa_tim_b2-ft_zes<b> into wa_ft_zes ---> here u have to take data into work area.</b>CASE wa_ft_zes-ztart.

WHEN '9005'.

this is sample code , please check the sytax.

Regards

Peram

Read only

0 Likes
573

This works!

Thanks.

Greets,

Ivo

Read only

Former Member
0 Likes
573

Hi,

Declare a work area and use it in your loop..

DATA: WA LIKE LINE OF wa_tim_b2-ft_zes.

LOOP AT wa_tim_b2-ft_zes <b>INTO WA</b>.

Thanks,

Naren