cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to implement NOTE 571669.

Former Member
0 Likes
912

Hello Gurus,

I have a requirement where I need to show values for materials whose (BSTAUS) = V and(BSTTYP) = V .The values are there at PSA level but I saw in the transformation for 2LIS_03_BF that the values for such scenarios are getting deleted , so it is not getting reflected at the cube level . I refered to NOTE 571669 but I didn't understood how to implement the solution.

Can someone guide me about how to implement the solution code wise.

View Entire Topic
anshu_lilhori
Active Contributor
0 Likes

Hi,

I have gone through the note.

Few questions :

  1. Is your inventory data flow in 3.x ?
  2. your bw system version and package?
  3. Are you planning to report out of these consumption values?

As this note is very old so you need to check on the same as well.

You have to ignore the start routine part and follow the routines written in communication structure.

Hope it gives some idea.

Regards,

AL

Former Member
0 Likes

Hi  Anshu,

1 . My Inventory data flow is in 7.x flow

2 . Bw Release - 731 , SP- level - 0004 , Support package - SAPKW73104

3 . I have a report for non - moving inventory where  I need to capture receipt value having movement 101 . Now the problem that I am facing is that if there is a movement type 101 and stockcat =v and stocktyp =v the particular record is deleted at transformation level because of the code as mentioned below :-

* INSERT BEGIN

loop at DATA_PACKAGE.

if DATA_PACKAGE-stockcat eq 'V' or

DATA_PACKAGE-stocktype eq 'V'.

delete DATA_PACKAGE.

endif.

endloop.

* if abort is not equal zero, the update process will be canceled

ABORT = 0.

* INSERT END

Now the Note 571669 tells a workaround solution for the same . I wanted to know how to implement that solution code-wise as I am not able to understand the solution thoroughly.

anshu_lilhori
Active Contributor
0 Likes

Hi,

Are you sure that you are in 7.x and the below code is working.

NSERT BEGIN

loop at DATA_PACKAGE.

if DATA_PACKAGE-stockcat eq 'V' or

DATA_PACKAGE-stocktype eq 'V'.

delete DATA_PACKAGE.

Reason is in 7.x data_package has been replaced by source_package.

please cross check.

Regards,

AL

Former Member
0 Likes
Hi,
There was a error in the transformation earlier but that was handled bycopying fields of
_ty_t_SC_1 to _ty_s_SC_1_full which resolved the issue
Now I want to implement the code mentioned in 571669 which is a workaround for including receipt values with stockcat =v and stocktyp =v .
Create two new key figures (cumulative values):
1. Material consumption value (ZVERWERT, for example) with unit
0BASE_UOM
2. Material consumption quantity (ZVERMENGE, for example) with unit
0LOC_CURRCY
3. Include these in the InfoCube definition.
4. Update these key figures from 2LIS_03_BF as follows:
-> material consumption value:
IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues
OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor
OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer
OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock
"Transfers
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
* only movements which are relevant for stock control
AND COMM_STRUCTURE-cppvlc <> 0
AND COMM_STRUCTURE-stockcat EQ 'V'
AND COMM_STRUCUTRE-stocktype EQ 'V'.

* result value of the routine
RESULT = -1 * COMM_STRUCTURE-cppvlc.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSEIF ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts
OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt/Vendor
OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer/"Receipt
OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD
OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other
OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock
"Transfer
* only movements which are relevant for stock control
AND COMM_STRUCTURE-cppvlc <> 0
AND COMM_STRUCTURE-stockcat EQ 'V'
AND COMM_STRUCUTRE-stocktype EQ 'V'.
* result value of the routine
RESULT = COMM_STRUCTURE-cppvlc.
* if the returncode is zero, the result will be updated
RETURNCODE = 0.
ELSE.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 4.
ENDIF.
* if abort is not equal zero, the update process will be canceled
ABORT = 0..
anshu_lilhori
Active Contributor
0 Likes

Hi,

First of all the code given in that note is for 3.x flows and not for 7.x.

You need to comment the start routine part in case you are planning to capture material consumption value and quantity.

Enhance your cube with the 2 keyfigures as mentioned in that note.

Replace comm_structure with source_fields in case of 7.x.

Map all the fields stated above with your newly created keyfigure and write the field level routine.

Hope this helps.

Regards,

AL