After retrieveing employee data without no problem, i am encouring a warning after creating opportunites and leads.
Well, i was thinking this is because of missing employee data but i think it is not .
After succesfully selecting employee, contact, client and competitor and saving it, it shows me ,
"Enter dist. channel,
Enter a sales org.
ENter an org unit ( sales"
Why can this happen ? My employee responsible has its own dist channel and sales org.
I think this is last question and error
yea i change but doesnt effect.
i fill sales org, dist chan, but when i look from CRM, i see they are still empty.
and there is no Organization Unit field in badi, so last warning is "enter an org unit".
strange, i will try some other methods.
after exiting badi, fields remain filled but i dunno somewhere in the other functions they are turned back to old values which are empty, i will debug and find why probably it will be fixed via badi.
Oh ok. I should also check, but stuck in other things now.
What I thought was as the BAPI has these empty tables, these values can be filled via BADI.
So, when the BAPI calls the CRM Function module, I would send the Sales Org, division, distribution channel also. Therefore, when it commits, this information is also saved.
badi should work. in all module badis, logic is same change values and commit.
but here it doesnt work, for example i changed the lead description, but nothing has changed.
my last option is creating an enhancement spot on BAPI but i dont want this.
i am working on, i will inform.
i found the soluiton.
go to se37 - > enhance- -
Edit- > ench operations - > show imp options.
luckily they allow us to enhance at the upper side of the function
create new enhancement.
then fill the organizational data from user's data (IT_HEADER).
it works .
and that function is only used from mobile side, so no problem from WEB UI lead creation.
I have a similar requirement to populate default values for the sales org and distribution channel. In my case I need that for activities, leads and opportunities. Initially I tried using the BADI's just to realize later that they are located in the code after the transaction has been committed so all you can do with those is change the return table with messages.
I have also tried the approach described by Bilen - enhancement spot and populating the IT_HEADER or IT_ACTIVITY_H for activities but unfortunately this does not work for me.
Did you guys actually get it to work? I might need to do more debugging to see if my sales org and dist channel values are simply not taken into consideration or there is some sort of mismatch throwing an error deeper in the code.
Any advice will be appreciated.
Here's an update on how we've solved this issue. Thanks for all the guidance I got here. Hope my blog will still be helpful to you guys.