Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Repeat mainmaterial value for subsequent items

Hello,

Need help in populating the mainmaterial field with data as shown in the attached file.

This is at datamodeling level (scripting).

The resident table(attached) is derived from this load statement and it has to be Joined to FACT

Load

VBELN as SO,

POSNR  as Item,

UEPOS  as HighlevelItem,

if(UEPOS='000000',MATNR,'') as MaterialMain

resident FACT;

1 Solution

Accepted Solutions
Kushal_Chawda

Please see the attached

View solution in original post

5 Replies
anbu1984
Master III
Master III

Can you explain your requirement with sample data

Not applicable
Author

Sample data

Sales
  Order
ItemHighLevelItemMainMaterialNeed MainMaterial field to have
  this data
81453100000XGA73
814531010010000 XGA73
814531020010100 XGA73
814531030010100 XGA73
814531040010000 XGA73
814531050010000 XGA73
814531060010000 XGA73
814531070010000 XGA73
814531080010000 XGA73
814531090010000 XGA73
814531100010000 XGA73
81453200000CP155
81453300000CP152
81453400000CP158
814534010040000 CP158
81453500000CP153
81453600000CP152
814536010060000 CP152
81453630000PP991
81453650000SU196
814536510065000 SU196
81453700000SU192
81453800000SU193
anbu1984
Master III
Master III

Try this

Load

VBELN as SO,

POSNR  as Item,

UEPOS  as HighlevelItem,

if(UEPOS='000000',MATNR,Peek('MaterialMain')) as MaterialMain

resident FACT;

Kushal_Chawda

Please see the attached

Not applicable
Author


Thanks a lot. It works.