cancel
Showing results for 
Search instead for 
Did you mean: 

Unable read container element in the BO

Former Member
0 Kudos

Hi

I have created a new container element in the task and trying to pass the value and read the same value in the bussiness object method

using the statement "SWC_GET_ELEMENT CONTAINER 'Classification' l_KLGRU1". I have created the the container element in parameters of the BO method.

In the task binding I am direclty passing the container value i.e my case

Classification = FI

"SWC_GET_ELEMENT CONTAINER 'Classification' l_KLGRU1".

But the above statement is not returning the value at all.

Where am I going wrong....

Regards,

Krishna prasad

Accepted Solutions (0)

Answers (4)

Answers (4)

KKilhavn
Active Contributor
0 Kudos

In case your problem has not been solved yet... after reading your post again I thought of one reason it can fail, and that is if you change a definition, and then test it on an existing work item. The definition changes (at least for workflows) will in most cases only be effective in workflows started after you actived the new (changed) version.

However, as it is more than a week since you asked your question you probably will have discovered on your own that it works for a new workflow.

If you still have not solved your problem, please check the return code (sy-subrc) from SWC_GET_ELEMENT_CONTAINER to ensure that this statement doesn't have a problem. If the return code is zero the element has been found, but does not have a value (alternative view: has the value INITIAL). If the return code is not zero there is something wrong with your statement. Perhaps you accidentally have misspelled the container element name?

Former Member
0 Kudos

Hi Krishna,

You check the following points.

1) You are passing the values to container element in workflow

2) You set the properties of container element i.e Export and Import

3) If you are hardcoding the values put them in single quotes 'value'.

3) Try to use the same name for container element and Business object method parameter.(To Avoid confusion)

4) Set the Import property for the Method parameter.

5) The parameters to macro SWC_GET_ELEMENT CONTAINER are not case sensitive for sure!!!. (You can chk this in any standard Business object)

Hope it help you to resolve the issue.

Thanks

Praveen

Former Member
0 Kudos

one more thing you need to take care while doing this is that parameter is case sensitive.

KKilhavn
Active Contributor
0 Kudos

Container elements are not case sensitive if you use the macros. They will convert the element name to upper case before setting/getting the value.

Former Member
0 Kudos

May be in older version, because i had faced some problem like this long back, or may be my understanding was wrong at that time.I am not trying to say that container elements are case sensitive by the way.

KKilhavn
Active Contributor
0 Kudos

Sorry about that, I could have sworn that I read in one of your previous posts:

>one more thing you need to take care while doing this is that parameter is

>case sensitive.

Former Member
0 Kudos

Kjetil,

Not everybody is as experienced and expert as you are. It is really good that you tell us whenever we are wrong. I think i get to learn a lot from you. Thanks!

KKilhavn
Active Contributor
0 Kudos

Perhaps I am wrong, but I sense some sarcasm in your remark. My intention was to prevent the person who requested help (and anyone else reading the thread) to be incorrectly taught that the element names in the containers are case-sensitive (in particular when you use macros).

However, when you obviously were not quite aware what you had written previously I thought I could point it out to you, but with a smiley. No offense intended, so I hope the one that seems to be taken can be forgotten. If none was taken my sarcasm sensor has malfunctioned.

It was not my intention to point to <u>you</u> being wrong, just that the information was incorrect. I have corrected this incorrect information before and will do it again. Or perhaps I won't... perhaps I will just give up on SDN. The signal/noise ratio is steadily getting worse, where signal is an interesting question/discussion and noise is a question that can be answered by spending some time (in some cases just a couple of minutes) looking at online help or SDN.

<i>Message was edited by Kjetil Kilhavn:</i>

Examples of noise:

- what are internal tables

- what are events

- please give step-by-step instructions

Former Member
0 Kudos

Wish you would have sensed some respect instead of sarcasm

I actually meant it when i said that not everybody is as experienced and expert as you are. And i have searched a lot of problems in this forum and many times i got my answers from what you had provided in this forum...so i have a proof that i have learnt a lot from you.

I agree parameter is not case sensitive while using in macro unless the macro we are using is macros for processing object.

Message was edited by:

Shweta Verma

Former Member
0 Kudos

Hi,

Truly agree with swetha. Many of your posts have been helpful to me a lot of times. A special thanks to you (Kjetil), Rob, Jocelyn, Rajasekar and Mike porkara who have contributed a lot to this forum. In most of the problems I face (atleast the basic ones) I almost get a solution from one or other of your earlier posting.

<b>The signal/noise ratio is steadily getting worse</b>

Definitely agree on this too but this may be unavoidable as the number of users increase. When I got introduced to SDN more than a year back the number of users in SDN (or atleast in BPM area) also was less and definitely the BPM forum was not this active. I feel the noise will always be there as new users keep coming in everyday. (And it is nearly impossible to teach everyone about the “Rules of Engagement” everyday).

I normally look into the question only if the subject of the post interests me – one way of ignoring the noises and consuming only the signal required. Ignoring the noises may be a better way of reducing it (as noise makers might tend to search (or stop posting) when they don’t get the answers).

Thanks,

Prasath N

KKilhavn
Active Contributor
0 Kudos

Then please accept my apologies - and thank you for your respect

KKilhavn
Active Contributor
0 Kudos

This question is going waaaaaayyyy off-topic, sorry about that Krishna. Just a final response from me, pointing people in the right direction if they are not already aware of another great forum.

There is a debate (see the Coffee Corner forum which I try to read at least a few times a week) going on with respect to technical solutions to reduce the number of repeated questions and questions to which the answer is available on help.sap.com. There are many suggestions already, some of which are:

  • forcing a forum search before posting (as when creating customer messages on service.sap.com)

  • restricting the number of open questions a user can have

  • a solution as in Experts Exchange where asking a question cost you some points, thus encouraging people to find the answers from previous questions and saving their points for a question that they <u>really</u> can't find an answer to

  • forcing a period as lurker, i.e. a new member can not post before he has visited the forums X number of days

Obviously, not all suggestions will be implemented, and not all are desireable. For instance, forcing a period as a lurker can shut out people who have spent 15 days trying to solve a problem on their own before finally deciding to give SDN a try.

PS: Mike's last name is Pokraka, I had to double-check it quite a few times before I finally could remember it - my variation was Pokarka

Former Member
0 Kudos

The Point is that is Krishna still facing this problem or else he should close this thread.

Again going off-topic...Kjetil your reply to Madan is worth reading.

former_member184495
Active Contributor
0 Kudos

Hi KP,

since you said you have created a parameter for your BOR Method,

first send the values from your method to parameter,

SWC_SET_ELEMENT CONTAINER '<parameter>' '<variable in BOR method>'.

and in the binding pass your parameter to your task container.

<parameter> => Classification.

Hope it helps,

Aditya

Former Member
0 Kudos

hi Aditya,

you mean to say write on more method to set the container value and the read that value in the other method?

Regards,

Krishna

Former Member
0 Kudos

Hi

First check whether the value is appearing in the Task Container. If so then check whether you have provided the Business object that is referencing to the Container element in Workflow Template. This problem arises when suppose the Workflow Template i for Bus2012 and you are using method of ZBUS2012 which is the delegated Business Object. This should be Bus2012 as Workflow Container element is referencing Bus2012. This will resolve the issue. If this is done and still it is not coming then Delete that step and create the same step. This solution will surely help. It is effective.Please reward points if helpful.

Thanks

Arghadip