Reg : at new

Hi all ,,
I am using collect statement at this point of time .But i need to use at new statement .here the requirement is on the basis of material number ,plant and batch quantity should be added.for the same material batch combination .
TYPES : BEGIN OF tp_mchb,
          matnr LIKE mchb-matnr,
          werks LIKE mchb-werks,
          charg LIKE mchb-charg,
          clabs LIKE mchb-clabs,
        END OF tp_mchb.
DATA : itab_mchb   TYPE STANDARD TABLE OF tp_mchb   WITH HEADER LINE,
itab_mchb_final   TYPE STANDARD TABLE OF tp_mchb   WITH HEADER LINE.
*---Sorting the table on basis of material and batch no.s
  SORT itab_mchb BY matnr charg.
*--Quantity addition for a given Plant, Material, Batch combination
  LOOP AT itab_mchb INTO wa_mchb.
    COLLECT wa_mchb INTO itab_mchb_final.
    CLEAR wa_mchb.
  ENDLOOP.

Hi,
When u use AT NEW it will take the all the fields till the field mentioned in AT NEW as key. So in ur case u need combination of matnr charg. So even if plant changes it triggers the event.
There are 2 way.
1. Changing field order in internal table.
If u r using select to get the data the it is not suggested as the field order in select should be same as they appear in data base table.(Performance issues)
2. Take one extra internal table and pass the data to that.
LOOP AT itab_mchb INTO wa_mchb.
CLEAR wa_mchb_temp.
wa_mchb_temp-matnr = wa_mchb-matnr.
wa_mchb_temp-charg = wa_mchb-charg.
wa_mchb_temp-werks = wa_mchb-werks.
wa_mchb_temp-clabs = wa_mchb-clabs.
APPEND wa_mchb_temp TO i_mchb_temp.
ENDLOOP.
Now
SORT i_mchb_temp BY matnr charg.
LOOP AT i_mchb_temp INTO wa_mchb_temp.
SUM.
AT END OF charg.
APPEND wa_mchb_temp TO i_final.
ENDAT.
ENDLOOP.
Thanks,
Vinod.

