cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow: Container will not populate

former_member852447
Active Participant
0 Kudos

Experts,

I developed a method in a standard task which reads an ACCEPT/REJECT button and if the button is triggered updates a container element with an 'X'.

I have code in place as follows:

swc_set_element container 'accept' accept..

swc_set_element  container 'reject' reject.

The container elements have been created and the bindings are correct.

However the container is not populated. I checked this in the workflow log even after I  went into debug and ensured that the element was populated with an 'X'.

Do I have to use a FM ......why would the swc_set elemnt code not populate the container.

Any hints will be helpful.

Thank you.

regards

David Dittmer

Accepted Solutions (1)

Accepted Solutions (1)

former_member852447
Active Participant
0 Kudos

Rick,

Thank you for your help......how would check the bindings between the method and the task ....as i said I am new to workflow. I am familiar with the bindings betwen the task conatiner and the workflow container....

regards

David

former_member185167
Active Contributor
0 Kudos

Hi David,

Go to PFTC_DIS, fill in the task (TS), go to where you can see what method it calls. Look for the Binding button (two green squares).

regards

Rick

former_member852447
Active Participant
0 Kudos

Hello Rick,

I checked the binding button as you described. The binding as you described is empty....should this be bound?

Thanks

former_member185167
Active Contributor
0 Kudos

No! It should (in most cases) be empty.

former_member185167
Active Contributor
0 Kudos

Hello,

Maybe you could share the code of the method in question, including declarations.

regards

Rick

former_member852447
Active Participant
0 Kudos


Hello Rick,

The following is the code

Declaring the object

Acceptance type LOEVM.

Rejection type LOEVM

Populating the ACCEPTANCE/REJECTION

case ZZ_APPROVAL_TYPE

when DS Site Approval.

acceptance = 'X'.

when DS Site rejection

rejection = 'X'.

endcase.

SWC_SET_ELEMENT CONTAINER 'APPROVAL' approval

SWC_SET_ELEMENT CONTAINER 'REJECTION' rejection.

The parameters on the task container 'acceptance' 'rejections' are the same type as above and clicked on for IMPORT/EXPORT and the workflow container elements the same.

When the ACCEPTANCE element is populated, the workflow stops and the value of 'X' does not go to the decision point.

Just cant understand what I did wrong.

Thank you.

regards

David Dittmer

former_member852447
Active Participant
0 Kudos

Hello Rick,

Further to my earlier posts, the graph of the workflow says that it stops because there is NO AGENT. I have declared a GENERAL AGENT on the standard task so what agent could the workflow possibly be looking for.....any hints would be helpful.

Thanks

regards

David

former_member185167
Active Contributor
0 Kudos

Hello,

"No Agent" just means it hasn't been executed by the agent yet.

I'd prefer to see actual code. The pseudo-code given won't work because "approval" is unknown.

regards

Rick

former_member852447
Active Participant
0 Kudos

Rick,

I click on the link in my inbox and the following method selects the transaction as follows:

BEGIN METHOD XXXX CHANGING CONTAINER.

SET PARAMETER ID 'PSP' Field object-key-currentexternalproje.

CALL TRANSACTION CJ20N' and skip first screen.

endmethod.

This code brings up the transaction and I enter CHANGE and select a few screens and then there is a button which is triggered for ACCEPT/REJECT. The project is saved. This dialogue task has been checked over and over again and it has an expression to find my inbox which is working but it will not complete and stops  after I perform the action

The workflow stops right here. I moved ACCEPTANCE/REJECTION  to another method on a tree where the database is selected to check whether accepted or rejected but the workflow does not even get there.

If you ned more information let me know.

Thanks

David

former_member852447
Active Participant
0 Kudos

Hello Rick,

The funny thing is that when I run this workflow in the portal I get a popup message which asks me to COMPLETE WORKFLOW and then if I click on it, the workflow completes (NO agent issue) but where would I find the COMPLETE WORKFLOW popup or menu in the SAP GUI.

