Abt clear value problem in scripts

Hi,
Im working on scripts.in scripts im calculating totals by using subroutine.but im facing problem.
my problem is first time i calculated it's working fine.
when i go back and enter other order number it's taking previous order number and present total and it displays these totals.
i clear the it_out in se38 and the varible which holds the total.
but it's not working.
please help me in this.
Thanks & Regards,
Srinivas

Hi this is my abap code.
FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
REFRESH : it_output.
CLEAR v_extpr_tot.
  DATA: v_vbeln2(10) TYPE n.
  REFRESH it_input.
  Clear v_vbeln2.
clear v_extpr_tot1.
  READ TABLE it_input INDEX 1.
  MOVE it_input-value TO v_vbeln2.
  READ TABLE it_input INDEX 2.
  MOVE it_input-value TO v_extpr_tot.
  v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
  READ TABLE it_output INDEX 1.
  WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
  MODIFY it_output INDEX 1.
   Clear it_output.
  clear v_extpr_tot1.
REFRESH it_output.
ENDFORM.                    "GET_EXTPR_TOT
and my se71 code is
PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
USING &VBDKA-VBELN&
USING &V_PRICE&
CHANGING &V_EXTPR_TOT1&
ENDPERFORM
please help me

Similar Messages

  • Clearing values in a script

    Hello All,
    I have a scenario where I need to change the data from USD to LC? I have this script below to do it. But there are few values in LC but not in USD that I need to zero out before the copy. I tried Clear_destination but it does not seem to work. I am on BPC 7.0M version. I am aware that clear_destination does not work on NW platform. Any help is appreciated.
    *XDIM_MEMBERSET TIME= %TIME_SET%
    *XDIM_MEMBERSET ENTITY= DORSTAT
    *XDIM_MEMBERSET ACCOUNTP = <ALL>
    *XDIM_MEMBERSET RPTCURRENCY = USD
    //*XDIM_MEMBERSET CATEGORY=ACT
    *WHEN ACCOUNTP
    *IS *
    *REC(RPTCURRENCY="LC")
    *ENDWHEN
    *CLEAR_DESTINATION
    *COMMIT
    Thanks for your help.

    Try this:
    *XDIM_MEMBERSET TIME= %TIME_SET%
    *XDIM_MEMBERSET ENTITY= DORSTAT
    *XDIM_MEMBERSET ACCOUNTP = <ALL>
    *XDIM_MEMBERSET RPTCURRENCY = LC
    //*XDIM_MEMBERSET CATEGORY=ACT
    *WHEN ACCOUNTP
    *IS *
    *REC(FACTOR=0
    *ENDWHEN
    *COMMIT
    *XDIM_MEMBERSET TIME= %TIME_SET%
    *XDIM_MEMBERSET ENTITY= DORSTAT
    *XDIM_MEMBERSET ACCOUNTP = <ALL>
    *XDIM_MEMBERSET RPTCURRENCY = USD
    //*XDIM_MEMBERSET CATEGORY=ACT
    *WHEN ACCOUNTP
    *IS *
    *REC(RPTCURRENCY="LC")
    *ENDWHEN
    *COMMIT
    Edited by: Anis El-Mariesh on Oct 23, 2009 11:26 AM

  • Problem with Script Monitoring scom 2012 r2

    Hello,
    i have some problem. i create 2 state monitoring and it works fine but. mu task is to monitor any changes
    i have xml file where is returned some values 
    <Item>
    <Name>#16</Name>
    <Value>NA</Value>
    </Item>
    when everything is ok value is NA .but when not ok it write here count of problem per server  ex
    <Item>
    <Name>#16</Name>
    <Value>server 1 230</Value>
    </Item>
     and in alert it returns as server 1 230 errors.but in script may be that it will change on
    <Item>
    <Name>#16</Name>
    <Value>server 1 230 | server 2 340</Value>
    </Item>
    but script couldn't get that this is new alert.  what can i do for this. i couldn't found  to resolve alert  after time automatically 

    i have one problem now. 
    when i run script (vbs) on witch is read from file it don't work 
    this is code witch don't work
    Dim oAPI, oBag,sComputerName
    sComputerName = WScript.Arguments(0)
    Set oAPI = CreateObject("MOM.ScriptAPI")
    Set oBag = oAPI.CreatePropertyBag()
    Set xmlDoc = CreateObject("Microsoft.XMLDOM")
    xmlDoc.Async = "False"
    xmlDoc.Load("http://" + sComputerName + "/metrics/info.xml")
    strQuery = "/Info/Item/Value"
    Set colNodes = xmlDoc.selectNodes( strQuery )
    Set objNode = colNodes.Item(16)
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile("C:\SCOM\NetworkDevice\tms.txt", 1)
    Do Until objFile.AtEndOfStream
    strLine = objFile.ReadLine
    Wscript.Echo strLine
    Loop
    objFile.Close
    Set oAPI = CreateObject("MOM.ScriptAPI")
    Set oBag = oAPI.CreatePropertyBag()
    Call oBag.AddValue("ComputerName",sComputerName)
    Call oBag.AddValue("Tvalue",objNode.text)
    Call oBag.AddValue("Tvalue2",strLine)
    oAPI.Return(oBag)
    this is witch works fine
    Dim oAPI, oBag,sComputerName
    sComputerName = WScript.Arguments(0)
    Set oAPI = CreateObject("MOM.ScriptAPI")
    Set oBag = oAPI.CreatePropertyBag()
    Set xmlDoc = CreateObject("Microsoft.XMLDOM")
    xmlDoc.Async = "False"
    xmlDoc.Load("http://" + sComputerName + "/metrics/info.xml")
    strQuery = "/Info/Item/Value"
    Set colNodes = xmlDoc.selectNodes( strQuery )
    Set objNode = colNodes.Item(16)
    Set oAPI = CreateObject("MOM.ScriptAPI")
    Set oBag = oAPI.CreatePropertyBag()
    Call oBag.AddValue("ComputerName",sComputerName)
    Call oBag.AddValue("Tvalue",objNode.text)
    oAPI.Return(oBag)
    tms.txt is file witch contains sole text string. example (test)

  • GR/IR clearing value

    Hi all
    There is a SA with many times GR and IR now i want to know the GR/IR clearing value about this SA.
    Which T-code can display this? I tried manys but all under vendor,account number.which can under a SA?
    Thanks a lot

    Hi King,
    You can see the GR/IR analysis in MR11 by selecting the PO.
    You can also see the total GR/IR in PO - ME23N under "Item Details" under tab "Pruchase Order history"
    Thanks, Ashok

  • GR/IR clearing value in local currency

    Hi All,
    I have a service PO (Item cat D) in which the vendor and local currency is same as USD.
    when I see PO history, the amount of SES and GR (101) is shown as 0 (ZERO) in  "GR/IR clearing value in local currency" colunm, however the amont of IR is displayed here (NOT 0).
    Can you please help to undersatnd of this behaviour.
    Thanks in Advance.

    Hello Kumar,
    When a Po is created two currencies come in to picture
    One- The document currency, which is generally the vendor currency also or the currency in which the items are ordered.
    Two- The local currency or the Currency of the company code or the currency in which account postings take place.
    The GR/Ir clearing value in local currency is the  value that is viewed in the company code currency. This is dealt in the background and should not cause any issues at all

  • I just ran the most current Firefox update and now the program won't open. I keep getting an error for the XUL Runner that says "Platform version 6.0.2 is not compatible with minversion =6.0.1 maxversion 6.0.1. Restarting didn't clear this problem.

    I also did a System Restore and that didn't clear the problem, either.

    If you use ZoneAlarm Extreme Security then try to disable Virtualization.
    Do a clean reinstall and delete the Firefox program folder.
    * http://kb.mozillazine.org/Browser_will_not_start_up#XULRunner_error_after_an_update
    *[[/questions/869812]]
    *[[/questions/869951]]

  • Pass value in SAP Script

    How can u pass value in SAP Script?& where?

    Hi,
    PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:
    In the line editor, specify the table field arguments enclosed by '&' symbol as follows:
    /E  ELEMENT
         &KNA1-KUNNR& ,, &KNA1-NAME1& ,, &KNA1-LAND1&
    Save -> Activate.
    In the Print Program, specify following code:
    TABLES KNA1.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       FORM                              = 'ZSHABFORM1'
       LANGUAGE                          = SY-LANGU.
    SELECT * FROM KNA1.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'ELEMENT'
       WINDOW                         = 'MAIN'.
    ENDSELECT.
    CALL FUNCTION 'CLOSE_FORM'.
    Save -> Activate -> Execute.
    Regards,
    Priya.

  • How Can i get PLSQL Procedure out values in Shell Script?

    Hi,
    I need to use PLSQL Procedure out values in shell script by using that parameter i need to check and call the other procedure. Please can you guide me how can i?
    #!/bin/ksh
    # Function to call validation program
    SQL_PKG_CALL()
    echo "Inside SQL_PKG_CALL for $file"
    sqlplus -s /nolog << EOF
         whenever sqlerror exit failure
         connect ${APPS_LOGIN}
         variable exit_value NUMBER
         set serveroutput on size 100000
         DECLARE
              l_errbuf VARCHAR2(10000) := NULL; l_retcode NUMBER := NULL;lv_test VARCHAR2(4000) := NULL;
         BEGIN
              fnd_global.apps_initialize ( USER_ID => ${USER_ID}, RESP_ID => ${RESP_ID}, RESP_APPL_ID => ${RESP_APPL_ID}
                             , SECURITY_GROUP_ID => ${SECURITY_GROUP_ID}
              #Calling PLSQL procedure for create and attache document
              XXAFPEEP_SO_DOC_ATTACH_INT.DOCUMENT_ATTACH (p_errbuf => l_errbuf, p_retcode => :RETMSG, p_fileName => $file
                                       , p_debug => 'Y', p_rettest => lv_test);
              # to print the procedure return values
              DBMS_OUT.PUT_LINE('Return Message: '|| lv_test);
              #${RETCODE}=l_retcode;
              print :RETMSG;
         END;
    EXIT 0
    EOF
    # Program starts here
    echo "+---------------------------------------------------------------------------+"
    echo "Program Start"
    APPS_LOGIN=${1} # Apps Login
    USER_ID=${2} # User ID
    RESP_ID=${5} # Responsiblity ID
    RESP_APPL_ID=${6} # Responsiblity Application ID
    SECURITY_GROUP_ID=${7} # Security Group ID
    DIRECTORY_PATH=${8} # Directory --Attached file locations
    DIRECTORY_NAME=${9} # Directory Name for plsql
    echo "User ID : $USER_ID"
    echo "Responsibility ID : $RESP_ID"
    echo "Responsibilith Application ID : $RESP_APPL_ID"
    echo "Security Goup ID : $SECURITY_GROUP_ID"
    echo "Directory Path : $DIRECTORY_PATH"
    echo "Direcotry Name : $DIRECTORY_NAME"
    echo
    #files direcotry
    cd $DIRECTORY_PATH
    echo Present Working Directory: `pwd`
    echo
    #for all file names
    ALL_FILES=`ls *.pdf`
    for file in $ALL_FILES
    do
         if [ -f $file ]
         then
              #log "Processing $file" # future
              echo Processing: $file
              # Calling the PL/SQL Program
              SQL_PKG_CALL;
              #echo "Retcode : $RETCODE"
              echo "RetMessage : $RETMSG"
         else
              log "Skipped $file: invalid file"
              echo "Skipping current file $file: not a valid file."
         fi
    done
    Thanks
    Sudheer

    Saubhik's provided the solution, but just for fun:
    Test procedure:
    create or replace procedure get_ename
       ( p_empno in emp.empno%type
       , p_ename_out out emp.ename%type )
    is
    begin
       select ename into p_ename_out
       from   emp
       where  empno = p_empno;
    end get_ename;Test data:
    SQL> select empno, ename from emp order by 1;
    EMPNO ENAME
    7369 SMITH
    7499 ALLEN
    7521 WARD
    7566 JONES
    7654 MARTIN
    7698 BLAKE
    7782 CLARK
    7788 SCOTT
    7839 KING
    7844 TURNER
    7876 ADAMS
    7900 JAMES
    7902 FORD
    7934 MILLER
    14 rows selectedTest call from SQL*Plus to show it working:
    SQL> declare
      2     v_ename emp.ename%type;
      3  begin
      4     get_ename(7844,v_ename);
      5     dbms_output.put_line(v_ename);
      6  end;
      7  /
    TURNER
    PL/SQL procedure successfully completed.Demo shellscript (borrowing the function idea from Saubhik):
    #!/bin/ksh
    empno=${1:-NULL}
    exec_sql() {
        sqlplus -s william/w@//vm.starbase.local:1521/eleven <<END_SQL
        spool get_out_value.sh.log
        set serverout on size 2000 feedback off
        declare
           v_name emp.ename%type;
        begin
           get_ename(${empno},v_name);        
           dbms_output.put_line('# ' || v_name);
        end;
        spool off
        exit
    END_SQL
    ename=$(exec_sql ${empno} | awk '/^# / {print $2}')
    print Employee ${empno} = ${ename}Demo:
    /Users/williamr: get_out_value.sh 7844
    Employee 7844 = TURNER
    /Users/williamr: get_out_value.sh    
    Employee NULL =Note this substitutes the word NULL if no empno is passed, and it ignores error output or anything else by only looking for lines beginning '# ' and then taking the following word. Error messages will appear in the logfile. (In this example it probably doesn't need the NULL substitution because a missing parameter would cause a syntax error which the script will handle anyway, but it could be useful in more complex examples.)
    For a production script you should probably use an OS authenticated account so you don't have to deal with password strings.

  • Rounding off value problem in sales order

    Hi All,
    This is related to a rounding off value problem in sales order.
    The problem is described by an example which is as follows -
    Selling Price of Material A = Rs. 176.76
    Excise charged = Rs. 21.80
    Total Price = Rs.176.76 + Rs.21.80 = Rs. 198.56
    On this total Trade Discount (ZDTD) having access sequence,is calculated  at the rate of 4% = Rs. 7.94
    But the condition base value after the discount is showing Rs.198.60 instead of Rs.198.56
    I want the system to reflect the value as Rs.198.56 intact and it should not round up to the nearest value i.e. Rs. 198.60
    Why is this happening? Is it possible to reflect the exact value? If yes what is needed to be done?
    The commercial round off is activated for the DIFF Condition Type.
    Looking forward to some valuable suggestions.
    Thanks & Regards
    Priyanka Mitra

    Hi Ramesh,
    Thanks for your suggestion but the problem has been solved by me.
    Regards
    Priyanka Mitra

  • How to get/read region item value in java script

    Hi All,
    i have text item on a page.
    how to read the item value in java script
    EXAMPLE
    P10_RESULT IS ITEM IT HAS VALUE "38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888"
    NOW I WANT TO REFER ABOVE ITEM VALUE IN JAVA SCRIPT LIKE
    var myPoints=new Array(&P10_RESULT.);
    SO I CAN POPULATE ARRAY WITH CORDINATES
    IT IS NOT WORKING
    WHAT IS THAT I AM MISSING.
    PLESE HELP .
    ThankS
    Rk

    region header code....
    <script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    //globals
    var bounds = new GLatLngBounds();
    var map;
    var centerPoint = new GLatLng(38.984898,-76.854549);
    var gmarkers = [];
    //var x= ""38.956472,-77.447777","38.999123,-//77.026184","12.951497,70.668646","17.459075,78.456888"";
    //var myPoints=new Array(x);
    //var myPoints=new Array($x('P10_RESULT').value);
    var myPoints=new Array(document.getElementById('P10_RESULT').value);
    //var myPoints=new Array("38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888");
    function initMap()
              doLoad();
                        addMarkers();
    function doLoad()
         if (GBrowserIsCompatible())
                   map = new GMap2(document.getElementById("map"));
                   map.setCenter(centerPoint, 7);
                   map.addControl(new GScaleControl());
                   map.addControl(new GLargeMapControl());
                   map.addControl(new GMapTypeControl());
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    function addMarkers() {
         if (myPoints.length) {
              var bounds = new GLatLngBounds();
              for (n=0 ; n < myPoints.length ; n++ ) {
                   var mData = myPoints[n].split(',');
                   var point = new GLatLng(mData[0],mData[1]);
                   bounds.extend(point);
                   var marker = createMarker(mData[1],point, mData[0]);
         map.addOverlay(marker);
              map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
    function createMarker(i,point, title) {
         var marker = new GMarker(point,{title:title});
         GEvent.addListener(marker, "click", function() {
              marker.openInfoWindowHtml('<div style="width:250px;">' + title + '<hr>Lat: ' + point.y + '<br>Lon: ' + point.x + '</div>');
         gmarkers[i] = marker;
         return marker;
    //]]>
    </script>
    page body code
    onload="initMap()" onunload="GUnload()"

  • ReG: Open Item Clearing Value is showing is difference

    Hi All,
    Acutal invoice value is 3,289.90 . but it f-44  clearing value is shwoing 3,176.35. how can solve this problmem. plz help gurs.
    with regards
    JK Rao

    hi,
    have a look here
    http://help.sap.com/saphelp_47x200/helpdata/en/e5/07829e4acd11d182b90000e829fbfe/frameset.htm
    A.

  • Problem in script format

    hi,
    i am having problem in script , the problem is
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aaaaaaaaaaaaaaaaaaaaa       11.01                             17.28                     170000000               2400000
    this is fine but when the 1st column is shot other also get affected.
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aa       11.01                             17.28                     170000000               2400000
    and i cannot draw vertical line here .what is the solution for this.
    Edited by: jaihind on Mar 6, 2010 12:21 PM
    hi,
    problem is if the description field is long then other coloum are comming fine but if description caloumn is small then other also get affected and its comes towards left .
    Edited by: jaihind on Mar 6, 2010 12:22 PM

    Hi
    For this u can resolve by using the Formatting characters ......
    This is your layout ..
    s.no| descriptio | UOM | Qty | Rate | AMT |
    01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
    Assume that   your field names like  
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    &sno&      &desc&         &UOM&       &Qty&         &rate&         &AMT&
    asseme that  length of these fields(in characters) as per your requirement will be ...
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    8                  15                  5                8                 10                  15
    For these use formatting characters    like   ...
                  s.no      |  description      |    UOM      |    Qty      |      Rate      |         AMT       |
    1stLine  &sno& ,,  &desc+0(15)&,,  &UOM&       &Qty&        &rate&         &AMT&
    2ndline                 &desc+15(15)&     
    &desc+0(15)&  -  it will print  first 15 characters from 0th position
    &desc+15(15)&- From 15th position it will print 15 characters ..
    Hope you resolve your issue
    Let me know if Any concerns,.......

  • O/P problem in scripts

    Hi all,
               I am working on Medruck,
        I need to display delivery date in script.for this I used RM06P structure. For one P.O  it is displaing the date for some other P.Os its not displaying. I checked for those it doesn't display Del.dates in EKET but Del.dates are ther for those P.Os
    can any one plz tell me why its happening like that?

    Hi Ranganadh,
    ur using standard RM06P for displaying values in standard script. u have to debug through to check why it is not filling in RM06P.
    otherways use a subroutine to fetch delivery date from EKET against a PO if it is not coming from RM06P structure.
    Regards,
    Krishnendu

  • How to clear value set values from node info

    Hi,
    I have set some values on value set to display on a dropdown in my view.  using following method.
      l_node_info->set_attribute_value_set(  name      = 'XYZ'  value_set = l_value_set ).
    Now i need to clear node info value set. Otherwise particular attribute which i used for dropdown is always showing values added .
    Please suggest how to clear value set.
    Thanks,
    Venkat.

    Hi,
    Interface IF_WD_CONTEXT_NODE_INFO is for metadata of a node. It has nothing to do with the values in dropdown list.
    In order to manipulate the values in the dropdown of an attributes, you can use the IF_WD_CONTEXT_NODE.
    As you are saying its a dropdown, what I can suggest is to write supply function for the node.
    And then get the index (V_INDEX) of the value you wanted to see in the dropdown list, and then use the following code in the method WDDOINIT
    LO_NODE->SET_LEAD_SELECTION_INDEX( INDEX = V_TABIX ).

  • Priniting problem in script

    Hi friends,
    i am facing a problem in script. i have developed the form
    and it is working fine .in print preview every thing seems to be ok.
    when we try to take a print the right side characters are cutting down by 2
    characters every time.
    i have moved the content to left but the result is the same.
    can any one tell me how to solve the issue.
    Regards,
    Srinivas

    Hi,
    Try to check the lenght of the field/var that you are printing.
    change the alignment doesnt solve the problem.
    Check in your code what is the lenght and if is the same in your form.
    Sample:
    &j_1bprnfli-cfop(4C)&
    prints only 4 digits of the variable j_1bprnfli-cfop.
    Regards.
    Rodrigo Paisante

Maybe you are looking for

  • 3gs will no longer charge and not recognized in itunes

    Tries sveral differnt cables as well as wall charger -   Never an issue with this phone and did not drop or get wet -   Any help appreciated

  • Help needed with LMS Reporting Settings

    I am new to Captivate and am working with 5.5 to create a number of large courses. The first course, I have split over 5 captivate files as there are a large number of slides in each file.  I have reviewed the Help PDF on Learning Management System,

  • ERROR 1708 When using a script on a Text Invitation

    Whenever I use a script in Text Invitation- even if something as simple as "beep"- I receive an error that reads : Error : Error - 1708. The strange thing the script is executed successfully but I always get an error. I am using Version 4.0.2. Any id

  • Garageband doesn't respond to iPad MIDI Keyboard

    I downloaded a free iPad app called Pad MIDI.  I finally got my iMac to see my iPad over the network, but when I press a key in the iPad app, Garageband is not responding.  It's possible it's the app itself, but I don't want tp spend money on an actu

  • Time capsule or external hard disk?

    I am new to Mac. I read so much about the problem of using a Time Capsule. Is it safer or better to use a normal external hard disk instead?