Similar Messages

  • Do i need to reg. my new touch after connecting it to itunes

    do I need to register my new ipod touch 64gb after connecting it to iTunes onmy pc

    f you’re trying to register an Apple product, chances are it’s already registered. Most Apple products can be registered when you turn them on for the first time and begin the setup process. Service and support for your Apple product are linked to its serial number, so it’s OK if you don’t register it. If you'd like to check the service and support coverage for your Apple mobile device or computer, click here.

  • Reg: Create new Page in iText

    Hi,
    I created pdf file by using iText...But i didnt get new page by using the syntax as follows,
    document.newPage();This retrurned true value...But page didnt add..Rectify this pblm ..

    Ask that in an iText forum.

  • Reg. New material type and New movement type

    dear Friends
    For what reason we need to create new material type and movement type ? this quesition is frequently asked by interviewer,but my answer is not exactly correct. Please tell me, why we are create newly. already I posted this quesition and got reply but no satisfaction with that.
    Thanks in advance
    Rajakumar.K
    *Note : Interview questions were not allowed in forum,Search forum before posting,lot of answered
    threads already available*
    Edited by: Jeyakanthan A on May 26, 2011 10:57 AM

    Hi,
    New Material type is required to meet various business functionalities of client. Depending on user department views required by client, field selection key required, wheather quanity and value updation is required or not and if so under which valuation area its required, wheather the business wants to have default value of price control  in material master, number range intervals to be used and wheather its internal/external, account determination process etc are some controlling functions which may force a business to create customised or new material type.
    Similarly new movement types can be created when the controlling features of the existing movement type do not match the requirement like wheather any movement type is required to move goods from GR valuated stock ( as an illustration), wheather auto PO/Auto storage location needs to be decided automatically, new account grouping and field selection procedure to be used etc are some controlling functions. As an illustration in earlier version of ECC 6.0 there was no movt type like 107,109 etc but since most of the business wanted to valuate stock when goods movement will occur from GR valuated stock , the above movt types was introduced in ECC 6.0. Thus business justification and understanding should be concrete to create new movt type.

  • Reg SAPScript New Font

    Hi Friends,
    I have a question regarding SAP Script. I need to change the existing font of one text to Arial Font. So I have to create a new Paragraph format while creating I couldnt find the Arial Font....
    How do I achieve this...
    Your help will be appreciated....

    Hi Friends,
    In a SAPscript form , I believe Paragraph formats, Character formats, Layout , Windows and Page Windows are found at the top ( below the menu bar ).
    I couldnt find Windows and Page Windows in my Sapscript. As I need to edit some of the Windows & its texts is there any other way apart from going through the layout set.
    Your suggestions will be appreciated....
    Leo

  • REG:My new iphone 4s getting over heat while playing and charging

    Hello,
    I bought new iphone 4s on Last month,I'm facing over heat problem,while palying games in iphone and in charging my iphone.i'm getting this problem randomly

    This may answer your question: http://www.phonesreview.co.uk/2011/10/22/iphone-4s-battery-overheating-fix-or-fo rget-iphone-5/
    Or this: http://appletoolbox.com/2011/12/iphone-4s-overheating-issue/

  • Reg: Adding new Instance in Redwood - RSI_MAINTAIN_INSTANCES

    Hi,
      When I tried deploy SAP INSTANCE IN REDWOOD I am getting an error
    Error connecting to SAP
    RFC users are created ,
    I have added the message server port in service file sapmsDE1 3600/tcp
    I have created Parition, Application and Queues because we chosen for devlopment ECC Jobs going to run in Dev Partition.
        Pls anybody help me in this issue.
    RFC error: RFC_ERROR_COMMUNICATION
    RFC Message: Connect to message server failed
    Connect_PM  MSHOST=/H/ussp-ecd01, R3NAME=DE1, GROUP=PUBLIC
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       service 'sapmsDC1' unknown
    TIME        Mon Feb 11 16:33:17 2008
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -3
    MODULE      niuxi.c
    LINE        579
    DETAIL      NiPGetServByName2: service 'sapmsDE1' not found
    SYSTEM CALL getservbyname_r
    COUNTER     1
    SAP connect failure
    SAP Agent initialization failure
    Thanks
    Raja Valluri

    Hi Raja
    Did you get a solution for your problem
    I too am searching for some help on SAP CPS by redwood
    Can you send me any document on this.
    Can you please give me your number so that we can discuss on redwood setup.
    Thanks
    Vinni Rokkam
    Vinni Eight Seven Nine Seven At The Rate G Mail Dot Com
    Edited by: Vinni8797 on May 12, 2008 12:45 AM

  • Reg: Generating new Pseudo Sequence

    Hi,
    I have a table data having the following structure.
    Customer Sequence
    Customer001 1
    Customer002 1
    Customer002 1
    Customer002 1
    Customer003 1
    Customer004 1
    Customer004 1
    Customer005 1
    Customer006 1
    and the expected result is
    Customer Sequence
    Customer001 1
    Customer002 1
    Customer002 2
    Customer002 3
    Customer003 1
    Customer004 1
    Customer004 2
    Customer005 1
    Customer006 1
    please help me to achieve this. Thanks.

    Use analytic function - ROW_NUMBER
    with xx as(
        select 'Customer001' a, 1 b from dual union all
        select 'Customer002' a, 1 b from dual union all
        select 'Customer002' a, 1 b from dual union all
        select 'Customer002' a, 1 b from dual union all
        select 'Customer003' a, 1 b from dual union all
        select 'Customer004' a, 1 b from dual union all
        select 'Customer004' a, 1 b from dual union all
        select 'Customer005' a, 1 b from dual union all
        select 'Customer006' a, 1 b from dual
    select a,row_number() over(partition by a order by a) from xx;gives
    Customer001     1
    Customer002     1
    Customer002     2
    Customer002     3
    Customer003     1
    Customer004     1
    Customer004     2
    Customer005     1
    Customer006     1Edited by: ranit B on Nov 30, 2012 11:58 AM
    -- added o/p

  • Msi Reg wrong fromat for zip code.

    Iam a member of msi site I wont to reg a new motherboard and get some tech advice for the board working with command centre.
    Every time I fill in my details on the site its giving me this error....
    Error Number: 1366
    Incorrect integer value: 'BN159BA' for column 'zip code' at row 1
    So any idea what's happing ..I hope its the place to post this.
    I'm in the uk so it will be mypostcode.

    Thanks for your answer mate, but i am still waiting
    It's a pitty as i had to return my old earphones by 12/09/12 .... and there is no way to tell apple that my new earphones are still not here

  • Reg.Remove quesitions from my control panel.

    Dear Friends
    I have 7 posts  in my forum which is blocked by SDN moderator,I want to remove those questions from unanswered status.
    Please guide me how to remove from my control panel.
    I am unable to ask more than 3 questions that there are 7 pending.
    Thanks
    Rajakumar.K

    Dear Juergen
    As per your advice I have mentioned the threads and my user ID and Password.
    """ SAP allows 10 open questions at a time.
    Locked questions are not considered as closed. So your possible open questions get reduced by any locked question.
    I think the questions got locked for a good reason.
    Unfortunatly I cannot search for these threads, Send me the links to each locked one to my mail address (can be found in my business card) and I will see what I can do. """
    Please remove my all questions and make it empty.
    Reg. TAX and VAT configuration
    Reg. Logistic execution process in MM
    Reg.Number range collapsed in production server -FBN1(NRIV table)
    Reg.Blueprint process
    reg. Tax code  in procedure TAXINJ is invalid
    Reg. New material type creation
    Reg.Std hierarchy creation problem
    Reg.Remove quesitions from my control panel.
    Thanks
    Rajakumar.K

  • Form getting submitted even A4j validation fails +jsf

    i am using a4j for checking username exists or not for onblur event
    it displays the error messages when user already exists but ,if i click on
    submit button after displaying the error message it gets submitted
    when it comes to the required=true for inputtext it doesn't get submitted
    <h:inputText id="firstName" label="#{msg['msg.firstName']}"
                                                            value="#{RegistrationBean.firstName}"                                                        
                                                            required="true" validator="#{RegistrationBean.checkFirstName}">
                                                            <a4j:support event="onblur" reRender="msg" onsubmit="true" oncomplete="true" />                                 
                                                         </h:inputText>
    public void checkFirstName(FacesContext facesContext, UIComponent component, Object value) 
              String name = (String) value;
             if(name.trim().length()==0){
                  System.out.println("Name *******");
                  String message = bundle.getString("Name_Required");
                   FacesContext.getCurrentInstance().addMessage("Reg:firstName",
                         new FacesMessage(FacesMessage.SEVERITY_ERROR, message,message));                    
             if(name.trim().equalsIgnoreCase("tom")){
                  String message = bundle.getString("Name_exists");
                   FacesContext.getCurrentInstance().addMessage("Reg:firstName",
                         new FacesMessage(FacesMessage.SEVERITY_ERROR, message,message));                    
           }could anyone suggest me where i went wrong
    thanks

    bean is configured as request in faces-config and also tried changing to session

  • Can anyone help me in a problem with PL/SQL Tables & the Java getArray()

    The problem is the following:
    I would tike to get a PL/SQL Table (a table of varchar2) into a Java String Array.
    It works very well except that instead of getting the characters in the PL/SQL Table
    I receive the character codes in each string.
    In the following example i should get:
    spring
    summer
    outumn
    winter
    Instead I get:
    0x737072696E67
    0x73756D6D6572
    0x6F7574756D6E
    0x77696E746572
    Steps to try the sample
    1)Creating the following type
    create or replace TYPE CHAR_ARRAY IS TABLE OF VARCHAR(32767);
    2)Creating the following stored procedure
    create or replace PROCEDURE MQ_MSG_PROCESSOR
       MessageText in VARCHAR2,
       QueueName out VARCHAR2,
       RplyMessage out CHAR_ARRAY,
       HastoCommit out NUMBER
    AS
       RMessage CHAR_ARRAY;
    BEGIN
       QueueName:='DEV_OUT';
       RMessage:=CHAR_ARRAY();
       RMessage.Extend(4);
       RMessage(1):='spring';
       RMessage(2):='summer';
       RMessage(3):='outumn';
       RMessage(4):='winter';
       HastoCommit:=1;
       RplyMessage:=RMessage;
    END;
    3)Copiling and running the following java class
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.oracore.Util;
    import oracle.jdbc.driver.*;
    import java.util.Dictionary;
    public class ArrayExample
       public static void main (String args[]) throws Exception
          MSG Msg=null;
          oracle.sql.ARRAY RMsg=null;
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
          Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@test","test", "test");
          conn.setAutoCommit (false);
          try
             String []array={};
             ArrayDescriptor desc=ArrayDescriptor.createDescriptor("CHAR_ARRAY",conn);
             ARRAY CHAR_ARRAY=new ARRAY(desc,conn,array);
             OracleCallableStatement sproc = (OracleCallableStatement)conn.prepareCall("{call GSM.MQ_TST.MQ_MSG_PROCESSOR(?, ?, ?, ?)}");
             sproc.setString(1, "hello"); //MessageText
             sproc.registerOutParameter(2, OracleTypes.VARCHAR);   //QueueName
             sproc.registerOutParameter(3, OracleTypes.ARRAY,"CHAR_ARRAY");   //RplyMessage
             sproc.registerOutParameter(4, OracleTypes.NUMBER);      //HastoCommit
             sproc.execute();
             CHAR_ARRAY=(oracle.sql.ARRAY)sproc.getARRAY(3);
             array = (String [])CHAR_ARRAY.getArray();
             for(int i=0;i<array.length;i++)
                System.out.println(array);
          catch(SQLException e)
             System.out.println("Error while trying to execute MQ_MSG_PROCESSOR");
             System.out.println(e);
          conn.close();

    Hi,
    I tried the code with same procedure.
    That works out fine for me..
    and it prints out exactly the same words as you mentioned..:))
    may be you must have changed something later on.. which started printing character codes..
    but for me it works perfectly fine..
    All The Best..
    Regards
    Gurudatt
    The problem is the following:
    I would tike to get a PL/SQL Table (a table of
    varchar2) into a Java String Array.
    It works very well except that instead of getting the
    characters in the PL/SQL Table
    I receive the character codes in each string.
    In the following example i should get:
    spring
    summer
    outumn
    winter
    Instead I get:
    0x737072696E67
    0x73756D6D6572
    0x6F7574756D6E
    0x77696E746572
    Steps to try the sample
    1)Creating the following type
    create or replace TYPE CHAR_ARRAY IS TABLE OF
    VARCHAR(32767);
    2)Creating the following stored procedure
    create or replace PROCEDURE MQ_MSG_PROCESSOR
    ���MessageText in VARCHAR2,
    ���QueueName out VARCHAR2,
    ���RplyMessage out CHAR_ARRAY,
    ���HastoCommit out NUMBER
    AS
    ���RMessage CHAR_ARRAY;
    BEGIN
    ���QueueName:='DEV_OUT';
    ���RMessage:=CHAR_ARRAY();
    ���RMessage.Extend(4);
    ���RMessage(1):='spring';
    ���RMessage(2):='summer';
    ���RMessage(3):='outumn';
    ���RMessage(4):='winter';
    ���HastoCommit:=1;
    ���RplyMessage:=RMessage;
    END;
    3)Copiling and running the following java class
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.oracore.Util;
    import oracle.jdbc.driver.*;
    import java.util.Dictionary;
    public class ArrayExample
    ���public static void main (String
    args[]) throws Exception
    ���{
    ������MSG Msg=null;
    ������oracle.sql.ARRAY
    RMsg=null;
    ������DriverManager.regis
    erDriver(new oracle.jdbc.driver.OracleDriver());
    ������Connection conn =
    DriverManager.getConnection
    ("jdbc:oracle:oci8:@test","test", "test");
    ������conn.setAutoCommit
    (false);
    ������try
    ������{
    ���������S
    ring []array={};
    ���������A
    rayDescriptor
    desc=ArrayDescriptor.createDescriptor("CHAR_ARRAY",conn
    ���������A
    RAY CHAR_ARRAY=new ARRAY(desc,conn,array);
    ���������O
    acleCallableStatement sproc =
    (OracleCallableStatement)conn.prepareCall("{call
    GSM.MQ_TST.MQ_MSG_PROCESSOR(?, ?, ?, ?)}");
    ���������s
    roc.setString(1, "hello"); //MessageText
    ���������s
    roc.registerOutParameter(2,
    OracleTypes.VARCHAR);���//QueueName
    ���������s
    roc.registerOutParameter(3,
    OracleTypes.ARRAY,"CHAR_ARRAY");���//Rpl
    Message
    ���������s
    roc.registerOutParameter(4,
    OracleTypes.NUMBER);������
    //HastoCommit
    ���������s
    roc.execute();
    ���������C
    AR_ARRAY=(oracle.sql.ARRAY)sproc.getARRAY(3);
    ���������a
    ray = (String [])CHAR_ARRAY.getArray();
    ���������f
    r(int i=0;i<array.length;i++)
    ���������{
    System.out.println(array);
    ���������}
    ������}
    ������catch(SQLException
    e)
    ������{
    ���������S
    stem.out.println("Error while trying to execute
    MQ_MSG_PROCESSOR");
    ���������S
    stem.out.println(e);
    ������}
    ������conn.close();
    ���}

  • Deploy powershell script - Uninstall Forefront

    Hi
    Im trying to build a powershell script that uninstall Forefront Client and later install SCEP and it also copy the local exclusions from Forefront to insert in SCEP (registry).
    All works fine when Im running the script locally, but when Im deploying it from Altiris DS it halts on Microsoft Forefront Client Security Antimalware Service". Every time, I also have tried to sort them differently but it wont work.
    All I see in the event viewer is a warning:
    "Application 'C:\Program Files\Microsoft Forefront\Client Security\Client\Antimalware\MSASCui.exe' (pid 1964) cannot be restarted - Application SID does not match Conductor SID.."
    And then later an error:
    HRESULT:0x80070643
    Description:Cannot complete the System Center Endpoint Protection installation. An error has prevented the System Center Endpoint Protection setup wizard from completing successfully. Please restart your computer and try again. Error code:0x80070643. Fatal
    error during installation.
    This is the deployment from Altiris:
    powershell.exe -noexit "& 'C:\Temp\ForefrontSCEP.ps1'"
    Does anyone has any clue?
    Cheers!
    **** The script ****
    # Backup Forefront registry data
    Reg export "HKLM\SOFTWARE\Microsoft\Microsoft Forefront" C:\Temp\SCEPClient_New\exclbackup.reg
    # Create new registry item
    new-Item "HKLM:\SOFTWARE\Microsoft\" -Name "Microsoft Antimalware"
    new-Item "HKLM:\SOFTWARE\Microsoft\Microsoft Antimalware\" -Name Exclusions
    # Copy Forefront registry exclusion data to newly created regkey
    Copy-Item "HKLM:\SOFTWARE\Microsoft\Microsoft Forefront\Client Security\1.0\AM\Exclusions" -Destination "HKLM:\SOFTWARE\Microsoft\Microsoft Antimalware\" -Recurs
    # "Uninstall Forefront och MOM"
    # "Uninstall Microsoft MOM"
    $app = Get-WmiObject -Class Win32_Product | Where-Object {
        $_.Name -match "Microsoft Operations Manager 2005 Agent"
    $app.Uninstall()
    # "Uninstall Forefront Assessment"
    $app = Get-WmiObject -Class Win32_Product | Where-Object {
        $_.Name -match "Microsoft Forefront Client Security State Assessment Service"
    $app.Uninstall()
    # "Uninstall Forefront Antimalware"
    $app = Get-WmiObject -Class Win32_Product | Where-Object {
        $_.Name -match "Microsoft Forefront Client Security Antimalware Service"
    $app.Uninstall()
    # Install SCEP with policy
    Start-Process -FilePath C:\Temp\SCEPClient_New\scepinstall.exe -ArgumentList "/s /q /policy C:\Temp\SCEPClient_New\ServerSCEP.xml" -ErrorAction SilentlyContinue

    I finally solved, in two ways.
    For the powershell part:
    I changed the name match against a filter function. So now I can deploy the powershell script just fine.
    $app = Get-WmiObject -Class Win32_Product | Where-Object {
        $_.Name -match "Microsoft Operations Manager 2005 Agent"
    $application = Get-WMIObject Win32_Product -filter "Name='Microsoft Operations Manager 2005 Agent'"
    2nd solution:
    I also created a batch file which worked at my first try. Gotta love the old fashion way :)
    I post it here as well, maybe somebody can get use of it.
    Uninstall Forefront - Install SCEP - Copy local exclusions
    REM Backup Forefront exclusions
    regedit /e C:\Temp\ForefrontExclBackup.reg "HKLM\Software\Microsoft\Microsoft Forefront"
    REM Create SCEP registry keys
    reg add "HKLM\Software\Microsoft\Microsoft Antimalware"
    REM Create SCEP registry keys
    reg add "HKLM\Software\Microsoft\Microsoft Antimalware\Exclusions"
    REM Copy Foreront exclusions to SCEP
    reg copy "HKLM\Software\Microsoft\Microsoft Forefront\Client Security\1.0\AM\Exclusions" "HKLM\Software\Microsoft\Microsoft Antimalware\Exclusions" /s /f
    REM Uninstall Microsoft Forefront Client Security State Assessment Service
    MsiExec.exe /X{E8B56B39-A826-11DB-8C83-0011430C73A4} /qn
    REM Uninstall Microsoft Forefront Client Security Antimalware Service
    MsiExec.exe /X{436028CD-6476-4224-9274-8F0320F30FD1} /qn
    REM Uninstall Microsoft Operations Manager 2005 Agent
    MsiExec.exe /X{F692770D-0E27-4D3F-8386-F04C6F434040} /qn
    REM Install SCEP and policys
    C:\Temp\SCEPInstall.exe /policy C:\Temp\ServerSCEP.xml /s

  • I had a good day today - I hope you did too

    Memorial Day is a good day to listen to patriotic songs, and remember why we get to do all of the things we get to do. It is a day to honor those who gave their all for us.
    It is also a great day to grill meat, and attend festivals of all kinds. I did both.
    The festival I went to had some interesting things to photograph. I finally have a new picture to use for my avatar. My wife saw my gorilla picture and decided it was time to make a change. I have been trying to come up with something and I think today got me one or more that I can use.
    The rest of the better shots are temporarily sitting out there waiting for the owners of the birds to respond to my e-mail asking for their names and species. I need to pare it down to get rid of some of the similar ones, but I need to wait a day or so to make that decision. I am too close to the subject to make an objective decision just yet.
    Birds from the West Coast Falconry Center on Behance

    Well, even if we do not have memorial day in Denmark, my day was good too
    This post explains my Q. reg. your new avatar too - it's great
    Ulf

  • Std,reports,tax

    HI
    GURUS
    WHAT are the stanaard reports availble in sap
    in relating to tax purpose
    i mean all tax reports
    with regards
    arun

    J1INMIS     Withholding Tax Information System
    J1INAR     Annual Return
    J1I57AE     New Monthly Returns Report Rule 57AE
    J1I6     CENVAT forecast
    J2I8     Avail.of subs credit for Cap Goods
    J1I5     Update RG23A/C Issues and RG1
    J2I9     New Monthly Returns Report Rule 57AE-CENVAT Reg
    J2IN     New RT-12 Report
    J2IR23D     Register RG23D
    J2IRAP1     Print RG23A Part1
    J2IRAP2     Print RG23A Part2
    J2IRCP1     Register RG23C part1
    J2IRCP2     Register RG23C Part2
    J2IRG1     Register RG1
    J2IRPLA     Register PLA
    J2IUN     Fortnightly Utilization
    J1I7     help for internally generated doc - List of Exc Invoice
    J1ILN     India localization
    J1IA101     ARE1 Internal Document
    J1I2     Sales Tax Register
    Hope that all the above reports related to TDS, Excise, Sales Tax etc.,

Maybe you are looking for