cancel
Showing results for 
Search instead for 
Did you mean: 

how to trigger workflow FV50

Former Member
0 Kudos

Hi experts,

I am trying to trigger a workflow when user parks a G/L doc in FV50.

I did created new entry in SWETYPV and SWEINST for FIPP created event link to my workflow - a copy of WS10000052 ( single level only ). I also activated the link.

However, workflow is not started as I expect. Even no event is triggered when I save or "save as completed" in FV50 ( I traced the event in program RSWELOGS ).

But I do see a event post when I post a G/L doc in FV50. That mean FIPP is the correct one.

What's the configuration I missed?

Thanks a lot.

Accepted Solutions (1)

Accepted Solutions (1)

surjith_kumar
Active Contributor
0 Kudos

Hi,

In the SPRO settings for the park and post you have to assign the workflow Number.

Go to T.code. SPRO

In Financial Accounting --> Accounts Receivable and Accounts payable > Business Transaction> Incoming Invoices/Credit Memos --> Make and check settings for Document Parking --> Create Workflow Variant for Parking Documents (Click this)

There you have to assign your workflow. Then the event will trigger.

Regards,

Surjith

Edited by: surjith kumar on Dec 23, 2008 10:20 AM

Former Member
0 Kudos

HI surjith kumar :

The even is not shown in SWEL even after I setup this configuration. So nothing will be catch by workflow.

BTW, what's the difference b/t SPRO->FI->Global Setting->tools->workflow->document parking

and SPRO->FI->AR & AP->BT ->Incoming Inv & Credit Memo->setting for doc parking?

I need G/L account, not incoming invoice.

Answers (3)

Answers (3)

saumya_govil
Active Contributor
0 Kudos

Hi Stony,

I wanted to cross-check with you the the minute details to ensure nothing have been missed upon.

Hope the other people posting on the forum understand that they need to reply ONLY to the question and not comment on other's reply.

I hope people follow posting etiquettes here in future!

Regards,

Saumya

bpawanchand
Active Contributor
0 Kudos

Stony

And points will be awarded late.

No need of saying this

Saumya Govil

I hope people follow posting etiquettes here in future!

!!!!!

saumya_govil
Active Contributor
0 Kudos

Hi Stony,

Go to transaction FV50 and park a G/L doc. Select save or 'save as completed' in FV50.

Now go to transaction activate the event trace by t-code SWELS and then go to SWEL to see the event trace.

If the event is triggered it would be listed in this transaction.

For event binding to workflow do the following:

1. Go to t-code SWDD and open your workflow template.

2. Go to Basic Data (cap sign button at the top of the screen) or click Ctrl + F8

3. Go to Start Events tab.

4. In the Object type enter your BO name, in Event of object enter the BO event (the event triggered in FV50).

5. Click on 'B' i.e. Binding Defined, click on generate automatic binding. It would automatically generate the appropriate binding for the workflow. You can also alter the binding as per requirement.

6. Click on 'C' i.e. Start Condition. A dialog would open, select the appropriate start condition for the workflow. Check the condition before saving (recommended).

6. Click on 'A' to Activate the binding and start condition. All 'A', 'B' and 'C' would get green.

7. Save the changes made and activate your workflow.

Hope this answers your query.

Regards,

Saumya

former_member193382
Active Contributor
0 Kudos

Hi Saumya,

Stony Wrote : He has created an entry in SWETYPV.

Do you think the A,B,C in the start events tab of workflow will do something different. Please read the question properly before posting.

Regards,

Raj

Former Member
0 Kudos

Hi Saumya Govil

"4. In the Object type enter your BO name, in Event of object enter the BO event (the event triggered in FV50)."

Now the issue is the event is not triggered in FV50.

former_member193382
Active Contributor
0 Kudos

Hi Stony,

You can use BTE (Business Transaction Events) to trigger FI Workflows. Try to find out appropriate BTE for FV50 using tcode BERE and FIBF.

Try using BTE 00001011, 00001070, 00001140.

You can also use User-exit SAPLF051 - EXIT_SAPLF051_002

Below is the code how i implemented it for FV50 using user-exit

DATA: OBJKEY LIKE SWEINSTCOU-OBJKEY .

DATA: KEYF(18) TYPE C.

IF SY-TCODE = 'FV50' OR SY-TCODE = 'FV60' OR SY-TCODE = 'FV65' OR SY-TCODE = 'FV70'

OR SY-TCODE = 'FV75' OR SY-TCODE = 'FV63' OR SY-TCODE = 'F-64' OR SY-TCODE = 'F-65'

OR SY-TCODE = 'F-66' OR SY-TCODE = 'F-67'.

IF T_VBKPF-BSTAT = 'V'.

CONCATENATE T_VBKPF-BUKRS T_VBKPF-BELNR T_VBKPF-GJAHR INTO KEYF.

OBJKEY = KEYF.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

EXPORTING

OBJECT_TYPE = 'FIPP'

OBJECT_KEY = OBJKEY

EVENT = 'CREATED'

COMMIT_WORK = 'X'

EVENT_LANGUAGE = SY-LANGU

LANGUAGE = SY-LANGU

USER = SY-UNAME.

ENDIF.

ENDIF.

Let me know if you have any queries.

Regards,

Raj

Edited by: Raj Karunanidhi on Dec 23, 2008 9:14 AM

Former Member
0 Kudos

Hi Raj,

Thanks, I will check it. And points will be awarded late.

My question is, is FV50 a stardand document park transaction which is defined in FIPP? Why do we still need add user exit to do it?

Former Member
0 Kudos

It is resolved. Thanks for Raj's Function Moudule - I debugged into the SAP subroutine "PP_WF_CREATED" in which the event is generated, and found the reason: the amount is less than the approval limit.

Thanks for all of your answers. rewarded.