on 08-09-2006 1:06 PM
Hi All,
I am using Bapi to create activity in CRM. The organization data are assigned correctly as follows.
----
Set Organisation
----
it_organisation-ref_guid = it_header-guid.
it_organisation-ref_kind = 'A'.
it_organisation-mode = 'A'.
it_organisation-sales_org = it_data-sales_org.
it_organisation-sales_org_resp = it_data-sales_org.
it_organisation-dis_channel = it_data-dis_channel.
it_organisation-sales_office = it_data-sales_office.
it_organisationx-ref_guid = true.
it_organisationx-ref_kind = true.
it_organisationx-mode = true.
it_organisationx-sales_org = true.
it_organisationx-sales_org_resp = true.
it_organisationx-dis_channel = true.
it_organisationx-sales_office = true.
append it_organisation.
append it_organisationx.
At run time values are also populating correctly. But still its giving me problem. I am getting following errors.
Organizational unit (Sales) is not available
Sales organization does not exist
Sales office is not available
Org unit (sales) does not have these attributes
Organizational unit (Sales) is not available
Sales organization does not exist
Sales office is not available
Org unit (sales) does not have these attributes
I checked the master data also and Sales Organization and sales office do exist in system.
Text is also populated as follows,
it_text-ref_kind = 'CSLA'.
it_text-ref_guid = it_header-guid.
it_text-mode = 'A'.
it_text-ref_kind = 'A'.
it_text-tdid = it_data-tdid.
it_text-tdspras = it_data-tdspras.
it_text-tdline = it_data-tdline.
it_text-ref_kind = true.
it_textx-ref_guid = true.
it_textx-mode = true.
it_text-ref_kind = true.
it_textx-tdid = true.
it_textx-tdspras = true.
it_textx-tdline = true.
append it_text.
append it_text.
But it is not appearing in the activity.
Can anybody know why this is happing?
FYI: IT_DATA is the internal table getting filled up from input file.
Hi Sunil,
I´m not realy sure why your programm doesn´t work but there are some points you should think about.
If you create an activity the system automatically set the org unit to the or-unit which is connected to your user. If you want to set the org-unit "manually" you must create the activity and then use the CHANGE BAPI. You have a simular problem with the status. There is no way to set the status perhaps to "closed" if you create the activity. You have to create the activity with status "open" and then change the status. I think with the organization it is the same problem. The system cannot find a org unit for YOUR user. Perhaps someone can correct me and I know no other way.
The text "should" be created with your code. I tested my programm with your settings and even with the duplicate entry for "REF_KIND" (why you set ref_kind = CSLA?) the text is created. Make sure to use the correct "TDID" there could be the error.
But if this snipped is your "real" code you have an error in the following line:
append it_text.
append it_text.
The second lind must be: append it_text
x
! (or whatever you call your change structure)Hope I could help a bit. Sorry today my english is terrible, I´m tired like a dog. I hope you understand what I mean.
Greetings
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris,
Thanks for your help. It solved the problem of text. Now text is populating.
But the problem of Sales org is still there. If i don't pass sales org data, BAPI gives error saying that 'pass Sales org'. If i pass the sapes org, it still gives error saying 'Sales org doesn't exist' however the sales org does exist....
Hi
Not sure if you have resolved the problem or not, but I have been doing a similar thing, where activities are created in background based on the creation of a Case. These activities are passed a value in the organisation table for the sales_org_resp in the format "O xxxxxxxx", where xxxxxxxx is equal to the organisation unit object that is the sales group. Without the O (for Organisation node) and the space in front of this value I get the error messages identified by yourself.
Kind regards
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
sorry but for the organization I also have to dig deeper.
We are not setting the organization at all. All data for the org modell is set automatically for the user who creates the activity (by programm or manually in the gui/portal). Try to debug the function module "CRM_ORDER_MAINTAIN" which is called inside the bapi. There you can see which data is populated and how the parameters are set. Check the customizing for the settings of the organizational management.
Keep trying and let us know if you solved the problem (and how ;).
Greetings
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sunil
Does the follwoing fields should hold the Chars ??
<b>
it_organisationx-ref_guid = 'Y'.
it_organisationx-ref_kind = 'Y'.</b>
Thanks
Jack
<b>Allot points if my post helps!!!</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.