Dynamic assignment in expression

Hi Friends,
I have a requirement such that, based on some conditions, a = b + c, or a = b + d, or a = a - c, or a = a + c, and so on...  All variables are of currency type (13,2).
Now, the logic of this condition-based equation comes from table ( i.e. if a = a - c, then 'a' ,  '-' and  'c' are maintained in a custom table).
I want to populate a text by concatenating 'a' '-' 'c' such that the text equals 'a - c'. Now I want to equate a with text  (a = text )to get the value as that of (a - c).
If you can throw some light on this please...
Thanks in advance,
Birendra

Hi,
You can achieve this by using field symbols... Just analyze the following sample code..
PARAMETER : w_a TYPE i
     , w_b TYPE i
     , w_symbol TYPE c
DATA : w_text_A(10) TYPE c
      , w_text_B(10) TYPE c
      , w_c TYPE i
FIELD-SYMBOLS : <FS_A>,<FS_B>,<FS_C>.
w_text_A = 'W_A'.
w_text_B = 'W_B'.
WRITE : w_a, w_b, w_c.
WRITE /.
ASSIGN (w_text_A) TO <FS_A>. " assigns the value of field name(w_a) contained in variable(w_text_a)
ASSIGN (w_text_b) TO <FS_B>. " assigns the value of field name(w_b) contained in variable(w_text_b)
CASE W_SYMBOL.
  WHEN '-'.
    W_C = <FS_A> - <FS_B>.
  WHEN '+'.
    W_C = <FS_A> + <FS_B>.
  WHEN '/'.
    W_C = <FS_A> / <FS_B>.
  WHEN '*'.
    W_C = <FS_A> * <FS_B>.
  WHEN OTHERS.
ENDCASE..
WRITE : w_a, w_b, w_c.
copy paste to SE38 and try.You will get what you want.....
Thanks and Regards,
Senthil Kumar Anantham..

