on 09-18-2007 5:43 PM
I have to introduce and calculate the qty value
The data looks like in the ODS layer
Document Order Item Contract Material
185000480 0100 001 ZL0001
185000480 0200 001 ZL0002
185000480 0200 002 ZL0002
185000480 0300 001 ZL0003
185000480 0300 002 ZL0003
185000480 0300 003 ZL0003
185000480 0300 006 ZL0003
185000480 0300 008 ZL0003
Infocube level QTY needs to be calculated based on material and line item per document like below,
Document Order Item Contract Material qty
185000480 0100 001 ZL0001 1
185000480 0200 001 ZL0002 1
185000480 0200 002 ZL0002
185000480 0300 001 ZL0003 1
185000480 0300 002 ZL0003
185000480 0300 003 ZL0003
185000480 0300 006 ZL0003
185000480 0300 008 ZL0003
I have write the ABAP code
data: zqty type i.
if comm_structure-document <> 0 and
comm_sturcutre-item <> 0 and
comm_sturcuture-material <> ' '
zqty = zqty +1
endif.
result = zqty.
ZQTY is not populating properly.
Advance Thanks for your help to correct this issue.
Hi,
Try this logic it should work
data: zqty type i.
zqty = comm_strucutre-qty
if comm_structure-document <> 0 and
comm_sturcutre-item <> 0 and
comm_sturcuture-material <> ' '
<b>comm_structure-qty<>0</b>
zqty = zqty +qty
endif.
( In this case it vl check if qty is not equal to zero then only qty will be added.)
result = zqty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.