Professional Documents
Culture Documents
1 of 5
https://archive.sap.com/discussions/thread/3290474
10/31/2016 6:58 PM
Changing source_package
2 of 5
https://archive.sap.com/discussions/thread/3290474
Hi,
I have a DSO with materials and seasons:
0material
0af_sean
material and season are keys but I can have one material with different seasons
Goal: Create a new DSO with a unique material and season where season is selected by the smallest one,
I mean:
Material
| Season
121323
|4
121323
|1
345234
|2
985645
|3
345234
|5
| Season
121323
|1
345234
|2
985645
|3
10/31/2016 6:58 PM
Changing source_package
3 of 5
https://archive.sap.com/discussions/thread/3290474
DATA: iT_temp TYPE standard table of T_temp, wa_temp like line of iT_temp.
*$*$ begin of routine - insert your code only below this line
*-*
clear SOURCE_PACKAGE.
SOURCE_PACKAGE[] = ITAB[].
LOOP AT SOURCE_PACKAGE into wa_SOURCE_PACKAGE.
if wa_SOURCE_PACKAGE-MATERIAL is not initial.
move wa_SOURCE_PACKAGE-MATERIAL to wa_temp-MATNR.
move wa_SOURCE_PACKAGE-AF_SEAN to wa_temp-SAISO.
10/31/2016 6:58 PM
Changing source_package
4 of 5
https://archive.sap.com/discussions/thread/3290474
Paulo Prspero
January 09, 2013 at 17:51 PM
0 Likes
Correct Answer
Paulo Prspero
replied
Hi,
I have solved this with this change in code:
SORT ITAB BY MATERIAL ASCENDING.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATERIAL AF_SEAN.
clear SOURCE_PACKAGE.
SOURCE_PACKAGE[] = ITAB[].
And by changing the DTP with Semantic Groups by MATERIAL
Thank you to all messages and suggestions
0
10/31/2016 6:58 PM
Changing source_package
5 of 5
https://archive.sap.com/discussions/thread/3290474
Suyash Pandey
replied
January 10, 2013 at 00:59 AM
Donghoon Woo
Hi, Paulo.
If you want a compact source code.
You can use following source code but you need some changes.
-----------------------------------------------*Material
| Season
*121323
|4
*121323
|1
*345234
|2
*985645
|3
*345234
|5
*
*Result will be:
*
*Material
| Season
*121323
|1
10/31/2016 6:58 PM