Creation of activity

Hello Guys,
   Am using the following code  to create an activity,but am not successful in creating an activity.
   Though sy-subrc is resulting in zero and activity is not getting created.  Please suggest:
CALL FUNCTION 'CRM_GUID_CREATE'
       IMPORTING
         EV_GUID       =  lv_object_guid  .
ls_activity_h-ref_guid = lv_object_guid.
ls_activity_h-name = 'Create Activity'.
append ls_activity_h to lt_activity_h.
ls_subject-listcode = 'A1Y0000001A001'.
append ls_subject to lt_subject.
ls_osset-subject = lt_subject.
append ls_osset to lt_osset.
ls_service-osset = lt_osset.
append ls_service to lt_service.
ls_input_field_names-fieldname = 'NAME'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'LISTCODE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_fields-ref_kind = 'A'.
  ls_input_fields-objectname = 'ACTIVITY_H'.
  ls_input_fields-field_names = lt_input_field_names.
  INSERT ls_input_fields INTO TABLE lt_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
   IT_ACTIVITY_H                 = lt_activity_h
   IT_SERVICE_OS                 = lt_service
IMPORTING
   ET_EXCEPTION                  = lt_exception
CHANGING
   CT_ORDERADM_H                 = lt_order_out
   CT_INPUT_FIELDS               = lt_input_fields
EXCEPTIONS
   ERROR_OCCURRED                = 1
   DOCUMENT_LOCKED               = 2
   NO_CHANGE_ALLOWED             = 3
   NO_AUTHORITY                  = 4
   OTHERS                        = 5
IF SY-SUBRC eq 0.
insert lv_object_guid into table lt_guid.
CALL FUNCTION 'CRM_ORDER_SAVE'
   EXPORTING
     IT_OBJECTS_TO_SAVE         = lt_guid
  IMPORTING
    ET_SAVED_OBJECTS           = lt_save
ENDIF.
regards
najm

By the way, you must create an order first and set their process type , then you will be able to append an activity.
      ls_orderadm_h-handle = 1.
      ls_orderadm_h-description = 'My order'.
      ls_orderadm_h-process_type = 'Z000'.
      INSERT ls_orderadm_h INTO TABLE lt_orderadm_h.
      CLEAR: ls_input_fields, ls_input_fields-field_names[].
      ls_input_fields-ref_handle = 1.
      ls_input_fields-ref_kind = 'A'.
      ls_input_fields-objectname = gc_object_name-orderadm_h.
      ls_field_names-fieldname = 'PROCESS_TYPE'.
      INSERT ls_field_names INTO TABLE ls_input_fields-field_names.
      ls_field_names-fieldname = 'DESCRIPTION'.
      INSERT ls_field_names INTO TABLE ls_input_fields-field_names.
      INSERT ls_input_fields INTO TABLE lt_input_fields.
then your code ...
       CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
        IT_ACTIVITY_H                 = lt_activity_h
        IT_SERVICE_OS                 = lt_service
        IMPORTING
          et_exception      = lt_exception
        CHANGING
          ct_orderadm_h     = lt_orderadm_h
          ct_input_fields   = lt_input_fields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
then CRM_ORDER_SAVE
then BAPI_TRANSACTION_COMMIT.

