cancel
Showing results for 
Search instead for 
Did you mean: 

query - WF container empty ?

Former Member
0 Kudos

Hi All,

I am facing a very peculiar problem.

In my WF BO-FIPP is used

1) I have created a step with ztask and zmethod (method fetches the document type from FV60 screen).Have done the bindings :

method --> Task ---> WF.

2) have put the condition step if : &documenttype& = X ,then proceed otherwise stop WF.

whenever I test my Wf through swdd,then its working fine.

But the problem is : whenever a document is parked through FV60, event trace gives the info that receiver WF starts correctly ,but it always stop WF

as condition is never met and WF container variable "documenttype" is empty .

and while testing it through swdd, WF container variable "documenttype" is filled with values and according to the condition WF proceeds .

I am fail to understand wat is missing or why WF variable is not filled with data if we park document through FV60 while it has the values if we test it through swdd.

Please advice how to go about it .

Best Regards

Priya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priya,

Check whether your business object(FIPP) is getting initiated at run time. I.e. when you test it using SWDD you will pass the FIPP Key attributes manually.

So its working FIne.

This kind of problems arise generally <b>" When you forget to do the binding of FIPP object from Start event container to WOrkflow conatiner Object FIPP".</b>

(In the header of workflow)

Try doing the above step if you have not done already.

Reward if it helps.

Thanks

Praveen

Former Member
0 Kudos

Hi Praveen,

The binding of FIPP object from Start event container to Workflow conatiner Object FIPP".(In the header of workflow) is already done ,that is fine. still problem persists.

Please advice how to go about solving the issue.

Rgds

Priya

KKilhavn
Active Contributor
0 Kudos

The container element for document type, how do you fill it? By that I mean both

1) what is the source you bind into the workflow container

2) how/where is the source initialised

You repeatedly say that the workflow works fine when you test it in SWDD, but you have never said anything about how document type is fed to the workflow from the application.

If the answer is "it isn't", there are several solutions. You can extend object type FIPP with a new attribute for document type (that would be my recommendation if you asked for one). You can (probably) create your own receiver function module and set the container element there. You can make sure the document type is passed (as an event parameter?) when the workflow is started.

Former Member
0 Kudos

Hi Priya,

Have u made the required settings in SWE2 between ur event and the workflow? Try this maybe it will work.

Also run SWELS and then SWEL to see if ur Workflow is being triggered from the SAP Tcode.

Just some points to check on. Let me know if it helped.

Regards,

Soumya

Former Member
0 Kudos

Hi Kjetil,

I hv created a zmethod which fetches the doctype from VBKPF, n done the binding between method(doctype) --> task(doctype) ---> WF(doctype).

WF runs through SWDD means - condition is getting satisfied here and WF proceeds with the steps followed by condition step.

Doctype is fed to WF through task ,in turn task is fed through method and method fetches the value of doctype through VBKPF comparing FIPP-key fields.

Now as suggested by u , I have created a new attribute "doctype" in BO - FIPP.

if i test this attribute through SWO1, its giving the required value.

In my WF if i m giving condition step as: if &FIPP.documenttype& = Z1, true-Go, false -stop, condition step is giving error.

SO, i hv made a element "doctype"[VBKPF-BLART(doctype)] in WF container n done the binding as :

[Start Event] -


> [ WF]

&_EVT_OBJECT& -


> &FIPP&

&_EVT_CREATOR& -


> &_WF_INITIATOR&

&_EVT_OBJECT.DOCUMENTTYPE& ---> &DOCTYPE&

Now the condition step is: &doctype& = Z1.

But WF always stops while executing it through SWDD as well as through tcode-FV60 .

Please suggest, wat else could be done to correctly start the WF based on true result of "doctype" condition.

Any help will be highly appreciated.

Regards

Priya

KKilhavn
Active Contributor
0 Kudos

That's odd - your condition which references FIPP.DocumentType should not be giving you an error. Does this error occur at definition time or at run time?

Even if your attribute seemingly is OK (works in SWO1 test mode), there could be something wrong in your code, especially if your error occurs at run time and not at definition time. Could you post your code for the attribute? (Please use the <b>Code</b> button to make it more readable).

If the error occurs at definition time the error message you get from the workflow builder should reveal what the problem is.

Former Member
0 Kudos

Hi Kjetil,

If condition is : &FIPP.documnettype& = Z1, this condition is getting satisfied and WF proceeds if i test it through SWDD, but if i execute tcode- FV60, event trace (SWEL) shows following error in this WF:

"Error in the evaluation of expression '&FIPPID<???>.DOCUMENTTYPE&' for item '7'" and

"Error when determining attribute 'DOCUMENTTYPE' of object instance '[BO.FIPP.100019000004622007]"

I have checked, FIPP in WF container has the correct value in attribute "document type", still giving errors . I m puzzled !!

DocumentType is a database attribute (VBKPF-BLART), so code is system generated.

Pls advise wat could be done?I m badly stuck with this issue from last 3/4 days.

Rgds

Priya

Former Member
0 Kudos

Hi Kjetil,

The issue is still on ......

taking &FIPP.DocumentType& = Z1, throws an error saying ,FIPP.DocumentType cannot be determined.

Pls guide me where I m mistaken n help me to come out of this matter.

Regards

Priya

KKilhavn
Active Contributor
0 Kudos

You have defined DocumenType as a database attribute. Set a break-point in the routine which finds database attributes and see what happens. If that doesn't help, try changing it to a virtual attribute (for testing purposes) and observe what happens in the code. There's got to be something wrong there I believe.

