Skip to Content
0
May 29, 2018 at 04:13 PM

How to read the characteristics values(Runtime) before a purchase order /sales order is created

1352 Views Last edit May 29, 2018 at 04:15 PM 2 rev

Hello Experts,

We have a requirement where, in the variant function module i have to fetch the characteristics and their values before the purchase order/sales order/object is created. which means we need to fetch the run time characteristics values.

Inside the variant function module we are first fetching the instance number(CUOBJ) from the stack as the instance number was not available in any of the interface parameters of the variant function. Then using the method cl_cbase=>GET_CURRENT_CBASE_BY_INSTANCE we were fetching the characteristics details, but in case we are in the process of creation of a PO/sales order the instance number fetched from stack is having a number starting with 9999 which means it is a temporary instance, and in case of temporary instance the above method raises exception saying invalid instance.

So if you can help me read the characteristics values before the object is created will really be great.

Thanks,

Deepak