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

How to fetch data from nested internal table

Former Member
0 Likes
624

Hi,

Im using FM CRM_PRODUCT_GETDETAIL_API which is returning me work area (ES_PRODUCT_DATA) of type

COMT_PRODUCT_MAINTAIN_API. This work area contains a table SHORT_TEXTS of type COMT_PR_SHTEXT_MAINTAIN_TAB

whcih in turn contain a line type DATA of type COMT_PRSHTEXT_X. I need to fetch fields lying inside DATA. Can anybody please

let me know how to achieve this. I would like to do this by not using nested loop structure.

Rgds

Sudhanshu Sharma

2 REPLIES 2
Read only

Former Member
0 Likes
462

you should be able to get the fields by:

COMT_PR_SHTEXT_MAINTAIN-DATA_X-UPNAME

COMT_PR_SHTEXT_MAINTAIN-DATA_X-SHORT_TEXT

Read only

gerd_rother
Active Participant
0 Likes
462

Hi,

Use field ES_PRODUCT_DATA-short_texts like any other internal table (without header line).

E.g.:


field-symbols: <text> type COMT_PRSHTEXT_X.
...
loop at ES_PRODUCT_DATA-short_texts assigning <text>.
        write: <text>-short_text
endloop.

Regards, Gerd Rother