cancel
Showing results for 
Search instead for 
Did you mean: 

data move from one itab to another

Former Member
0 Kudos

Hi,

see the codding below :

DATA: GT_EBKN LIKE EBKN OCCURS 0,

WA_EBAN TYPE EBAN.

READ TABLE GT_EBAN INTO WA_EBAN INDEX 1.

SELECT * FROM EBKN INTO TABLE GT_EBKN WHERE BANFN EQ P_PRNO.

DATA: GT_FMAVCT LIKE FMAVCT OCCURS 0,

WA_FMAVCT LIKE FMAVCT.

SELECT * FROM FMAVCT INTO TABLE GT_FMAVCT

FOR ALL ENTRIES IN GT_EBKN

WHERE

RRCTY = 1 AND

RVERS = 0 AND

RYEAR = WA_EBAN-BADAT+4(4) AND

RCMMTITEM = GT_EBKN-FIPOS AND

RCMMTITEM = gt_EBKN-FIPOS AND

RFUNDSCTR = GT_EBKN-FISTL.

the The error is comming " When you use the addition "FOR ALL ENTRIES IN itab", the fields "RCMMTITEM" and "GT_EBKN-FIPOS" must have the same type and the same length.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Answer rec own...

Former Member
0 Kudos

Hi..

Please check that,

FIPOS FIPOS CHAR 14 0 Commitment Item

RCMMTITEM FM_FIPEX CHAR 24 0 Commitment Item

You can declare the internal table or ranges for EBKN -FIPOSwith FIPOS of type CHAR24 and move data the into that particular table, and then use it as Range Table, which may solve your problem .

Regards,

Karthik

Former Member
0 Kudos

Hi,

Reason for the error - the length of the field FMAVCT-RCMMTITEM is 24 & for GT_EBKN-FIPOS is 14 and hence the issue.

If it is in the reverse case, you have the option to take the position. For instance, in your stmt - RYEAR = WA_EBAN-BADAT+4(4).

But in this case, it is not possible.

Either you have to create a new internal table of same type (GT_EBKN) & change the field length of RCMMITEM as 24 or remove the condition from the select. It's upto your choice and if you have any different logic, please try that.

Also, just one recommendation, just chk whether the internal table GT_EBKN is empty or not before using in select... for all entries.

Regards,

Selva K.