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

Subroutines issue with fields

Former Member
0 Likes
661

I have a subroutine

and in the form statement

FORM SUB_xxx using gt_itab.

SORT GT_Itab BY LIFNR zzvalid.

DELETE ADJACENT DUPLICATES FROM GT_Itab COMPARING LIFNR ZZVALID.

-


endform.

Here the system throws a message that lifnr, zzvalid fields could not be identified.

Can any one please help me why i am getting issue with sort, delete adjacent duplicates.

I am able to do my program for this itab after i comment out these two...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

You need to speficy the structure of the Internal table in your FORM...


FORM GET_TABLE TABLES T_MYTAB
                              STRUCTURE TY_MYTAB.
*Do some logic here....
ENDFORM. 

Greetings,

Blag.

HI Narendra,

U need to provide the structure for gt_itab.

Perform SUB_XXX tables itab.

FORM SUB_xxx <b>Tables gt_itab structure itab</b>.

SORT GT_Itab BY LIFNR zzvalid.

DELETE ADJACENT DUPLICATES FROM GT_Itab COMPARING LIFNR ZZVALID.

-


endform.

Regards

SAB

4 REPLIES 4
Read only

Former Member
0 Likes
636

You need to speficy the structure of the Internal table in your FORM...


FORM GET_TABLE TABLES T_MYTAB
                              STRUCTURE TY_MYTAB.
*Do some logic here....
ENDFORM. 

Greetings,

Blag.

Read only

Former Member
0 Likes
635

HI Narendra,

U need to provide the structure for gt_itab.

Perform SUB_XXX tables itab.

FORM SUB_xxx <b>Tables gt_itab structure itab</b>.

SORT GT_Itab BY LIFNR zzvalid.

DELETE ADJACENT DUPLICATES FROM GT_Itab COMPARING LIFNR ZZVALID.

-


endform.

Regards

SAB

Read only

Former Member
0 Likes
635

Hi

What you are writing in the PERFORM statement

Write

PERFORM SUB_XXX tables ITAB then

FORm SUB_XXX table gt_itab.

<try now to delete>

endform.

But just to delete after sort why do you need a perform and form.

you can straight away do it without subroutine.

Reward points if useful

Regards

Anji

Read only

0 Likes
635

I tried with the way you have asked me to do so..

It diesnt recognize the work area.

I need to sort the internal table to do some calculations. This is very important for me.

Please let me know how i can accomplish this