Create a Update Routine to populate Particular records.

Hi,
The Lower level ODS (ZGSD_O01) has the key fields Document Number and Document Item.
The value for GI_STS will be C for each item when it is PGI'd (Actual Goods Issue Date) and will be in other status (A or B) until it is PGI'd.(that means the order is not complete).
The data on the ODS will be:
Goods Issue Status Last Actual Goods Issue Date of an Order Shipping point Sales document Fiscal year variant Sales document item Tolerance Limit for Under Delivery in % Net price Quantity Confirmed as Requested Desired Delivery Quantity
C 5/23/2006 CDC1 0000000045 Z1     50 0 0.88 0 0
C 5/23/2006 CDC1 0000000045 Z1     60 0 0.88 0 0
C 5/23/2006 CDC1 0000000045 Z1     70 0 0.88 0 0
C 5/23/2006 CDC1 0000000045 Z1     80 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1     90 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1    100 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1    110 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1    120 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1    130 0 0.88 0 0
C 5/24/2006 CDC1 0000000045 Z1    140 0 0.88 0 0
C 5/25/2006 CDC1 0000000045 Z1    150 0 0.88 0 0
C 5/25/2006 CDC1 0000000045 Z1    160 0 0.88 0 0
C 5/25/2006 CDC1 0000000045 Z1    170 0 0.88 0 0
C 5/25/2006 CDC1 0000000045 Z1    180 0 0.88 0 0
C 5/26/2006 CDC1 0000000045 Z1    190 0 0.88 0 0
C 5/30/2006 CDC1 0000000045 Z1    200 0 0.88 0 0
A           CDC1 0000000045 Z1    210 0 0.88 0 0
C 5/31/2006 CDC1 0000000045 Z1    220 0 0.88 0 0
C 6/1/2006 LV01 0000000045 Z1    230 0 65.6 0 0
C 6/1/2006 CDC1 0000000045 Z1    240 0 65.6 0 0
I need a logic to look in to the entire order items at lower ODS and then populate this 1 record in top ODS with the inclusion of status fields. If all the values of GI_STS are C, then a record should be populated with last item's AGI data and this. If not, a record should populated with the GI_STS either A or B.
Can any one help me in witing a routine in the update rules of 2nd level ODS.
here is the base code at present in the update rules.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line  -
TABLES:/BIC/AZGSD_00100.
Data: T_ZGSD_001 like /BIC/AZGSD_00100 occurs 0 with header line.
DATA: l_number_of_days TYPE i,
      n TYPE i.
      DATA: IN    TYPE F,
      OUT   TYPE F,
      DENOM TYPE F,
      NUMER TYPE F.
$$ end of global - insert your declaration only before this line   -
FORM compute_data_field
  TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
  USING    COMM_STRUCTURE LIKE /BIC/CS8ZGSD_001
           RECORD_NO LIKE SY-TABIX
           RECORD_ALL LIKE SY-TABIX
           SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
  CHANGING RESULT LIKE /BIC/AZGSD_O0300-/BIC/ZO_STS
           RETURNCODE LIKE SY-SUBRC "Do not use!
           ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line        -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
<b>IF COMM_STRUCTURE-LST_A_GD NE ' ' AND
     COMM_STRUCTURE-GI_STS EQ 'C'.
  RESULT = 'C'.
ELSE.
RESULT = ' '.
ENDIF.</b>* if abort is not equal zero, the update process will be canceled
  ABORT = 0.
$$ end of routine - insert your code only before this line         -
please make changes in this to get records as described above.
Regards,
Message was edited by: Satish Muppala
Message was edited by: Satish Muppala

