Application Development 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: 

How read Table Type | Line Type that have a filed table

former_member740482
Participant
0 Kudos

Dear experts

How can read the content of following table, field "FIELD_VALUE_PAIR_TAB?

For this I am using (1) LOOP ....

LOOP AT lt_ecpayloadtab_ws3 INTO ec_payload_wa3.

And then .(2) READ TABLE .....

READ TABLE ec_payload_wa3-field_value_pair_tab .......

I have done this

     ASSIGN pnnnn_primary_tab TO <lfs_p0105>.
LOOP AT <lfs_p0105> ASSIGNING <lfs_wa>.
ASSIGN COMPONENT 'SUBTY' OF STRUCTURE <lfs_wa> TO <fs_subtipo>.
CHECK <fs_subtipo> = '0001'.
LOOP AT lt_ecpayloadtab_ws3 INTO ec_payload_wa3.
ASSIGN COMPONENT 'PERNR' OF STRUCTURE <lfs_wa> TO <fs_pernr2>.
* IF line_exists( <lfs_tab>-field_value_pair_tab[ ec_fld_name = 'endDate' ] ).
ASSIGN COMPONENT 'ENDDA' OF STRUCTURE <lfs_wa> TO <fs_endda>.
* endif.
READ TABLE ec_payload_wa3-field_value_pair_tab WITH KEY ec_fld_name = 'assignmentIdExternal'
ec_fld_value = <fs_pernr2>
TRANSPORTING NO FIELDS.

Regards

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

You did "READ TABLE ec_payload_wa3-field_value_pair_tab"

it's fine,

but then, what is your issue?

Nobody can answer if you don't explain.

former_member740482
Participant
0 Kudos

Hi Rossi

There is a different way to read the content the table field_value_pair_tab without before use a LOOP

I first use a LOOP ...to ec_payload_wa3.

LOOP AT lt_ecpayloadtab_ws3 INTO ec_payload_wa3.

And then use a read table.

Is possible do this without use a LOOP?

Regards