Skip to Content
avatar image
Former Member

How to change the pricing during creating followup of same Transaction

Hi Frds,

My requirement is the check the Opportunity date and once it get expire create the copy of same opportunity so that again it get renewable.

Ques: suppose if contract get expire after 2 year and during this time the pricing get change. So i want to update the pricing during creating followup document in report.

I am creating followup document using FM CRM_COPY_PROCESS_PREPARE and then using CRM_ORDER_MAINTAIN.

so my problem is i unable to update the pricing. Is it possible to update the pricing at the time of creation.

Please advice. Sample code will be appreciable.

Thanks,

Rajan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 06, 2016 at 11:50 PM

    Hi Rajan,

    This could be done via customizing actually.

    Assuming you have opportunity ZOPT with ZACTION assigned as action profile and ZITM as item category.

    step 1: customize the action

    go to action profile -> customizing action e.g. zfollowup.

    zfollowup should have no schedule condition, and start condition to judge in some way that opportunity date is expired.

    In zfollowup, select for "Processing At" that "1 Processing Using Selection Report".

    assign zfollowup with method copy_document.

    Make sure flags of Schedule Automatically , changeable in dialog and executable in dialog are checked.

    then maintain processing parameter PROCESS_TYPE for copy_document.

    If you do not have process_type, click on create button to create process_type.

    To create element process_type,

    in D. Type tab, select ABAP Dict. Reference

    Structure CRMD_ORDERADM_H

    Field PROCESS_TYPE

    in Initial Value tab, add ZOPT

    step 2: go to copy control for transaction

    maintain ZOPT to ZOPT

    go to copy control for item category

    maintain ZITM to ZITM, select "do not copy conditions" or "only copy manual conditions" for field Copy Conditions.

    This customizing will determine if the followup opportunity will copy or recalculate conditions on items.

    This copy condition field is not available on ZOPT to ZOPT.

    step 3: schedule background job for report RSPPFPROCESS every day for example.

    Once the preceding ZOPT is created and save, zfollowup will be added to table PPFTTRIGG once zfollowup 's schedule condition is met. since there is no schedule condition, so zfollowup is always scheduled. Once you run this report, the report will check if start conditions of actions in this table are met. Once met, this action zfollowup will be executed which means, copy_document will be executed and followup ZOPT is created with conditions on item level recalculated.

    Spencer

    Add comment
    10|10000 characters needed characters exceeded