Want touse AT END OF.. for three fields

Hi all,
I have five fields in my internal table with amount as one field in the table GTAB.
fld1
fld2
fld3
fld4
amount
and i want to compare three fields fld2 fld3 fld4 and if they are same then add the amount and append to new internla table itab.
if any value is different then append as it is to the new internal table itab.
i m tring AT END of fld2.
endat.
but i m not getting the logic to check all the three fields.
Please suggest.
Thnx
RK

Hi,
You can use the below logic.
REPORT  ztest_100.
TYPES: BEGIN OF ITAB,
         F1(10) TYPE C,
         F2(10)  TYPE C,
         F3(10) TYPE C,
         F4     TYPE I,
       END OF ITAB.
DATA: ITAB TYPE STANDARD TABLE OF ITAB,
            JTAB TYPE STANDARD TABLE OF ITAB,
      WA_ITAB TYPE ITAB,
      WA_JTAB TYPE ITAB.
WA_ITAB-F1 = 'A'.
WA_ITAB-F2 = 'B'.
WA_ITAB-F3 = 'A'.
APPEND WA_ITAB TO ITAB.
WA_ITAB-F1 = 'A'.
WA_ITAB-F2 = 'A'.
WA_ITAB-F3 = 'A'.
WA_ITAB-F4 = '10'.
APPEND WA_ITAB TO ITAB.
APPEND WA_ITAB TO ITAB.
WA_ITAB-F1 = 'A'.
WA_ITAB-F2 = 'B'.
WA_ITAB-F3 = 'A'.
WA_ITAB-F4 = '10'.
APPEND WA_ITAB TO ITAB.
LOOP AT ITAB INTO WA_ITAB.
  AT END OF F3.
    IF WA_ITAB-F1 = WA_ITAB-F3 AND
       WA_ITAB-F2 = WA_ITAB-F3.
       SUM.
       MOVE WA_ITAB TO WA_JTAB.
       APPEND WA_JTAB TO JTAB.
    ENDIF.
  ENDAT.
  CLEAR WA_ITAB.
ENDLOOP.
Close the issue if this solution helps you.
Edited by: priyanka jatla on Nov 4, 2009 4:53 PM

