Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
Please see the attached
Can you explain your requirement with sample data
Sample data
Sales Order | Item | HighLevelItem | MainMaterial | Need MainMaterial field to have this data |
81453 | 10000 | 0 | XGA73 | |
81453 | 10100 | 10000 | XGA73 | |
81453 | 10200 | 10100 | XGA73 | |
81453 | 10300 | 10100 | XGA73 | |
81453 | 10400 | 10000 | XGA73 | |
81453 | 10500 | 10000 | XGA73 | |
81453 | 10600 | 10000 | XGA73 | |
81453 | 10700 | 10000 | XGA73 | |
81453 | 10800 | 10000 | XGA73 | |
81453 | 10900 | 10000 | XGA73 | |
81453 | 11000 | 10000 | XGA73 | |
81453 | 20000 | 0 | CP155 | |
81453 | 30000 | 0 | CP152 | |
81453 | 40000 | 0 | CP158 | |
81453 | 40100 | 40000 | CP158 | |
81453 | 50000 | 0 | CP153 | |
81453 | 60000 | 0 | CP152 | |
81453 | 60100 | 60000 | CP152 | |
81453 | 63000 | 0 | PP991 | |
81453 | 65000 | 0 | SU196 | |
81453 | 65100 | 65000 | SU196 | |
81453 | 70000 | 0 | SU192 | |
81453 | 80000 | 0 | SU193 | |
Try this
Load
VBELN as SO,
POSNR as Item,
UEPOS as HighlevelItem,
if(UEPOS='000000',MATNR,Peek('MaterialMain')) as MaterialMain
resident FACT;
Please see the attached
Thanks a lot. It works.