cancel
Showing results for 
Search instead for 
Did you mean: 

Reporting requirement..

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member182516
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sanjana,

For Third

Convert from yyyymmdd to ddmmyyyy use the following function module

CONVERT_DATE_FORMAT

For No. of days ,Months and years .

Function module : FIMA_DAYS_AND_MONTHS_AND_YEARS .

Regards,

Satya


Former Member
0 Kudos

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