Skip to Content
0
Former Member
Apr 30, 2015 at 10:23 AM

How to declare a workarea of type index table

866 Views

Hi Experts,

I am getting error as CT_RESULT is a generic type.Use of this type is only possible for typing field symbols and formal parameters when using the below code. Please help me and let me know how to declare it.

TYPES:BEGIN OF ty_guid,

guid TYPE guid,

END OF ty_guid.

DATA:it_guid TYPE STANDARD TABLE OF ty_guid INITIAL SIZE 0,

it_item TYPE STANDARD TABLE OF bbp_pds_sc_item_d INITIAL SIZE 0.

DATA:wa_guid TYPE ty_guid,

wa_item TYPE bbp_pds_sc_item_d.

FIELD-SYMBOLS: <fs_result> like LINE OF ct_result.

SELECT guid FROM crmd_orderadm_h INTO TABLE it_guid

WHERE object_id IN ct_result.

IF sy-subrc = 0.

LOOP AT it_guid INTO wa_guid.

CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

EXPORTING

i_guid = wa_guid

* I_OBJECT_ID =

* I_ATTACH_WITH_DOC = ' '

i_with_itemdata = 'X'

* I_ITEM_SORTED_BY_HIERARCHY =

* I_WITHOUT_HEADER_TOTALS =

* I_READ_FROM_ARCHIVE = ' '

* IMPORTING

* E_HEADER =

* EV_IS_PD =

* ET_ATTACH =

TABLES

e_item = it_item

* E_ACCOUNT =

* E_PARTNER =

* E_CONFIRM =

* E_LONGTEXT =

* E_LIMIT =

* E_ORGDATA =

* E_TAX =

* E_PRIDOC =

* E_HCF =

* E_ICF =

* E_MESSAGES =

* E_ACTVAL =

* E_ACC_ACTVAL =

* E_HEADER_REL =

* E_ITMLIM_REL =

* E_STATUS =

.

ENDLOOP.

ENDIF.

IF it_item[] IS NOT INITIAL.

LOOP AT it_item INTO wa_item.

LOOP AT ct_result ASSIGNING <fs_result>.

<fs_result>-zzpurchase_cat = wa_item-be_tracking_no.

* MODIFY ct_result FROM wa_result.

CLEAR wa_result.

ENDLOOP.

CLEAR wa_item.

ENDLOOP.

ENDIF.