BBP_WFL_APPROV_BADI container element

Could you please tell me how to read container of the shopping cart in the dynamic approver determination badi in n level item based workflow ?
thanks
ps.i copied for the object type bus2121 the existing code given for po and contract in the example impl of the badi but i cudnt get any result.
i put this code in when c_shop.
      swf_create_object  lo_new_instance  object_type   guid.
      swf_get_property   lo_new_instance 'Initiator' l_initiator.

Hi Rita,
  If you want to retrieve SC attributes , like the descripton, you can use FM BBP_PD_SC_GETDETAIL. By using this function, you can get the header, items information as well as its account information. Here, you can get both the shopping cart and item guids.
However, there's FM BBP_WFL_DIN_ITEM_APPROVAL_GET that allows you to build and control the dynamic approval information, which I suppose is the type of information you need to have.  This function is used to create an approval object (more specifically, an approval guid), through which you relate the item and their respecitve approvers. Then, you fill up tables APPROVAL_TABLE”,  “ITEM_APPROVAL_TABLE” and
“ITEM_APPROVAL_OBJ.
These functions work together. I don't exactly what your approval determination requirements are, but I can give you a little example, just a piece of the coding I had to go through when attending a customer recently:
METHOD if_ex_bbp_wfl_approv_badi~get_remaing_approvers.
  DATA:
   ls_header         TYPE bbp_pds_sc_header_d,
tables for different approval criteria
   lv_call_crit1     TYPE bbp_wfl_app_criterion,
   lv_call_value1    TYPE bbp_wfl_app_property,
local help variables
   lv_guid           TYPE crmt_object_guid,
item fields and structures
   ls_item           TYPE bbp_pds_sc_item_d,
   lt_item           TYPE TABLE OF bbp_pds_sc_item_d,
accounting structures
   ls_account        TYPE bbp_pds_acc,
   lt_account        TYPE TABLE OF bbp_pds_acc.
  DATA: ls_approver TYPE bbp_wfl_approval_table_badi.
  DATA:
        v_lin       TYPE i ,
        w_group     TYPE i,
        w_level     TYPE swh_numc10,
        w_index     LIKE sy-tabix,
        t_approval  TYPE bbpt_wfl_approval_table_badi,
        t_item_app  TYPE bbpt_wfl_item_approval_badi,
        t_item_obj  TYPE bbpt_wfl_item_approval_obj.
Business objects (local)
  CONSTANTS:
   c_po            TYPE crmt_subobject_category_db VALUE 'BUS2201',
   c_shop          TYPE crmt_subobject_category_db VALUE 'BUS2121',
   c_contract      TYPE crmt_subobject_category_db VALUE 'BUS2000113'.
  CONSTANTS:
    c_code  TYPE bbp_wfl_app_criterion  VALUE 'CODE'.
  CASE object_type.
    WHEN c_shop.  " shopping cart
get the details of the shopping cart
      CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
       EXPORTING
         i_object_id                      = object_id
      IMPORTING
        e_header                         = ls_header
      TABLES
        e_item                           = lt_item
        e_account                        = lt_account.
...... Determine the approvers  
loop while approval level number is not reached
Important. Do not change actual_approval_index_directly
IF actual_approval_index <= 1 .
        w_level = 1.
      ELSEIF actual_approval_index <= 2 .
        w_level = 2.
      ELSEIF actual_approval_index <= 3 .
        w_level = 3.
      ELSEIF actual_approval_index >= 4 .
        w_level = 4.
      ENDIF.
WHILE w_level <= 3.
        LOOP AT lt_item INTO ls_item WHERE del_ind IS INITIAL.  " AND deduct_ind IS INITIAL.
              CALL FUNCTION 'ZBBP_WFL_DIN_ITEM_APPROVAL_GET'
                EXPORTING
                  sc_guid                     = ls_header-guid
                  item_guid                   = ls_item-guid
                  approval_index              = w_level
                  approval_description        = text-001
                  hide_items_not_responsible  = 'X'
                  criterion1                  = c_code
                  value1                      = ''
                  created_by                  = ls_header-created_by
                TABLES
                  criterion                   = t_crit
                  ITEM_APPROVAL_HISTORY_TABLE = ITEM_APPROVAL_HISTORY_TABLE
                CHANGING
                  approval_table              = approval_table
                  item_approval_table         = item_approval_table
                  item_approval_obj           = item_approval_obj.
        ENDLOOP.
        IF sy-subrc <> 0 .
          no_further_approval_needed = 'X'.
        ENDIF.
      IF actual_approval_index GE 4 OR approval_table[] IS INITIAL.
        no_further_approval_needed = 'X'.
      ENDIF.
  ENDCASE.