Any hints.....

regards

David

former_member185167
Active Contributor
0 Kudos

Hi David,

Check in SWI1 if that Complete Workflow was a separate workitem.

Also look in PFTC_DIS for the TS task and see if (on the Basic data tab) the checkbox "Confirm end of processing" has been marked.

regards

Rick

former_member852447
Active Participant
0 Kudos

Hello Rick,

On my basic tab of the standard task the confirm end of processing has been checked. In SWi1 would I see CONFIRM WORKITEM under a separate WS #?

Thank you.

David

former_member185167
Active Contributor
0 Kudos

Hello,

No, it doesn't show up as a separate workitem in this case (when checkbox is checked).

Strange you don't see it when executing the workitem from the GUI, it's always worked there for me.

regards

Rick

former_member852447
Active Participant
0 Kudos

Rick,

All I see in SWi1 is a workitem that has a status of STARTED and if I go to the log it shows the workitem stalled at the activity even after I access the link in my inbox and complete the step.

thanks for your input.

regards

David.

former_member185167
Active Contributor
0 Kudos

I just tried it in a Test workflow and it all works as expected. I got the pop-up in SBWP.

As you said, the workitem (and the workflow) are in status STARTED.

Could your pop-ups be blocked somehow? Perhaps you could try a simple test workflow.

former_member852447
Active Participant
0 Kudos

Hello Rick,

When you say test workflow do you mean transaction SWUS.....I did that numerous times and get STARTED from the display SWI1. Do you have any idea how a pop-up could be blocked?

Thank you for staying with me on this

regards

David

former_member185167
Active Contributor
0 Kudos

Hello,

I created a simple one-step workflow as a test and started it from PFTC (you can start it many ways).

See if that works for you. No idea how a pop-up would be blocked but first you should find out if it is indeed being blocked.

regards

Rick Bakker

Answers (2)

Answers (2)

former_member852447
Active Participant
0 Kudos

Rick,

Thanks for hanging in with me on this.......it was a basis problem on the system.

regards

David Dittmer

former_member185167
Active Contributor
0 Kudos

Great to hear it got resolved. Even better (for this forum) if you can give any details that could help a future reader with the same problem. I know, it's hard getting information out of Basis sometimes.

former_member185167
Active Contributor
0 Kudos

Hello,

Did you define accept and reject as parameters for the method with suitable types and with the Export checkbox set?

regards

Rick Bakker

former_member852447
Active Participant
0 Kudos

Rick,

Thank you for replying. I did NOT set up ACCEPT/REJECT as parameters. I will do so immediately. The EXPORT/IMPORT boxes were set.

Let me try and catch the transport before basis goes home for the weekend

regards

David Dittmer

former_member852447
Active Participant
0 Kudos

Hello Rick,

I created the 2 parameters with the same types as the task container elements and they are both EXPORT and IMPORT but the values are still not passed to the container....do you have any other suggestions

Thanks

David

former_member185167
Active Contributor
0 Kudos

Hello,

When you run the method standalone (i.e. from SWO1) does it return the correct values?

regards

Rick

former_member852447
Active Participant
0 Kudos

Rick,

thank you for replying on saturday. I put a hard coded breakpoint in the method so when I clicked on the link in my inbox the debugger stopped in the method. I single stepped through the method code and noticed that the element was populated. I displayed the CONTAINER table in the debugger and it shows the container element is populated. The task container is therefore populated. I then checked the workflow container and it is also set up as IMPORT/EXPORT and is of the same type as the task container and the binding on the task is set up......this is such a conundrum.....the value is not passed to a condition step which is either ACCEPT/REJECT.

Thanks

David

former_member185167
Active Contributor
0 Kudos

Hi David,

Are you able to run the method from SWO1? If it returns the proper values then that narrows it down.

regards

Rick

former_member185167
Active Contributor
0 Kudos

Also check if you have bindings between the task and the method.Ideally, it should be empty.