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