Skip to Content
-1

Filling internal table with a sequence of another

Dec 10, 2016 at 11:12 AM

66

avatar image

Hi everyone,

I am facing an issue with my development. Kindly please advise on below scenario:

I have an internal table GT_FINAL with entries:

MATNR LGNUM LGTYP LGPLA

11234 101 425 08-21-1

11234 101 450 17-19-3

11234 101 315 17-52-3

11234 101 300 36-93-1

and i also get the sequence in which storage type should be filled from T344T table as:

LGNUM KZEAR LGTKZ BWREF LGTY0 LGTY1 LGTY2 LGTY3

101 E 112 921 300 450 425 315

LGTY0,LGTY1,LGTY2,LGTY3 is the sequence of storage type(LGTYP) in which they should be filled.

For my case if i am looping the first internal table(GT_FINAL) then it will take the first entry with LGTYP = 425 and try to search sequence in T334T by first compairing to LGTY0 ,then LGTY1 till LGTY3. as it finds the same storage type in LGTY2.it will start filling the bins.

But i don't want this.I want 300 storage type to be filled first as this is first in sequence(LGTY0) and also present in internal table.

How to achieve this?

Thanks in advance.

10 |10000 characters needed characters left characters exceeded

Formatted lists:

GT_FINAL:

MATNR  LGNUM  LGTYP  LGPLA
11234  101    425    08-21-1
11234  101    450    17-19-3
11234  101    315    17-52-3
11234  101    300    36-93-1

T344T:

LGNUM  KZEAR  LGTKZ  BWREF  LGTY0  LGTY1  LGTY2  LGTY3
101    E      112    921    300    450    425    315
0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi Dec 10, 2016 at 11:41 AM
0
  1. Get distinct values of MATNR/LGNUM (11234/101, 11234/102, ...)
  2. For each couple of distinct values MATNR/LGNUM
    2-a. Read unique row of table T344T for LGNUM
    2-b. Read GT_FINAL for MATNR/LGNUM and LGTYP = T344T-LGTY0, and process it
    2-c. Read GT_FINAL for MATNR/LGNUM and LGTYP = T344T-LGTY1, and process it
    2-d. Read GT_FINAL for MATNR/LGNUM and LGTYP = T344T-LGTY2, and process it
    2-e. Read GT_FINAL for MATNR/LGNUM and LGTYP = T344T-LGTY3, and process it
Share
10 |10000 characters needed characters left characters exceeded