cancel
Showing results for 
Search instead for 
Did you mean: 

Field level routine for cost at BI transformation

KodandaPani_KV
Active Contributor
0 Kudos

Hi All,

i want write the field level routine at transformation level.

source fields have

ZTYPE_MD TYPE -  LT

ZCAT_TEXT TYPE - LT1

ZBU TYPE - 0-50, 51-100, 101-200,

Target fields

ZCOST

if ZTYPE_MD -  LT and ZCAT_TEXT - LT1 and ZBU -(0-50) , it will charge the 2.0 (INR) then calculate the cost give the out put value.

As per reference refer the below thread.

Thanks,

Phani.

Accepted Solutions (1)

Accepted Solutions (1)

anshu_lilhori
Active Contributor
0 Kudos

whats the use of opening new thread and not replying to old thread ?

Will it get an answer to your query faster ?

Do you have the below fields in your DSO structure ? Just confirm.

ZTYPE_MD TYPE -  LT

ZCAT_TEXT TYPE - LT1

ZBU TYPE - 0-50, 51-100, 101-200,

Regards,

AL

KodandaPani_KV
Active Contributor
0 Kudos

Hi Anshnu,

i will close old thread asap.

i wrote the end routine but source level don't have proper data and i am getting mismatching records getting.

these are all source fields (DSO) getting all fields records.

ZTYPE_MD TYPE -  LT

ZCAT_TEXT TYPE - LT1

ZBU TYPE - 0-50, 51-100, 101-200,

in target level(cube)  have ZCOST key figure.

if all condition satisfy will calculate the cost at target level.

please give some piece of code.

Thanks,

Phani.

anshu_lilhori
Active Contributor
0 Kudos

Ok i would appreciate that..First of all map all the source fields to Zcost fields which you require for calculation of Price.

After that the Syntax for field level routine would be:


If Source_fields-/bic/ZTYPE_MD EQ 'LT'

And Source_fields-/bic/CAT_TEXT EQ 'LT1'.


if Source_fields-/bic/ZBUTYPE EQ '0-50'

or Source_fields-/bic/ZBUTYPE EQ '51-100'


or Source_fields-/bic/ZBUTYPE EQ '101-200' .


/bic/zcost = '2'.

endif.

endif.

Result = /bic/zcost.

Hope this gives an idea.

Regards,

AL

KodandaPani_KV
Active Contributor
0 Kudos

Thanks anshnu,

i have define like that up to LT1 - LT12  and they have some different changes.

i will get back to you.

Thanks,

Phani.

Former Member
0 Kudos

Hi,

Kodanda pani.

I had gone through your previous thread regarding this question.

As far as i have understood, ZCOST on your target side is going to get effected based on the value in ZBU TYPE. So there's no need of checking ZTYPE_MD ZCAT_TEXT. Because the values in those are not going to affect your output.

Only the value in ZBU TYPE is going to affect your output right?

Ex:-

If ZBU TYPE = 0-50, ZCOST should be 2.0.

If ZBU TYPE = 51-100, ZCOST should be 'XX'.

If ZBU TYPE = 101-150, ZCOST should be 'YY'.

Please reply me weather i am right or wrong, sure i will get back to you with the code.

Will you please elaborate your requirement some more with an example.

Regards,

Upender reddy.

KodandaPani_KV
Active Contributor
0 Kudos

Hi Upendra,


So there's no need of checking ZTYPE_MD ZCAT_TEXT. Because the values in those are not going to affect your output.

i need check the these objects  ZTYPE_MD ,ZCAT_TEXT and  billed unit is KF it is in source level.

after checking the ZTYPE_MD ,ZCAT_TEXT  based on the ZBU TYPE (0-50, 51-100) .  pass to value target KF (ZCOST )


EX- 0- 50 * 2 = XXX

        51- 100 = XXXX.


Thanks,

Phani.

sakthi_ss
Active Participant
0 Kudos

Hi Pani

Just for clarification whether the ZBU type 0-50..... is a KF?

Regards,

Sakthi.

Former Member
0 Kudos

Hi,

Kodanda pani.

Use the below code at field level routine for your requirement.

If Source_fields-/bic/ZTYPE_MD EQ 'LT'

And Source_fields-/bic/CAT_TEXT EQ 'LT1'


or Source_fields-/bic/CAT_TEXT EQ 'LT2'

or Source_fields-/bic/CAT_TEXT EQ 'LT3'

or Source_fields-/bic/CAT_TEXT EQ 'LT4'

or Source_fields-/bic/CAT_TEXT EQ 'LT5'

or Source_fields-/bic/CAT_TEXT EQ 'LT6'

or Source_fields-/bic/CAT_TEXT EQ 'LT7'

or Source_fields-/bic/CAT_TEXT EQ 'LT8'

or Source_fields-/bic/CAT_TEXT EQ 'LT9'

or Source_fields-/bic/CAT_TEXT EQ 'LT10'

or Source_fields-/bic/CAT_TEXT EQ 'LT11'

or Source_fields-/bic/CAT_TEXT EQ 'LT12'.

if Source_fields-/bic/ZBUTYPE EQ '0-50'.

/bic/zcost = '2'.

Elseif Source_fields-/bic/ZBUTYPE EQ '51-100'.

/bic/zcost = 'XX'.




Elseif Source_fields-/bic/ZBUTYPE EQ '101-200' .

/bic/zcost = 'YY'.


Endif.

Endif.

Result = /bic/zcost.


Regards,

Upender reddy.

KodandaPani_KV
Active Contributor
0 Kudos

Thanks Anshnu and Upendra,

My code is working fine.

Thanks,

Phani.

anshu_lilhori
Active Contributor
0 Kudos

Glad to know that..Please close the thread if your issue is solved as you are an active contributor also so you understand the gravity of it.

Regards,

AL

KodandaPani_KV
Active Contributor
0 Kudos

HI Anshnu,

Thanks for your compliment and my issue solved i am closing the thread..

Thanks,

Phani.

Answers (0)