Similar Messages

  • Problem in Creation of Activity Request Questionnaire

    Hi
    I'm facing issue while creation of activity Request Questionnaire. After setting the status to complete & Clicking 'Ok' the activity is not getting created. Its showing 'Internal Error'
    When I checked in Tcode SLG1 for error log, I'm getting following error.
    I was not facing this issue with other activities. But when i use Request Questionnaire activity I'm facing the problem. The worst part is when i use this activity, all other activity start showing same problem i.e. if i skip Request Questionnaire & use other activity every thing works fine.
    Please suggest
    Regards

    Hi,
    Please check program " RCF_CHECK_SEARCH_SETTINGS" here all categories status to be shown in Green color.
    BR,
    Rajeswara.

  • Problems in creation of activity with the folder relationship...

    Hi People,
    I need to create the activity adding the campaign in the RELATIONSHIP folder.
    To create the activity, I am using the BAPI BAPI_ACTIVITYCRM_CREATEMULTI, but there is the problem: I can´t add the campaign at the folder RELATIONSHIP of transaction CRMD_BUS2000126. Is it possible to create this?
    If not, Is there the other function that do this?
    Thanks,
    Regards.

    Hi Florin,
    At First, thank you for your help.
    Really, I don´t populate the table DOCUMENT_FLOW.
    Sorry, do you have an example to populate this table correctly? Or do you have any documentation about this BAPI?
    Thanks.
    Best Regards.
    Norberto Muramoto.

  • Automatic creation of Activity/Ineraction log when BP data  is changed

    Hi Gurus,
    How automatic business activity can be created from CRM Web UI when particular transaction is excuted.
    for ex. when I change a Business partner details from Web UI,a automatic business activity/Interaction log needs to be created saying that BP details been changed.
    I also develop this functionality for few more transactions.
    Please give me a clear approach how this can be achieved.
    Regards,
    Ravi

    Hi Ravi,
    There are few ways to get this requirement done,
    One Method of doing the same and which I also have tried is by Implementing the BADI 'PARTNER_UPDATE'.
    Regards,
    Anand T

  • Automate the creation of Active Directory users with organization/address information

    On one of our Domain Controllers we regularly have to create new users with fully populated organisation/address information, as they use a server-side application which appends email signatures at the end of all of their emails created from this information.
    At the moment we have to fill this information out manually and it can sometimes cause inconsistencies if the information is not uniform or is typed incorrectly.
    Is there any way to automate this/do it in bulk?

    This is another Powershell script that can be used:
    http://www.wictorwilen.se/how-to-use-powershell-to-populate-active-directory-with-plenty-enough-users-for-sharepoint
    Note that you have two ways to do that:
    Create a new User account Provisioning script and include the Street update as part of it
    Have a daily scheduled script that will run against your users OUs and update the Street address for user accounts having it wrong or missing
    From my point of view, option 2 would be the best as it will make a Bulk update and Bulk correction if required.
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to trigger an SMS after creation of Activity / Interaction Record

    Dear Experts,
    Our Client requirement is to trigger an SMS immediately after creation of an Interaction Record. I want to define an Action for this.
    But what processing type should I use for SMS, (like Method Call, Smart Forms Mail / Fax / Print and Workflow). We are using an external service provider domain to send SMS to our customers. It has been configured in SCOT.
    But from CRM configuration front there is no specific processing type for SMS. then how system reads telephone number from the BP master.
    Kindly help me to resolve the issue, your suggestions will be highly appreciated.
    Best regards
    Raghu ram

    Raghu,
    In your case you could copy a "print" action method class and create a z-version.  Then modify the print action method so that the smartform output triggers a call to your output type.
    Or you could just code a new method that creates a new BCS send request using the CL_BCS document and your output type.
    It just depends on how whether you want to use smartforms to build the message or build it in some other method.
    Take care,
    Stephen

  • Creation of Activity with campaign

    hi guys,
    Can anybody help for the below scenario.
    I am creating an activity with an 'CAMPAGIN ID'. Once the Campagin id is populated in the activity transaction and click on save button it will become as a preceding document for the activity.
    I am using the function module(BAPI_ACTIVITYCRM_CREATEMULTI) to create an preceding document as marketing campaign for the activity. But it was not working.
    can anyone guide how to approach to the above mention scenario. If possible post sample code.
    Thanks
    Viswa

    Hi Viswa
    Try this.
    Create a Marketing Campaign first.
    On save create activity using actions.
    Thanks

  • Home Folder Creation w/Active Directory

    If this has been asked a million times, just point me to the url for the answer...
    I have done the leg work and have the "magic triangle" working - I can login and auth to AD and get my preferences from OD. I want our user's home folders to reside on our Windows server. I have shared out \\server\students on the Windows server and in AD I am pointing their home folder to our Windows server, but I can't get the permissions right. When I point a new user's home folder in AD to our Windows server, it creates the folder \\server\students\jtest.
    When the user logs in, none of the subfolders are created. Can someone give me some pointers on how permissions need to be set so the subfolders are created on first login?
    This is all pretty new and I'm happy that I got the triangle to work - if I can get this all important piece, I'll be set.
    Thx in advance!

    Hi
    A lot of this depends on how many OUs you have; how deep they go; and how many directories you have nested in each OU or the particular OU the directory for home folder creation is within. The accepted 'recommendation' is not more than 3 deep - generally. Having said that I have made it work with OUs 7-10 deep. Gets trickier after that.
    In my experience the non-creation of expected directories is generally down to permissions not being assigned properly - as you've guessed. Essentially users must be given read/write access all the way down the nested directories. I have seen permissions assigned correctly to a parent folder, with a set of different permissions applied to the next folder down and the next one along again with the correct permissions applied. Folder creation fails when permissions are set in this way.
    What is interesting is the log-in does not fail though you are greeted with the usual "the home folder exists on an SMB or AFP Server etc" dialog box when getting to the desktop. You sometimes get this at the log-in window as well. Although you can also see the message for other reasons - usually down to poor DNS configuration.
    You should be able to log in as the local admin and look at the system.log in Console. You should see an error starting with 'NSurl etc etc. . . ' listed. If you do that's an indication it's a permissions problem.
    Beyond this and without being there it's difficult to tell?
    Hope this helps, Tony

  • Creation of Activity Elements

    Dear All,
    I have a requirement to cerate standard set of activity elements to activities. We do not use standard networks. Is there any way this can be automated. Or, is it possible by way of customization ?
    Regards
    Muraleedharan.R

    Hi,
    Try BAPI_NETWORK_MAINTAIN
    BAPI_ACT_ELEMENT_UPD
    BAPI_ACT_ELEMENT
    Regards,
    Kabir

  • Service Disruption - Adobe ID Creation/Activation

    Due to emergency system maintenance, creation and activation of Adobe IDs
    will be unavailable from 6 AM - 7 AM Pacific time on Friday, September 24,
    2010.  During this time no new user will be able to activate an Adobe ID, and
    existing users may also receive error messages during activation.
    During this period, only Adobe ID services will be impacted; Content Server
    4 partners will be able to be fulfill eBooks normally during this time.  We
    apologize for the inconvenience and look forward to posting an update upon
    resolution. 
    Jim Lester
    Lead Engineer - Digital Publishing
    Adobe Systems

    Maybe the confusion about not being able to activate is down to the fact that you need to be part of the beta program to be able to use the app. I could not find any reference to this in any publicly available information but once I used an Adobe account that we use for our beta testing, I could activate the iPad app and access our test files on it.

  • Issue in automatic delivery creation

    Hello,
    This is to reframe the issue again and give you some more details on
    this issue –
    As per SAP standard we have configured our salers order for
    immediate delivery creation with a default delivery block – XX. Hence
    as
    per config whenever we create a sales order, it gets created with a
    default delivery block – XX which later on users removes manually and
    system subsequently as per design creates the delivery document
    automatically.
    We are facing two issues in case of sales order design –
    1. Some time even after removing the delivery block –XX manually,
    system do not create the delivery document automatically against those
    sales order.
    2. Some time if sales order is created with a credit block in
    addition to Delivery Block – XX, system doesn’t create automatic
    delivery document against those sales orders even after releasing /
    removing the credit block as well as Delivery block.
    But if you just open those sales orders in VA02 and make any change for
    example – Carry out new pricing Or carry out Availability check for any
    one item and save the sales order without making any change into it,
    system is creating delivery document against that sales order
    automatically.
    This issue is happening sporadically. There is no specific pattern
    where
    this issue is happening. This is an inconsistent issue. We could not
    replicate this issue in any of our Non-production SAP system.
    Whenever we tried to investigate it in debug mode for the sales orders
    where this issue has happened, it worked well and created delivery
    document automatically.
    Requesting you to kindly look into this issue again and help us to fix
    it as early as possible.
    Thanks and Best Regards,
    Pankaj Jain

    Hi,
    plz confirm if the automatic delivery creation is activated to few sales order types
    as it is most frequently used for Cash sales and Rush Orders
    more ever Credit check not Applicable for cash and rush sales

  • Activity Generated in CRM  through an incoming Email

    Hi,
        Im new to CRM.Can anyone one help me in this issue.
        When an User sends a Email with HTML attachment to CRM System, an Activity is generated at CRM end.
    But when i try opening the Attachment in the Activity,it doesn't open.It works fine for Word Document and PDF attachments.
    Can anyone suggest me how this activity is generated when an email comes.Any processing steps or Configuration to be done.Need to know whether HTML format is Supported?????
    Thanks,
    Anuja

    Hi Anuja,
    You need to specify the transaction type to be created on sending the mail through campaign at the following:
    IMG -> MARKETING-> MARKETING PLANNING AND CAMPAIGN MANAGEMENT -> CAMPAIGN EXECUTION -> DEFINE COMMUNICATION MEDIUM. This will result in creation of activity.
    Regards,
    Deepak

  • Activity Journal in Tasks

    LS,
    Can anybody tell me how an Activity Journal can be made available in a Task?
    According to standard SAP CRM Sales material you can only assign item categories (ACT/ ACT0/ ACT1) to Business Activities. And thus making the Activity Journal available.
    Additional information is that this has to be done for CRM2006s SP01.
    Regards,
    Maarten Maassen

    Hi,
    I had similar issue as during creation of activity,the  activity journal is visible but later when you open the same activity it will not be visible. To make it possible you need to customise your component view for task BT_125H by adding activity journal assignment block available in task.
    Shiva

  • Standby to active database

    Hi All
    I am looking for some doc which tell about creation of Active database from standby without DG broker. I am looking for doc for 10g/11g version.
    kindly inform me . Thanks in advance.
    Thanks
    Krishna

    Actually my requirement is linke this. we are planning to have exadata serever with high capacity. on the server where my Standby is runing on same machine i >want to have my TEST/DEV database also. and we want cloning of databse on daily basis. so my TEST/DEV will be cloned from standby (using RMAN) and my >Data Guard should also be continue. Now your requirement is very much clear (Initially there was a bit confusion with your subject line :) ). You can have the cloning activity being carried out from the standby to the test database but during this process, the MRP (managed recovery process) on the standby database will have to be stopped. So, it means that, at the time of cloning, log shipping and applying of logs from the primary to the standby would not be carried out.
    Before the clone:
    On standby:
    SQL>alter database recover managed standby database cancel;
    Connect to target as the standby database and auxiliary as the test database (Remember your target database (standby) would be in mount stage and the auxiliary >database (dev) would be in nomount stage)
    RMAN target sys/pwd@stby axuiliary sys/pwd@dev
    RMAN>duplicate target database to 'dev' from active database nofilenamecheck;This would clone your standby database to dev but during the cloning activty you need to cancel the managed recovery on the standby. Once the cloning is done, you need to start the managed recovery on the standby again.
    On standby:
    sql>alter database recover managed standby database disconnect from session;If you do not cancel the recovery before cloning activity, then you would be getting errors while opening the dev database saying that the "system datafile is inconsistent and needs recovery".
    Note: This is tried without dataguard broker (normal sql commands). I have disabled the dataguard broker configuration and normally do not use it.

  • Managing Office 365 Components for a large enterprise using Active Directory

    Opening Office 365 to a large enterprise (7000 users) implies some controls be placed around who can subscribe to what and which Add-Ons a user might have/need/desire access to.
    To place these controls around, for example, licensing Project Online to individual users, we are proposing creation of Active Directory groups for each add-on and use powershell or other method to read the AD FS user groups, then flip the bit on the O365
    user profile for that member to allow them to select the Add-On.
    At any point in time, our Asset Management team can use the AD group to determine licensing distribution and chargeback to internal cost centers.
    Does this seem like a viable approach?
    Any other approaches that have worked?

    John,
    After your users and home profile paths are created in AD - have your tried running the createhomedir command from Terminal? Assuming your AD plugin settings are correct on your server - specifically the 'Use UNC path...' - try running the command (in Terminal) below on your document (home folder) server:
    sudo createhomedir -s
    This command should query your server's search path (check the path using Directory Utility - located in /SystemLibrary/CoreServices) and find any users (preferably your AD network accounts - that's the -s option) that should have home folders on that server and create them. Note that this command nust be run as root - hence the sudo
    To test - try creating a new AD user and point their profile to your Mac sharepoint - then run the command. You could also run the command on your Mac server to create an account for just the new user - just add their name at the end of the command above:
    sudo createhomedir -s newusername
    Hopefully one of these suggestions will work for you...
    Ken