hi nagesh,
here the data in 1st level ODS is like this.
Goods Issue Status, Last Actual Goods Issue Date, Sales document, Fiscal year variant, Sales document item, Tolerance Limit,Quantity Confirmed
C, 5/23/2006, CDC1, 0000000045 ,Z1,     50, 0, 0.88 ,0, 0
C, 5/23/2006, CDC1, 0000000045, Z1,     60 ,0, 0.88, 0, 0
C, 5/23/2006, CDC1, 0000000045, Z1,     70 0 0.88, 0, 0
C, 5/23/2006,CDC1, 0000000045, Z1,     80, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045, Z1,     90, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045,Z1,    100, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045, Z1,    110, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045, Z1,    120, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045, Z1,   130, 0, 0.88, 0, 0
C, 5/24/2006, CDC1, 0000000045, Z1,    140, 0, 0.88, 0, 0
C, 5/25/2006, CDC1, 0000000045, Z1,    150, 0 ,0.88, 0, 0
C, 5/25/2006, CDC1, 0000000045, Z1,    160, 0, 0.88, 0, 0
A,          ,CDC1, 0000000045, Z1,    210, 0, 0.88, 0, 0
C, 5/31/2006, CDC1, 0000000045, Z1,    220, 0, 0.88, 0, 0
C, 6/1/2006, LV01, 0000000045, Z1,    230, 0, 65.6, 0, 0
C, 6/1/2006, CDC1, 0000000045, Z1,    240, 0, 65.6, 0 ,
If suppose for a sales document no all the reocrds is Having GI_STS as 'c' then the last record with latest date should be populated.
i.e. C, 6/1/2006, CDC1, 0000000045, Z1,    240, 0, 65.6, 0 ,
If GI_STS is having status other than C i.e A or B. then it should populate A or B records.
i.e A,          ,CDC1, 0000000045, Z1,    210, 0, 0.88, 0, 0
with regards,
sreekanth.