Similar Messages

  • My business want to start using iPhones for our field techs is there a simple and inexpensive way to manage multiple phones?

    I am a service manager for a small HVAC company, we want to issue iPones for our field staff (15) people, is there a simple management software out there that is also cost effective, I have used an iPhone for years, but have no experience with enterprise management, so simple would be best. Thanks for any help you can give.

    If you are running MS Exchange for mail, you can use the Exchange management console to perform remote wipes.
    We have used Casper for mac desktop management to good effect, I believe they offer more advanced remote management for iphones.
    FWIW, we just used the Apple Iphone Configuration utility to build config profiles...
    http://support.apple.com/kb/DL852 (for windows, there is a mac ver avail)

  • AT END OF for char field not working

    Hi all,
    AT END OF (char field) not working,
    I sorted the itab and also avoid the stars(*) problem also, but its not working.
    Thanks in advance.
    Edited by: Vijay Babu Dudla on Jan 28, 2009 11:01 PM

    Hi, Niranjan
    Test the following Sample Code it will solve out your Problem,
    " This is not working properly right now.
    TYPES: BEGIN OF t_name,
      name1(10),  " if You Change Cut the Name2 from the 2nd line and past it up to the Name one will work fine
      name2(10),
      amount1 TYPE p,
      amount2 TYPE p,
      END OF t_name.
    DATA: it1_sum TYPE STANDARD TABLE OF t_name WITH HEADER LINE,
          wa_it1_sum TYPE t_name,
          it2_sum TYPE STANDARD TABLE OF t_name WITH HEADER LINE,
          wa_it2_sum TYPE t_name.
    wa_it1_sum-name1 = 'AAAAAA'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 500.
    wa_it1_sum-amount2 = 200.
    APPEND wa_it1_sum  TO it1_sum.
    wa_it1_sum-name1 = 'AAAAAA'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 500.
    wa_it1_sum-amount2 = 200.
    APPEND wa_it1_sum  TO it1_sum.
    wa_it1_sum-name1 = 'BBBBBB'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 100.
    wa_it1_sum-amount2 = 200.
    APPEND wa_it1_sum  TO it1_sum.
    wa_it1_sum-name1 = 'AAAAAA'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 500.
    wa_it1_sum-amount2 = 10000.
    APPEND wa_it1_sum  TO it1_sum.
    wa_it1_sum-name1 = 'BBBBBB'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 105000.
    wa_it1_sum-amount2 = 20500.
    APPEND wa_it1_sum  TO it1_sum.
    wa_it1_sum-name1 = 'BBBBBB'.
    wa_it1_sum-name2 = 'AAAAAA'.
    wa_it1_sum-amount1 = 21000.
    wa_it1_sum-amount2 = 22000.
    APPEND wa_it1_sum  TO it1_sum.
    SORT it1_sum BY name1 name2.
    LOOP AT it1_sum INTO wa_it1_sum.
      APPEND wa_it1_sum TO it2_sum.
      AT END OF name2. " When you will use this in this Condition it will give you wrong Because this row is on number two and
                       " it is not changing but the Row one is Changing so it will work fine if LEFT MOST
        SUM.
        wa_it1_sum-name1 = 'End Name 2'.
        wa_it1_sum-name2 = 'End Name 2'.
        APPEND wa_it1_sum TO it2_sum.
      ENDAT.
      AT LAST.
        SUM.
        wa_it1_sum-name1 = 'At Last'.
        APPEND wa_it1_sum TO it2_sum.
      ENDAT.
    ENDLOOP.
    Please Reply if need more help about it.
    Kind Regards,
    Faisal

  • I want to draw multiple selection for some field on Type M program.

    Hi. everyone.
    I'm programing on Type M program but I don't know how do I draw multiple selection on Type M.
    Is it possible?
    If you know some related website or on-line document, please let me know that.

    It means Online program. it is not report progeam.
    I want to design a multiple selection on screen.

  • F4 HELP for standard field..

    i want to put F4 help for standard field FERTH in mm01 and mm02 ...
    is there any way to put F4 help for this field..

    try this
    1. First go to SE11 and create your own search help( if you dont know how to create a search help please feel free to ask me, it is very easy).
    2. Now in your module pool program program go to the layout of your screen.
    3. Now when you see the attributes of this field in the Dict tab you will find the field Search Help. Now here you can specify the name of the search help you created in SE11.
    There is also another mehtod to create the dynamic search help. eg:- in a posted document data get the Document nos related to that company code.
    The sample code is like this:-
    First of all declare the module below in the flow logic of your screen then create it in your main program.
    You declare the module in the PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD TXT_DOCNO MODULE VALUE_BELNR.
    You also need to create an internal table where you wil store results of the select query fired below in the module.
    here you will get a F4 help on the filed Document Number(TXT_DOCNO) based on the field Company code (TXT_CODCO)
    MODULE VALUE_BELNR INPUT.
    progname = sy-repid.
    dynnum = sy-dynnr.
    CLEAR: field_value, dynpro_values.
    field_value-fieldname = 'TXT_CODCO'.
    APPEND field_value TO dynpro_values.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'BKPF'
    fieldname = 'BUKRS'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_CODCO'.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = progname
    dynumb = dynnum
    translate_to_upper = 'X'
    TABLES
    dynpfields = dynpro_values.
    READ TABLE dynpro_values INDEX 1 INTO field_value.
    SELECT BUKRS BELNR
    FROM BKPF
    INTO CORRESPONDING FIELDS OF TABLE it_doc1
    WHERE BUKRS = field_value-fieldvalue.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'BELNR'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_BELNR'
    value_org = 'S'
    TABLES
    value_tab = it_doc1.
    ENDMODULE. " VALUE_BELNR INPUT

  • Invalid date format for 'Created' field in the getVersions web service Response.

    Hi all,
    I am trying to get all versions for selected document by calling getVersions method Versions.asmxweb service, but getting ‘Created’ date attribute value is in the format "29-05-2012 12:01"
    but I am expecting either one of the following date formats.
     1.      yyyy-MM-dd HH:mm:ss  or  yyyy-MM-ddTHH:mm:ssz
     2.      MM/dd/yyyy HH:mm a   (a means AM/PM)
     3.      MM/dd/yyyy
     4.      yyyyMMdd HH:mm:ss
    where do I need to change?
    what are all the formate will be support by SharePoint?
    please find attached response xml of getVersions call.
    <results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
        <list id="{6A6F6CD1-2E9C-44CC-B1F5-56G7JB5C8778}"/>
        <versioning enabled="1"/>
        <settings url="http://hbngjfgj47s20/reg/_layouts/LstSetng.aspx?List={7S6F6CD1-2E9C-44CC-B1F5-KO9J8Y7Y6H78}"/>
        <result version="@0.3" url="http://vmesxsrv47s20/register/Shared Documents/Parent/child/my_doc" created="29-05-2012 12:01" createdRaw="2014-12-02T12:46:02Z" createdBy="my_dom\agi_sharepoint"
    createdByName="AGI_Sharepoint" size="288" comments=""/>
        <result version="0.1" url="http://hbngjfgj47s20/register/_vti_history/1/Shared Documents/Parent/child/my_doc" created="29-05-2012 10:01" createdRaw="2014-12-02T10:55:18Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
        <result version="0.2" url="http://hbngjfgj47s20/register/_vti_history/2/Shared Documents/Parent/child/my_doc.txt" created="29-05-2012 11:01" createdRaw="2014-12-02T10:59:25Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
    </results>
    Kindly help me on this.

    Hi,
    According to your post, my understanding is that you want to change date format for ‘Created’ field in the getVersions web service.
    Per my knowledge, you can get the date format for ‘Created’ field as “MM/dd/yyyy HH:mm a”.
    For more information, you can refer to:
    Versions.GetVersions Method (Versions)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Maintain separate table for these  fields

    I want to maintain separate table for this fields.
    1. Sales order number
    2.item number
    3.material
    4.qty pricing date price change date if u user changes price manually.
    5. Order price
    6.sales value
    Where will we get these fields  from which table.

    Hi,
    1. Sales order number = VBAK-VBELN
    2.item number = VBAP-POSNR
    3.material = VBAP-MATNR
    4.qty pricing date price change date if u user changes price manually.
    Qty from VBAP-KWMENG
    Price date = VBKD-PRSDT
    Change Date = VBAK-AEDAT
    5. Order price = VBAK-NETWR
    Thanks,
    Mandar

  • Hi search help for my field?

    Hi friends,
                   I have got a input field in screen painter with name FORMNo.
    Formnos are stored in Zform table.
    I want to create search help for this field please can anyone share me the procedure for createing the search help for my field. Its veru veru urgent please help me with answer.
    points will awarded for helpful answer.
    THks

    hi,
    PARAMETERS: p_filnam TYPE ibipparms-path.
    For value request use the below function
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam. 
    And
    you have to call one functio nmodule
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       program_name        = syst-cprog
       dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
    IMPORTING
       file_name           = p_filnam-----pass the p_filnam here
    Reward Points if usefull
    Regards
    Fareedas

  • Search help for custome field with different data type

    Hi Friends,
    I have Created a  custom table in which i have created a field is
    ZMATLONG which stores material number.
    Now the data element is zdmat which is of char 40..
    Now i want to give search help for this field ZMATLONG..
    I have tried many ways giving search help to this field
    a) i Tried to attach the standard search help of MATNR ie : MAT1 but its showing me data type inconsistancy
    b) i created a zsearch help and in the selection method i have used database table mara , again here iam getting the same error data type inconsistancy...
    Now how can i give the search help like matnr field to my custom field ZMATLONG...
    How can i do it..?
    Thanks in Advance..
    Regards
    Kumar

    Hi,
    MATNR ahs length 18 and ZMATLONG has length 40.So due to this u cannot use MAT1 search help.
    best way would be cope MAT1 into Z search help. Then in the search help parameter change the data element of field
    MATNR as ZMATLONG.
    Now if you assign Z search help to ZMATLONG  it will work.
    I tried this its working fine.
    Shanmugavel Chandrasekaran

  • Incomletion Procedure for Delivery Fields

    Hi..
    I want to configure InCompletion Procedure for deliveri fields.
    Can you please guide me how shd I proceed?
    Actually I want to check incom process before finalising the user exit...
    Please help!!!
    Nisha

    hi
    define status groups----OVA0
    define incomplete procedures---OVA2
    assign incomplete procedure---VUA2
    Incompleteness in the Delivery 
    Use
    When you are creating and processing deliveries, it is often necessary to check the completeness of the delivery. A delivery is considered to be incomplete if fields relevant for the delivery have not been filled, or if certain settings defined in Customizing have not been taken into account. The delivery incompletion log ensures that this completion check is executed automatically.
    In the delivery, you can check the following levels for completeness:
    Header data of the delivery
    Item data of the delivery
    Partner data
    Texts
    You can either display a list of all incomplete deliveries or go directly from delivery processing to the incompletion log. See also Processing Incompletion Log
    Integration
    The incompletion log controls whether the next subsequent functions are allowed in the case of an incomplete delivery:
    Inbound delivery     
    Outbound delivery
    Putaway     
    Picking
    Packing     
    Packing
    Goods receipt     
    Goods issue
    Billing document
    Also, it is possible to set the system so that incomplete deliveries cannot be saved to the database. If, in such a case, the delivery is created in a collective processing run, the reasons for the incompleteness are printed in the collective processing log and the delivery is not created by the system.
    For example, you can detect the following situations through the incompletion log:
    Batches for an item were not assigned completely
    Too many items were picked or put away
    Required description texts are missing
    IMG--sd-basic functions----log of incomplete terms

  • TS1702 Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a

    Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a blur.

    Do you have a question? This is a user to user help forum. Apple is not here only other users like yourself. You don't report problems to Apple here.
    By the way, it might help if you indicated where you are located.
    To complain to Apple use http://www.apple.com/feedback/ipad.html

  • Hi ,i want provide a input help for a Selection input field

    Hi Experts,
    I want to provide  a input help for field in selection-screen ,
    this field is non primary key Custom Table(Z) selection input field .
    how we can get ,f4 help for this field.
    how to get f4 help Suppose field Link s_mtart-low,s_mtart-high,
    What are the function moduled available for this >
    Thanks in Advance.
    Regards,
    Hitu.

    Hi,
    refer to below code.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-low.
    **//To provide F4 help to S_USNAM-LOW
    PERFORM f_f4help_usnam USING 'S_USNAM-LOW'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-high.
    **//To provide F4 help to S_USNAM-HIGH
    PERFORM f_f4help_usnam USING 'S_USNAM-HIGH'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-low.
    **//To provide F4 help to S_WBS-LOW
    PERFORM f_f4help_wbs USING 'S_WBS-LOW'.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-high.
    **//To provide F4 help to S_WBS-HIGH
    PERFORM f_f4help_wbs USING 'S_WBS-HIGH'.
    *&      Form  f_f4help_usnam
        To provide F4 help to username
         -->P_0019   text
    *FORM f_f4help_usnam  USING    value(p_0019) TYPE any.
    **// To retrieve username from mkpf.
    SELECT bname
            FROM usr01
            INTO TABLE it_usnam.
    SORT:  it_usnam  BY usnam.
    DELETE ADJACENT DUPLICATES FROM it_usnam COMPARING usnam.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield            = c_retusnam
      PVALKEY                = ' '
        dynpprog              = c_dynpprog
        dynpnr                = c_dynpnr
         dynprofield          = p_0019
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org            = c_s
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
      IMPORTING
      USER_RESET             =
        TABLES
          value_tab           = it_usnam
        field_tab            = it_usnam.
      return_tab             = l_it_ret
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *ENDFORM.                    " f_f4help_usnam
    *&      Form  f_f4help_wbs
        To create F4 help for wbs element
         -->P_0039   text
    *FORM f_f4help_wbs  USING    value(p_0039) TYPE any.
    **// To retrive wbs element from mseg
    SELECT pspel
            FROM pspl
            INTO TABLE it_wbs.
    SORT:it_wbs   BY  wbs.
    DELETE ADJACENT DUPLICATES FROM it_wbs COMPARING wbs.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
      DDIC_STRUCTURE         = ' '
         retfield               = c_retwbs
      PVALKEY                = ' '
       dynpprog               = c_dynpprog
       dynpnr                 = c_dynpnr
        dynprofield            = p_0039
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
        value_org              = c_s
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
       TABLES
         value_tab              = it_wbs
      FIELD_TAB              =
      return_tab             = l_it_ret1
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *ENDFORM.                    " f_f4help_wbs

  • Order Import - Validation failed for the field - End Customer Location

    I am trying to import an order using standard import program and it is failing with below error:
    - Validation failed for the field - End Customer Location
    I have checked metalink to debug this and found nothing, the values i have used to populate the interface table or valid.
    Can someone please post your views on this, on where the problem might be.
    Thanks!

    Hello,
    Try the following
    1) Check if any processing constraints are applied to customer/location
    2) Try to create a new customer and associate internal location.
    Create a new order to reproduce the issue
    Thanks
    -Arif

  • Value for customized fields didn't get copied to back end system

    Hi,
    We are in SRM 4.0 and using extended classic scenario.
    We have defined two customized fields in account assignment tab in shopping cart and SRM Po and also in back end PO.
    SRM POs are having values for the field but while transferring the Po details to back end system, for some of the line items of the Po the entries are missing in back end system.
    Problem is only with few line items of the PO.
    Have tried with FM like BBP_PD_PO_TRANSFER_EXEC  and BBP_PD_SC_RESUBMIT, but it is not transfering the values to back end.
    Is there any other way to push the missing values to back end system.
    Please advise.
    Thanks.

    Sk,
    Table adjustment has to be done accordingly. Get in touch with your Basis team.
    Thanks.

  • A download, iPhoto, Version 9.4.2, released November 2012; has been on my download page for three weeks.  Despite a half dozen attempts to install it, it has never completed the download.  Near the end it always says an error has occurred.  What can I do?

    A download, iPhoto, Version 9.4.2, released November 2012; has been on my download page for three weeks.  Despite a half dozen attempts to install it, it has never completed the download.  Near the end it always says an error has occurred.  What can I do?  The unit onto/into which I am attempting to install this is a new MacBook Air.
    thank you.
    Otto

    Thanks LN.
    I tried.  It would not download.  A drop down notice said an error had occurred and to return to the purchase page; which I have done on numerous occasions.  (What I am to do on the purchase page I am not sure, other than to click on purchases and see that the same iPhoto download is available.  By the way, this was not purchased.  It just showed up with two other items free items, which did download nicely.)
    Otto

Maybe you are looking for

  • How to use globally defined variable in SQ01

    Hi, I have created one InfoSet using SQ02. In that I have declared some Additional Fields. These Additional Fields are of type String , so I have declared thses fields in DATA Section of Code of Infoset as it is not possible to define a custom field

  • Listing the objects in the particular frame

    I have just started to refresh Swing. I want all the objects available in the particular frame. Ex. I have a login frame. I want all the objects available in the frame. ie. objects of two textfields. objects of two labels (un and pwd) submit button c

  • Cannot get java system call to work

    I am trying to make a system level call that will create a new user but have not been sucessful. I am reading the list of new users from newbousrs.txt file. Why am I getting the error message shown below? Here is my program: import java.io.*; public

  • Employee download from HR

    Hi all,   As per the OSS note 312090 employee can be downloaded from HR by setting filters.    How will I filter only sales rep from the entire list of employees as the employee master data will contain both sales rep as well as internal employees li

  • Firefox not loading/running/opening

    In my laptop firefox is not working. It was working initially one day it stopped opening so i uninstalled it and could not delete scriptff.dll file which I deleted along with the technical support of Mcafee. But still it is not working. after install