To hold the value of a container in BPM

Hi,
How to access the value of the counter outside an  infinite loop in the BPM, i have to use the counter calculated in the first infinite loop in the next while loop.
Let me know if any one has done this..
thankx,
Shree

You mean inside the same BPM?
If that's so, you can use the local container you are using as counter wherever you want in the BPM. So, you can change the container in a step and use the same container (read its value) in any steps after that.
Regards,
Henrique.

Similar Messages

  • How to hold the value in List box.

    Hi All,
    On my screen painter Screen I am displaying the Sold to party and ship to party with thier address.
    I am also displaying the Shipping condition based on ship to party. To display the shipping condition i am using list box. Once the user enter the sold to party automatically all the field is going to populate in their respective fields. I am facing the problem that, The list box getting populated with shipping condition but once you choose the shipping condition and hit the enter the list box getting refreshed. I am using this code in PAI event. And I can Only use this in PAI.
    The Function i am using for list box is CALL FUNCTION 'VRM_SET_VALUES'.
    Pls suggest me how to hold the value in List box.
    Thanks,
    Rakesh

    Hi,
    Now i am using in PBO.
    the code below in in PBO.It is still not holding the value.
          if list[] is initial.
          perform SHP_COND.
          endif.
    form SHP_COND .
    *DATA: SHOP(80).
        clear : GT_VSBED, list.
        refresh : GT_VSBED, list.
         select vsbed
           from knvv AS K
           into table GT_VSBED
          where Kvkorg = vbak-vkorg  "Kkunnr = GV_STPH
          and K~vtweg = vbak-vtweg
          and K~spart = vbak-spart.
        select VSBED vtext
          from TVSBT
        into table list
        for all entries in GT_VSBED
        where spras = sy-langu
        and vsbed = GT_VSBED-VSBED.
    *break-point.
    NAME = 'SHP_CON'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = NAME
        values                = LIST[]
    EXCEPTIONS
       ID_ILLEGAL_NAME       = 1
       OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " SHP_COND
    Thanks,
    Rakesh

  • Using a session object to hold the value of a record set?

    Hi,
    I'm trying to hold the value of a record set (or literally the content of a column in a query in a db) in a session variable so that I can call on this later and insert into another table.
    I'm not sure of the correct syntax, I've already made a connection to the DB. I'm trying the following but it doesnt seem to like the code:
    <% session.setAttribute("code",rs("column_name")); %>
    <%String attrib =
    String.valueOf ( session.getAttribute("code")); %>
    Hello <%= attrib %>
    Any ideas, I dont know how to reference the record set, I declared the recordset previously as rs. Help! Can't find examples anywhere on the net!

    So just to recap. I appear to be seeing the column name "custorderno" within the Microsoft Access query "lastcust". But I get "no data found" when I run the following code (which I have sectioned off)
    <!-- connect to database and lastcust query --!>
    <%
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Tomcat/jakarta-tomcat-4.1.31/webapps/ROOT/Oatcake.mdb","","");
    Statement statement = conn.createStatement();
    String sql = "SELECT * FROM lastcust";
    ResultSet rs = statement.executeQuery(sql);
    while (rs.next()) {
    %>
    <TR><TD><%= rs.getString("custorderno") %></TD>
    </TR>
    <% session.setAttribute("code",rs.getString("custorderno")); %>
    <% String attrib =
    String.valueOf ( session.getAttribute("code") ); %>
    Hello <%= attrib %> [B]
    <%
    %>
    </TABLE>
    <%
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch (Exception e) {out.print(e);}
    %>
    </BODY>
    </HTML>
    No as mentioned I am (as you can see) declaring everything as a string when in actual fact the contents of the "custorderno" within the query is set to a autonumber within MS Access.
    The while loop does work by returning the contents but the session object part is not working correctly with the following result returned:
    [B]java.sql.SQLException: No Data Found
    Help please!

  • Holding the value in screen-field

    Dear All,
    I m facing the problem ,while i m putting the value in screen-field and then pressing enter,
    value in that screen-field is becoming null automatically.
    wht shld i do for holding the value even after PAI.
    Thanks in advance.

    Hi,
    You should define a corresponding variable for that screen field in your program.
    data: my_input_field type ... "same name and type as the one used in screen for field
    so when you enter data to that field and press ENTER, the data will be transported to that variable and in PAI you have its value there.
    Regards
    Marcin

  • How to hold the values as  it's not holding the values when it cross 255

    DATA : fval1  TYPE edidd-sdata.
    DATA : fval2  TYPE edidd-sdata.
    DATA : fval3 TYPE edidd-sdata.
    DATA : fval4 TYPE edidd-sdata.
    DATA : fval5 TYPE edidd-sdata.
      DATA : len(3) TYPE n.
    values1 = wa_final-low.
      values2 = wa_final-high.
      IF wa_final-high IS NOT INITIAL.
        CONCATENATE values1 values2 INTO fval1 SEPARATED BY '-'.
      ELSE.
        fval2 = values1.
      ENDIF.
      IF fval3 IS NOT INITIAL.
        IF fval1 IS NOT INITIAL.
          fval = fval1.
          CONCATENATE fval3 fval INTO fval3 SEPARATED BY '/'.
        ENDIF.
        IF fval2 IS NOT INITIAL.
          fval = fval2.
          CONCATENATE fval3 fval INTO fval3 SEPARATED BY '/'.
        ENDIF.
      ELSE.
        IF fval1 IS NOT INITIAL.
          fval3 = fval1.
        ENDIF.
        IF fval2 IS NOT INITIAL.
          fval3 = fval2.
        ENDIF.
      ENDIF.
      DATA : len(3) TYPE n.
      len = STRLEN( fval3 ).
      IF len > 250.
        fval4 = fval3+0(250).
        fval3 = fval3+250(5).
    *    CONCATENATE fval4 fval3 INTO fval5.
      ENDIF.
           IF fval4 IS INITIAL.
              wa_final1-varbl31 = fval3.
            ELSE.
                CONCATENATE fval4 fval3 INTO fval5.
                wa_final1-varbl31 = fval5.
            ENDIF.
            MODIFY  it_final1 FROM wa_final1
            TRANSPORTING varbl31 WHERE agr_name = wa_final-agr_name.
    at this point also it's not holding the values when it exseds 255
    kindly please help

    H friends ,
    i am not the expert at the same time i know some thing in abap
    fval4 = fval3+0(250).
        fval3 = fval3+250(5).
    in the above case fval3 have 255 char at that time iam transporting 250 char to fval4 with this statment
    fval4 = fval3+0(250).
    and iam keeping  the remaining 5 char in fval3 with this statment
    fval3 = fval3+250(5)
    so that i can push some more values in fval3  and at i am
    CONCATENATE fval4 fval3 INTO fval5.
    so that fval5 may get all values this is the way i try but fval5 is not holding all the values 
    i asked solution for that
    fval 3 = fval3+250(250)
      dosen't  have any meaning i know that  friend
    my question is how to hold the remaining value

  • Refresh the values in multiline container

    Hi All,
    Can any one help me on this.
    How to refresh the values in  multiline container of  workflow.
    Any function module are available to refresh the multiline container .
    Thanks,
    Harsha

    Hi,
    What do you mean by refresh?
    Have you tried SAP_WAPI_WRITE_CONTAINER? Always check workflow functions SAP_WAPI for any workflow functionality. If you don't find one for your purposes within SAP_WAPI*, the functionality probably cannot be achieved (at least not easily).
    Regards,
    Karri

  • Not Able to Pass the Values to WorkFlow Container

    Hi All,
        Iam calling a WF from a BSP application by using the FM       
    EWW_WORKFLOW_START
    for this fucntion module iam passing a table  to the parameter
    X_CONATINER = t_values
    but I am a bit confused that how this table is assigned to the workflow conatiner.
    what I want to know is I need to assign the values of t_values to the WF conatiner elements .
    Thanks In Advance.
    Regards
    Pavan

    Pavan,
    try this code and include this in your corresponding include.
    Make sure that your workflow has a multiline import element with the same name as of the internal table. Here, WERKS.
    REPORT yh_sample.
    DATA : t_container TYPE TABLE OF swcont WITH HEADER LINE,
            wf_id TYPE swwwihead-wi_id.
    DATA: werks TYPE STANDARD TABLE OF werks_d WITH HEADER LINE.
    DEFINE swc_set_element.
      call function 'SWC_TABLE_SET'
        exporting
          element       = &2
        tables
          container     = &1
          table         = &3
        exceptions
          type_conflict = 1.
    END-OF-DEFINITION.
    werks = '1000'.
    APPEND werks.
    werks = '1003'.
    APPEND werks.
    werks = '1056'.
    APPEND werks.
    swc_set_element t_container  'WERKS' werks.
    CALL FUNCTION 'EWW_WORKFLOW_START'
      EXPORTING
        x_task          = 'WS99901222'
      IMPORTING
        y_workflow_id   = wf_id
      TABLES
        x_container     = t_container
      EXCEPTIONS
        invalid_task    = 1
        no_active_plvar = 2
        start_failed    = 3
        general_error   = 4.
    IF sy-subrc = 0.
      COMMIT WORK.
      MESSAGE 'success' TYPE 'S'.
      WRITE:/ wf_id.
    ELSE.
      MESSAGE 'Error' TYPE 'S'.
    ENDIF.
    Regards
    Indu.

  • Variable to hold the value at run time

    Dear Friends,
         I have a requirement in customer ageing report to select a particluar record from the cube based on the record selected by the query. Is there any option for holding a value of the dimension selected by the query in to a variable at run time. kindly let me know if am not clear.
    Thanks
    Prem

    you want to :
    Exeute a query - this will select a particular record and this is to be used to select another reord from a cube. I assume that the seletion from the cube will also happen through a query - then try using a prequery - have a variable on the query on the cube which is filled using replacement path from the previous query..?

  • PO structures or tables that hold the values at Routine level

    hi
    can any one tell me what are all the MM structures or tables that holds value of mode of transport (OIC_MOT) and Order acknowledgment requirement (KZABS) values at VOFM routine level.
    if we caunt find these values at the routine level through structures, is there any other method to get those values at the routine level
    vamsi

    hi Mav,
    it's normal to have + and - records in infocube, the way infocube work is always ADD/INSERT records, any changes to data will be - first then insert new value, e.g
    Data come from transaction
    Date           Customer     Order Qty
    12.12.2005     A            100
    Data go to infocube
    Date           Customer     Order Qty
    12.12.2005     A            100
    Then transaction change :
    Date           Customer     Order Qty
    12.12.2005     A            50
    so in infocube will have 3 records :
    12.12.2005     A            100
    12.12.2005     A           -100
    12.12.2005     A             50
    -- total = 50 (correct)
    so its' normal to have - in infocube
    you can eliminate these records by do infocube compression.
    hope this helps.

  • How to hold the value of a prompted password in a variable while file is open?

    I have this little VBA macro that uses ADODB to execute a SQL Server Agent job remotely.  It is in an Excel file, and there will be several other similar macros in the same Excel file.  They will be used at least 10 times, each time the user opens
    the Excel file.  If I leave it like this, the user will be prompted for the password every single time they run one of the macros.  How can I change it to instead prompt the user for the password value initially when they open the file, store it
    in a variable, and then utilize that variable value for the database connection every time they run one of the macros (to avoid repeated prompting)?  Also, are there any security concerns with my proposed approach?
    Sub Test_SSIS()
    Dim conn As Object
    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "sqloledb"
    conn.Properties("Prompt") = adPromptComplete
    conn.Open = "Data Source=MYSERVER;USER ID=JOHNDOE;"
    conn.Execute "exec msdb.dbo.sp_start_job 'Test_remote_job_execution'"
    End Sub

    One possibility is to use the workbook_open event to prompt for and store the password temporarily in the registry. Add the following code to the thisworkbook module of the workbook
    Option Explicit
    Private Sub Workbook_Open()
    Dim strPassword As String
    strPassword = GetSetting("myApp", "Config", "Password", "")
    If strPassword = "" Then
    strPassword = InputBox("Enter password")
    SaveSetting "myApp", "Config", "Password", strPassword
    End If
    lbl_Exit:
    Exit Sub
    End Sub
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    RegKeyDelete "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\myApp\Config\"
    If RegKeyDelete("HKEY_CURRENT_USER\Software\VB and VBA Program Settings\myApp\") = True Then
    MsgBox "Password cleared"
    Else
    MsgBox "Password not stored"
    End If
    lbl_Exit:
    Exit Sub
    End Sub
    Function RegKeyDelete(i_RegKey As String) As Boolean
    Dim myWS As Object
    On Error GoTo ErrorHandler
    Set myWS = CreateObject("WScript.Shell")
    myWS.RegDelete i_RegKey
    RegKeyDelete = True
    Exit Function
    lbl_Exit:
    Exit Function
    ErrorHandler:
    RegKeyDelete = False
    GoTo lbl_Exit
    End Function
    Then modify your macro code as follows:
    Sub Test_SSIS()
    Dim strPassword As String
    Dim conn As Object
    strPassword = GetSetting("myApp", "Config", "Password", "")
    If strPassword = "" Then
    strPassword = InputBox("Enter password")
    SaveSetting "myApp", "Config", "Password", strPassword
    End If
    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "sqloledb"
    conn.Open "DATA SOURCE=MYSERVER;USER ID=JOHNDOE;Password=" & strPassword & ";"
    conn.Execute "exec msdb.dbo.sp_start_job 'Test_remote_job_execution'"
    End Sub
    The workbook must obviously be saved as macro enabled
    This will then prompt once when the workbook is opened. When the macro is run it will read the password from the registry thus not requiring a prompt, unless for some reason the password is missing or nothing has been entered as a value in the first box.
    When the workbook is closed, the workbook before close event deletes the registry entries completely.
    The only snag to this is if the workbook is crashed, the registry entry is not removed and there will be no prompt next time, until the workbook is closed correc tly. This might not be an issue, if the users don't know about it, so hide your code from them.
    Graham Mayor - Word MVP
    www.gmayor.com

  • Variable isn't holding the value (strings, numbers.. anything)

    Hi Thanks in advance for taking a look, I've been trying to
    display a value from a variable, in this case just text. Here is
    what i'm doing;
    made a text box on the stage called it messageBox_txt (set it
    to dynamic)
    in the code on other layer, i wrote;
    var Message:String = "This is a test message";
    messageBox_txt.text = Message;
    when i run this it is blank and these instructions are from
    the Flash 8 textbook so they can't be wrong. is there a chance i
    need to change some setting? but it didn't work on the machine to
    me either. i'm in a computer lab.
    Any help from one of you gurus would be a get assist, unless
    i'm just jinxed let me know

    Have you embedded the fonts in the text field (just
    checking)?
    1) Select the text field
    2) Click "Embed..."
    3) Select the characters you want to embed (I usually click
    on Uppercase and then shift-click on Punctuation to select
    uppercase, lowercase, numerals and punctuation)
    4) When they are highlighted click OK.

  • Problems by holding the typed Values in Fields by using "LEAVE TO SCREEN"

    Hello Experts,
    I have created a Dynpro  with many field.
    Some Fields are Fields without searchhelps and a part of this Fields have searchhelps.
    One of this Field has a special function.
    It is a Field where you can choose a key value ( an ID number) about the searchhelp.
    After choosing I get the other values for this ID-Number in the returnparameter of the Searchhelp function
    ( values like name, surname ....)
    I set this return values  to the Fieldvariables in the PBO.
    For jumping to PBO I use "Leave to Screen" to the same screen.
    But the Problem is I can not hold the values wich I have typed before  in the Dynpro Fields (Field without serachhelps).
    After using the Field with the Searchhelp (for ID)  the Fields with typed Value go away.
    Please Hel me . Thanx in Advance
    Cetin

    Hi,
    In SE80 double click on your Screen Number and go to the Attributes Tab and Select Hold Data Check box,
    The Help Obtained from F1 Help is as follows, Kindly note this is Copied from F1 Help provided by Standard SAP,
    You too can Check it out
    "SAP Says --->
    If you activate this option, the following functions are supported for
    the screen at runtime:
    System -> User profile -> Hold data
                            -> Set data
                            -> Delete data
    The Hold data function allows you to hold onto any entries you have made
    on the screen. When the screen is next processed (even in a different
    mode), the system then automatically redisplays the data in the input
    fields.
    If the option is not activated, these functions are ineffective at
    screen runtime.
    The "Hold Data" option is not supported for include screens
    (subscreens). The automatic insertion of held data is exclusively
    controlled by the main screen.
    Cheerz
    Ram

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • Custom Rule - Problem in passin values From Rule Container to WF Container?

    Hi Guys,
    I am having hard time passing values back from my custom rule. I have created a custom rule to determine the agents in PFAC which takes in the Person number as import element of container. It determines the Manager as agent and I am passing Managers Person Number back to workflow. If he dont approve the Request then it will be passed to his boss. In this case I will pass this imported Mangers Person number back to rule so that his boss will be determined as agent. I  have created ZRULE function module. I am passing value back from Rule container to Workflow Container using following code.
    swc_set_element ac_container 'SUPERPERNR'  lf_super_pernr.
    I have created a element SUPERPERNR on rule container and workflow container as well .The problem is in the Rule container I am not able to create SUPERPERNR as export parameter. The tick mark is grayed out and there is no option for setting it as export.
    My question is do I have create a Export element on Rule container or Not? If i just write the code
    ( swc_set_element ac_container 'SUPERPERNR'  lf_super_pernr ) will it set the value in WF container? In my case it is not setting. I have to bind the values from rule container to WF container and if My rule container element is not allowing me to click the tick mark as export how can i pass value of of rule container back to WF Container?
    Please help me guys.
    Thanks,
    Manish.

    Hi Manish,
         Same scenario I have developed in my system. This all steps I did in my system.
    1) Created a Z function module which takes import parameter (Parameter name = 'EMP') in the
        format 'US100123'.
    2) This in turn fetches back the supevisor or boss as an export parameter (Parameter name = 'BOSS') in
         the format 'US100245'.
    3) This function module is attached to a BUS object(SWO1).
    4) While attaching this function module to BUS object you need not do any manual coding it is done
        automatically.
    5) Implement, release and generate this BUS object.
    6) Create a new variable in your workflow (Parameter name = 'ZSUPERVISOR') for storing the value
        which is returned by the Z method.
    7) Create a new task.
    8) Put in your BUS object name, then your Z method name, select background processing checkbox.
    9) Press save, it will ask for transfer of missing elements, select yes.
    10) Then you will see a green button below your Z method name click on it.
    11) Top portion contains your Z method variables, below to it you have the import parameter window in
          this window you should have &EMP& -> &EMP&., below to import parameter window you have
          export parameter window in this window you should have &BOSS& <- &BOSS&. (This is method
          binding).
    12) Now click on enter button then click on back button it will generate the task binding automatically
         just press yes.
    13) Now click on binding exist button.
    14) Here you have the Workflow container variables as well as the system container variables.
    15) In the import parameter window left portion is for your workflow variables and right portion is for your 
          method variables. In my case i had sent workflow initiator and fetched his supervisor. The Import
          parameter binding was &WF_INTIATOR& -> &EMP&. and the export parameter binding part was
          &ZSUPERVISOR& <- &BOSS&.
    16) Save the task and run the workflow.
    Regards.
    Vaibhav Patil.

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

Maybe you are looking for