How to update campaign pricing discount through coding

Hi ,
I have a requirement where I need to maintain campaign Discount through coding.
Generally , we create the condition record by clicking on 'New' button on Discount assignment block . Then its shows pop-up to choose the Condition type combination. When we click on it , it redirects to Edit list View component and we maintain there only.
But here I need to maintain directly Discount assignment button through coding.
Please help me out here.
Thanks,
Satya

Hello,
when creating the condions manually in a campaign or auto generate the conditions in a trade promotion this calls function module /SAPCND/MNT_MAINTAIN_OW. You can try to use that one to generate the conditions.
Two remarks:
you will need to take care of the correct input parameter when calling that function
you will need to make sure that the conditions are saved afterwards
I hope this helps to solve the issue.
best regards,
Johannes

Similar Messages

  • How to create a batch job through coding

    Hi Experts,
    How to create a batch job through coding?
    Regards
    Saroj

    Hi, below is the code.
    ***Create Variant for the job
    ***Get the dynamic variant name
      DATA: variant_name TYPE  varid-variant value 'test'.
      DATA: vari_desc LIKE varid,
            vari_contents LIKE rsparams OCCURS 0 WITH HEADER LINE,
            vari_text     LIKE varit    OCCURS 0 WITH HEADER LINE.
      CLEAR: vari_desc,vari_contents,vari_text.
      REFRESH: vari_contents[], vari_text[].
      vari_desc-mandt = sy-mandt.
      vari_desc-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_desc-variant = variant_name.
      vari_desc-transport = 'F'.
      vari_desc-environmnt = 'A'.
      vari_desc-version = 1.
      vari_desc-mlangu = sy-langu.
    ***Varint Text
      vari_text-mandt = sy-mandt.
      vari_text-langu = sy-langu.
      vari_text-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_text-variant = variant_name.
      CONCATENATE 'job' 'Background' INTO vari_text-vtext SEPARATED BY space.
      APPEND vari_text.
    ***Partner
      IF ( p_partner-low IS NOT INITIAL ).
        vari_contents-selname = 'PARTNER'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_partner-low.
        ENDIF.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_partner-low.
          vari_contents-high = p_partner-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Account
      IF ( p_cont_acct-low IS NOT INITIAL ).
        vari_contents-selname = 'CA_ACC'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_acct-low.
        ENDIF.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_acct-low.
          vari_contents-high = p_cont_acct-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Object
      IF ( p_cont_obj-low IS NOT INITIAL ).
        vari_contents-selname = 'CO_OBJ'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_obj-low.
        ENDIF.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_obj-low.
          vari_contents-high = p_cont_obj-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Account Category
      IF ( p_ctra_acc_category  IS NOT INITIAL ).
        vari_contents-selname = 'P_CAT'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_ctra_acc_category.
        APPEND vari_contents.
      ENDIF.
    ***filed_freq_to_change_from
      IF ( p_filed_freq_to_change_from  IS NOT INITIAL ).
        vari_contents-selname = 'P_TO_CH'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_filed_freq_to_change_from.
        APPEND vari_contents.
      ENDIF.
    ***req_filed_freq_change
      IF ( p_req_filed_freq_change  IS NOT INITIAL ).
        vari_contents-selname = 'P_CHANGE'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_req_filed_freq_change.
        APPEND vari_contents.
      ENDIF.
    ***Test Run p_tstrun
      vari_contents-selname = 'P_TSTRUN'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_test_run.
      APPEND vari_contents.
    ***Update Filing Frequency Checkbox
      vari_contents-selname = 'P_FIL_FR'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_frequency.
      APPEND vari_contents.
    ***Update Incoming Payment Channel Checkbox
      vari_contents-selname = 'P_PAY_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_payment_channel.
      APPEND vari_contents.
    ***Update Filing Channel Checkbox
      vari_contents-selname = 'P_FIL_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_channel.
      APPEND vari_contents.
    ***Use Current Filing Period Checkbox
      vari_contents-selname = 'P_CU_PER'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = use_curr_per.
      APPEND vari_contents.
    ****Create Variant thru Function Module
      CALL FUNCTION 'RS_CREATE_VARIANT'
        EXPORTING
          curr_report   = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          curr_variant  = variant_name
          vari_desc     = vari_desc
        TABLES
          vari_contents = vari_contents
          vari_text     = vari_text.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ****Prepare all the date for scheduling job
    ***Get the print parameters
      DATA: params LIKE pri_params.
      CLEAR params.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          mode           = 'CURRENT'
          no_dialog      = 'X'
        IMPORTING
          out_parameters = params.
      params-paart = 'X_65_255'."'X_PAPER'.
    ***Open The scheduling job
      DATA: job LIKE tbtcjob-jobname,
            jobcount LIKE tbtcjob-jobcount.
      CLEAR: job,jobcount.
      job = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = job
        IMPORTING
          jobcount = jobcount
        EXCEPTIONS
          OTHERS   = 4.
    ***Job Submit
      DATA: authcknam LIKE tbtcjob-authcknam.
      CLEAR: authcknam.
      authcknam = sy-uname.
      params-primm = space.
      CALL FUNCTION 'JOB_SUBMIT'
        EXPORTING
          authcknam = authcknam
          jobcount  = jobcount
          jobname   = job
          priparams = params
          report    = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          variant   = variant_name.
    ***JOB_CLOSE
      DATA: sdlstrttm TYPE tbtcjob-sdlstrttm,
            released LIKE btch0000-char1.
      sdlstrttm = p_job_start_time + 30.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          sdlstrtdt        = p_job_start_date
          sdlstrttm        = sdlstrttm
          jobcount         = jobcount
          jobname          = job
        IMPORTING
          job_was_released = released.
    Regs
    Manas

  • How to update the pricing, sales area details in Campaign

    Hi All,
    I need to create a campaign in CRM through program. For the same I have created it using the below:
    1. create a Profle set using "'BAPI_PROFILESET_CREATE' with the appropriate "segmenttype".
    2. create a target group using " BAPI_TARGETGROUP_CREATE" based on the Profileset guid.
    3. assign Target group to Market element calling the FM"MKTPL_TGGR_ASSIGN_CREATE".
    I need to assign the pricing amount , sales area data and the product to the campaign. Could you let me know the name of a Bapi/FM to update the same.
    Thanks,

    Hi,
    Can you check if these FM's are useful:
    CRM_MKTPL_GET_BP_SALES_AREAS
    CRM_MKTPL_AL_FILL_PRODUCT
    Hope this helps.
    Regards,
    Anup

  • How to update FSCM Credit Management through SD in R3.

    Hi,
        I have a follwowing requirement.
        When SD documents such as Sales orders, Delivery Documents, Billing Documents are created, the commitment of that new transaction goes through the same PI interface to update FSCM Credit Management.
       I guess, SAP has already provided standard interfaces in PI for this. Please let know how can I trigger those interface through SD transactions like VA01, VL01N.
    Thanks in advance.
    Punit

    Punit,
    I know about Tcode ukm_bp to check credit eligibility of business partner. Likewise there can be different T codes. Please post in respective FSCM forum with details requirement to get more info on that...
    Coming to developement, you could use SAP pre defined content from SAP FINBASIS and APPL and develop scenarios.
    If your ERP and FSCM are on the same box, use the same business systems else use seperate one for each.
    Venkat.

  • Want to updated sales pricing procedure through quotation

    Hello Friends,
    In general scenario: we update any condition type in vk11 tcode and tht is reflected in quotation pricing.
    my requirement : while creating quotation if the user changes any price for any condition tht should automatically get updated in pricing procedure for tht particular condition type.
    pls suggest how it is possible??
    Regards,
    Sunny

    Hi Sunny,
    you can write exit in VA21 to update the sales pricing .
    Thanks & Regards,
    Devalla T Kumar

  • HT4623 how to update my iphone 3g through itune to 4.2.1?

    my phone 3g is version 4. i want to update 4.2.1 through itunes. how should i do it?

    READ  the article from which the question was posted and follow the relevant instructions.

  • How to update the pricing conditions in Products.

    Hi All,
    I have created a Product Using  Function Modules. Now i need to update the Pricing Conditions into it. Can anyone suggest me with  the exact Function Module and Tables that are used to Update the pricing conditions?Can anyone provide me with a sample report program written to update the pricing conditions.?
    Points will be awarded for useful answers.
    Thanks In Advance,
    Shwetha Korlepara.

    Hi,
    Can you check if these FM's are useful:
    CRM_MKTPL_GET_BP_SALES_AREAS
    CRM_MKTPL_AL_FILL_PRODUCT
    Hope this helps.
    Regards,
    Anup

  • How to update a list item through Sharepoint Designer Workflow?

    Hi,
    I have a created a list, in which "Completion date" column is there.
    Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
    Please help.
    Thanks in advance

    Hi,
    You can use the "Build Dynamic String" action to convert the date field to a string,
    And use string comparison to determine if the date is blank
    For more information, please refer to
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
    Hope this helps
    Thanks!
    Stanfford

  • Very Urgent.......How to update the database values through OAF pages ??

    Hi All,
    I am developeing some self service application thru Oracle Application Framework(OAF). There I am fetching 5 attributes from the database and displaying those attributes in my main page Table Region. Now my requirement is i want to edit that exising values & again i want to store it in the databse while clicking the update button. so first i have created one VO for fetching the values from the database & i make one Table Region in my main page along with 5 MessageTextInput field.. & i mapped that VO's attributes to my textbox.Now i can able to fetch & display the values inside the text box while rendering the page.
    But I dont know how to update the values in the database. Caz in my VO I have only select query. So anyone plz send me the code for update. And also plz let me know where to insert that code..whether (CO or AM or EO)..it is very urgent.
    Thanks
    srini

    David,
    Note that the default JavaBean datacontrol does not allow create/remove and transaction operations. These apis are not implemented for the JavaBean datacontrol.
    You may re-initialize the rowsetiterator, by calling ((oracle.adf.model.generic.DCRowSetIteratorImpl)iteratorBinding.getRowSetIterator()).clearCurrentData().
    This will force the RSI to refresh it's data via the named-accessor again.

  • How to update OID oblogintrycout attribute through java code

    Hi Team,
    As per my requirement ,i need to update OID oblogintrycout attribute through java code. could you please help me on this.
    where can i get the java code.
    Regards,
    Ravi.

    As always, Google is your friend.
    Follow the bouncing link.
    http://www.google.com/search?hl=en&q=VisualSourceSafe+%2B+Java+API
    PS.

  • How to update values in ztable through hyperlink

    Hi Gurus,
    The Problem is I want to send sales order in mail to any id and mail should have two links
    like Accept or decline and when user clicks on this link there sholud be some process to update z table.
    Pls help how to achive this.
    Should i use some services or webdynpro or there is some another mehod by which i can get values inside SAP.
    Thanks
    Pooja

    Hi Uma
    workflow is not configured in my company..
    Please suggest some other option..
    I am able to send data through mail but how to capture the links pressed outside and update tables in sap.
    Please guide
    thanks
    Pooja

  • How to Update Fields in ES20 through EC70

    Hi,
    I have displayed some customer fileds in accelarated move-in/Out transaction EC70.Once i create move in through EC70 these customer fields are updated in EC70 also it creates contarct in background.
    My requirement is to display the same customer fields in ES20 as well and same is to be filled with values from EC70 when contarct gets created.
    Can anyone please tell me how to acheve this is there any EXIT or BADI for the same or any case it cab be achieved through MASTER DATA generator.
    Thanks & Regards

    Hi rushikesh,
    PLEASE do NEVER use ES20 to create a contract, please do always use EC50E or something alike. You can CHANGE any contract you like with ES21, but never create one with ES20.
    As for the customer fields - please see note 152498 - it describes a bit the user exists within the contract and how to use those.
    KR
    Uwe

  • How to update an Excel Sheet through a WebService

    Dear All,
    Please help me with this query.
    Kindly could you guide me on updating an Excel Sheet which is saved on my local server through a WebService which is deployed on the WebApp Server. The Server is located locally too. I have developed the WebService on the NWDS.
    I have tried using POI and ODBC for updating the sheet. But it appears to me that the server is unable to fetch the excel sheet.
    Please could you provide your valuable suggestions on this.
    Regards,
    Suyukti B N

    Hi,
    Thanks for your reply.  Below are more details regarding my question. I am trying to achieve the requirement with :
    Java WebDynpro (Front End) <--> WebService (Middle Tier) <->ODBC <---> Microsoft Excel (Back End)
    1) I am Using the Java perspective to create the service method. The method has to read and update the excel sheet. I have created a ODBC DataSource on my local machine. I also have the SAP WebApp Server on my local machine. Below is the method I am using for "reading" the excel :
    public String read(){
    Connection connection = null;
    String columnValue = "";
            try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection con = DriverManager.getConnection   ("jdbc:odbc:DS");
                    Statement st = con.createStatement();
         ResultSet rs = st.executeQuery("Select * from [Sheet1$]");
         ResultSetMetaData rsmd = rs.getMetaData();
         int numberOfColumns = rsmd.getColumnCount();
         while (rs.next()) {
         for (int i = 1; i <= numberOfColumns; i++) {
             if (i > 1)                           System.out.print(", ");                columnValue = rs.getString(i);
         System.out.println("value is" + columnValue);
         st.close();
         con.close();
              } catch (Exception ex) {
              System.err.print("Exception: ");
              System.err.println(ex.getMessage());
              return "false" + ex.toString();
         return "true";
    This code works perfectly fine and provides me the values that are present on the Excel Sheet.
    2) I now switch over from the Java Perspective to the WebService Perspective on my NetWeaver Developer Studio. I create a new WebService for the above Java method.
    3) I then create an Ear file and deploy on the Server.
    4) Now when I click on Test WebService, the values that are returned from the Excel are "null". It shows return String as False and an SQL Exception. java.sql.SQLException: General error.
    Hence I concluded that after deploying the Service on the Server, the Excel Sheet is not being fetched or read.
    Please could you provide your thoughts on this.
    Thank You Very Much,
    Warm Regards,
    Suyukti B N

  • How to update a baen property through javascript?

    I am creating a shuttle listbox component where i copy a value from one listbox(source) to another listbox(target) onclick of a button using javascript.
    when i click on the submit button i want the setter property of the target listbox to be updated using javascript.
    i dont want to use ajax.
    is there an option how i can achieve this?
    please help me...

    It sounds like this is more of a JavaScript question than a Java question. The JavaScript source code available here may help.

  • How to trigger standard FPM events through coding.

    While a standard FPM event triggers, it carries out with some event parameters which are automatically filled and is taken care by standard program.
    I have a requirement to raise a standard event manually, but in this case, the standard event parameters are not filled.
    Can any one tell me if there is any way through which I can get the event parameters automatically by raising a standard fpm event manually.

    Hi Chittibabu,
    There is no any such method to fill the event parameters automatically while we raise standard fpm event manually. You have to fill the parameters accordingly before you raise fpm event manually.
    Regards,
    Ravikiran.K

Maybe you are looking for

  • How to calculate the Daily Call Volume

    Hello, Can anyone please advise how to calculate the daily call volume in a contact center - the counts of the calls terminated in ICM ? Is there any webview report or a SQL query which provides the count ? Many thanks in advance for the help! Thanks

  • Diff between Log files and Trace files

    hi What is the exact differences between Log Files and Trace Files. And the relevant informative URL/reference materils would be highly appriciated. Thanks Sekhar

  • Quick time error

    I reinstalled itunes after receiving a MSVCR80.dll error. I followed advice from Microsoft.com support for addressing this error which involved a sequence of uninstalling and reinstalling Apple programs in the order of itunes-apple software update-ap

  • How do to I locate & delete empty song titles

    I had to reformat my boot drive, so I upgraded to Win 8.1.  After doing so I used the Add File to Library option to reload my music.  Now I have two problems- 1. I have hundred of duplicate songs of which the first of each duplicate is empty.  Meanin

  • How to remove a plug-in from aperture

    How do you remove a plug-in from aperture?