Similar Messages

  • Update Routine to populate 0VENDOR from either of the 2 data source fields

    Hi,
    I have a requirement to write an update routine for 0VENDOR based on the below logic :
    Create routines to populated BW Info Object u201CVendoru201D (0VENDOR) based on the following logic:
    IF field u201CVendoru201D (ITM_VENDOR_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
    ELSE IF u201CPreferred Vendoru201D (ITM_PROPVEN_ID) is populated from data source 0BBP_SC_TD_1, THEN populate 0VENDOR with that value
    ELSE IF neither u201CVendoru201D (ITM_VENDOR_ID) or u201CPreferred Vendoru201D (ITM_PROPVEN_ID) are populated from data source 0BBP_SC_TD_1, then 0VENDOR = NULL
    Can anyone help me in converting this logic into ABAP routine.
    Thanks,
    Suchitra

    Hi Suchitra,
    In the Transfer Rules ... You will be mapping each field then the mapping field click on the button with Triangle then you can see the which type you want.
    Then select the routine and select the datasource fields (don't forget to select the both fields VENDOR and PROPITM)...
    Then give a name to routine ...
    and in the code just change the COMM_STRUCTURE to TRANSFER_STRUCTURE.
    Then you can get this .... done..
    Regards,
    Ravi Kanth

  • Update routine to populate value for field ZDOCCATG(Document category)

    Hi Experts,
       I need to populate  data for field ZDOCCATG(Document Category) based on the value of the below  two fields,
    1. 0deb_cre_lc(Debit / credit Amount)
    2. 0ac_doc_typ(Belegart)
    The logic is as follows:
    if 0deb_cre_lc > '0'.
         if 0ac_doc_typ == 'dz'.
          ZDOCCATG = Disputes.
         else
      ZDOCCATG = Invoices.
       end If.
    else
    if 0ac_doc_typ < '0'.
    ZDOCCATG = Credits.
    end if.
    I need to write the update routine to get the values assigned for Document category based on these two fields. When i open the routine for the field ZDOCCATG, i can see the below screen:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      RESULT = .
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Please let me know the code to be inserted (based on the logic mentioned above) in the above screen . Thanks
    Regards,
    Kavitha Jagannath

    Hi Kavitha,
          Supposing the technical name of fields is /bic/0deb_cre_lc and /bic/0ac_doc_typ use the code below at the marked position.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line -
    TABLES: ...
    DATA: ...
    $$ end of global - insert your declaration only before this line -
    FORM compute_data_field
    TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
    USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
    RECORD_NO LIKE SY-TABIX
    RECORD_ALL LIKE SY-TABIX
    SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
    CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
    RETURNCODE LIKE SY-SUBRC "Do not use!
    ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine                 
    <----- Paste the code below as shown here --->
    if comm_structure-/bic/0deb_cre_lc > 0.
      if comm_structure-/bic/0ac_doc_typ == 'DZ'.
       result = 'DISPUTES'.
      else
       result = 'INVOICES'.
      endIf.
    elseif comm_structure-/bic/0deb_cre_lc < 0.
      result = 'CREDITS'.
    end if.
    <----
    >
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    $$ end of routine - insert your code only before this line -
    ENDFORM.
    Regards:
    Jitendra
    Edited by: Jitendra Gupta on Oct 15, 2009 3:05 PM

  • Maintaining the mapping information and writing update routine to populate

    Hi,
    Its my requriment to get the transactional data from r/3, here in the transaction data i will get the data in following format
    (for example)
    Material no.   Sales value    quantity ..
    M001              100           2
    M002              200           4
    M003              150           3
    now my requirement is to take the quantity per material number and multiply it with a factor called as SBU factor
    .. my problem is that this SBU factor is not maintained in r/3 means the mapping information of material no. with its relative SBU factor is not maintained. So i thought of two option as this mapping is fixed means it will not changed so we can maintain in bw system through 1) one time upload of flat file or
    2) maintaning a table in BW with mapping
    so users agreed to give the mapping information as follows
    Material no.    SBU factor
    M001              5
    M002              10
    M003              7
    now while uplading the transational data i need to take the SBU factor per material that is maintained through flat file or table and multiply it with quantity and store it quantity.
    for example(the result i need in cube)
    material no.   sales value    quantity(quantity * SBU)
    M001             100           2*5=10
    M002             200           4*10=40
    M003             150           3*7=21
    so i can do this at two level at transfer rules or update rules.
    I need following clarification
    1) shall i load the mapping information through flat file or maintain it in table?
    2) If i will do the transformation at update rules so wht routine (start or update) should i write to get the SBU factor per material and do transformations
    If possible send the sample routine.
    Pls reply ASAP.
    Thanks
    Saleem.

    Hi Saleem,
    Nimesh is right..Do the multiplication in the Update rules.
    If the data for this SBU factor is less and is always fixed, you can go for one time upload, else set up a RFC Call to load this data to BW from R/3 if no datasource for the same exist.
    Else you can also maintain a table in BW, in which one time upload could be done by writing an ABAP, or manually. And then you can provide authorizsation to add more values to it, so that the table can be maintained.
    And then in Update rules, use the table for look up and get the SBU Factor per material.
    Some thing like
    Select * from the <ODS table or Table name> into <internal table>
    Loop at Data_Package.
    Read table <internal table> for all values in Data_Package where internal table-Material = Data_package-MAterial.
    If sy-subrc = 0.
    Sales Value = Sales Value * internal table-SBU Factor.
    ENDIF.
    MODIFY DATA_PACKAGE.
    ENDLOOP.
    You might need to make more changes to this code as required.
    Assign points if useful
    Regards
    Rohit

  • Creating Search prompt to display a particular record row

    Hi,
    I have a crystal report with an Excel sheet as my data source.
    I want to create a prompt which would ask for a certain value (say, "name") and when we enter a name (say "John") ; it will display the record row(age, income, savings, etc..) for the Name "John". (if multiple "john"s exist; it will display all the records with name- "John").
    Basically, i want to create a "search" function.
    Can you please help me understand how to create one like this. I am new to Crystal report. I have tried using Parameters but not able to make it happen.! 
    Thanks,
    Aditi

    Hi Aditi,
    Please follow these steps:
    1) Create a string parameter. You may choose to create a dynamic/static parameter. In the parameter creation screen, you can also choose to select the 'value' field and you can select the Name field from the database here. This will give a list of Names when the report is run. Skip this if you do not want it this way, that is, if you wish to manually type in the value
    2) Go to the Record Selection Formula (Report > Selection Formulas > Record) and use this formula:
    = {?Parameter_Name}
    Place the fields you want on the details section and the run the report.
    Hope this helps!
    -Abhilash

  • How to create an update page

    i want to create an update page using dreamweaver and record set, i succeded but it only updates the database with user id of 1. even if i login as another user with id of 3, it keeps updating the user with id of 1.please help me, a lost. below is my code:
    <?php require_once('Connections/conn_login.php'); ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && true) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "login.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {  
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
      $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE login SET username=%s, pwd=%s, `role`=%s, firstname=%s, lastname=%s, country=%s WHERE userID=%s",
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['pwd'], "text"),
                           GetSQLValueString($_POST['role'], "text"),
                           GetSQLValueString($_POST['firstname'], "int"),
                           GetSQLValueString($_POST['lastname'], "int"),
                           GetSQLValueString($_POST['country'], "int"),
                           GetSQLValueString($_POST['id1'], "int"));
      mysql_select_db($database_conn_login, $conn_login);
      $Result1 = mysql_query($updateSQL, $conn_login) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_Recordset1 = "-1";
    if (isset($_GET['userID'])) {
      $colname_Recordset1 = $_GET['userID'];
      $_SESSION['userID'] = $_GET['userID'];
    $colname_Recordset1 = "-1";
    if (isset($_GET[''])) {
      $colname_Recordset1 = $_GET[''];
    mysql_select_db($database_conn_login, $conn_login);
    $query_Recordset1 = sprintf("SELECT userID, username, pwd, `role`, firstname, lastname FROM login WHERE userID = %s", GetSQLValueString($colname_Recordset1, "int"));
    $Recordset1 = mysql_query($query_Recordset1, $conn_login) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Scuba2u</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <?php include('headerScuba2u.php'); ?>
    <div id="main">
        <div id="left">
          <h1>Registration Form</h1>
          <fieldset>
            <legend>Register for our website</legend>
            <form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
              <p>
                <label for="firstname">First Name</label>
                <input name="firstname" type="text" id="firstname" size="30" maxlength="40" />
              </p>
              <p>Last Name
                <label for="lastname"></label>
                <input name="lastname" type="text" id="lastname" size="30" maxlength="40" />
              </p>
              <p>Country
                <input name="country" type="text" id="country" size="30" maxlength="30" />
              </p>
              <p>Email
                <label for="email"></label>
                <input name="email" type="text" id="email" size="60" maxlength="60" />
              </p>
              <p>Password
                <label for="pwd"></label>
                <input name="pwd" type="password" id="pwd" size="10" maxlength="10" />
              </p>
              <p>
                <input name="role" type="hidden" id="role" value="guest" />
                <input name="id1" type="hidden" id="id1" value="<?php echo $row_Recordset1['userID']; ?>" />
                <input type="submit" name="submit" id="submit" value="Register" />
              </p>
              <input type="hidden" name="MM_update" value="form1" />
            </form>
          </fieldset>
        </div>
    </div>
    <?php include('footerScuba2u.php'); ?>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

    Temporarily change your id1 field from a hidden field to a text field so you can see if it is being set correctly for the logged in user.

  • Infostructure update routine : debug problem

    Hi All,
    We have created three update routines for three corresponding infostructures. But I am not able to debug this routine. I tried to put a hard breakpoint also, but it was of no use. The Infostructure logs the changes in the sales order.
    How can I get the list of objects that are accessible in these routines?
    How can I view the values of MCVBAP and MCVBAK(communication structures) that are used in the update routines?
    How can I debug such routines?
    From where does these structures, MCVBAK and MCVBAP, get value? Are these runtime values? How much time does it take normally take for the infostructure to be updated? or is it updated immediately when the sales Order is saved?
    Thanks,
    Jiten

    Hello,
    some hopefully helpful answers:
    - the MCVBAK / MCVBAP are structures, that are built from the orderdata in the function MCV_STATISTICS_ORDER. There are two exits EXIT_SAPLMCS1_001 (header Data) and EXIT_SAPLMCS1_002 (position data) where you could fill additional user fields in these structures. Additional fields you could define in the structures MCVBAKUSR or MCVABPUSR.
    - the time that it takes to get an infostructure updates depends on it's customizing of updating (transaction OM01). the possibilities are: no update, update in V1-posting, update in V2-posting, update in batch.
    - Helpful are folling transactions: MC30 ( shows the update logs, you have to set the parameter MCL = 'X' in your userdate, see OSS - Note 77427) , MCVR (simulation of update).
    Regards Wolfgang

  • Start routine for insert a record by each day in a range of dates

    Hi all,
    I need create a start routine for insert 1 record by each day in a range of dates:
    example:
    Actual.
    DATE_I             DATE_F          TIME_I       TIME_F      TIME_minutes
    04/04/2008       05/04/2008     13:40:00     23:00:00        2000
    Result:
    DATE_I             DATE_F          TIME_I       TIME_F      TIME_minutes
    04/04/2008       04/04/2008     13:40:00     24:00:00        X
    05/04/2008       05/04/2008     00:00:00     23:00:00        Y
    I thanks any help.
    regards.
    Alberto.

    Hi Alberto,
    What I understood from your requirement is that you want to split the record into 2 since you have 2 dates coming from the source.
    In the transformations you will have to create new rule group one for each of the dates.
    You can create the new rule group by clicking on the 'Rule Group' button and then clicking on the 'New Rule Group'.
    In the newly created rule groups take care to distribute data for each date separately.
    Hope it is clear.
    All the best...
    Regards,
    Krishna

  • How to populate the variable created in start routine to a field.

    Hi
    I have created a variable ZCUST in the Start routine and I have written some code to populate this value. Now there is a field in the update rules, Z_YTCUST. I want to assign the result of the variable created in start routine to this field. How can I go abt doin this? I have tried but for some reason the result shows 0.
    Thank you.

    Hi,
           Make sure the variable used in the start routine is a global variable. then assign the value u get it from the start routine in the update rule result field.

  • How to create monitor entries from an update routine?

    Hi,
    Does anyone try to create monitor entries in ABAP routine in update rules?
    I have How-to guide "How to... Create monitor entries from an update routine". I applied code from it.
    RETURNCODE = 1.
    MONITOR-MSGID = 'RSM'.
    MONITOR-MSGTY = 'W'. *** I also tried MONITOR-MSGTY = 'E'
    MONITOR-MSGNO = '799'.
    MONITOR-MSGV1 = 'My message '.
    MONITOR-MSGV2 = COMM_STRUCTURE-<MY_FIELD>.
    append MONITOR.
    EXIT.
    But it doesn't work. I don't see new lines on Details tab in AWB Monitor.
    What's wrong?
    BW 3.0B

    Hi, hope you had a good weekend.
    I tried with MSGTY = 'I' and I didn't get any errors or warnings at load.
    In the monitor, on the detail tab, I find hidden under:
    Processing (data packet)
    -> Data Package x
       -> Transfer rules
          -> Data records for package x
             -> Record 0:
             -> Record 0:
             -> Record 0:
    When I select "Display Message(s)" from the dropdown-menu on one of these "Record 0:" lines, I get to see
    my message text: S:RSM:000 test1 test2
    1) how can I change the text that appears in the monitor tree ("Record 0:") ?
    2) The status of these nodes is always a green led (also with MSGTY = 'W')... shouldn't it be a yellow triangle?
    Like this it is hell to find your warnings/information messages.
    3) I cannot find my monitor messages with transaction SLG1... should I be able to find them there?
    Kind regards,
    Edwin

  • HI... Create\Update pricing in Purchase Info Record

    Hi Guru's,
    I have got requirement to create or update the pricing condition in purchase info record (PIR).I have used below function modules to create or update General and purchase information for PIR but using those function module, im not able to create or update pricing condition..
    ME_INITIALIZE_INFORECORD
    ME_DIRECT_INPUT_INFORECORD  - Create new entries in PIR
    ME_MAINTAIN_INFORECORD - Change the PIR
    ME_POST_INFORECORD
    I have tried the below function module to create or update pricing condition,here issue is function module successfully executed but it was not upating PIR.
    ME_PRICING_REFRESH
    ME_PRICING_DIALOG
    ME_PRICING_INFORECORD
    Could you please provide any sample code / function module to update the pricing condition in PIR.
    Thanks in Advance.

    Dear Shivakumar,
    Can you kindly provide sample code for the function module MASS_CHANGE_PURINFO_REC? I found it is difficult to figure out how to populate the import parameters. And the Where-used function didn't return any result, so I can't even refer to the standard program. Thank you!
    Regards,
    Arwen

  • Update the particular RECORD which is already exist in the table

    EXPERTS,
    AM USING JDEV VER11.1.1.4.0 n am using adf business components.
    SEE this my snapshot.
    http://www.4shared.com/photo/fullsize/hpoeMX1o/1_online.html
    THIS MY TABLE
    DESC glm_control;
    FIELD Name Null DATA Type
    GLMCTRL_BU                     NOT NULL VARCHAR2(5)
    GLMCTRL_ACCT_LENGTH NOT NULL NUMBER(3)
    GLMCTRL_ALLOW_UPD_RJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_UPD_DJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_UPD_AJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_CAN_RJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_CAN_DJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_CAN_AJ NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_INS_RJ_PC NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_INS_GJ_PC NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_INS_DJ_PC NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_POST_GJ_PO NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_PYE_RJ_UP NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_PYE_AJ_UP NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_PYE_DJ_UP NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_PYE_GJ_UP NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FIN_AJ_POST NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FIN_RJ_POST NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FIN_DJ_POST NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FPC_GJ_CHK NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FPC_AJ_CHK NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FPC_RJ_CHK NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_FPC_DJ_CHK NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_ZERO_DJ_POST NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_CHNG_BUD_OPT NOT NULL VARCHAR2(1)
    GLMCTRL_ALLOW_NS_FIN_YEAR NOT NULL VARCHAR2(1)
    GLMCTRL_CRE_BY NOT NULL VARCHAR2(15)
    GLMCTRL_CRE_DATE NOT NULL DATE
    GLMCTRL_UPD_BY VARCHAR2(15)
    GLMCTRL_UPD_DATE DATE
    GLMCTRL_AMC_REC NOT NULL VARCHAR2(1)
    GLMCTRL_DATE_JRNL NOT NULL VARCHAR2(1)
    GLMCTRL_CLR_JRNL NOT NULL VARCHAR2(1)
    GLMCTRL_EX_QTY NOT NULL VARCHAR2(1)
    GLMCTRL_EXP_PERIOD NOT NULL NUMBER(7)
    GLMCTRL_EXP_DAYS NOT NULL NUMBER(7)
    GLMCTRL_LC_FIN_IMP NOT NULL VARCHAR2(1)
    GLMCTRL_AUTO_OFFSET_DEL NOT NULL VARCHAR2(1)
    GLMCTRL_GRN_INV_RND_OFF NOT NULL NUMBER(3)
    GLMCTRL_INV_PYMT_RND_OFF NOT NULL NUMBER(3)
    GLMCTRL_INV_RCT_RND_OFF NOT NULL NUMBER(3)
    GLMCTRL_LVL1_DESC VARCHAR2(30)
    GLMCTRL_LVL2_DESC VARCHAR2(30)
    GLMCTRL_LVL3_DESC VARCHAR2(30)
    GLMCTRL_LVL4_DESC VARCHAR2(30)
    GLMCTRL_CFS_AMT_FMT VARCHAR2(1)
    GLMCTRL_SERV_TAX_CR_OPT VARCHAR2(1)
    GLMCTRL_REJ_WAR_OPT VARCHAR2(1)
    GLMCTRL_CASH_AMT NUMBER(15,3)
    GLMCTRL_INV_RND NUMBER(5)
    GLMCTRL_SHR_COST_TYPE VARCHAR2(2)
    GLMCTRL_TAX_AMT_FLAG VARCHAR2(1)
    GLMCTRL_OPDATE DATE
    GLMCTRL_OP_YEAR NUMBER(6)
    GLMCTRL_RG_CTRL VARCHAR2(1)
    THIS TABLE CONTAINS MOREOVER 25 RECORDS.
    I WANT TO DO THE FOLLOWING USECASE:
    1. I WANT TO SHOW THE PARTICULAR RECORD RELEATED TO THAT PARTICULAR FIELDS IN MY PANEL BOX AND
    2. AND ALSO UPDATE THE PARTICULAR 4 FIELDS WHICH IS SHOWN IN MY PANEL BOX
    IF YOU NOT UNDERSTAND I WILL GIVE THE EXAMPLE WATCH IT.
    glm_control - THIS MY TABLE - THIS MY RECORDS
    IT CONTAIN 1..TO ..25 RECORDS.
    GLMCTRL_BU || GLMCTRL_LVL1_DESC || GLMCTRL_LVL2_DESC || GLMCTRL_LVL3_DESC || GLMCTRL_LVL4_DESC
    1. MEL || EXPL1 || EXPL2 || EXPL3 || EXPL4
    15. UIL || XPL1 || XPL2 || XPL3 || XPL4
    25. DIL || PL1 || PL2 || PL3 || PL4
    1*. I WANT TO SHOW FOUR OF THE FIELDS (GLMCTRL_LVL1_DESC GLMCTRL_LVL2_DESC GLMCTRL_LVL3_DESC GLMCTRL_LVL4_DESC) OF THE (*'UIL'* - NOTHING BUT IT IS DATA WHICH IS IN GLMCTRL_BU FIELD).
    I WANT TO UPDATE THOSE FIELDS(GLMCTRL_LVL1_DESC GLMCTRL_LVL2_DESC GLMCTRL_LVL3_DESC GLMCTRL_LVL4_DESC) OF A PARTICULAR RECORDS
    BASED ON THIS CONDITION. GLMCTRL_BU = 'UIL'
    THIS UPDATION DONE WITH THE HELP OF BUTTON.
    I FACING THE FOLLOWING PROBLEM:
    BUT HERE FIRST RECORD OF THE TABLE IS  SHOWN. SEE THE SNAPSHOT.
    ONLY U SEE THIS SNAPSHOTS.
    http://www.4shared.com/photo/fullsize/hpoeMX1o/1_online.html
    ATLAST I NEED TO SHOWN PARTICULAR RECORD(NOT ALL RECORD) IN PANEL BOX. THAT PARTICULAR RECORD BASED ON THE CONDITION.
    AND ALSO UPDATE THE REOCRD WITH THE HELP OF BUTTON.
    CAN ANY ONE HELP ME.
    i think so it can be done with viewrowimpl class we can done it.
    but i dono how to proceed?
    note: am newbie.
    please help me.

    Hi,
    just use a ViewCriteria on the View Object query. Then drag and drop the ExecuteWithParams operation as a paremeter form to the page and ensure pressing the search button partially refreshes the table
    Frank

  • Create id, update id with date for each record

    Hi,
    Please give me brief idea or document for this concept:
    I need create id, create date, update id, update date for each record inserted or updated in database (in few tables).
    1) how user id can be obtained?
    2) Is it better if i use views instead of tables for this?
    3) is it possible for each record?
    Please show me complete scenario. a piece of code can also be helpful.
    thanx in advance.

    only.ashish99 wrote:
    Hi,
    Please give me brief idea or document for this concept:
    I need create id, create date, update id, update date for each record inserted or updated in database (in few tables).
    1) how user id can be obtained?SELECT
    2) Is it better if i use views instead of tables for this?It depends.
    post EXPLAIN PLAN for both.
    3) is it possible for each record?yes
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Enable or disable particular record in list item based on a corresponding c

    Hi,
    How can i Enable or disable property of particular record in list item (multi record) based on a corresponding check box(multi record) ,
    e.g Form Structure:
    if press a button then record should populate where multi_post_query
    if my_check_box = 1 then
    my_list_item  disable to update;
    else
    my_list_item  enable to update;
    end if;
    now wanted result is like below
    my_check_box ---- my_list_item
    +----------------------enable
    +----------------------enable
    +----------------------enable
    _----------------------Disable
    _----------------------Disable
    Here "+" means checked,"_" means unchecked and "enable" means updatable "Disable" means not updatable
    the pseudo code is like,
    if my_check_box = 1 then
    my_list_item enable to update;
    else
    my_list_item disable to update;
    end if;
    Note: my_check_box is not updatable
    please tell me which trigger and where I should create
    Thanks
    Edited by: 838602 on Feb 21, 2011 11:12 PM
    Edited by: 838602 on Feb 22, 2011 1:40 AM

    Hi Abdetu,
    I created WHEN-NEW-RECORD-INSTANCE Trigger at data block level
    And I need should work like below pseudo code (sorry for previous pseudo code)
    if my_check_box = 1 then
    my_list_item  disable to update;
    else
    my_list_item  enable to update;
    end if;
    so change code as
    IF :MULTI.PROTECTED_FIELD = 1 THEN
    SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_FALSE );
    SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_FALSE);
    :multi.action := 0;
    ELSE
    SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_TRUE);
    SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_TRUE);
    END IF;
    Sorry, still I am not getting desired o/p. even i check item (ACTION) level Trigger
    Note: my_check_box is not updatable
    that would assign at time of button press (post query) as i mentioned
    Edited by: 838602 on Feb 22, 2011 1:41 AM

  • Update Routine ... Help me Please--VERY URGENT

    Hi All ,
    I Moving data from Cube to ODS . Let me explain abt the records in the cube .
    There are 6 key figures in the cube as well as dimensions, UNIQKEY TRANSACTION is One Dimension and ARTICLE is another dimension which is having an Navigational attribute called CORE ELEMENT.
    I am showing the data with those two dimension and the key figures which are to be used in the routine.
    Charc----
    Key Figures
    UNIQKEY-ARTICLE-Coreelement--
    billqty     
    in base unit
    A00N----1006330--1--
    10.5
    A00M -
    1006320----2--
    2.5
    A00P-----1006330--1--
    10.5  
    A00P-----1006320--2--
    2.5
    A00Q-----1006320--2--
    2.5
    A00Q-----1006340--3--
    10.5
    Now Lets see what the core element numbers mean,
    core element 1 means -- fuel .
    Core elemnet other 1 -- food .   
    I need to move these data into ODS Which will have an extra field called No of items in the transaction --ITEMS.For this i need to write  a routine .
    The Logic is ...
    1.if Materail is of type 1(Means if the core element - 1)
    I need to Populate the No of items in tnx = 1 .--ITEMS.
    2.If Material is of type(Means if the core element)2or 3 I need to populate the billing quantity to the no of transcations.--ITEMS
    3. If the Uniqkey tanscation contains two line items as  suppose that you have 20 litres of fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing Quantity in BUoM 22
    billing quantity in BUoM = 20 litres for the first line item and 2 for the second line item...
    then as the first line item is fuel, field No OF Items in the Transcation should be 1 (replacing the 20) + 2 = 3
    so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the Transcation= 3
    So the ODS Data should look like this.
    UNIQKEY--billqty--
    ITEMS
    in base unit 
    A00N--10.5--
    1
    A00M--2.5--
    2.5
    A00P--13--
    3.5
    A00Q--13--
    12.5  
    NOTE : IN the ODS only the UNIQKEY IS THE KEY FIELD and the rest are DATA FIELDS.
    I Posted this one before also. But didnt get proper responses.
    I am Pasting the piece of code which I have written . This code will work for the first two records in the cube , But it is failing for the UNIQKEY Transcation having Line items.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BI0/PMATERIAL.
    DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
           CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    check not COMM_STRUCTURE-material is initial.
      select SINGLE RPA_WGH1
            INTO CORE_ELEMENT
            from /BI0/PMATERIAL
            where
            material = COMM_STRUCTURE-material
            and  OBJVERS <>'D'.
       IF CORE_ELEMENT EQ '1'.
       TITEMS = '1'.
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
             input         = titems
          IMPORTING
            OUTPUT        = titems
       ELSE.
       TITEMS = COMM_STRUCTURE-BILL_QTY.
       ENDIF.
    result value of the routine
      RESULT = TITEMS..
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    PLease give me ideas on how to acheive this . As I am not Aware of ABAP very well.. PLease try to give me the code. I hope one of you may got the same requirement before.
    Its very urgent and I need to deliver it today itself.
    Thanks in advance , you can mail me to [email protected]. If anybody intersted to discuss this Issue they can reach at +91 9845922955.

    Hi ,
    While I am moving the data from cube to ods . I need to create the update rules with cube -- 8cube . WHen i am doing this the billqty is a key figure in cube so that is not a problem but the ITEMS is not there in the cube ,SO for that I need to write a routine to populate that one.
    Its strange but the user what to analyse with the UNIQKEY transaction. And these objects will be added as navigational attributes to the Characteristic. as it acts as another dimension.
    He wants to laod these from ODS to Master data -Characteristic.
    to say for each transcation hpw many items are getting sold.
    Message was edited by: Nagarjuna Reddy
    ONce again thanks for the qucik replies
    Message was edited by: Nagarjuna Reddy

