Skip to Content
0
Former Member
Mar 11, 2010 at 08:57 AM

Collect Statement Issue?

364 Views

Hi,

i have the internal table as

BEGIN OF TY_FINAL,

GPID TYPE PERSONID_EXT, "GPID

TP_NAME(11) TYPE C, "THIS FIELD IS USED BELOW TO DETERMINE WHICH WT TO USE.

INV_ID(12) TYPE C, "INVOICE NUMBER

ISA_DATE(6) TYPE C, "USED FOR VALIDATION, NOT LOADED INTO SAP

ISA_TIME(4) TYPE C, "USED FOR VALIDATION, NOT LOADED INTO SAP

NAME_QUALIF(2) TYPE C, "USED TO IDENTIFY EMPLOYEE / VENDOR RECORDS. NOT LOADED INTO SAP.

NAME(35) TYPE C, "USED ON ERROR LOG. NOT LOADED INTO SAP.

ID(9) TYPE N, "TRANSACTION WILL ERROR OUT IF 9 DIGITS ARE SENT: ID VALUE 0014, 0015.

TOT_INV_AMOUNT(10) TYPE N, "GOAL AMOUNT ON FILE

TOT_SUB_AMOUNT(10) TYPE N, "SUBSIDY AMOUNT

END OF TY_FINAL,

this internal table is of sorted table with unique key GPID and TP_NAME.

In this table if i have more than one records with Same GPID with SAME NAME i need to Collect the Amount Fields and placed as a single record in the other internal table.

Here the amount fields are TOT_INV_AMOUNT(10) and TOT_SUB_AMOUNT(10).

here when i use Collect Satatement it says that the Non Key fields Should be of type (I,P or F)

Please let me know the Solution with sample code.

Regards,

Pavan