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

Assign workarea to a nested itab - ABAP Proxy

Former Member
0 Likes
1,445

Hi Experts,

This is wr.t nested strcutres while creating in ABAP proxies.SPROXY.

I have a workarea that contains fields say f1 f2..f5

Now i have an internal table itab (say) that is declared wr.t a structure that is inturn nested with 2 more structures internally say struct1 holds inturn strcu2 and finally struc2 contains some fields. note that there are no Table types used for itab.

Now i need to assign the fields of workarea above to itab.

i am getting errors like itab cannot be converted ..etc

Please help me How to do this.

I need to use this itab in

CALL METHOD zprxy->execute_asynchronous

EXPORTING

output = itab.

COMMIT WORK

Thanks

Dany

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,025

Hi,

You can use this example:

data: lt_xml_ref TYPE "Table type".

FIELD-SYMBOLS:

<fs_ref> LIKE LINE OF "Table Type".

LOOP AT lt_xml_ref ASSIGNING <fs_ref>.

CLEAR lw_ref .

APPEND lw_ref TO

znfe_sign_nfe_ob-nfe-inf_nfe-ide-nfref.

ENDLOOP.

znfe_sign_nfe_ob-nfe-inf_nfe-ide-nfref is the structure created regarding the abap proxy.

Fernando

Hi Experts,

This is wr.t nested strcutres while creating in ABAP proxies.SPROXY.

I have a workarea that contains fields say f1 f2..f5

Now i have an internal table itab (say) that is declared wr.t a structure that is inturn nested with 2 more structures internally say struct1 holds inturn strcu2 and finally struc2 contains some fields. note that there are no Table types used for itab.

Now i need to assign the fields of workarea above to itab.

i am getting errors like itab cannot be converted ..etc

Please help me How to do this.

I need to use this itab in

CALL METHOD zprxy->execute_asynchronous

EXPORTING

output = itab.

COMMIT WORK

Thanks

Dany

3 REPLIES 3
Read only

Former Member
0 Likes
1,025

You have to use field symbols to populate or read data from/to nested structures.

Thanks,

Srinivas

Read only

Former Member
0 Likes
1,026

Hi,

You can use this example:

data: lt_xml_ref TYPE "Table type".

FIELD-SYMBOLS:

<fs_ref> LIKE LINE OF "Table Type".

LOOP AT lt_xml_ref ASSIGNING <fs_ref>.

CLEAR lw_ref .

APPEND lw_ref TO

znfe_sign_nfe_ob-nfe-inf_nfe-ide-nfref.

ENDLOOP.

znfe_sign_nfe_ob-nfe-inf_nfe-ide-nfref is the structure created regarding the abap proxy.

Fernando

Read only

0 Likes
1,025

Hi Epxerts,

Can someone give me an idea of passing multiple records in the parameter it_prxkna1 below :

I am working on this to pass it to XI.

Please note that it_prxkna1 contains a 3 more nested structures and not an internal table.

TRY.

    • Assign row

it_prxkna1-MT_KNA1_EXTRACT-record-row = wa_zcaap. --> one record of a customer

loop at t_zcaap into wa_zcaap.

CALL METHOD kna1_prxy->execute_asynchronous

EXPORTING

output = it_prxkna1.

COMMIT WORK.

endloop.

CATCH cx_ai_system_fault .

DATA fault TYPE REF TO cx_ai_system_fault .

CREATE OBJECT fault.

WRITE 😕 fault->errortext.

ENDTRY.

Please suggest.

Thanks

Dany