Unable read container element in the BO
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
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
Similar Messages
-
Accessing container element in the User Defined Function
Hi All,
I am accessing a container element in the user defined function.
But it is not working. Actually i want to split a message(1800 records) into a batch of 200.
But it goes in a infinite loop.
Please can you tell me where i am wrong.
Smita
The code is :
public void SplitMsg(String[] a,ResultList result,Container container){
Object container1;
String counter;
int i,j=0;
container1 = container.getParameter("value");
if( container1 == null){
counter = "0";
else {
counter = container.toString();
j = Integer.valueOf(counter).intValue();
for ( i = j ; i <= j + 199 ; i++){
if ( i >= a.length){
container.setParameter("value","9999999");
break;
result.addValue(a<i>);
j += 200;
counter = Integer.toString(j);
container.setParameter("value", counter);Here is another way to accomplish what you wanted.
For the target mapping, use this sequence for mapping
Source element -> removeContext -> Your User-defined Function -> Target Element
When defining User-Defined Function, select "Cache Queue" option.
Since you are using removeContext before calling the UserDefined function, your input to the user defined function will be a String array without ResultList.CC.
Now manipulate the array the way you want it, and build the ResultList result.
After every 200 records, use method
void addContextChange().
This will insert the ResultList.CC at the appropriate places.
Use Display Queue in the Mapping Editor to see the debug values. -
Container Element in the Mapping UDF
Is there any way that to access the BPM container Element in the Mapping UDF. Can some one share the UDF code for this
Hi,
Refer BPM Container Element and Container in UDF Relation
BPM Container Element and Container in UDF Relation
Creating the container Object In Java Mapping
Thanks
swarup -
Unable to read stack element of the CoD2 script engine in C
Hi,
I am trying to get extensions for Call of Duty 2 binary working for Arch Linux. I am running x86-64 arch (3.11.2-1-ARCH) and CoD2 is 32bit. That is why i am using the multilib. It gets preloaded with LD_PRELOAD.
But on Arch it doesn't read the stack element of the CoD2 script engine:
// My COD_VERSION is COD2_1_3
int getStack()
#if COD_VERSION == COD2_1_2
return 0x83D7A10; // diff to 1.3: 1080
#elif COD_VERSION == COD2_1_3
return 0x83D8A90;
#elif COD_VERSION == COD1_1_5
return 0x0830AE88;
#elif COD_VERSION == COD4_1_7
return 0x08c055b0;
#else
#warning int getStack() return NULL;
return NULL;
#endif
int stackGetParamInt(int param, int *value)
//printf("stackGetParamInt() start...");
aStackElement *scriptStack = *(aStackElement**)getStack();
aStackElement *arg = scriptStack - param;
printf("scriptengine> test value=%.8x scriptStack=%.8x arg=%.8x\n", value, scriptStack, arg);
if (arg->type != STACK_INT)
return 0;
*value = (int)arg->offsetData;
//printf("... end\n");
return 1;
It prints: scriptengine> test value=ff805778 scriptStack=00000000 arg=00000000
Source: https://github.com/kungfooman/libcod/
My thread on the support forum for these extensions for CoD2: http://killtube.org/showthread.php?1583 … Arch-LinuxHi,
I am trying to get extensions for Call of Duty 2 binary working for Arch Linux. I am running x86-64 arch (3.11.2-1-ARCH) and CoD2 is 32bit. That is why i am using the multilib. It gets preloaded with LD_PRELOAD.
But on Arch it doesn't read the stack element of the CoD2 script engine:
// My COD_VERSION is COD2_1_3
int getStack()
#if COD_VERSION == COD2_1_2
return 0x83D7A10; // diff to 1.3: 1080
#elif COD_VERSION == COD2_1_3
return 0x83D8A90;
#elif COD_VERSION == COD1_1_5
return 0x0830AE88;
#elif COD_VERSION == COD4_1_7
return 0x08c055b0;
#else
#warning int getStack() return NULL;
return NULL;
#endif
int stackGetParamInt(int param, int *value)
//printf("stackGetParamInt() start...");
aStackElement *scriptStack = *(aStackElement**)getStack();
aStackElement *arg = scriptStack - param;
printf("scriptengine> test value=%.8x scriptStack=%.8x arg=%.8x\n", value, scriptStack, arg);
if (arg->type != STACK_INT)
return 0;
*value = (int)arg->offsetData;
//printf("... end\n");
return 1;
It prints: scriptengine> test value=ff805778 scriptStack=00000000 arg=00000000
Source: https://github.com/kungfooman/libcod/
My thread on the support forum for these extensions for CoD2: http://killtube.org/showthread.php?1583 … Arch-Linux -
Read container element in program exits
Hi all,
again me
Today the question is that i want to read and change the element 'ObjectType' of an BOR element's container before execute method of the task. I use the program exits with CL_SWF_TST_PE_BEFOREEXEC class, it's work fine.
But this element is a BOR of a BOR, so i know how to read an element with CALL METHOD container->element_get_value but in this case how can i do ?
Thanks
Edited by: CECG on Jan 24, 2008 2:46 PMI think you can use following macros
swc_get_object_type
swc_get_object_key
Checki in Include <CNTN01> for syntax
Thanks
Arghadip -
How to transfer my container element to the bor object
Hello
I am quite new to workflow. I have created a workflow with a task and in this task I have a container element that is an Id for a campaign element and I can see that the container is filled correctly. In my task I call a BOR object amd a method and I want to transfer my campaign Id to this method, but when I debug I can see the ID is getting into the bor object. How do I get the id into the bor object
Thanks
ClausHi Claus
After binding from task to method. You will get the data in the method parameters but to transfer the data from parameter to method you need to use this code in your method.
SWC_GET_ELEMENT CONTAINER 'CONTAINER NAME' VARIABLE NAME.
SWC_SET_ELEMENT CONTAINER 'CONTAINER NAME' VARIABLE NAME.
Use this statement to get the data to the method container.
Regards
vijay -
Multiline table container element does not display the contents
Hi Guys,
I am sending an email from the workflow. The workflow has few steps and in one of the steps the the workflow brings in few lines of text. This text is then stored in a multiline container element in the workflow.
later in the workflow i am sending an email and this sendmail step is using the multiline containter. So in the body of the email i have used the container as shown below
Your expense for the trip &TRIPEXP.TRIPNUMBER& has been rejected.
The Reason for rejection(s) mentioned below:
&CATSXT_LONGTEXT_ITAB##&
Please change and submit again.
However when i recieve the email i dont see any text. But when i look at the workflow log and check the contents of this table under the workflow container elements it has the data in it.
Not sure where i am going wrong. I have checked the bindings and they are fine.Thanks Arghadip,
Yes that was the missing link.
One question:
When i use sendmail step and use the variable drop down box i can see the workflow container elements. So why do i need the same container element in the sendmail setp? I just now created same element in the sendmail task. When i am able to access the workflow container elements in the send mail step then why there is a need to create a same container element in the send mail step and then do the binding for it to work? -
Reg: Access the container element value inside the Task's description tab
Hi All,
I need to call one of my container element into the task's description tab as text symbols.
Please let me know how to do it.
Regards,
Selva.define an importing element in the task container.
map this importing element with the element in the workflow container.
now you can use this task container element in your description text box. (method exxplained in the previous post to this problem)
rgds, -
Wat is the task container element
hi ,
im using a task and sending a work item .
if i want to find the person to whom the workitem is triggerd,
which task container elment hold this value..
olease suggest me ..
RaghuI think you can use Function Module
SAP_WAPI_WORKITEM_RECIPIENTS
to retrieve the agents that has been assigned provided you have the workitem Id. In the Task container it will not be reflected unless you have designed like that.
Yes if the step is executed then the WI_ACTUAL_AGENT container element of the relevant task container will store the agent who executed it.
Thanks
Arghadip -
Which container element contains the triggering event name?
hi,gurus,
i have a workflow template, and i want to use a 'switch' to deal with different triggering event inside the template logic.
but i can not find a element in the container which supposed to contain the triggering event name.
could you please help me ?
br.
zjHello,
The element which stores the name of triggering event is '_EVT_NAME' which is present in the event container. To use it in the workflow template, you have to create an element in the workflow container and bind this element to the above mentioned element through the binding for triggering event.
Thus you can use the workflow container element in the switch.
Hope this will help.
Regards,
Samson -
XML DB: is it possible to get a row for each element in a container element?
I have an XML document containing a container element (collection). If I query, using an XPath expression, the contained elements I get a row for each container element with the contained element concatenated. Is it possible to get a row for each contained element?
I run this simple query:
select extract(xmltype('<colors><color>Red</color><color>Green</color></colors>')
, '/colors/color/text()').getstringval() from dual
And get this result:
EXTRACT(XMLTYPE('<COLORS><COLOR>RED</COLOR><COLOR>GREEN</COLOR></COLORS>'),'/COL
RedGreen
1 row selected.
What I would like to have is:
Red
Green
2 rows selected.
Wishful thinking or possible? Many thanks!Sure. This is where our XMLSequence() function comes in. It allows you to treat the top-level nodes in a nodeset as if they were rows in a table when combined with the TABLE() operator. Here's an example.
First, to make the SQL look a little cleaner, I like to define a function like this:
create or replace function testdoc return xmltype as
begin
return xmltype('<colors><color>Red</color><color>Green</color></colors>');
end;.
To break out the nodeset of <color> elements as a table, we use the following query:
select value(list_of_color_elements).extract('*/text()').getStringVal() as color
from TABLE( XMLSequence( extract(testdoc(),'/colors/color'))) list_of_color_elements.
Or, using the new-in-9.2 extractValue() operator so we don't have to remember the text() part:
select extractValue( value(list_of_color_elements), '.') as color
from TABLE( XMLSequence( extract( testdoc() ,'/colors/color'))) list_of_color_elements.
Here the TABLE(XMLSequence(...)) combo produces a table of XMLType, with one XMLType object in each row of the table.
In general, if the XMLType instance were coming from an XMLType table xmltab the query would look like this:
select extractValue( value(colors), '.') as color
from xmltab x, /* Important that this table comes earlier in the FROM clause! */
TABLE( XMLSequence( extract( value(x),'/colors/color'))) colors.
And if the XMLType were instead in a column of XMLType named doc in a table xmltab, then we would have the syntax:
select extractValue( value(colors), '.') as color
from xmltab x, /* Important that this table comes earlier in the FROM clause! */
TABLE( XMLSequence( extract( x.doc ,'/colors/color'))) colorsOnce you get the hang of it, you'll see that the combination of TABLE(XMLSequence()) to "shred" XML nodes into rows, and XMLAgg() to aggregate fragments of XML across multiple rows back into a single document, is quite powerful. -
Using Multiline Container element in sending mail
Hi,
I am sending mail with Multiline Container element APTEXT.
I put &APTEXT##& Is this right ?
But when I have 2 lines of data, its sending mail with only one line.
ThanksIt is my personal observation that if the line size is more than 132 charecters then it will display like that.
So do like this
1. First make the row size as 125.
2. and when you are selecting the multiline container element in the mail content, then it will ask you 3 options selct the option Print line by line then check the mail.
It worked in my case. -
Displaying Container element in send mail
Hi Experts,
I am a beginner in SAP Workflows. I have created a simple wokflow in which a mail is sent to a particular user.The workflow is triggered whenever a complaint (BUS20000120)is raised.Now I want to display values of certain container elements in the workflow.I have also created a container element based on BUS20000120. But every time I use some or the other container element attributes, in the mail it is displayed '<BONmae>.<Attributename> not found.
I am not getting any solution to this problem.Please help me.....Hi Raja Sekhar,
The start event of my workflow is 'created' event of the Business Object (BUS20000120) .But where to implement the binding for the 'EVT_Object'?The start event for the workflow is firing as I have checked in the transaction 'SWEL' and also the mail is being sent to the desired user.The only problem is that I cannot display any data of my container element based on Business Object BUS20000120 . I can display elements of the system container like current date ,time etc. Please give me a solution.Infact this is happening to some other workflows as well. -
How to round value of container element in task description
I am trying to round the value of the container element from 3 decimals to 2 decimals for display purposes.
The command symbol in the task description is &_WI_Object_Id.OverallTotalCost&. I have looked at SAP Help and I have tried the suggestion of &_WI_Object_Id.OverallTotalCost(.2)& and &_WI_Object_Id.OverallTotalCost(Z.2)& with no success.
I have also searched the sap-wug mailing list and SAP ITToolBox and found no references rounding a container element in a task description. I have seen code assigning a value to a packed decimal variable to round. But I have not been able to get this to work as a command in a description for a task.I created a new element in the container as suggested by Glauco and added the element binding in the workflow / task binding. Biggest hassle was finding a business object that had a type of 2 decimal places to use for the new container element.
The reason why the SAPScript symbol for reducing the number of decimals does not work in Task texts is because the container elment symbols are resolved first as text. Therefore only the SAPScript commands that apply to text will work like length. -
Dear Experts,
Can you plz explain, when it is required to create a CONTAINER ELEMENT in Alert Configuration.? As we can use the System Defined Variables like SXMS_ERROR_CODE, SXMS_FROM_INTERFACE etc, what is the need for the container element?
The System Defined Variables are filled by the System during Runtime, when such an error happens. But who ll fill the Customized Container Variable and how??
Also while creating a Container Element for ALERT, the data type can be of OBJECT TYPE/ ABAP DICT.REFERENCE/ABAP DICT DATA TYPE. What is the significance of each?
Plz explain.
Regards,
NavneetHi Navneet,
The container element contains all the control information required at run time in the form of constants and object references.
To inform the WF which object was created in the step via the method the reference to the bus object is passed via the binding definition from the task container to the Wf container. An appropriate element was therefore created automatically in the WF container with the correct data type.
The workflow container contains an element which is defined with a data type reference to the same object type that is created in the referenced task, this binding definition is proposed automatically when an activity is defined.
If no element with an appropriate data type reference is available in the workflow container, a suitable element is added to the workflow container and the binding entered.
For more info pz go through the link given below,u will get the useful info regarding creation of container element and much more .
http://****************/Tutorials/Workflow/Workflow.htm
Reward points if this helps
Regards
Vani.
Maybe you are looking for
-
Deleting a single row in a report using checkbox
Hi, Can anyone please help me on how to perform a deletion of a single row/multiple rows in a report when one clicks on a checkbox .. I went throught the HOWTO's guide .. But when i select a checkbox and say delete i get the following error: ORA-2000
-
Can you send iMessages from one iPad to another? If so how can I do this? Thanks
I have just got a new iPad and I'm wondering if you can send iMessages from one iPad to another? We are currently trying this out and can only send iMessages from an iPad to an iPhone is this correct? Thanks
-
BBM stopped working Q10.
I am having a really infuriating problem with BBM. It is receiving BBM's, but I cannot send them or reply, (they just sit there in my hub queue, with a grey tick against them). It's like been stuck in cyber-hell. I have tried everything and have done
-
Control record must start with tag EDI_DC40, not E1LFA1M
Hi, I am trying sxample <b>FILE>XI>IDOC ADAPTER-->R/3</b> I am getting error as <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-- Call Adapter --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.
-
Inbound EDI error notification - processing Work Items
I am testing the inbound error notification. How do you change an IDoc from work item. The work item only allows you to display the IDoc, not change it. Which trans to change IDOC for reprocessing?