cancel
Showing results for 
Search instead for 
Did you mean: 

Quantity conversions using customer exit.

Former Member
0 Kudos
198

Dear SDN,

I have created a Query to display the Sales Qty Actual vs Plan.

I am getting the values in different dimensions NM3,M3,GLL...I want to display the Query output in Metric Tons.

In which user exit I have to write the code?

Please provide the code to convert from NM3,M3,GLL..etc to Metric Ton.

Thanks & Regards,

Praveen.K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can try creating a unit conversion type using transaction RSUOM with fixed target unit metric ton.

And use that conversion type in query with your quantity field.

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Dear all,

I created Quantity conversion type in RSUOM.It is working in BEx Query.But this conversion will work

only for normal keyfigures and Selections.For formulas this Quantity conversion option is

disabled.That's why my final option is user exit.Please send me user exit name and code.....

Please let me know any case of any queries.

Thanks & Regards,

Praveen.K

Former Member
0 Kudos

Dear Gurus,

Please answer my question.

Thanks & Regards,

Former Member
0 Kudos

Hi Praveen,

I think routine for keyfigures in update rules is the right plyce. Create a routine for required KF and check u2018Unit Calculation in the Routineu2019 (BW 3.5)

sample (Assummung 0QUANTITY is desired KF and 0UNIT contensts allocated UOM) :

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine
  CASE COMM_STRUCTURE-UNIT."convert value according to unit
    WHEN 'M3'.
      RESULT = COMM_STRUCTURE-QUANTITY * 1000 .
    WHEN '...'.
     RESULT = COMM_STRUCTURE-QUANTITY * x  .
  ENDCASE.
* result value of the unit
  UNIT = 'TON' ."allocate fixed UOM here 'TON'
* if the returncode is not equal zero, the result will not be updated
  RETURNCODE = 0.
* if abort is not equal zero, the update process will be canceled
  ABORT = 0

.

x represents factor for conversion from unit provided by comm_structure to 'TON'

For detailed information please take a look on routine info in editor.

Good Luck

Joe

Former Member
0 Kudos

Dear J.F.B,

Thank you for sample code.

The cube is already in Production.So I dont want to disturb transformations ...etc at modelling level.

I need Customer exit code at reporting level....

Finally I need which customer exit I have to use...and what is the code?

Waiting for reply....

Thanks & Regards,

Praveen.K

Former Member
0 Kudos

Hi Praveen,

Currently I don't have access to a system . But I think you could solve your issue using virtual key figures and characteristics at query runtime level. Please do a search for these key words in SDN. It should help.

Regards

Joe

Former Member
0 Kudos

Use T-code RSUOM,

Provide name of the Qty Conversion Type :

Say Create and navigate through the Tabs and choose your respective conversion type and values.

If you want to choose Only Fixed Target Unit of Measure , Please go with it.

After creation, please use this Conversion Type in the Query Designer,Select the Key Figure and select the Conversion Tab and choose the respective Conversion Type and the Target Unit Measure is automatically displayed.

Raj