Approach to customize workflow - setting default values of attributes

Hello Friends,
I have a requirement to customize the standard workflow - PO Requisition Approval & PO Create Documents. I want to change the default value of certain attributes in both the workflow.
Generally workflows are customized through process customization (create a new process by copying the main process (which gets called) and customize it under the same 'Item type' ) but if we just need to change the default value of attributes , do we create a new 'Item type' and set the attribute values or any other approach? If we make the change in the seeded workflow , whichever OU use that workflow will see the changes in functionality.
The requirement is very common and even Oracle has mentioned that buisness should set these attributes to suit their business needs.One such attribute is 'Is Automatic Creation Allowed' (Should PO be created from iProc requisition without user intervention)
What is the recommended/best way forward.
Please suggest , thanks !!
Regards,
Amit

You can simply update the wf_item_attributes table.
Set text_default to Y WHERE name = 'CONT_WF_FOR_AC_REL_GEN'           
Hope this helps
Sandeep Gandhi
Independent Techno-functional Consultant

Similar Messages

  • Default value for attribute "COUNTRY" in BP_HEAD_SEARCH/MainSearch

    Hi Gurus,
    Requirement is to set default value for attribute "COUNTRY" in BP_HEAD_SEARCH/MainSearch when user clicks on Corporate Account.
    Below is code that i have written in DO_PREPARE_OUTPUT.
    Code is working fine and in the debug also i can see the value of COUNTRY is set to DE, but it is not showing on the screen for first time but when i load component second time(Refresh the screen), it shows me value.
    Any help would be appreciated. If somebody has otheralternative kindly share.
      CALL METHOD super->do_prepare_output( iv_first_time = iv_first_time ).
    Calling Super Method
    CALL METHOD super->do_prepare_output
       EXPORTING
         iv_first_time = abap_true.
    Data Declatation
      DATA :lr_col            TYPE REF TO if_bol_bo_col,
            lr_current        TYPE REF TO if_bol_bo_property_access,
            lr_param          TYPE REF TO if_bol_bo_property_access,
            lr_qs             TYPE REF TO cl_crm_bol_dquery_service,
            lv_attr_name      TYPE name_komp,
            lv_sign           TYPE bapisign,
            lv_option         TYPE bapioption,
            w_country_exist   TYPE c,
            w_param           TYPE string,
            w_value           TYPE string,
            w_flag            TYPE c.
    Getting SEARCH Context Node
      lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
    Get Selection Parameters
      lr_col ?= lr_qs->get_selection_params( ).
    Start from first parmaters
      lr_current = lr_col->get_first( ).
    Clearing Variables
      CLEAR : w_country_exist, w_flag, w_param, w_value.
    Loop till we have selection paramters
      WHILE lr_current IS BOUND.         " While loop 1
    checking attribute name is COUNTRY then setting some variable
        w_param = lr_current->get_property_as_string( 'ATTR_NAME' ).
        CASE w_param.
          WHEN 'COUNTRY'.
    If country is filled then setting variable
            w_value = lr_current->get_property_as_string( 'LOW' ).
            IF w_value IS NOT INITIAL.
              w_country_exist = abap_true.
            ENDIF.
    When we got COUNTRY attribute then setting flag
            w_flag = abap_true.
        ENDCASE.
    Calling next parameter
        lr_current = lr_col->get_next( ).
      ENDWHILE.                          " While loop 1
    In below block we are checking is COUNTRY attribute is blank and
    we have found COUNTRY attribute in current selection paramters
      IF lr_qs IS BOUND.                 " SEACRCH CONTEXT BOUND
    If vairable is blank means DE or any other value is not filled in COUNTRY Attribute
        IF w_country_exist IS INITIAL.   " w_contry_exist
    We have to add selection attribute if we come accross COUNTRY attribute during our search
          IF w_flag EQ abap_true.        " w_flag
    Adding COUNTRY attribute with default value 'DE'
            lr_qs->add_selection_param( EXPORTING iv_attr_name = 'COUNTRY'
                                                  iv_sign      = 'I'
                                                  iv_option    = 'EQ'
                                                  iv_low       = 'DE' ).
          ENDIF.                         " w_flag
        ENDIF.                           " w_contry_exist
      ENDIF.                             " SEACRCH CONTEXT BOUND
    In below block we will remove COUNTRY attribute when it has blank value
      IF lr_qs IS BOUND AND w_country_exist IS INITIAL.
        lr_current = lr_col->get_first( ).
        WHILE lr_current IS BOUND.
          w_param = lr_current->get_property_as_string( 'ATTR_NAME' ).
          CASE w_param.
            WHEN 'COUNTRY'.
              w_value = lr_current->get_property_as_string( 'LOW' ).
              IF w_value IS INITIAL.
                lr_col->remove( iv_bo = lr_current ).
              ENDIF.
          ENDCASE.
          lr_current = lr_col->get_next( ).
        ENDWHILE.
      ENDIF.
    Edited by: Harsharandeep Singh on Apr 28, 2011 3:44 PM

    Hi,
    Try it like this:
      DATA:
        lr_bo        TYPE REF TO if_bol_bo_property_access ,
        lv_attr_name TYPE name_komp.
      FIELD-SYMBOLS:
        <ls_param>   TYPE crms_thtmlb_search_criterion.
      READ TABLE parameters
           ASSIGNING <ls_param>
           WITH KEY field = 'COUNTRY'.
      IF ( sy-subrc = 0 ).
        <ls_param>-value1 = ip_pfct.
      ENDIF.
      CHECK ( me->parameter_collection IS NOT INITIAL ).
      lr_bo = me->parameter_collection->get_first( ).
      WHILE lr_bo IS BOUND.
        CALL METHOD lr_bo->get_property_as_value
          EXPORTING
            iv_attr_name = 'ATTR_NAME'
          IMPORTING
            ev_result    = lv_attr_name.
        IF lv_attr_name EQ 'COUNTRY' .
          CALL METHOD lr_bo->set_property
            EXPORTING
              iv_attr_name = 'LOW'
              iv_value     = 'DE'.
          EXIT.
        ELSE.
          lr_bo = me->parameter_collection->get_next( ) .
        ENDIF.
      ENDWHILE .
    Kind regards,
    Micha

  • How  to set default value for Zfeild using statusprofile

    hi experts,
    I need to set a default value for a zfeild using status profile.Although we can default the values,using getter and setter methods,but in my requirement,the feild will be defaulted when the page is locked,also in display mode,which will require me to write code to unlock then set the value and then write a commit,as there wont be any user action performed.
    I have created a zstatus profile and have set the required status to inital,but no luck
    please suggest if this canbe achived through status profile.
    Regards
    Anu.

    Hi,
    You can check in the getter if the Page is locked and then display the value to want to display. Note that this will be just Displaying the default value for the Zfield and it will not set the default value into  the Zfield in DB, because when the document is locked ( means locked for editing - mostly when system status is completed ) , setters are not called and so you can display the value but cant set it. This is fine if the value you want to display in Z field is just for user's informations and its not required to save this default value.
    The best approach would be to set the value in the Zfield before the page is locking. For example, If you wat to set the zfield value when status is set to "Completed" , then you can configure an action that is 1) triggered during saving of the document with 2) start condition "When status is completed"  ( both 1 and 2 you can mention in action defination ), then Implement this action badi in which you can set the Zfield to default value.
    This will ensure that default value is always set whenever the page is getting locked for editing ( i assumed that page lock means status completed ).
    Thanks & Regards
    Suchita

  • Set Default Value of Multi-select list item

    I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
    :P507_ITEM := '%null%'; How do you get the default value set and selected?

    Hi
    Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
    Company A returns 1
    Company B return 2
    % returns 0
    Then your query would be...
    SELECT ...
    FROM ...
    WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
    Hope this makes sense.
    Cheers
    Ben

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set default value to input field

    Hi Experts,
    I need to set default value to one input field for the transaction crmd_order as a screen variant. Guide me in doing that.
    Regards,
    Harish

    Using the transaction SHD0, you can define the screen variant. While defining the sceen variant, you are allowed to define the default values.
    Using screen variant, for the main transactoin, you can also define the transaction variant and you can use this as an independent transaction.

  • Any opinions on setting default values on Business Partner level?

    Hi All,
    I do not have a question, but would like to have a good discussion on how you should preferably be setting default values on a business partner and it's assignment blocks.
    In my opinion you have two main alternatives:
    1. The "old fashioned" way by using the get_<attribute_name> method and doing some checks for the perticular attribute in the context node.
    2. Using the Badi BADI_CRM_BP_UIU_DEFAULTS to fill fields with a default value. With some enhancements on the assignment blocks (making typed_context attribute public and, when not called yet, calling the badi) you can use the badi for all assignment blocks.
    Because I discovered via debugging that in the, by many forums suggested, badi code a programm error/exception is used so that the default values are only set during creation mode, I started doubting to use the badi. Because once I had set my data declarations to the right references and the exception did not occur anymore, suddenly it always fills the values even when there are already values filled. So additional checks are needed to assure that I am in creation mode.
    Although I like the use of the badi, because all my default values on the whole business partner object can be found in the same place, it is getting a bit strange to: first still enhance the view and context node class, adjust the visibility of the typed_context, call the badi and do all kind of checks to assure that you are in the right view/context node, where this all is faster and more lean and mean when done directly in the get_<attribute_name> method on a context node.
    Anyone who wants to give there opinion on this?
    Regards,
    Martijn.

    Cameron,
    Unfortunately you cannot pass the Account and Contact name before saving the record. Post default tries to capture the name just before the record gets saved, but as the record is yet to be created, the relationship wont exist and only the respective id fields will have values. If you try using account id/ contact id it will work else just pass the time stamp in the name field which will make sure there is some value when the record is saved. later in the back end you might need WS to update the field values.

  • Setting Default values in portal form

    I have a portal Master/Detail Form. I want to set some of the detail block columns value to the value of a field in the master block.
    In the formattng option of the detail column, I tried setting default value to:
    p_session.get_value_as_varchar2(p_block_name=>'MASTER_BLOCK', p_attribute_name=>'A_CLASS_CD');
    and default value type to: function (I also tried expression). It compiles, but gives me an error when I ry running form. How can you set the default value (from the value of a differnt field)?

    HI,
    You can set the default value to value of a different field. The only way is to use javascript like onFocus.
    Thanks,
    Sharmila

  • Setting default values for field on screen.

    Hello,
    I am trying to set default value for one of the fields I have on screen when I execute the custom transaction.
    I am doing that in PBO as follows. But the default value is not set for Date field.
    PROCESS BEFORE OUTPUT.
    MODULE PBO_OUT.
    MODULE STATUS_5000.
    *&      Module  STATUS_5000  OUTPUT
          text
    MODULE STATUS_5000 OUTPUT.
      SET PF-STATUS 'NON_SAP_DOCUMENT'.
      SET TITLEBAR '001'.
    ENDMODULE.                 " STATUS_5000  OUTPUT
    *&      Module  PBO_OUT  OUTPUT
          text
    MODULE PBO_OUT OUTPUT.
      ERDAT = SY-DATUM.
    ENDMODULE.                 " PBO_OUT  OUTPUT
    Please help.
    Thanks.
    Regards,
    Rajesh.

    Works Now...

  • How to hide PNP selection windows and set default values for PNP.

    Hi expert,
         I am using HR logical database PNP, but I don't want to display selection windoes for running program on PNP, whereas I want to set default value for some selection items in the program. could you please tell me how to get those two targets?
    Many Thanks,

    Hi
    You have mentioned 2 things.
    1. Don't want selection windows for running program for PNP - this can be achieved using the HR Report category - You can get more details on HR Report Category on
    HR Report Category
    2.  I want to set default value for some selection items - This you need to achieve in initialization event of your program.
    How you can get this can be explained by INITIALIZATION (SAP Library - ABAP Programming (BC-ABA))
    Thanks,
    Sreeram

  • How to set default value and bg color of cross tab cell?

    Hi all
    Which way can I set default value and background color for a crosstab cell where there are no any data?
    I try to pass it in following way
    if isnull(CurrentFieldValue) then
    But is has no effect.

    Hi,
    If your field is numeric
    if currentfieldvalue =0 then cryellow else crnocolor
    if the field is numeric but you don't see the 0 check check if : Suppress if zero is ticked in the Number format tab.
    Regards

  • Extending flash: how do I set default values for filenames

    Hi,
    I am trying to set default values for filenames
    <choosefile> and <popupslider>s that will show up when
    my XMLpanel first loads in my jsfl extension file. It seems that I
    can only set default values for textbox items.
    How do I do this for filenames and popups?
    As a workaround, I also tried using a flash object dialog box
    to look like a <choosefile>, or any jsfl command, but then
    how do I return those values back to the XMLpanel that calls them.
    and pass the data back to my jsfl script.
    lemme know if you know a way,

    Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
    Misha

  • How to set default value in ME21N

    Hi all,
    I want to set default value of PO item's price unit to 1000 and make it unchangeable, is it possible? If so, could you please tell me how to do that.
    Thanks in advance!
    Woody

    Dear Woody,
    1) if u want to make any field un-editable then make it Via SHD0
    2) Plz find the below link for Demo SHD0, here we need to make the field as out put only
    [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/transactionVariant-AStepbyStepGuidefor+Creation]
    Plz Provide the link to ur Abaper
    Regards
    kumar

  • How to set default values in matrix combo

    hai everybody.
    i want to set default values in a matrix combo box. how to do that
    pls.......

    Hi Priya,
    Public Sub comboload1()
            Try
                ds = oform.DataSources.DBDataSources.Add("OUSR")
                oitem = oform.Items.Item("pm7")
                omatrix = oitem.Specific
                ocolumns = omatrix.Columns
               ocolumn = ocolumns.Item("V_2")
               ocombo = ocolumn.Cells.Item(r).Specific (r = row number)
                LoadEroToCombo1(ocombo)
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    load to combo function is below
        Public Sub LoadEroToCombo1(ByRef ocombo As SAPbouiCOM.ComboBox)
            Dim rset As SAPbobsCOM.Recordset
            Dim querystring As String
            Dim rcount As Long
            Dim rindex As Long
            Try
                rset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                querystring = "SELECT T0.U_NAME FROM OUSR T0"
                rset.DoQuery(querystring)
                rcount = rset.RecordCount
                rset.MoveFirst()
                ocombo.ValidValues.Add("0", "Select")
                For rindex = 0 To rcount - 1
                    ocombo.ValidValues.Add(rset.Fields.Item(0).Value, rindex)
                    rset.MoveNext()
                Next rindex
                ocombo.Select("0")
                rset = Nothing
                System.GC.Collect()
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    try this code if it helps please reward points
    Regards
    Cool Ice
    Edited by: Cool Ice on Jul 28, 2008 1:43 PM

