on 04-06-2016 3:49 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
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.