cancel
Showing results for 
Search instead for 
Did you mean: 

solution without BPM possible ?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Gaurav

Can you tell me the general walkthrough for creatinbg a ABAP proxy please , I am more interested in the work that needs to be done in SAP system, and the coding logic . I could look at a proxy blog for XI configuration.

Many thanks

Sudheer

prateek
Active Contributor
0 Kudos

Regards,

Prateek

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

henrique_pinto
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

henrique_pinto
Active Contributor
0 Kudos

calling the same rfc twice in parallel will cause the same lock problems.

You need some abap help, maybe check some reference or some colleague with experience.

You need to call the BAPI you have from this RFC and your XI interface will call the RFC you just created.

Regards,

Henrique.