Maybe you are looking for

  • FrameMaker 9 - Docking Difficulties

    Greetings, We were running a bit of orientation on our newly-purchased  FrameMaker 9 this morning and found that one of our computers couldn't dock items on the right. We did the following, pretty much in this order: Opened a book file and promptly d

  • House Keeping with a MacBook Air

    This is the first Mac I've ever owned and I'm loving it. I bought a 13in. MacBook Air about two weeks ago. Are there regular maintenance check-ups that I need to do regarding my laptop? Do I need to defrag or do things similar to that to keep the com

  • Live Meeting on mac?

    Hello - I am considering using Live Meeting but I heard that it doesn't support Mac users well - specifically I heard the following are NOT available, but I am not sure if this has changed with any recent client updates. Does anyone know if the follo

  • CMP finder method error

    I'm now using Jbuilder7+weblogic7 to do some EJB develop. Weblogic server is configured to run inside the Jbuilder IDE, and my CMP entity bean has been deployed successfully. I new a "EJB test client" within Jbuilder to test my CMP bean, I could crea

  • Scheduling monitoring of Total CPU Utilization

    Hi, Looks like the question has been asked all over the internet but I can't find a good answer to it and whatever that would look like  a start of an answer is for 2007... So here is my question, which is for Operation Manager 2012 R2 I have a bunch