on 2012 Jan 19 12:42 PM
Hi Experts,
I have a requirement that, to write a report program to "create or update opportunity".
I am new in CRM, Can anybody help me to do this?
Thanks in advance,
Saju.
Hi
To create an opportunity, you can use the FM CRM_ORDER_MAINTAIN. You can place a breakpoint in that FM and create an opportunity through transaction crmd_order. In this process you can see all the tables that are getting filled and pass it in the same way to your program. You also will need to call CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT to make the changes to the database.
For updating an already existing opportunity, you need to use CRM_ORDER_READ to read the opportunity, then make the changes that you need to do using CRM_ORDER_MAINTAIN and then use CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT to save the changes to the database. In case you want to display any details of the modified opportunity through your report program, you'll need to call CRM_ORDER_READ again.
Hope this helps you.
Thanks and regards
Preeti Viswanath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
You can write a report that calls:
- To create opportunity, BAPI_OPPORTUNITY_CREATEMULTI
- To modify the oportunity, BAPI_OPPORTUNITY_CHANGEMULTI
Another option is calling function module CRM_ORDER_MAINTAIN, which also contains opportunity parameter.s
Regards
Joaquin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Place a break point in CRM_ORDER_MAINTAIN and then try to create a new opportunity. Check the changing parameter CT_INPUT_FIELDS and check the objects filled in that parameter and pass the corresponding internal tables( CT_ORDERADM_H, IT_PARTNER etc.) and pass the exact values which are filled in all those internal tables.
Then use CRM_ORDER_SAVE followed by BAPI_TRANSACTION_COMMIT.
Regards,
Nithish
User | Count |
---|---|
10 | |
1 | |
1 | |
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.