cancel
Showing results for 
Search instead for 
Did you mean: 

Linking MSEG to GLPCA in SQVI

Former Member
0 Kudos

I'm trying to link MSEG to GLPCA in order to map storage location to line items against a specific G/L account.

The quickview is duplicating each entry based on the number of lines in the material document - so a 5 line material document si creating 25 entries when only 5 are unique.

Anyway to stop the duplicates as the volume of date means exporting and sorting is not possible.

Accepted Solutions (0)

Answers (3)

Answers (3)

JL23
Active Contributor
0 Kudos

it depends on the fields you use to join those 2 tables.

each material document item has at least 2 entriesin GLPCA

which means you get an individual material document item duplicated if you dont use a second field for the join or a different field to restrict the selected GLPCA records

Former Member
0 Kudos

Hi Jürgen

Thanks - any idea of a second field to use that restrict entries.

I'm struggling to find one.

JL23
Active Contributor
0 Kudos

I dont know which information from GLPCA you need.

Maybe it is already sufficient to add GLPCA-DOCLN as selection field and there you restrict to 001, which means you get only the first GLPCA record

Former Member
0 Kudos

In code block END-OF-SELECTION add the following:

data: lv_table type char100 value '%G00[]'.

field-symbols: <table> type any table.

assign (lv_table) to <table>.

if <table> is assigned.

sort <table>.

delete adjacent duplicates from <table>.

endif.

Hope this works!!

Former Member
0 Kudos

use delete adjacent duplicate:

DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>

[COMPARING <f1> <f 2> ...

|ALL FIELDS].

Former Member
0 Kudos

hi,

Try with inner join