on 12-24-2012 6:31 AM
Dear Experts,
I have the following requirement for a number of BW reports , Data is coming from R/3.
1. 1)
Manufacturing month( BEZEI)=HALD-MAR-2008. It shows the material is manufactured in HALD plant in March,2008.
I need to split it into two info-objects like
Info object-1 = HALD
Info object-1 = MAR-2008.
What to write in the code in BW side?
2.
2)
We have material like ZE00-3TT300. The manufacturing month and manufacturing plant data is stored in table ZMATPLNT.
I need to do the Lookup the ZMATPLNT with reference to material ZE00-3TT300. Here during the lookup it finds with 3TT300
instead of ZE00-3TT300.It omits the first 5 character and find s the Material code like 3TT300.
The table holds the data like this,
Plnt | Material | Month | Loc.curr.amount | Quantity |
HALD | 3TT300 | 200803 | 1,175,934.00 | 150 |
SHAM | 3TT300 | 200803 | 1,694,415.84 | 208 |
Please suggest , How to write the code ?
3)
3. We maintain the manufacturing month like 201203 (MAR-2012). Whenever it calculates the the age of the material , it automatically
takes the manufacturing date as 01-03-2012 ( 01-MAR-2012 ). So that it can get the ages like ,
Age = Current Date – Manf. Date .
How can I assign 01.03.2012 from 201203.
Please sugest , How should I proceed ?
Regards,
Sanjana
1) Create 2 IOs separately one which holds HALD and other MAR-2008
Map the source field and write the field routine as
Info object 1
RESULT = SOURCE_FIELDS- BEZEI+0(4).
translate RESULT to upper case.
Info Object 2
RESULT = SOURCE_FIELDS-BEZEI+6(8).
translate RESULT to upper case.
2) You can write the code
RESULT = SOURCE_FIELDS-ZMATPLANT(your source field+5(6).
Or
take help of ABAP person to write the logic, its a simple one.
Regards
KP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjana,
First, get to know how to do a string split operation. It's very simple and write an end routine to assign the split strings to your newly created infoobjects.
For e.g: BEZEI+0(4) will yield HALD and BEZEI+
Second, Do the same operation like MATERIAL+5(6) and assign it to new infoObject for comparing with ZMATPLNT.
Third, If you manipulate month to date format by sting operation, you cannot able to compute age.
For this, I'f suggest you to use relevant date fields for comparison.
All you need to know is, how to write a routine and string operations. Do a search and you'll know what I meant.
Br,
H
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.