Campaign from Reference

Hi SAP-CRM Gurus,
In Web-UI, we can create CAMPAIGN FROM REFERENCE.
If we want to create a CAMPAIGN from a Referenced Campaign programatically, which Function Module or standard method or standard class can be used ?

Hi Sib,
Please try the below classes  and FM and see if it can help you
CL_TM_PXY_CAMPAIGN
CL_TM_PXY_CAMPAIGN_TASK
FM - CRM_TM_CAMPAIGN_CREATE
Regards
Jgds

Similar Messages

  • Why am I getting ErrorCode: OperationNotSupported _Code: 204 When I am trying to get campaigns from sandbox account

    Hi All,
          Seasonal Greetings. 
          I am new one to bing ads . I am trying to get Campaigns from my sandbox account. The following is my code.                    
     <?php
    // To ensure that a cached WSDL is not being used,
    // disable WSDL caching.
    ini_set("soap.wsdl_cache_enabled", "0");
    try
        //$accountId = <youraccountid>; // Application-specific value.
         $accountId = "8951263";
        // Use either the sandbox or the production URI.
        // This example is for the sandbox URI.
        $URI =
            "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/v8/";
        // The following commented-out line contains the production URI.
        //$URI = "https://adcenterapi.microsoft.com/api/advertiser/v8/";
        // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v8";
        // The proxy for the Campaign Management Web service.
        $campaignProxy = 
            $URI . "CampaignManagement/CampaignManagementService.svc?wsdl";
        // The name of the service operation that will be called.
        $action = "GetCampaignsByAccountId";
        // The user name, password, and developer token are
        // expected to be passed in as command-line
        // arguments.
        // $argv[0] is the PHP file name.
        // $argv[1] is the user name.
        // $argv[2] is the password.
        // $argv[3] is the developer token.
        if ($argc !=4)
            printf("Usage:\n");
            printf(
              "php file.php username password devtoken\n");
            exit(0);
        $username = $argv[1];
        $password = $argv[2];
        $developerToken = $argv[3];
        $applicationToken = "";
        // Create the SOAP headers.
        $headerApplicationToken = 
            new SoapHeader
                $xmlns,
                'ApplicationToken',
                $applicationToken,
                false
        $headerDeveloperToken = 
            new SoapHeader
                $xmlns,
                'DeveloperToken',
                $developerToken,
                false
        $headerUserName = 
            new SoapHeader
                $xmlns,
                'UserName',
                $username,
                false
        $headerPassword = 
            new SoapHeader
                $xmlns,
                'Password',
                $password,
                false
        $headerCustomerAccountId = 
            new SoapHeader
                $xmlns,
                'CustomerAccountId',
                $accountId,
                false
        // Create the SOAP input header array.
        $inputHeaders = array
            $headerApplicationToken,
            $headerDeveloperToken,
            $headerUserName,
            $headerPassword,
            $headerCustomerAccountId
        // Create the SOAP client.
        $opts = array('trace' => true);
        $client = new SOAPClient($campaignProxy, $opts); 
        // Specify the parameters for the SOAP call.
        $params = array
            'AccountId' => $accountId,
        // Execute the SOAP call.
        $result = $client->__soapCall
            $action,
            array( $action.'Request' => $params ),
            null,
            $inputHeaders,
            $outputHeaders
         print "Successful $action call.\n";
         print "TrackingId output from response header: "
              . $outputHeaders['TrackingId']
              . ".\n";
         // Insert a blank line to separate the text that follows.
         print "\n";
        // Retrieve the campaigns.
        if (isset(
            $result->Campaigns
            if (is_array($result->Campaigns->Campaign))
                // An array of campaigns has been returned.
                $obj = $result->Campaigns->Campaign;
            else
                // A single campaign has been returned.
                $obj = $result->Campaigns;
            // Display the campaigns.
            foreach ($obj as $campaign)
                print "Name          : " . $campaign->Name . "\n";
                print "Description   : " . $campaign->Description . "\n";
                print "MonthlyBudget : " . $campaign->MonthlyBudget . "\n";
                print "BudgetType    : " . $campaign->BudgetType . "\n";
                print "\n";
    catch (Exception $e)
        print "$action failed.\n";
        if (isset($e->detail->ApiFaultDetail))
          print "ApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->ApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->ApiFaultDetail->OperationErrors->OperationError
              if (is_array(
                  $e->detail->ApiFaultDetail->OperationErrors->OperationError
                  // An array of operation errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors->OperationError;
              else
                  // A single operation error has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors;
              foreach ($obj as $operationError)
                  print "Operation error encountered:\n";
                  print "\tMessage: ". $operationError->Message . "\n"; 
                  print "\tDetails: ". $operationError->Details . "\n"; 
                  print "\tErrorCode: ". $operationError->ErrorCode . "\n"; 
                  print "\tCode: ". $operationError->Code . "\n"; 
          // Process any batch errors.
          if (isset(
              $e->detail->ApiFaultDetail->BatchErrors->BatchError
              if (is_array(
                  $e->detail->ApiFaultDetail->BatchErrors->BatchError
                  // An array of batch errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors->BatchError;
              else
                  // A single batch error has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors;
              foreach ($obj as $batchError)
                  print "Batch error encountered for array index " . $batchError->Index . ".\n";
                  print "\tMessage: ". $batchError->Message . "\n"; 
                  print "\tDetails: ". $batchError->Details . "\n"; 
                  print "\tErrorCode: ". $batchError->ErrorCode . "\n"; 
                  print "\tCode: ". $batchError->Code . "\n"; 
        if (isset($e->detail->AdApiFaultDetail))
          print "AdApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->AdApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->AdApiFaultDetail->Errors
              if (is_array(
                  $e->detail->AdApiFaultDetail->Errors
                  // An array of errors has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              else
                  // A single error has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              foreach ($obj as $Error)
                  print "Error encountered:\n";
                  print "\tMessage: ". $Error->Message . "\n"; 
                  print "\tDetail: ". $Error->Detail . "\n"; 
                  print "\tErrorCode: ". $Error->ErrorCode . "\n"; 
                  print "\tCode: ". $Error->Code . "\n"; 
        // Display the fault code and the fault string.
        print $e->faultcode . " " . $e->faultstring . ".\n";
        // Output the last request.
        print "Last SOAP request:\n";
        print $client->__getLastRequest() . "\n";
    ?>
    http://msdn.microsoft.com/en-us/library/bing-ads-campaign-management-php-samples-get-campaigns(v=msads.80).aspx
    But I am getting responce 
    GetCampaignsByAccountId failed.
    ApiFaultDetail exception encountered
    Tracking ID: efa654c5-b112-4e96-8c3d-79bac7e70112
    Operation error encountered:
    Message: This operation is not supported.
    Details: 
    ErrorCode: OperationNotSupported
    Code: 204
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns1:ApplicationToken></ns1:ApplicationToken><ns1:DeveloperToken>BBD37VB98</ns1:DeveloperToken><ns1:UserName>-XXXXXX-</ns1:UserName><ns1:Password>-XXXXX-</ns1:Password><ns1:CustomerAccountId>8951263</ns1:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Please Help me to get out of this .  
    Thank you in advance.
    Deepa Varma 

    Hello Nalin,
              Thank you for the reply . Now I am using
    $campaignProxy ="https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?wsdl" ;
    // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v9";
        $xmlns = "https://bingads.microsoft.com/AdIntelligence/v9";
    But I am getting 
    GetCampaignsByAccountId failed.
    AdApiFaultDetail exception encountered
    Tracking ID: ca31d743-7b7b-4479-8082-44997d60d549
    Error encountered:
    Message: Authentication failed. Either supplied credentials are invalid or the account is inactive
    Detail: 
    ErrorCode: InvalidCredentials
    Code: 105
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:ns2="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns2:ApplicationToken></ns2:ApplicationToken><ns2:DeveloperToken>BBD37VB98</ns2:DeveloperToken><ns2:UserName>vbridgellp</ns2:UserName><ns2:Password>XXXX</ns2:Password><ns2:CustomerAccountId>8951263</ns2:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    I am able to login to sand box UI and see my campaigns. What may be reason for the error ? 
    Thank you in Advance. 
    Deepa Varma

  • Problem launching Campaign from UI

    Hi All
    We have a problem launching campaign from UI screen,as when we try and launch the campaign from the screen
    following error is coming:
    Cannot display view BSPWD_BASICS/WorkAreaHostViewSet of UI Component CRM_UI_FRAME
    An exception has occurred Exception Class CX_SHM_OUT_OF_MEMORY - Insufficient Shared Objects Memory Available
    Method: CL_SHM_AREA=>_ATTACH_WRITE70
    Source Text Row: 2
    Error occurred during navigation
    An exception has occurred Exception Class CX_BSP_WD_RUNTIME_ERROR -
    Method: CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source Text Row: 165
    Cannot display view BSPWD_BASICS/BreadCrumbView of UI Component CRM_UI_FRAME
    An exception has occurred Exception Class CX_BSP_WD_INV_VA_ASSIGNMENT - Assigned view in view area Root could not be loaded.
    Method: CL_BSP_WD_HIST_MANAGER_BASE=>GET_VIEW_ASSEMBLY
    Please suggest what should i do to correct this(we are working on CRM 2007)
    Any help will be highly appreciated
    Regards
    Ashish

    Hi,
    Would you please show your solutions? I am facing the same problem. Thanks!
    BR,
    Hao

  • Error coming while launching campaign from UI screen

    Hi All
    We have a problem launching campaign from UI screen,as when we try and launch the campaign from the screen
    following error is coming:
    Cannot display view BSPWD_BASICS/WorkAreaHostViewSet of UI Component CRM_UI_FRAME
    An exception has occurred Exception Class  CX_SHM_OUT_OF_MEMORY - Insufficient Shared Objects Memory Available
    Method:  CL_SHM_AREA=>_ATTACH_WRITE70
    Source Text Row:  2
    Error occurred during navigation
    An exception has occurred Exception Class  CX_BSP_WD_RUNTIME_ERROR -
    Method:  CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
    Source Text Row:  165
    Cannot display view BSPWD_BASICS/BreadCrumbView of UI Component CRM_UI_FRAME
    An exception has occurred Exception Class  CX_BSP_WD_INV_VA_ASSIGNMENT - Assigned view in view area Root could not be loaded.
    Method:  CL_BSP_WD_HIST_MANAGER_BASE=>GET_VIEW_ASSEMBLY 
    Please suggest what should i do to correct this.
    Any help will be highly appreciated
    Regards
    Ashish

    Hi Rohit
    Thats what i am really surprised off too,what we did was a little bit configuration for changing the skin of the screen,so a configuration request was created,now whatever changes i have done regarding the change in the skin etc. was not actually reflecting in the system & personalise button become ineffective on the main screen of UI.
    So to just go back to previous state ,i deleted that request.
    This is whatever we did,after that when we tried running campaign ,this error is coming,but i am not sure that whether this error is coming after this deletion of request or may be it was coming before too but i did not check campaign before these customisations.
    There is no Z object involved as role applied is Standard SAP Business Role & the probs coming is in the Viewset of standard Role.
    I have tried changing the role & created a Z role and applied it but of no use since the result is same,the error that i have already described.
    I am really clueless.
    Regards
    Ashish

  • Creation of campaign from template through program in web ui

    Hi,
    We have requirement to send notifications to customers.We are using campaign framework to send notifications.Need to create a new campaign from an existing campaign template  and release the campaign through a program in web ui. Please suggest me to achieve this requirement.
    Regards,
    Brahmaji

    We have created camapign element  by passing parent campaign guid and assigned the target group
    LV_OBJECT is an Object of Class cl_crm_mktpl_appl_base.
      CALL METHOD LV_OBJECT->ELEMENT_CREATE
        EXPORTING
        IM_MKTELEMENT_GUID         =
          IM_OBJECT_TYPE             = lv_object_type
          IM_ATTRIBUTES              = ls_attribute
          IV_USE_EXTERNAL_ATTRIBUTES = 'X'
        IM_TEXTS                   =
          IM_PARENT                  = lv_campaign_guid_16
        IM_CHECK_ATTRIBUTES        =
        RECEIVING
          RV_NEW_GUID                = lv_campaign_guid_new
        CALL METHOD LV_OBJECT->TGGR_ASSIGN_CREATE
          EXPORTING
            IM_MKTELEMENT_GUID = lv_campaign_guid_new
            IT_TGRP            = lt_tgrp
    Regards,
    Brahmaji

  • How to change the path of sysprep files that were copied to reference computer when i capture the image from reference.

    Dears ,,
    how to change the path that sysprep were copied to reference computer when i capture the image from reference.
    Should i modify some codes in LTIAPPLY.wsf? how to modify it?
    Thanks.

    Sysprep and capture has *Three* steps.
    1. Run sysprep on the local machine (easy).
    2. Copy WinPE down to the local machine so we can reboot into winpe for capture.
    3. Capture the drive in an *offline* state from within WinPE.
    What is most likely happening is that you are having problems with step #2. 100MB is *WAY* too small to copy down WinPE. By default MDT will make this System partition much bigger, 499MB. IF you install Windows 7 from the default media. IT will only create
    a 100MB partition.
    By default MDT 2012 Update 1 and greater *should* recover to a fallback drive with the OS on it, however if you are running older versions that might not happen correctly.
    If you are still having problems, copy your BDD.log file to a public share like OneDrive and copy the link here.
    Keith Garner - keithga.wordpress.com

  • Settlement rule copied from reference internal order

    Hi
    How to manage that no settlemnt rule will be copied from reference order into the new internal order I´m creating in transaction KO01? Is it a configuration issue?
    Please advise.
    Anna

    HI,
    the reason for creating an internal order "with reference" is to transfer all infos to the new order (even the settlement rule). So after "creation with reference" the settlement rule is copied. If its not the one you need:
    1: take a reference order that fits your requirement.
    2: for order creation without reference use a "model" order, this "model" order can be assigned to the order type in T-code KOT2_OPA and works similar as a reference, but if the model order does not contain a settlement rule, the created order also does not).
    3: change/delete the created settlement rule from the new order.
    Best regards, Christian

  • Permanently delete Campaigns from Marketing Planner and Reuse Campaign ID

    Hi,
    Does anyone have a suggestion how we can delete the campaigns from the Marketing Planner permanently so we can re use the campaign ID?
    Thanks,
    Niversphere.

    Hi,
    you might try this. Make sure you have not still scheduled any dependent objects of a marketing plan and campaigns (e.g. campaign elements belonging to the campaign, conditions). In customizing you are able to archive marketing projects. You are able to delete all marketing projects that are successfully stored in the archive from the the database.
    Let me know if you need further help.
    Marcus

  • Create material from reference material for all org.levels

    Hi,
    i want to create a material from a reference material with all MARA, MAKT, MARC, MBEW, MARD, MARM, MVKE, MLAN, MLGN and MLGT content for all organizational levels of the reference material.
    For instance, my reference material has 200 MARC entries. All these entries should also be created for the new material.
    Transaction MM01 will copy from reference but only for 1 organizational level. To create 200 plants manually with MM01 is not an option.
    I have to develop a copy from reference transaction, where i select the new material number, the reference material number and the required tables (MARA, MAKT, etc)
    I can read the current tablevalues and insert new entries into the required SAP standard tables, but that is not nice.
    Is there another option to do the job ?
    I know there are bapi's, but these are related to one org.level. For 200 plants, i have to execute 200 bapi to get the data from the reference material and another 200 bapi's to create the new material.
    with kind regards,
    Hans

    Hi Goutam,
    You can use the BAPI BAPI_MATERIAL_SAVEDATA, which will create/update the material. You can pass the reference material in the filed BAPI_MARA-PL_REF_MAT. And you can pass reference material for all view like this.

  • VA01 copies texts, but VA02 does not when creating from reference

    Hello,
    I am having an issue with text determination configuration.  It is currently set up to copy some header texts from the quote to the order when an order is created from reference.  This works correctly when using transaction VA01 to create an order from reference.
    However, the issue arises when using VA02 to create from reference, the items copy over correctly from the quote, but texts and other data do not copy over correctly.  Any ideas on why this might be the case?
    Thanks,
    Tony

    Hi Everyone,
    Thanks for your replies.  I know the correct way to do this is to use VA01 and Create from reference.  However, the way that the order processing group has always done this is to create a "dummy" order using VA01, then use VA02 to "modify" the order by going to menu option Sales Document -> Create with Reference.  This has the effect of copying over all items from the quote into the order.  However, no sales texts are copied over when this is done.  I'm wondering if there is a config that needs to be modified to allow texts to copy over using this method.
    When I go into the texts tab in VA02 and display the log, the texts that I need copied over say something like, "Text does not exist".  I have a feeling that the text is not copied over because the order does not have a reference to the quote at the time the text determination is evaluated.
    Thanks,
    Tony

  • Problem extracting value from reference

    Hi all,
    I have a main VI where the user specifies a range for acquiring data. These values are then passed to a subVI which iterates a loop an according number of times. I have created a reference in the subVI which passes the position of the data acquisition in the range specified as I want to provide a progress bar which would be calculated as (max value - current value)/(maxvalue - minvalue).
    I created an indicator to show the current value on the main VI which is related to the reference I created and when I run the main VI I can see this value changing correctly. The problem is that I cannot find a way to wire this value into the formula above. I tried changing the indicator to a control, but the value is not passed.
    I have attached my code along with the subVIs to illustrate the problem. Current Frequency A increments correctly on the screen whereas Current Frequency B stays constant. I have also tried using local variables, property nodes and an OpenVIReference Node but none of these solve the problem.
    I'm sure this must be possible so if somebody could tell me the correct way to go about it then that would be much appreciated :-)
    Many thanks,
    Ian
    Attachments:
    FRA SubVI.vi ‏71 KB
    extract value from reference.vi ‏52 KB
    DATA FROM RIG v2.vi ‏553 KB

    No worries - I managed to solve my own problem.
    I realised if I did the calculation and created the progress bar on the subVI and made the reference straight to that then it wouldn't required the need to bring a wire from the reference.
    Still, I'd be intrigued to know if I could've done it the other way tho...
    Ian

  • Create Control From Reference

    Using the type parameter of the Terminal is the best way to get the type of a control. If you try to do something like "get the value of the control and then ask for the type of that", you run into problems with LV classes and refnum types where the type of the value might be a child class of the type of the control.
    Solved!
    Go to Solution.

    Using the Create from Reference method seems easier:
    Try to take over the world!

  • BPS: Create records from reference data in FOX

    As writed in "How to Loop over Reference Data in Fox Formulas", I create FOX Function with DO statements, but unfortunetely if I have no data yet in the subset my fox formulas can't be executed at all.
    It's write "0 data records were read, 0 of them were changed, 0 generated". Even if I put Break-point in fox formula, it doesn't take place. When I input somehow one or so "test" record, it works perfect, and creates new lines from reference as I want.
    How can I execute fox formula at list one time with empty subset?

    Hello,
    use a copy function to create one (dummy) record. Then call your FOX function (and delete the dummy record). You can combine them in a sequence.
    Also see SAP Note <a href="http://service.sap.com/sap/support/notes/646618">646618</a> for looping over reference data.
    Regards,
    Marc
    SAP Techology RIG

  • How to create Project IMG from Reference IMG in Solution Manager

    Dear All
    I am new to solman, and need to create project IMG. can someone provide me step by step guidance to create Project IMG from Reference IMG in Solution Manager. Point swill be awarded.

    >
    Nayab Nayab wrote:
    > I am new to solman, and need to create project IMG. can someone provide me step by step guidance to create Project IMG from Reference IMG in Solution Manager.
    See [Configuration Guide SAP Solution Manager as of SP15|http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000673252&_SCENARIO=01100035870000000112&_OBJECT=011000358700000155252008E]  pages 8 - 10.
    Best regards,
    Ruediger

  • From Reference Step and To Reference Step

    When you use the fields : From Reference Step and To Reference Step in the pricing procedure how can I now in which cases the conditions will be added or multiplied so that I can avoid using subrutines ?
    For example:
    step 100---Z001   100
    step 101---Z002   2
    Z003 (VK11 maintaned with percentage 2.5% ) from = 100 to = 101
    result Z003 = (100 + 2 ) * 2.5
    Kind Regards.

    Hi David,
    Which conditions to be added comes from the business requirement. with the help of 'from-to' step i think you cant multiply the condition types.
    how can I now in which cases the conditions will be added .
    Suppose:
    100     0     PR00     Price
    200     0     JMAN     Manual Excise     100     190
    300     0     UTXJ     Tax Jurisdict.Code     100     190
    350     0     JMOD     A/R Basic Excise     200
    375     0          Base Prices     100     190
    400     0     JEX2     A/R Basic Excise     350
    450     0     JAED     A/R Add. Excise duty     100     190
    475     0          Base prices + BED     375     400
    500     0     JEXA     A/R AED     450
    520     0     JSED     A/R Special Exc.duty     100     190
    525     0          Base Price + BED + AED     475     500
    540     0     JEXS     A/R sED     520
    550     0     JCES     A/R Cess     100     190
    575     0          Base Price BEDAED+SED     525     540
    If you analyse the example, for calculating JMAN/UTXJ 100-190, all the prices/discounts would be added up.The base prices/discounts and excise duties are all added up to calculate sales taxes such as CST?VAT.
    regards
    prasad

Maybe you are looking for