cancel
Showing results for 
Search instead for 
Did you mean: 

0IC_C03 better suggestion

Former Member
0 Kudos

Gurus,

any better suggestions please below ??

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

some options:

1. write your own extractor performing the selection accordingly.

2. extract with no restriction and during URules or TRules, delete records not matching with your criteria in the start routine or just skip them during the transfer/update routine (eg RETURNCODE = 2, different than 0). In this case you'll have to lookup the material division from your 0MATERIAL master data (table /BI0/PMATERIAL).

3. create an InfoSpoke based on this cube and extract your data with your selection based on your 0MATERIAL__0DIVISION nav. Post this extraction into a table and generic extract your data from this table.

they're could be more depending on your reqs and limitations...

hope this helps...

Olivier.

Former Member
0 Kudos

Thanks Olivier

Second option sounds convincing.

If to be chosen how to proceed with this

since i do not have 0DIVISION as infoobject in transfer structure and its only a navigational attribute of 0material.

can you please describe in steps.

thanks

Former Member
0 Kudos

Hi,

in your update start routine, write something like the herehunder, all records having material with division different than "division1" or "division2" won't be processed (deleted from the data package)


*DECLARATIONS

DATA: BEGIN OF ls_material,
            MATERIAL LIKE /BI0/PMATERIAL-MATERIAL
            DIVISION LIKE /BI0/PMATERIAL-DIVISION,
          END OF ls_material.

TYPES: ly_material LIKE ls_material.

DATA: lt_material TYPE SORTED TABLE OF ly_material WITH UNIQUE KEY MATERIAL.

*processing

SELECT MATERIAL DIVISION
INTO CORRESPONDING FIELDS OF TABLE lt_material
FROM /BI0/PMATERIAL 
WHERE OBJVERS = 'A'.

LOOP AT data_package.
  READ TABLE lt_material INTO ls_material 
  WITH KEY MATERIAL = DATA_PACKAGE-MATERIAL
  BINARY SEARCH.

  IF SY-SUBRC = 0.
    CASE ls_material-DIVISION.
       WHEN "your_division1.
           CONTINUE.
       WHEN "your_division2.
           CONTINUE.
       WHEN OTHERS.
           DELETE DATA_PACKAGE.      
    ENDCASE. 
  ELSE 
    "material is not is the master data ???
  ENDIF.
ENDLOOP.

I just wrote the code without any checks so you may have some syntax errors...

In adition depending how many materials you have in total we might have to fill the internal table with only the material prsent in your data_package (using FOR ALL ENTRIES)...

just let us know how this goes...

Olivier.

Former Member
0 Kudos

Thanks Olivier,

So even if 0DIVISION is not a part of transaction data but part of material master navigational attribute as per your code it should work rite??

I trust your code technically,can you describe how functionally is it working with an example

say - I want Division "A" data only from 80IC_C03

example

material plant keyfigure

100 20 10000

is in the Infocube as transaction data and when I am pulling it from 80IC_C03 datasource how does it identify the division "A" as thats not in the infocube ??

thanks again

Former Member
0 Kudos

OK,

assume your record is coming in a datapackage.

When the datapackage is going to be processed, the start routine will be executed:

- first an internal table is filled (lt_material) will all MATERIAL IDs and their corresponding division; this is by reading the 0MATERIAL master data (of course you have to have this IObj correctly loaded).

- then the start routine will loop at the datapackage. Each record will be read. For instance, with your example, the routine will read the internal table and fetch the article ID 100 and store its division in the structure ls_material.

the CASE statement will check you criteria; in your case, depending on the division of material 100:

--if it is 'A' then continue: this is a valid record thus get the next record from the datapak.

-- if OTHERs (assume B), then the record will be deleted from the datapak thus not been updated in your datatarget.

Since you don't have 0DIVISION in your source cube, all the data will be extracted. When updating this data, we'll derive the division value from the material master data and decide whether to update or not the record in the target depending on the division value of its material.

hoping this clears your doubts....

Olivier.

Former Member
0 Kudos

Perfect answer,wish could give more points.

Thanks Olivier.

bye

Answers (0)