cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow scalability in finance interface

steve_coombes
Participant
0 Kudos

Hello,

We have several finance interfaces that use the FIDCCP02 Idoc. However, we were advised by SAP Support on a problem in another system not to use Idocs, but instead to use BAPI's to import finance data (BAPI_ACC_DOCUMENT_CHECK and BAPI_ACC_DOCUMENT_POST), for data validation and because it makes sense to use a public API.

So I have been asked to write a finance interface in PI that uses BAPI's. I wrote one using ccBPM that takes a XML structure, splits into finance documents, loops over the documents and sends a BAPI_ACC_DOCUMENT_CHECK request. If all the documents pass validation then loops over the documents again and calls BAPI_ACC_DOCUMENT_POST.

It works for small files but fails when I submit a 1Mb file. I think I could improve the way the interfce is written but wonder whether I should abandon the attempt altogether because it will never be as scalable as using Idocs. I use a combination of the two: validate using BAPI's and use Idocs to create documents (outside a workflow).

So, my questions are :

1) Should I use BAP's or Idocs to create finance documents?

2) What size files can ccBPM cope with, and what number of documents can be used inside a workflow?

3) Are there limits on the number of RFC requests that can be made from a mapping or ccBPM?

I would appreciate any advice on the subject.

Kind regards

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Steve, can u please describe the error you get or what u mean by saying "it fails"?

1) depends on your requirements... both should be fine. U have any details on why SAP recommended BAPIs instead of IDocs?

2) For ccBPM u generally should keep messages as small as possible inside the process and place mappings before or after calling the ccBPM to minimize runtime and resource usage

2 and 3) no such thing, but there is a maximum limit of steps per workflow instance, but I don't recommend to change that (ref. SAP help for WF runtime config http://help.sap.com/saphelp_nw04/helpdata/EN/88/8be338b46c4950e10000000a11405a/content.htm)

For your case I recommend a redesign, e.g. instead of starting one ccBPM for all documents, start one ccBPM for each document.

Regards, Martin

steve_coombes
Participant
0 Kudos

Hello Martin

Many thanks for your reply,

Sorry - I should have explained that the error was a timeout in program SAPLSENA :

>>>> DO times TIMES.

        CALL 'C_ENQUEUE'

             ID 'OPCODE' FIELD _opcode

             ID 'ENQOBJ' FIELD enqobj

             ID 'GRANULES' FIELD Seqta_lis-*sys*

             ID 'DELAY_ON_REJECT' FIELD delonrej

             ID 'USTP' FIELD _scope

             ID 'COLLISION_UNAME' FIELD user

             ID 'COLLISION_OBJECT' FIELD obj

             ID 'SYNCHRON' FIELD synchron

             ID userpar FIELD user_use

             ID usvbpar FIELD usvb_use.

        IF opcode = '1'.

           rc = SY-SUBRC.

        ENDIF.

        IF rc <> 2.

           EXIT.

        ENDIF.

     ENDDO.

The ABAP dump mentions that it is possible to increase parameter rdisp/max_wprun_time. However, I do not like this idea as I feel that we aren't using PI as intended by SAP.

1) I understand that we were told that Idocs are intended for use by SAP rather than their customers, and are liable to change. BAPI's also provide better data validation. This was not in a PI-related problem though.

And I have not seen anyone on SCN etc who is working this way with PI.

The problem I have is that I have to validate all documents in a file before posting, so if I do use BAPI's I think I have to process them all in one ccBPM.

I could perform some of the mappings outside the workflow. I could also create Java SAX mappings instead of graphical mappings to increase throughput. But I still wonder if I should be using ccBPM for what could be thousands of documents in one workflow.

Kind regards

Steve

Former Member
0 Kudos

I understand your requirement is that you only post the documents if ALL documents are valid, meaning that if at least one document is invalid, no documents are posted at all?

In this case, you could e.g. do the validation in a first ccBPM, and then, if all documents are valid, do the posting in a separate ccBPM, so you get 2 shorter running instances... execute all your mappings outside the ccBPM etc.

As u said, increasing runtime parameter is recommended.

Regards, Martin

steve_coombes
Participant
0 Kudos

Hello Martin

Thanks again. You've given me plenty of ideas to look into.

Kind regards

Steve

Answers (0)