cancel
Showing results for 
Search instead for 
Did you mean: 

Passing value from one object to another

Former Member
0 Kudos
168

Hello all,

Here is the situation: In a BEx query I will have a user entry variable for an object 0COMPANY. There is another object 0PCOMPANY that is used in the same report.

I want to accept the same value (that is entered by the user for 0COMPANY object) for the other object (0PCOMPANY) too without entering it separately.

I believe It's not big a deal if I write a custom exit.

But, is it possible to achieve the same goal without writing a custom exit?

Can anyone help?

Thanks,

Pranab

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If 0PCOMPANY is created with in reference to 0COMPANY then whatever variable you are creating for 0COMPANY can be used for 0PCOMPANY.

If this is the case you can use the same variable for both infoobjects for restriction.You can see that when you define the variable for 0COMPANY same variable will be listed in the characteristic values of 0PCOMPANY.

Regs

Gopi.

Former Member
0 Kudos

Hi,

If you use a std objects, then 0COMPANY is a reference char for 0PCOMPANY. ANd what Gopi said is true:

0COMPANY will accept var value entered for 0PCOMPANY.

You don't have to write any exits for this.

Best regards,

Eugene

Former Member
0 Kudos

All:

These are standard objects and 0COMPANY is a reference char for 0PCOMPANY.

However, when I am using the same variable for both objects I am getting BEx error -- Abort Variable <variable name> is used for two different characteristics.

Should I do something differently?

Thanks,

Pranab

Former Member
0 Kudos

I'm not sure if it will work and if the query structure will allow it:

Place 0PCOMPANY into filter area and restrict it by the variable.

Remove all other variables for companies.

Best regards,

Eugene

Former Member
0 Kudos

Pranab/Eugene

Pranab you are right and I got the same error.Have you seen the error details, it clearly says that you have to handle with EXIT.

I have tried Eugene's idea of moving to filter.It is once again telling the same error.

Instead of my own input variable I tried with SAP Standard SAP variable for both characteristics.Even though I got the same error.

It's BW!!! you can't do whatever you want.

Pranab! better to obey BW and go for Exits.

Enjoy!!

Regs

Gopi.

Former Member
0 Kudos

Thanks All.

It seems there is no other option but custom exit.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Pranab,

when we have to pass value from one characteristic variable to another( in your case 0COMPANY to 0PCOMPANY) ..this is not possible for charcteristic variable..without using customer exit...but it is possible for text variable...means..if you want to pass value entered by user to any text variable.

hope i am clear...

thanks..

regards,

San!

Former Member
0 Kudos

Pranab,

for characterstic varables it's not possible. either you need to go with customer exit or you need write in UR or TR.

all the best.

Regards,

Nagesh Ganisetti.

sachin_kulshrestha2
Active Contributor
0 Kudos

Hi,

If you require without custom exit then you will need valued in the infoprovider . In the update rule why don't you map 0COMPANY against 0PCOMPANY and reload the data.

Hope this helps!!!

Former Member
0 Kudos

Pranab,

you can create Custoemr Exit variable on 0PCOMPANY IO.

in the Customer exits write the code like this...

assume ZCOMPANY is variable on 0COMPANY and ZPCOMPANY variable on 0PCOMPANY.

case i_varnam.

when 'ZPCOMPANY'.

read table I_T_VAR_RANGE where vnam = 'ZCOMPANY'.

E_T_RANGE-low = i_t_var_range-low.

E_T_RANGE-high = i_t_var_range-high.

E_T_RANGE-option = i_t_var_range-option.

E_T_RANGE-sign = i_t_var_range-sign.

append E_T_RANGE.

endcase.

Former Member
0 Kudos

Nagesh,

This is good.

But, as I mentioned in original mail, I am looking for a solution without custom exit.

Is that possible?

Thaks,

Pranab

former_member188325
Active Contributor
0 Kudos

Hi,

i don't think it is possible without customer exit.

thanks