cancel
Showing results for 
Search instead for 
Did you mean: 

Link from contract to Rental Object using conditions

Former Member
0 Kudos

Hi All,

KIndly help me with the below query with link from contract to Rental Object.

Taking the contract number from table VICNCN as input, i want to find my Rental object. I use table VICDCOND condition table to pick the link where VICNCN-INTRENO = VICDCOND-INTRENO. And then using VICDCOND-OBJNR = VIBDRO-OBJNR to get Rental object.

select intreno

objnr

from vicdcond into corresponding fields of table ist_vicdcond

for all entries in ist_vicncn

where intreno eq ist_vicncn-intreno.

If ist_vicdcond is not initial.

select intreno

bukrs

swenr

objnr

xmetxt

from vibdro into corresponding fields of table ist_vibdro

for all entries in ist_vicdcond

where objnr eq ist_vicdcond-objnr.

endif.

The above works fine in 1 scenario but not another.

Scenario 1: IN contract, conditions Tab --> Calculation object created across the Rental object

i.e. Company Code/Business Entity/Rental Object

This picks Rental object successfully from above code

Scenario 2: In contract, conditions tab --> Calculation object across contract

i.e. Company code/Contract

In this scenario please help me how to find the link to pick Rental object as OBJNR here is not in VIBDRO.

Else, please let me know if there is any other way to get Rental object from contract number by not using the condition table.

Regards,

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Madhu,

why you want to get rental object through condition type ??

It is not possible to get rental object through condition type as your calculation object for condition type is contract.

you can try for for BAPI_RE_CN_GET_DETAILS, will get all the details.

rgds,

Srini

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Srini, BAPI resolved my query.