Edited by: Andre Sousa on Jan 3, 2008 1:39 AM

Similar Messages

  • Container element is not being displayed in email

    Hi Experts,
      I inserted an element from container into email text as below
    The task has been pending in inbox for more than &ins_num& days.
    The value of &ins_num& in container is 9
    In output I get
    The task has been pending in inbox for more than  days.
    Please let me know what is wrong. The binding works fine. No error in workflow.
    Thanks.

    Hi Miak,
    Greetings..:-)
    > I inserted an element from container into email text as below
    > The task has been pending in inbox for more than &ins_num& days.
    > The value of &ins_num& in container is 9
    > In output I get
    > The task has been pending in inbox for more than days.
    > Please let me know what is wrong. The binding works fine. No error in workflow.
    Check on the Following things:->
    1> The Container Element has Initial Value defined, If Yes - it should symbolise in Green Colour.
         If 'Not', then check the WF Log and see whether this Container Element is fetching the Values orr   not.
    2> If the Values are not being Fetched, then the Problem lies with the Binding of these WF Containers.
    Let me know if you are still facing Issues.
    Regards,
    Kanika

  • 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.

  • Hiding a container element  from a standard applicaition

    hi,
    i have a requirement to remove the UI elements in a transparent container from a view of a standard webdynpro component HRRCF_C_PREFERENCES_UI. This component is being used as a sub component in a main application.
    The transparent container within has a drop down list and a few buttons.
    So i created a component configuration for the component HRRCF_C_PREFERENCES_UI and changed the property of the UI element in the configuration to invisible. This worked, the container element was invisible in the application. But two other containers next to the UI element that was hidden did not move to the left . No proper alignment.
    Is this the standard behavior of a component configuration? i don't think so.
    Now in my option, the other only possible option is to hide the button by changing the attribute in the WDDOMODIFYVIEW method of the view.
    Could someone please help me how to set the attribute problematically? Is there a different way to meet this requirement?
    Need some help.Thanks.
    Best Regards,
    Sridharan

    Hi,
    Just go to enhancement mode in your webdynpro component and delete that button from UIElement hierarcy.
    If you want your button back, delete the enhancement.
    Regards
    Vishal kapoor

  • Assigning a value to container element in rule defination

    I am using a rule to determine an actual agent. I am using a function module containing actor_tab and ac_conatiner in TABLES parameter. the agent determined is appended to internal table actor_tab. I want this agent to be available in a container element(say: APPROVER) to use it further. I am trying to assingn the agent value to container element using macro  swc_set_element ac_container 'APPROVER' agent-name. But its not working...any other way to assgn this agent to the container element. Bindings from workflow container to rule container are proper.
    Edited by: Rishi Bhatia on Oct 19, 2008 2:46 PM

    i think you cannot modify the container element from Rule.
    the agents of the task determined by the Rule will be stored in some variable of the container automatically (i think it is RuleResult.Agents). you can check this yourself and then bind this element of the task to your APPROVER element.

  • BPM - An empty container element was specified when sending

    Hello Experts,
    My BPM process looks as below:
    Receive -> Loop (execute if the status of IDoc is ERROR(E))--> Mapping ---> End Loop --> Send
    The message is failing in BPM workflow with the log: An empty container element was specified when sending
    Container  for receive and send stepe are different. IP in SXI_CACHE has process code 0.
    Mapping program is defined between the abstarct msg type of receive step and abstract msg type of Send step.
    Th message being processed has initial status as ERROR and after the mapping step is exceuted, it retrieves teh current status i.e SUCCESS. This ends the loop step and while tying to send the messgae to target system, this error occurs.
    Pls advice if I am missing anything.
    Thanks,
    Elizabeth.

    Go to transaction SWWL  , select your integration process instance and delete it
    Create your process with a new name and run the scenario again
    Re: Prob with Integration Process
    regards
    Ninad

  • Error while creating container Element in WF

    Hi,
    I have created a container element with field vbeln, and specified an initial value. Created mail step and activated it.  I have given the mail subject and content  as "value given : &vbeln&".  When I try to test this I couldn't find the container element in " Input Data" tab  of the Test Data and getting the message as "Contnr elem. VBELN  is for read purposes only. No values are assigned to it." 
    Could anyone suggest me to correct this, because I am new to WF.
    Thanks,
    AA

    Hi AA,
    You would probably need to create more than one containers.
    In workflows, we have following types of containers:
    1. Workflow container
    2. Task Container
    3. Event Container
    Now, since you need the element VBELN, try the following:
    1. Create a WF container for VBELN. Make it as both input and output parameter.
    2. Create a container for the Mail Step, again with VBELN field as an input parameter.
    3. There would be a button for binding in the mailstep. Bind the Field VBELN from Work flow container to the Mail Step container.
    Once binding is done, save it and Activate the Workflow.
    Hope this helps.
    Do get back in case of any issues.
    Regards,
    Sonal

  • The hard drive on my laptop that contained Elements just died.  Can I get a second copy for installation on my new PC?

    The hard drive on my laptop that contained Elements just died.  Can I get a second copy for installation on my new PC?

    The iPhone is not a backup device.
    Restore the iTunes library from the backup that should be kept of your media and other important files.
    Syncing the iPhone to a new library (in this case, it will be a new library unless you have a complete backup of the iTunes folder pre-crash) will result in the media on the device being removed and replaced with content from the new library.
    As for iOS5, we really do not know until Apple officially releases it.

  • Container Element in Alert Category

    Hi,
    Any one can tell me what is the use of container element in Alert Category.
    While creating a container variable there is an drop down for Object type.When we go for each of these object type.
    When i selected the object type as 'XML object type '  i could be able to see all the abstract interfaces and the fields that are created in the IR.I am able to select that field in the long text tab also.
    But the value of the field is not getting reflected when an alert message is triggered.
    Am I in a right track or doing anything wrong?Can i directly access this field in the long text?
    Regards
    Divia

    Hi Sreedivia Narath,
    Go through this blog for alert configuration by Michal. Its a beautiful blog and explains about the container variables:
    The specified item was not found.
    Thanks and Regards,
    Sanjeev.

  • Container element in BPM of type integer

    if i make a container element of type integer in my BPM, does it initiallize to some value

    Hi Pankaj,
    Check this out,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/78/62373f58502e48e10000000a114084/content.htm
    Go to Assigning Values
    <i>At runtime, you can assign a value to a container element, for example to increase a counter or to append a message to a list of messages.</i>
    Also refer this
    http://help.sap.com/saphelp_nw2004s/helpdata/en/59/e1283f2bbad036e10000000a114084/frameset.htm
    <i>[Reward if useful]</i>
    Regards,
    Prateek

  • BPM error:Container element in step transformation is not initialized

    Hello Experts,
    I am new to the concept of BPM.
    I'm trying to create an integration process in which I'm taking an Idoc and processing it in many ways. The process contains many transformation steps. There two such transformation steps which have been placed in block step in a fork. And i get this error: Container element XXX in step transformation is not initialized
    What could be the problem?
    Regards,
    Akhil

    Hi
    if u are getting the messaga with red sigh then it means it will craete the error while running the scenario.
    but if it is in blue then i think it will not create any error.
    the meaning of that statement is that the container u have defind is not used anywhere. it is just giving u a warning message.
    Thanks
    Rinku

  • BPM Alert Container Elements Not Filled

    Hi All,
    Another problem i am facing when i am raising alert from BPM.
    In inbox i see alert message being raised but with no text.
    I have also subscribed to email alerts.
    In the email the subject is Process 000000008058
    and the content is the first alphabet of the AlertMessage container element.
    Ex : In BPM my container element is AlertMessage and the message assigned is <i>Error</i> . Then in email message i only get E. where as in alert inbox i get nothing.
    ps : im using XI 7.0 SP 9. there are no notes which are applicable for this release.
    Regards,
    Rahul
    Message was edited by:
            Rahul Jain

    Hi Bhavesh,
    <i>>When you select Dynamic text in the Alert category, the Container tab will no longer be available in ALRTCATDEF for your Alet Category.!</i>
    the container tab is available but the Long& Short text tab is disabled.
    I did not mean that..
    What i meant was see next to the Properties tab in Alert Category defination there is a Container tab where we define our own container elements.
    Do i need to define the names there..or i can directly use in the BPM?
    Regards,
    Rahul
    Message was edited by:
            Rahul Jain

  • Error while using container element _WF_PARFOREACH_INDEX in workflow

    Hi All,
    I am using internal container element WFPARFOREACH_INDEX in internal table so that i can use it as index to read table row one by one..but in binding i am getting error "Container element '_WF_PARFOREACH_INDEX' does not exist" in form of an example.
    Can someone tell me that how to get rid of this error in binding? I am using this element variable to achieve parallel branching in workflow.
    Regards,
    Sumit

    Hi AA,
    You would probably need to create more than one containers.
    In workflows, we have following types of containers:
    1. Workflow container
    2. Task Container
    3. Event Container
    Now, since you need the element VBELN, try the following:
    1. Create a WF container for VBELN. Make it as both input and output parameter.
    2. Create a container for the Mail Step, again with VBELN field as an input parameter.
    3. There would be a button for binding in the mailstep. Bind the Field VBELN from Work flow container to the Mail Step container.
    Once binding is done, save it and Activate the Workflow.
    Hope this helps.
    Do get back in case of any issues.
    Regards,
    Sonal

  • BPM: How to return the total number of lines in Multiline Container Element

    Hi all:
    I am trying to follow the following blog to do message splitting:
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    In the blog, total number of messages for Message1 was returned to Count in Message 2.
    If I do not want to create message 2, if there any way to return total number lines in multiline elements ? Because this number need to be used to specify in loop condition:
    While Indxe != TotalNumberOfLines
    Thanks
    Liang

    Hi, Matias:
    For the loop block option, your answer is passing message count in different message type is best option !
    I really do not know why SAP does not deliver a build-in function to return the number of items in multiline element at run time ?
    Now the question for the second option: ForEach block:
    When I leave current line of block properties empty, the compile does not pass
    I have to input a another element (Var_Cur) in current line
    Inside my block, I have one send step, it will send Var_Dest[Index],  followed by a container operation step to increment Index by 1.
    With above setup, I compile it, compile passed, but it says:
    "Container Element Var_Cur in Step Block1 is initialized but not used"
    then I added another containter operation step in block:
    Var_Cur = Var_Dest[Index]
    I modified send step to send Var_Cur rather than Var_Dest.
    Up to now, I can compile it without any warnings.
    But when I send message to IE, the message pass pipe line, but it seems does not pass the BPE.
    When I go to SXI_CACHE, to check the return code for my Integration process is 0, means no error.
    But my message does not reach my target system.
    Where do you think I made wrong ?
    Thanks
    Liang

  • How to Initialize Container Element in BPM..No Payload found

    Hi All,
    How do we initialize a container element in BPM if that container element is a message Interface.
    I am doing exception handling in BPM, so whenever a exception occurs i need to send a mail.
    So in the exception box i have a transformation step and a send step.
    In the transformation step what will be my source message?
    How do i initialize that source message?
    What i have done right now is created a dummy interface(abs) for source and then mapped with the target abs interface.
    When i execute the schenario,in the monitor i find in the Transformation step the following error
    <i>No payload found.</i>
    Regards,
    Sumit

    Hi Pinto,
    I too agreee. Lemme try to explain witha example.
    In my first transformation, MI_MAIL_TEMP_ABS is there along with 3 other interfaces. Each one is getting mapped i can see that in monitoring.
    Now in the exception branch in transformation step,
    i am mapping MI_MAIL_TEMP_ABS to MI_MAIL_ABS.
    Now in the send step im giving MI_MAIL_ABS as the interface name.
    Do you see anything wrong with this?
    <i>>>>>>>>Did you try to do outbound interface -> inbound interface mapping in the exception branch? Just to try to make your scenario work. Then you can investigate further on why the abs message is not being carried away.</i>
    Which outbound interface & inbound are you talking about?
    Regards,
    Sumit
    Message was edited by: Sumit Khetawat

Maybe you are looking for

  • Return pricing procedure-

    Dear all- After defining separate pricing procedure for return sales . when we are creating return sales with the refference of billing why return pricing procedure is not coming.Coming pricing proceure is previous sales procedure.I want in case of 

  • The new download has error 7 windows error 126?

    what is going on? i get the same message failed to start because msvcr80.dll was not found. then something about apple mobile bla bla bla. i am not very tech minded at all and this problem is worrying me as i have nearly 3000 tracks in my library. th

  • In search of drivers for ATI Radeon 7000

    I recently purchased a used ATI Radeon 7000 PCI video card for my G3 beige, OS 9.2.2. This is an older model card with just the single VGA output. This comes up as card name "ATI, Bluestar", and card model "ATI, RV100" under Apple System Profiler so

  • Video feels a bit soft

    Hi, Let me first walk you through my workflow. I made five compositions, each of which contains 2-3 compositions (which then have more comps nested inside). The main five comps are standard dvd resolution 872x486 (gotten straight from one of the pres

  • HT1473 how do i Athorize my computer

    i cant get itunes to work because it says my computer isnt athorized help how do i athorize it?