Maybe you are looking for

  • Link Purchase Order to Sales Order

    Hey All, I am trying to link a purchase order created via the DI API to a sales order in the B1 system. I set the following fields: B1Document.oDocument.Lines.BaseEntry = B1Detail.BaseDocEntry; B1Document.oDocument.Lines.BaseLine = B1Detail.BaseDocLi

  • Problem in Getting host name by using request.getHostName() on solaris 9

    Hi there, I'm trying to get the machine name of the system from which the request was initiated by using request.getHostName() on Solaris 9 but it is giving me the IP Address of the machine which har sent the request to the server and the same thing

  • Need help centering page

    This page is just a baby but I'd like to get this figured out before i get to deep into it. It's in php but only the swf menu at the top is the consistent thing. the menu at the top will center. the background and the sidebar will not. here is the co

  • DESCRIPTIVE FLEXFIELD의 REFERENCE FIELD추가방법

    제품 : AOL 작성날짜 : 2004-05-20 DESCRIPTIVE FLEXFIELD의 REFERENCE FIELD추가방법 ========================================== PURPOSE Descriptive Flexfield의 기능 중 Reference Field를 사용하기 위해서는 원하는 Form Block의 Field를 Reference Field로 등록해야 한다. Explanation 1. Place curs

  • ITunes 8.0.2 launching problem

    I just installed iTunes 8.0.2 on my Mac Mini G4-1.42GHz with 1GB RAM, and tried opening iTunes. A dialog box says "The iTunes application could not be opened. An unknown error occurred (13008). I tried reinstalling iTunes, but the same message occurs