Maybe you are looking for

  • How can I get my email from Outlook on the PC to Mac's Mail on Lion?

    I am trying to move years worth of emails from Outlook on a PC to a new MacBook Air. The database of emails is about 5GBs. I can find different settings to export the emails in PC formats, but not a single one listed in the Lion version of Mail. It c

  • Which Firewire cable to use

    I have an iMac and a Macbook. I need to transfer applications & files from the Macbook to the iMac. I guess I should use Migration Assistant, but don't know what Firewire cable to use...4 pin, 6 pin, etc. Thanks

  • Automatic language switch [Angry poster]

    I've just finished my Spanish homework in my 2013 Microsoft Word, and it wasn't pleasant. I study Biochemistry along with English, Spanish, German and my native language. What gets me worked up and really has me table-flipping angry, is that every ti

  • Open hub in 7.0

    hi frieds, i have some doubts open hub in bi 7.0 if i use third party tools, how can i configure for 3rd party tools in open hub. and how can i use badis in open hub, generally what scenerio we use 3rd party tools and badis. thanking u suneel.

  • Why can't i import photos from my Samsung Galaxy SII

    In the past I have been able to import photos from my phone, a Samsung Galaxy SII. For some reason, I am no longer able to do this. When I connect the phone by USB, two "cameras" appear under Devices in iPhoto. One titled "NO NAME" and one titled "Un