on 2008 Nov 18 10:45 AM
Hello experts
I have a requirement where I am using the BAPI_QUOTATION_CREATEFROMDATA2 for creating and updating quotations in SAP. My requirement is when there is an update I need to completely delete the existing quotation and create a new quotation with the updated data. This is to get a new quotation number for every update.
My solution was , If it is an update then set the update field to D to delete the whole sales document , and call another BAPI with the same data using BPM to create another quotation with updated data.
I was wondering if there is a clever way to achieve this without using BPM.
Please advice. Thanks a lot
Sudheer
Hi Sudheer
Looking at your requirement. Did you thought of ABAP proxy. This could be easier to do. As you want to use same BAPI twice and want to pass data to same tables. Second message can fail if the first one has not released the table due to locks.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may incorporate the logic in a custom RFC at receiver which has the same logic as BAPI_QUOTATION_CREATEFROMDATA2 and additiional logic to check if the incoming message has the field value = 'D', then call RFC again.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Prateek
I am not very experienced in making ZRFC , thats why i was looking for simpler solutions.
I have an idea, Its as below
Since the message is always routed to the same reciver and same interface but with different mappings , If i add two more interfaces( same) in interface determination and with different mappings , will it work ?
Thanks
Sudheer
you're thinking about calling 2 different rfcs from the same input message?
That would be fine, except for the fact that both RFCs will probably handle the same database table (where the quotations are stored) and it will probably cause several lock issues during execution.
Best approach would be to develop a Z wrapper RFC which would, if it's an update, call the BAPI to delete old quotation and then create a new one. The transactional behavior is guaranteed at commit time and there is no lock possibility here.
Regards,
Henrique.
Hi Henrique
I am trying to call the same RFC in my scenario , If the sender message is an update then I want to call the same RFC with D delete flag , so that the quotation is deleted and then call the same rfc again in insert mode with update data , so that a new quotation with updated data is created.
How can achive this using the BAPI wrapper , I am a newbie for BAPI wrappers.
Thanks
Sudheer
User | Count |
---|---|
70 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.