Answers (4)

Answers (4)

Former Member
0 Kudos

A problem is probably, that when the event is triggered (FIPP.created I believe) the document is not yet saved into the DB. System tries to read the attribute from the DB and fails.

When you do the same in SWDD you use the existing document so all works fine.

A simple (and not very elegant) workaround is to wait for some time before evaluating the condition. And obviously not to bind the object attribute from the triggering event.

Regards,

Michal

Former Member
0 Kudos

I'm not sure how many steps are in your workflow but you shouldn't need an additional workflow container element for the doctype. It's in FIPP if it's a defined attribute delegated from ZFIPP. If your workflow is being triggered, follow each step in SWIA and check the business object container element for Z1 in documentype. It must be getting lost somewhere along the way.

Former Member
0 Kudos

Hi,

Thanks for the reply.

Since I was getting error while using attribute &FIPP.documenttype& = 'Z1', I have deleted the condition step from my WF and instead I have used "SWB_COND" to define the start condition for my WF. there also if I m taking start condition as :

&FIPP.documenttype& = 'Z1' , while running FV60, SWEL-event trace shows the error in WF as :

"Error in the evaluation of expression '&FIPPID<???>.DOCUMENTTYPE&' for item '7'" and

"Error when determining attribute 'DOCUMENTTYPE' of object instance '[BO.FIPP.100019000004622007]"

So , I have generated 1 more zattribute(virtual) Flag (REF - Boole - Boole). and set the flag as "X" if Documenttype = 'Z1'.

Now in SWB_COND, I hv defined the condition as &FIPP.flag& = 'X', If true then start WF . But while testing it through FV60 now SWEL shows the error as :

<b>Start condition returns 'FALSE' for object '[BO.FIPP.100019000004622007]"</b>

Now the condition results is always shown as false.so WF is not getting started .

Its very urgent for me to solve this start condition issue n complete my WF with successful start .

Pls Advise how to go about it now, I m badly stuck !

Any help will be highly appreciated.

Best Regards

Priya

KKilhavn
Active Contributor
0 Kudos

Basically, your problem is to determine what the problem is, and I don't think anyone here can tell you. It isn't pretty, but the following may be helpful:

1) Add an attribute to ZFIPP (or change an existing one) so you can write text in it. For instance you can use CHAR255 as the data type. Implementation follows later, just leave an empty shell first.

2) Bind this attribute to a workflow container element as the first step of your workflow (remove the start condition temporarily).

3) Now, in the code for this virtual attribute you are going to look up the document type. But the key issue is to check for errors you think may occur, such as the document not existing in the database, or ... (the document not existing is the only one I can think of right now). Fill your new virtual attribute with a description which either says which error occured, or that you could not identify any error (and to prove that you can write the document type to the virtual attribute).

Former Member
0 Kudos

I just tried this and it takes 5 minutes.

Create a subtype of fipp...call it zfippXX or whatever.

Set your cursor to attributes and click create.

Say yes to create with reference and use BKPF-BLART. Set cursor to new attribute and click program. Say yes to add code and all the code to populate this field will be copied for you.

Set new attribute as implemented and released. Repeat also for object zfippXX then generate.

Hit test button and enter a valid document number. Documenttype should appear in the attribute list with the related value from the document you entered. check table bkpf in se16 to verify.

You can then try and use this Z version in a workflow. Generate the binding for zfippXX in your start condition and test the workflow in the workflow builder entering the same document number info as when you tested the business object.

Assuming all this works, you can delegate fipp to your new zfippXX, replace zfippXX with fipp and everything should work fine.

The error message you got normally happens when the business object you're referencing is empty. I don't know if you have it properly delegated so its difficult to tell where you're losing document type.

Former Member
0 Kudos

DocumentType is getting determined from Code I suppose as you are using Method. If in the method Container the value is X it should be in the Workflow Container. Please check whether the variables you have determined in method,Task and WFLOW is consistent. Also check that the Business object that you are using in Wflow Container matches with the Business object for which you have called the Method. If this is fine. Delete that step and create another and check. This will surely resolve ur issue.

<b>Please reward points if useful</b>

Thanks

Arghadip

Former Member
0 Kudos

Hi All,

Thanks for the response.

As suggested, I have cross checked the binding method--> task --> WF..bindings are fine, as WF is correctly started and WF container element has correct values while testing it through SWDD.

I don't know y while running WF through tcode-FV60,WF container element as well as task container export element "doctype" is shown as empty while import parameter "BOkey i.e FIPP here " for the task is correctly populated .

and while carrying out testing through SWDD, "doctype" is correctly filled..

As adviced I have deleted the step n created another step again with the bindings , still the problem persists.

Pls advice how to cum out of this problem.

Regards

Priya

KKilhavn
Active Contributor
0 Kudos

Can't you simply check &FIPP.DocumentType& instead of &document_type& - or is it just me who doesn't quite understand how you have set things up? (Also, since I can't access a SAP system right now I can't check whether document type is available as an attribute in FIPP.)

Former Member
0 Kudos

FIPP doesn't have document type but you can add it pretty easily with dictionary reference to BKPF-BLART. This will import the code to populate the attribute.

former_member184495
Active Contributor
0 Kudos

Hey Priya,

are you passing ur doc type from your method to task and then to WF ?

if yes, put a break point in your method, simulate the event and check whether you get the values in the variable.

If yes, then probably binding mistake, or check with the parameter ( if you are using any ) whether its export / import as per your logic.

Aditya