Similar Messages

  • In human task, dynamically assign group doesn't work

    Oracle SOA 11.1.1.4
    My bpel process invokes a human task.
    On the human task Assignment tab, I assigned 3 users (by name), 1 group (by expression).
    The group is configured in LDAP
    When I tested the bpel process, I entered the group and other data required.
    From the worklist app, I see the task listed. It is assigned to the 3 users, but not the dynamically passed-in group.
    From the Audit trail, I saw all data I entered (include the group). Everything seems correct, but I still can’t make the dynamically-pass-group work.
    If I assign the group by name in human task, it works fine.
    The problem is: dynamically assign group doesn't work.
    Please kindly advice.

    Yes, it is possible assign a group as participant of some human task, passing the group name as parameter.
    I have tested just now.
    It works pretty well in SOA 11.1.1.4 (BPEL or BPM).
    Make sure add a data parameter in your human task definition and pass a valid group name to it.
    At the Assignment tab, in the participants' list, add a group, data type by expression, and set the value to the right xpath expression to the corresponding parameter.
    For example: /task:task/task:payload/task:group
    If it is not working look the SOA log files, probably you'll find some information about the error there. Maybe there is some problem with your jazn.com configuration.
    You can also test if there is something wrong related to the group name, trying to transfer some task to the same group by the worklist.

  • Dynamic Assignment

    Hi all,
    I have created a BPEL process, using User Task Activity, via Sequential Workflow Pattern.
    I have used the wizard as desired and at assignment policy i have chosen to use "dynamic assignment using xpath expression". Although this seems like dynamic assignment it pushes me to choose even if the assignees will be users or groups. What I need here is to assign task to both users and groups together a mixture of both. when i look from BPEL process manager Audit Tab I should be observing (element of <RoutingVar1>)
    <approvers>groups("Aaa"),user("Mmm"),users("bbb")</approvers>
    how can manipulate "setRoutingPolicy" Assign activity.
    I am a new bee with XPath expression.
    Thanks for all.

    Your question is a bit difficult to understand. Please elaborate.

  • Dynamically Assigning Users

    Hi,
    I am trying to dynamically assign users within my process and need some guidance with it. The following two steps briefly describe what I am trying to achieve
    1. A user starts the process by filling in data into the PDF and completes the task.
    2. Based on the information filled in by the first user, I have to determine who the user for the next task is going to be and then assign the task to the user accordingly.
    I do not have the option of using multiple assign task operations and then setting the logic within the route evaluation, as there are way too many users that can be assigned for the second task ( there are more the 50 possible users from which the second user has to be selected )
    I am fairly new to Livecycle and from the options that I have seen so far, here are few questions that I need some help with
    1. The only option within the Assign Task operation that lets you assign the user dynamically is by using an XPath expression. If I were to use this, should I be embedding the logic within the form itself and then use the XPath expression to find the user by dynamically updating the form after the first user completes the task?
    2. Is there another approach to achieve this other than having the logic for selecting the user defined in the form itself? I believe embedding the logic in the form might not be a good idea as it can have performance implications and also having user information in the form itself doesnt seem right.
    3. Is there an operation that I could use, which would contain the logic that I would need to determine the next user and then assign the task to the user based on the result of the operation?
    I am hoping someone would have definitely run into this situation before so any suggestions/thoughts will be appreciated.
    Thanks,
    Varma

    "1. The only option within the Assign Task operation that lets you assign the user dynamically is by using an XPath expression."
    Yes
    "If I were to use this, should I be embedding the logic within the form itself and then use the XPath expression to find the user by dynamically updating the form after the first user completes the task?"
    I depends. If you can get to it server side, it woulb probably better. If you need to make a change to something, you don't want to change the form.
    "Is there another approach to achieve this other than having the logic for selecting the user defined in the form itself?"
    I'm not sure where the logic for the next user is located, but you could make a database or web service call from the process to get the next user instead.
    "I believe embedding the logic in the form might not be a good idea as it can have performance implications and also having user information in the form itself doesn't seem right."
    I agree.
    "Is there an operation that I could use, which would contain the logic that I would need to determine the next user and then assign the task to the user based on the result of the operation?"
    Again, I need a bit more info as to where the info (logic) is located.
    Jasmin

  • Dynamically assign value to a column in ALV LIST Display

    Hi all,
    How can I dynamically assign value to a column in ALV LIST Display without using classes and methods?
    Thanks,
    Ridhima

    Hi Vikranth,
    I am displaying one ALV list say with columns A and B.
    I have value in A but not in B. Now at runtime user selects one row, clicks on push button in application toolbar, then i have to display value in column B in the already displayed list.
    I searched and came to know it can be done with oops concept. but i am not using classes and methods.
    so how can i do this?
    Thanks,
    Ridhima.

  • How to dynamically assign Display Pattern using FormCalc in Adobe PDF Form

    I am using Adobe PDF Form Designer. I am trying to dynamically assign a display pattern like MM/DD/YYYY to the Field tab - Display Pattern property. May I know how to do that?
    I am using FormCalc scripting.

    hi,
    After placing the date field in layout from data view, u will get tabs like field,layout,border etc..
    In field tab under the edit pattern specify the pattern in which you want to display the date field.
    hope this works.
    Reward points if helpful.

  • Dynamically assigning field name and field value

    Hi all,
    logic:
    select field1 field2 from table into workarea.
    workarea-field1 will have value as 'MATNR' or 'BUKRS'  or  'KUNNR'  or............etc
    workarea-field1 will have values as '10000025' or  '2010'  or  '102536' or  ............etc
    Now i need to dynamically assign MATNR = 10000025
                                               or   BUKRS =2010
                                               or  KUNNR = 102536
    HOW CAN WE DO THIS.

    Hi,
    Use the ASSIGN COMPONENT statement.
    Regards,
    Ankur Parab

  • Regarding  dynamically assigning the where clause to select query

    hi,
      Please send the code regarding how to dynamically assign the where clause to select query.
    thanks in advance

    SELECT <fileds>
            INTO TABLE itab
            FROM dbase
            WHERE  condition.

  • Dynamically assigning digital signature strategy

    Hi Experts,
      I have a requirement where I need to dynamically assign different signature strategy to document approval based on the number of approvers.
    In our case for the same document based on the level of changes number of approvers might be different ( 3 - 12). We are planning to achive this by allowing document owners to select the approver using a approval workflow
    I also know that there is a limition of 8 approver slots on the default signature strategy.
    Please advise what is the best strategy in this case.
    Thank You
    Regi

    Hi,
    You can refer Note 700495 for digital signatures.
    Thank You,
    Manoj

  • Dynamic assign in field symbols

    dynamic assign in field symbols

    Hi,
    DYNAMIC ASSIGN:
    If you do not know the name of the field that you want to assign to the field symbol when you write a program, you can use a dynamic ASSIGN statement:
    ASSIGN (<f>) TO <FS>.
    This statement assigns the field whose name is contained in the field <f> to the field symbol <FS>. You cannot use offset and length in a dynamic ASSIGN.
    At runtime, the system searches for the corresponding data object in the following order:
    If the ASSIGN statement is in a procedure, the system searches first in its local data.
    If it cannot find the object in the local data (or if the ASSIGN statement is not in a procedure), it then looks in the local data of the program.
    If the field does not exist in the global data of the program, the system looks in the table work areas declared with the TABLES statement in the main program of the current program group. A program group consists of a main program and all of the programs that are loaded into the same internal session as a result of other program calls.
    If the search is successful and a field can be assigned to the field symbol, SY-SUBRC is set to 0. Otherwise, it is set to 4, and the field symbol remains unchanged. For security reasons, you should always check the value of SY-SUBRC after a dynamic ASSIGN to prevent the field symbol pointing to the wrong area.
    Searching for the field in this way slows down the program. You should therefore only use the dynamic ASSIGN statement when absolutely necessary. If you know when you create the program that you want to assign a table work area to the field symbol, you can also use the following variant of the dynamic ASSIGN statement:
    ASSIGN TABLE FIELD (<f>) TO <FS>.
    The system then only searches within the table work areas in the main program of the current program group for the data object that is to be assigned to the field symbol. This addition is forbidden in ABAP Objects, since the latter does not support table work areas.
    Suppose we have three programs. The main program:
    REPORT demo_field_symbols_dynami_as_1.
    TABLES sbook.
    sbook-fldate = sy-datum.
    PERFORM form1 IN PROGRAM demo_form1.
    The other two programs are:
    REPORT demo_form1.
    FORM form1.
      PERFORM form2 IN PROGRAM demo_form2.
    ENDFORM.
    and
    REPORT demo_form2.
    FORM form2.
      DATA name(20) TYPE c VALUE 'SBOOK-FLDATE'.
    FIELD-SYMBOLS <fs> TYPE ANY.
      ASSIGN (name) TO <fs>.
      IF sy-subrc EQ 0.
        WRITE / <fs>.
    ENDIF.
    ENDFORM.
    The output looks something like this:
    02.06.1998
    The program group in the internal session now consists of the programs DEMO, MYFORMS1 and MYFORMS2. The field symbol <FS> is defined in MYFORMS2. After the dynamic ASSIGN statement, it points to the component FLDATE of the table work area SBOOK declared in the main program DEMO.
    REPORT demo_field_symbols_dynami_as_2 .
    TABLES sbook.
    DATA: name1(20) TYPE c VALUE 'SBOOK-FLDATE',
          name2(20) TYPE c VALUE 'NAME1'.
    FIELD-SYMBOLS <fs> TYPE ANY.
    ASSIGN TABLE FIELD (name1) TO <fs>.
    WRITE: / 'SY-SUBRC:', sy-subrc.
    ASSIGN TABLE FIELD (name2) TO <fs>.
    WRITE: / 'SY-SUBRC:', sy-subrc.
    The output is:
    SY-SUBRC:      0
    SY-SUBRC:      4
    In the first ASSIGN statement, the system finds the component FLDATE of the table work area SBOOK and SY-SUBRC is set to 0. In the second ASSIGN statement, the system does not find the field NAME1 because it is declared by the DATA statement and not by the TABLES statement. In this case, SY-SUBRC is set to 4.
    Reference: http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb38d5358411d1829f0000e829fbfe/content.htm
    reward points if helpful.
    Regards,
    Ramya

  • Error message "ABAP/4 error during dynamic assign" on Contact Log creation.

    Hi,
    We are getting an error message "ABAP/4 error during dynamic assign beyond program bounds" displayed while creating contact log using transaction "BCT0".
    Please suggest what can be the cause of the error message and how we can remove this.
    Regards,
    Ankur

    Dear Andrea,
    The problem should be caused by obsolete entry in table TFAWX.
    Please use the following report for deleting this entry (test before in your TEST System) :
    report ztfawx_delete.
    tables tfawx.
    select single * from tfawx where prog = 'SAPLBAS0'
                                and bldgr = '0110'
                                and mnum  = 23
                                and bfeld = '$GENERAL'.
    if sy-subrc = 0.
      delete tfawx.
    endif.
    Buona Giornata
    Mauro

  • GP: Dynamically assignment of users

    Hello,
    i'm a newbie and i have the following question:
    Can i dynamically assign the user of the next step in a guided procedure?
    The initiator of my GP passes some data to a web service. The web service determines on the basis of the data the user of the next step in my GP. Is this possible? And how can i achieve this scenario?
    Thanks in advance and best regard,
    Matthias

    Hi Matthias,
    Unfortunately, the GP external service callable object only works for RFCs. You cannot use it for a Web Service.
    Therefore, I would propose the following solution. You can import a Web Service as an external service in CAF (using the Composite Application Services perspective in the Developer Studio). Then you can use the external service from a CAF application service. The application service can already be exposed as a callable object, and you can take the user ID as an output. Then you can use the predefined callable object Assign Users to Process Role, and map the application service output to its input. To enable the assignment of the relevant user to the next action, you must consolidate the role created for the Assign Users action to the role created for the next action, and set the type of the new role to Runtime Defined. Then, at runtime the Assign Users object is executed in the background and the user is assigned to execute the next action.
    You can find how-to guides describing how to import a Web Service in CAF and how to integrate it further into CAF in the https://www.sdn.sap.com/irj/sdn/developerareas/platform?rid=/webcontent/uuid/d8dbd703-0801-0010-c9bf-c04bc52f562f">caf [original link is broken] [original link is broken] (see tutorial N.81).
    Hope this helps a bit.
    Regards,
    Zornitsa

  • Routing  a human task while invalid dynamic assignment

    hi,
    we hav a confusion while using route process in human task.
    In our case when an invalid user is dynamically assigned to BPEL ,an Alert is generated for the jcooper user .As we have set "overrride default exception management" for jcooper user in adavance setting of .task file.
    When jcooper user route the task to any other user say jstein,the state of the task of jcooper is completed and also the BPEL process is completed.But in the worklist of jstein no task is shown .
    What we think is,BPEL process should not be get completed when jcooper user route the task but it should get complete when jstein act on the task.
    Regards,
    Ritesh/Nitin

    Hi
    Try to make the <messageAttribute name="ASSIGNMENT" attributeType="SIMPLE_TYPE"
    type="xsd:string" updatable="false"/>
    to
    <messageAttribute name="ASSIGNMENT" attributeType="SIMPLE_TYPE"
    type="xsd:string" updatable="true"/>

  • How can i dynamically assign values to the tld file

    How can i dynamically assign values to the tld file

    In the tld you write for the tag handler mention the following sub tags in the attribute
    <attribute>
    <name>xyz</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    import the packagejavax.servlet.jsp.tagext.DynammicAttributes;
    add the method
    public void setDynamicAttribute(String rui, String localname, Object value) throws JspException
    <Your Required task>
    Its better if you SimpleTagSupport class to be extended.

  • Dynamically assigning variable in xml loop

    I am trying to dynamically assign a variable name so I can
    build an accordian nav from and XML doc. the code looks like this:
    ACnav['depthChild0']._alpha = 0;
    ACnav.setStyle("color", 0x0ffffff);
    ACnav.setStyle ("openEasing",
    mx.transitions.easing.strong.easeout);
    ACnav.setStyle ("selectionDuration",
    mx.transitions.duration.slow);
    navXML = new XML();
    navXML.ignoreWhite = true;
    navXML.load("menu1.xml");
    oY=5;
    var currentSection = 0;
    function buildNav () {
    DisposableXML = new XML();
    TempXML = new XML();
    button = new Array();
    //buttonNum = new Array();
    subitem = new Array();
    menuItem = new Array();
    o = new Array ();
    subitemlocation = new Array();
    DisposableList = new Array();
    buttonList = navXML.firstChild.childNodes;
    i = 0;
    sectionLength = buttonList.length;
    while (i<=buttonList.length) {
    if (buttonList
    .nodeName.toLowerCase() == "button") {
    DisposableXML = buttonList;
    DisposableList = DisposableXML.childNodes;
    buttonName = buttonList
    .attributes.name;
    set ("buttonNum", "buttonNumber"+i);
    trace(buttonNum);
    ii = 0;
    //trace(buttonName+"-"+buttonNum);
    //ACnav.createChild("View", buttonNum, {label: buttonName,
    icon: "mainNav"});
    button = ACnav.createChild("View", buttonNum, {label:
    buttonName, icon: "mainNav"});
    oY=5
    while (ii<=DisposableList.length) {
    TempXML = DisposableList[ii];
    if (DisposableList[ii].nodeName.toLowerCase() == "subitem")
    subitem = TempXML.attributes.name;
    //subitemlocation = TempXML.attributes.location;
    subitemNum="subitemNum"+[ii]+
    //trace(buttonNum+"-"+subitemNum+"-"+subitem);
    menuItem = ACnav.buttonNum.createChild("subNav",
    subitemNum, {childText: subitem});
    menuItem
    .move(0, oY);
    oY=(oY+25);
    //trace(buttonNum);
    ii = Number(ii)+1;
    i = Number(i)+1;
    //trace(button);
    trace(menuItem);
    redraw();
    //gotoAndPlay('reload');
    The problem lies with this line: button =
    ACnav.createChild("View", buttonNum, {label: buttonName, icon:
    "mainNav"});
    If I quote the "buttonNum", it works, but jumbles the subnav
    items together vs in the proper node. I need to have that declared
    dynamically so that each parent node has a differentID and then
    createchild goes under that. Anyway, I've tried alot of stuff over
    the last few days and its getting frustrating.
    Thanks for the help if anyone contributes!

    You shouldn't need to do a concat within the XQuery path parameter. Try the following:
    bpws:getVariableData('inputVariable','payload','/ns1:Request/ns1:instance[bpws:getVariableData(&quot;j&quot;)]')

Maybe you are looking for

  • Vpn site to site and remote access , access lists

    Hi all, we run remote access and site to site vpn on my asa, my question is Can I create an access list for the site to site tunnel, but still leave the remote access vpn to bypass the access list via the sysopt command, or if I turn this off will it

  • Display Image on Splash Screen

    have just found the world of Java, having used VB for a while. How do I get a mobile application to display an image on the splash screen, I have created the screen and added an image but cannot get the system to pick the file to display?

  • Can edit event title, day, and hour, but *not* minutes - Help!

    I can edit everything about my calendar event title, day, and hour, but not the minutes. This is very annoying and I'm not able to have accurate calendar entries. It's like there' s a glitch in the program. Can it be reloaded/rebooted? Using iCal 3.0

  • Firefox 5 crashes and session restore does not load any tabs that were previously open.

    Also, if I exit Firefox 5 it no longer asks to confirm that I wish to close multiple tabs - even though that option is checked in the options folder. Have changed various settings in about:config but to no avail. Any ideas gratefully received...

  • Problem with (unknown) passcode

    My iPad Mini has just started to request a passcode on restart. I think my grandaughter may have inadvertantly set one up, so can anyone tell me how to reset it?