Control Break in Smartform

Dear all,
   How to write control break statement in smart form while printing multiple line items in loop.
like at new at last etc.....
For eg; multiple lines having same material  with different batch, how to total all batches for the same material  and print it for single material.
Thanks in advance.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Nov 5, 2008 11:15 AM

Hi
Make use of the Calculations tab
select accordingly the operation required ( TOTAL)
Give the field name which you want to total
Give the Target field name where you want the total to be and use this field to display the Total
Give the time for total also
i.e After Loop etc.
if you want SUBTOTALS
then print this value in the Event which you created as I mentioned in the previous Post
If GrandTotal
Then in the Footer area of the table print this value.
in the conditions tab remove the check box AT PAGE BREAK if you want only at end of all the  data
http://help.sap.com/saphelp_nw70/helpdata/EN/a5/de6838abce021ae10000009b38f842/frameset.htm
regards
Prasanth

Similar Messages

  • Smartforms, how to use control break events

    Please help with this requirement.
    Purchase Docu No.111
    Pur Item No       Mat no       Quantity 
    1                        2356      2000
    2                     1256      2000
    3                     8556      2000
    Purchase Docu No.112
    Pur Item No    Mat no    Quantity 
    1                      9656      2000
    2                      7356      2000
    3                      1356      2000
    Purchase Docu No.113
    Pur Item No    Mat no    Quantity 
    1                      5356      2000
    2                      8356      2000
    This i have to design for the smartform.
    1 header data then its item data.
    like is Script i can call the WIndow elements using control break events in the driver prog but how to get this kind of output in Smartforms.???????
    Thanks

    I dont want trigger new page.
    In the same page i want like this
    I have purchase docu data in only 1 internal table.
    So, for every new VBELN, under this i want its corresponding item details.
    I have created the command node for the main window with 2 rows, in the 1st row i am giving VBELN and in the 2nd row i am giving in item details like item no, matnr etc etc and in the condition its askng Field name and Comparison Value.
    How shold i give condition.??????
    Thanks
    Edited by: Jalaaluddin Syed on May 1, 2008 5:03 PM

  • Control break statements in smart forms

    Hi,
    Can we use control break statements(at new,at end of) in smart forms?
    if no why?
    if yes, how?
    Regards,
    Sonika

    you can use control block statements in smartforms by using the SORT events.
    In TABLES go to to the SORT section.Here you can give the field by which you want the table to be sorted.There are two radio buttons available for sort : SORT BEGIN and SORT end.
    On selecting any one sort event are generated automatically and event nodes are created in smartforms.Inside these event nodes you can add text nodes or code nodes and write your code.
    SORT BEGIN works like AT NEW
    SORT END works like AT END OF.

  • ANY SY-INDEX REFLECT CHANGES WHEN CONTROL BREAK STATEMENT PROCESS

    Dear Guru's,
                     I have a requirement where i have to move the values to variable when control break (AT END OF) process. So i want to move the values according to the end of Vendor so for that  i want to know is there any sy-index available which reflects changes when Control break (AT end of) process.
    LIKE Sy-subrc = 0 when select statement fetches record or sy-tabix is like counter for loop.
    Hope to get reply soon.
    Regards,
    Himanshu Rangappa

    Hi,
    There is no system Fields for it.
    But your requirement can be done with 'AT NEW' and 'AT END' statement.
    Refer this sample example,
    loop at otab.
        at new module.
          move otab-module to otab2-module.
        ENDAT.
          at END OF effort.
          sum.               "Do your calculations here
          move otab-count to otab2-count.
          append otab2.
        endat.
      endloop.

  • In alv report can i use control break events? if no .whay?

    Hi all,
    in alv report can i use control break events? if no .whay?

    hi,
    you can use control break statements in ALV report.
    for example: if one PO is having more than one line item, that time you need to display PO only once.

  • Doubts with control break statements on internal table loops (AT/ENDAT)

    Hi, i've had a couple of doubts for a long while which I hope someone can clarify today:
    1) I know how to use the AT statements, however, i'm not sure I get correctly what this part of help regarding this commands means:
    <i>"The control level structure with internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In this context, the criteria according to which you sort the internal table are unimportant."</i>
    I've always sorted the internal table before the control break and it works that way. For example:
    SORT ITAB BY EBELN EBELP.
    LOOP AT ITAB.
      AT NEW EBELN.
    *   Code for the order header
      ENDAT.
    ENDLOOP.
    If I <b>don't</b> sort the internal table, it doesn't work! (i get dupplicated processing). In the example, if i have more than one register with the same EBELN and they're not consecutive, the header gets processed twice. I really don't get that part of the help text.
    2) I know this: <i>"At the start of a new control level (i.e. immediately after AT), the following occurs in the output area of the current LOOP statement:
    All character type fields (on the right) are filled with "*" after the current control level key.
    All other fields (on the right) are set to their initial values after the current control level key."</i>
    My doubt is: WHY is that this way? Because sometimes (most times) I need those fields INSIDE the statement! So when that happened i've solved it in one of three ways:
    LOOP AT ITAB INTO WA_ITAB.
      WA_ITAB_AUX = WA_ITAB.
      AT NEW FIELD.
        WA_ITAB = WA_ITAB_AUX.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    LOOP AT ITAB INTO WA_ITAB.
      AT NEW FIELD.
        READ TABLE ITAB INDEX SY-TABIX INTO WA_ITAB.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    * (Without AT)
    LOOP AT ITAB INTO WA_ITAB.
      IF WA_ITAB-FIELD <> FIELD_AUX.
        FIELD_AUX = WA_ITAB_FIELD.
    *   ...Rest of the code for the first register
      ENDIF.
    ENDLOOP.
    Is there any problem with this way of coding? Can be done better?
    Thank you very much in advance.

    Hi..,
    1)
    See if u sort the table on a field on which u r using AT ENDAT .. then all the records which are having the same value for that field will form a group or those reocrds will be at one place.. so when u sort the table for all the records  AT ENDAT  will get executed onli once..
    If u dont sort this table on this field then all these records will be at different places and in between there may be records with different value for this field.. so this AT ENDAT will get executed for each record !!
    2)
    No u cannot use the Right hand fields of the field in the table .. Because these AT events work as Group based operations... So till that field on which AT ENDAT is working it breaks that record into two groups.. One is the left hand fields including that field.. and right hand fields as another group.. and makes the right hand group as stars ****.  Thats y u can observe that even any one field in the left hand group changes the AT ENDAT will get executed  !!!!
    Hope u understood !!!
    regards,
    sai ramesh

  • Problem with the control break statement  - AT END OF

    data : IT_DATA   TYPE STANDARD TABLE OF /BIC/OH0SPA_OHD WITH  KEY /B28/S_D1DVOX5 ,
    FIELD-SYMBOLS :   <ls_data> TYPE any,
    SELECT * FROM (c_open_hub) INTO TABLE IT_DATA .
    *IF sy-subrc = 0.
    *ENDIF.
    Create the GUID for header
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32 = LV_GUID.
    TRY.
        CALL METHOD CL_GDT_CONVERSION=>GUID_OUTBOUND
          EXPORTING
            IM_GUID_C = LV_GUID
          IMPORTING
            EX_VALUE  = LV_UUID.
      CATCH CX_GDT_CONVERSION  INTO go_exc .
        gv_text = go_exc->get_text( ).
    Application log for errors
        IF gv_text IS NOT INITIAL.
          PERFORM add_msg_to_log CHANGING lt_return.
          CALL FUNCTION '/SPA/APPL_LOG'
            EXPORTING
              LV_OBJECT    = '/SPA/APPL'
              LV_SUBOBJECT = '/SPA/ESOA'
              IT_RETURN    = lt_return.
        ENDIF.
    ENDTRY.
    OUTPUT-TRADE_PROMOTION_CRMBULK_CREATE-MESSAGE_HEADER-ID-CONTENT = LV_GUID.
    OUTPUT-TRADE_PROMOTION_CRMBULK_CREATE-MESSAGE_HEADER-UUID-CONTENT = LV_UUID.
    SELECT * FROM DD03T INTO TABLE lt_dd03t WHERE TABNAME = c_open_hub AND DDLANGUAGE = 'E' AND AS4LOCAL = 'A'.
    *IF sy-subrc = 0.
    *ENDIF.
    Sort the delta table
    SORT it_data.
    populate the output structure
    LOOP AT IT_DATA ASSIGNING <ls_data>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_keyfigures.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_keyfigures>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_signdata.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_signdata>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_bbtype.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_bbtype>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_customer.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_customer>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_product.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_product>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_territory.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_territory>.
    READ TABLE lt_dd03t INTO ls_dd03t with KEY DDTEXT = c_time.
    ASSIGN COMPONENT ls_dd03t-FIELDNAME OF STRUCTURE <ls_data> to <l_time>.
      CASE <l_keyfigures>.
        WHEN c_sd.
          PERFORM DATE_CALC USING <l_signdata> CHANGING  LV_DATE.
          ls_period_term-start_date = lv_date.
        WHEN c_ed.
          PERFORM DATE_CALC USING <l_signdata> CHANGING  LV_DATE.
          ls_period_term-end_date = lv_date.
        WHEN c_uplift.
          LS_PRODUCT_KF-ID-CONTENT = c_uplift_qyts.
          LS_PRODUCT_KF-VALUE = <l_signdata>.
         LS_PRODUCT_KF-YEAR = lv_week(4).
         LS_PRODUCT_KF-CALENDAR_PERIOD_ORDINAL_NUMBER = lv_week+4.
          APPEND LS_PRODUCT_KF TO LT_PRODUCT_KF.
        WHEN OTHERS.
        PERFORM DATE_CALC USING <l_signdata> CHANGING  LV_DATE.
         ls_period_term-start_date = lv_date.
    Get week
         CALL FUNCTION 'DATE_GET_WEEK'
           EXPORTING
             DATE = LS_PERIOD_TERM-START_DATE
           IMPORTING
             WEEK = LV_WEEK.
    append Keyfigure
          LS_PRODUCT_KF-ID-CONTENT = <l_keyfigures> .
          LS_PRODUCT_KF-VALUE = <l_signdata>.
         LS_PRODUCT_KF-YEAR = lv_week(4).
         LS_PRODUCT_KF-CALENDAR_PERIOD_ORDINAL_NUMBER = lv_week+4.
          APPEND LS_PRODUCT_KF TO LT_PRODUCT_KF.
    append tradespend
          SELECT SINGLE * FROM /SPA/SPEND_MAP INTO CORRESPONDING FIELDS OF LV_/SPA/SPEND_MAP
                 WHERE KEY_FIGURE = <l_keyfigures>.
          IF sy-subrc = 0.
            LS_TRADE_SPEND-TYPE_CODE-CONTENT = LV_/SPA/SPEND_MAP-SPEND_TYPE.
            LS_TRADE_SPEND-CATEGORY_CODE-CONTENT = LV_/SPA/SPEND_MAP-SPEND_CATEGORY.
            LS_TRADE_SPEND-METHOD_CODE-CONTENT = LV_/SPA/SPEND_MAP-SPEND_METHOD.
            APPEND LS_TRADE_SPEND TO LT_TRADE_SPEND.
          else.
            lv_flg = 'X'.
          ENDIF.
      ENDCASE.
    AT END OF /B28/S_D1DVOX5.   "
        SELECT SINGLE * FROM  /SPA/SO_TER_MAP INTO LS_/SPA/SO_TER_MAP WHERE TERRITORY = <l_territory>.
        IF sy-subrc = 0 AND lv_flg IS INITIAL.
    Create the GUID for TP's
          CALL FUNCTION 'GUID_CREATE'
            IMPORTING
              EV_GUID_32 = LV_GUID_MESSAGE.
          TRY.
              CALL METHOD CL_GDT_CONVERSION=>GUID_OUTBOUND
                EXPORTING
                  IM_GUID_C = LV_GUID_MESSAGE
                IMPORTING
                  EX_VALUE  = LV_UUID_MESSAGE.
            CATCH CX_GDT_CONVERSION .
          ENDTRY.
    populate the product
          LS_PRODUCT-ID-CONTENT = <l_product>.
          LS_CUSTOMER-ID-CONTENT = '300022'.
          LS_CUSTOMER-ROLE_CODE = '00000105'.
          LS_PRODUCT-KEY_FIGURE = LT_PRODUCT_KF.
          APPEND LS_PRODUCT TO LT_PRODUCT.
          APPEND LS_CUSTOMER TO LT_CUSTOMER.
          APPEND LS_DESCRIPTION TO LT_DESCRIPTION.
          APPEND LS_PERIOD_TERM TO LT_PERIOD_TERM.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-SALES_AREA-ORGANISATIONAL_CENTRE_ID = LS_/SPA/SO_TER_MAP-SALES__ORG.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-SALES_AREA-DISTRIBUTION_CHANNEL_CODE-CONTENT = LS_/SPA/SO_TER_MAP-DIST_CHANNEL.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PLANNING_ACCOUNT-CUSTOMER_INTERNAL_ID = <l_customer>.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PLANNING_PROFILE_GROUP_CODE-CONTENT = '4TPM'.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-TYPE_CODE-CONTENT = 'Z002'.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-UPLIFT_ACTIVE_INDICATOR = 'X'.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PLANNING_INFORMATION-MARKETING_PROJECT_PLANNING_PRO = '5'.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PLANNING_INFORMATION-CALENDAR_UNIT_CODE = 'WEE'.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-TRADE_SPEND = LT_TRADE_SPEND.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PARTY = LT_CUSTOMER.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-DESCRIPTION = LT_DESCRIPTION.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PLANNING_INFORMATION-PRODUCT = LT_PRODUCT.
          LS_TRADE_PROMOTION-TRADE_PROMOTION-PERIOD_TERM = LT_PERIOD_TERM.
          LS_TRADE_PROMOTION-MESSAGE_HEADER-ID-CONTENT = LV_GUID_MESSAGE.
          LS_TRADE_PROMOTION-MESSAGE_HEADER-UUID-CONTENT = LV_UUID_MESSAGE.
          LS_/SPA/REPORT_TAB-SPA_TP_ID = <l_bbtype>.
          LS_/SPA/REPORT_TAB-MESSAGE_ID = LV_GUID_MESSAGE.
          LS_/SPA/REPORT_TAB-CREATE_DATE = SY-DATUM.
          INSERT /SPA/REPORT_TAB FROM LS_/SPA/REPORT_TAB.
          APPEND LS_TRADE_PROMOTION TO LT_TRADE_PROMOTION.
          OUTPUT-TRADE_PROMOTION_CRMBULK_CREATE-TRADE_PROMOTION_CRMCREATE_REQU = LT_TRADE_PROMOTION.
          CLEAR : LT_DESCRIPTION, LT_PERIOD_TERM,LT_CUSTOMER, LT_PRODUCT, LT_PRODUCT_KF, LT_TRADE_SPEND,LS_/SPA/HEADER_TAB.
        ENDIF.
        CLEAR lv_flg .
      ENDAT.
    ENDLOOP.
    My problem is AT-END OF STATEMENT IS executing for each and every record of same /B28/S_D1DVOX5.
    Please help me from this problem

    Hello,
    First of all to know clearly about AT END.
    Let's say In IT_DATA fields are F1 F2 F3 /B28/S_D1DVOX5 F5.
    then AT END of /B28/S_D1DVOX5 means for each new value of this field at the end it will trigger.
    Please ensure thet IT_DATA is sorted by this field and then used Control break.
    Thanks,
    Pramod

  • Can we use control events in smartforms

    Hi all,
    I am srinivas. can we use control events in smartforms, I mean at new, at end of ..... if these are not used can you suggest me any alternative....
    Actually my requirement is like a classical report, for which I need to display subtotal and grand totals based on two fields....
    Please help me out in this issue as it is very urgent.
    <b><REMOVED BY MODERATOR></b>
    Thanks in advance....
    Regards,
    Sri...
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Nick,
            Thanks for the reply... it is really very useful for me.
    As I discussed in my earlier mail regarding the output sequence, which should be in the below format.
                                           number       quantity uom      unitprice        amount curr
    plant
           material
                   date
                                             x                 y                    z                      A           
                                             e                 f                     g                      h
                                             p                 q                     r                      s
                   subtotal date..... 1                   2                    3                       4
                   subtotal  material.5                  6                    7                       8
    As you said when I using <b>event of Begin</b> its working fine. but while using the <b>event of end</b>,  I am specifying date and then matnr (sort) its taking(nodes are created mean first matnr and then date) in the reverse order and when I am taking matnr and date it is placing the events(nodes) in the right order but the order date is not triggering.
    can please tell me how to proceed here..
    waiting for your reply..
    Regards,
    Srinivas

  • What happen if i use controll break statement in between select & endselect

    Hi all,
    what happen if i use controll break statement in between select & endselect ?
    Thanks in Advance
    KR

    Hi for reference u can go through this code example
    data:
      fs_tab like sflight.
      data:
       t_tab like standard table of fs_tab.
       select * from sflight into table t_tab.
       loop at t_tab into fs_tab.
         write: / fs_tab-carrid.
       endloop.
       refresh t_tab.
       clear fs_tab.
       select * from sflight into fs_tab.
         at new fs_tab-carrid.
           append fs_tab to t_tab.
         endat.
       endselect.

  • Interactive report with control break displays no data, until control break is unchecked

    Hello,
    I have an interactive report that is base upon a collection. When one first access the page the report shows no data(no errors are given) and the control break box is red. Once the control break box is unchecked, all the data is shown. Furthermore, navigating to another page causes the same issue.
    Any idea into how I can solve this issue will be appreciated.
    Thank you,
    Apex 4.2
    Oracle 11g 2.0.3
    Apache Tomcat
    Guyenko

    Vincent,
    The aggregates are applied to each control break group, or, if you don't have any, then they're applied to the full report. So, in your case the "count" (= count of non-null values for a column, same as in SQL) should mean there is 1 non-null value in each group.
    Does that description match what you're seeing?
    - Marco

  • How to put page break in SMARTFORMS

    Hi Guys,
              Can anyone please let me know How to put page break in SMARTFORMS
    Regards
    Avi

    Hi,
    Look at the below thread, you will get the answer
    https://www.sdn.sap.com/irj/sdn/profile?userid=2522810
    Regards
    Sudheer

  • Is there any way to use Control Break in a SQL Query

    Hi,
    Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1.
    Is there any way to modify the SQL query.
    SQL
    select dept, loc, count(*)
      from dept
    group by dept, locOutput-1
      Dept      Loc       Count(*)
      10         AA        1
      10         BB        2
      10         CC        2
      20         AA        2
      20         BB        2Output-2
      Dept      Loc       Count(*)
      10         AA        1
                 BB        2
                 CC        2
      20         AA        2
                 BB        2Thanks,
    Deepak

    DeepakJ wrote:
    Hi,
    Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1.
    Is there any way to modify the SQL query.
    SQL
    select dept, loc, count(*)
    from dept
    group by dept, locOutput-1
    Dept      Loc       Count(*)
    10         AA        1
    10         BB        2
    10         CC        2
    20         AA        2
    20         BB        2Output-2
    Dept      Loc       Count(*)
    10         AA        1
    BB        2
    CC        2
    20         AA        2
    BB        2
    Yes, using the <tt>lag</tt> analytic function and specified ordering of the data:
    select
        nullif(d.deptno, lag(d.deptno) over (order by d.deptno, d.loc, e.mgr nulls first)) deptno
      , nullif(d.loc, lag(d.loc) over (order by d.deptno, d.loc, e.mgr nulls first)) loc
      , e.mgr
      , count(*) n
    from
        dept d
          join emp e
            on d.deptno = e.deptno
    group by
        d.deptno
      , d.loc
      , e.mgr
    order by
        d.deptno
      , d.loc
      , e.mgr nulls first;
    DEPTNO  LOC       MGR   N
        10  NEW YORK         1
                      7782   1
                      7839   1
        20  DALLAS    7566   2
                      7788   1
                      7839   1
        30  CHICAGO   7698   4
                      7839   1
        40  BOSTON    7698   2
                      7902   1

  • Control break behavior

    Hi,
    Can anyone tell if there's a way to override the default behavior of Control Break?
    In my report (a schedule), I have a column that holds the values for days (monday, tuesday, etc.).
    I want to control break on that column but keep the resulting grups ordered in a natural order (monday first, tuesday second and so on).
    I can write the sql that generates my report that way by using decode, but once I Control Break apex is applying a new order by clause on my report, destroying my order.
    Any ideas on how to tell apex how to order for control break using decode, or how to disable ordering entirely when I use Control Break on a specific column?
    Thank you!
    Edited by: user2130586 on May 17, 2012 6:40 AM
    Edited by: user2130586 on May 17, 2012 6:41 AM

    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already).
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    When asking a question about "reports" it's firstly essential to differentiate between standard and interactive reports. Which is it?
    I suggest you take advantage of the opportunities provided by apex.oracle.com and reproduce the problem there...

  • How can I use control break statement in my requirement

    Hi ABAPers,
    In my requirement, I have 4 fields in sorted internal table, (audat, prdha, ipnum, netwr). In that i need to do summation of netwr field falling under same prdha(BU) for the same month
    internal table fields :
    audat  prdha  ipnum  netwr
    02      abc     1      100
    02      abc     2      200
    02      xyz     3      300
    03      abc     4      100
    03      xyz     5      300
    03      xyz     6      200
    i need output like this:
    audat  prdha  ipnum  netwr
    02      abc     1,2      300
    02      xyz     3         300
    03      abc     4         100
    03      xyz     5,6      500
    Can anyone suggest me logic for this by using control break statements
    Thanks in advance,
    Ankita
    Moderator Message: Duplciate Post.
    Edited by: kishan P on Apr 14, 2011 3:03 PM

    Hi ABAPers,
    In my requirement, I have 4 fields in sorted internal table, (audat, prdha, ipnum, netwr). In that i need to do summation of netwr field falling under same prdha(BU) for the same month
    internal table fields :
    audat  prdha  ipnum  netwr
    02      abc     1      100
    02      abc     2      200
    02      xyz     3      300
    03      abc     4      100
    03      xyz     5      300
    03      xyz     6      200
    i need output like this:
    audat  prdha  ipnum  netwr
    02      abc     1,2      300
    02      xyz     3         300
    03      abc     4         100
    03      xyz     5,6      500
    Can anyone suggest me logic for this by using control break statements
    Thanks in advance,
    Ankita
    Moderator Message: Duplciate Post.
    Edited by: kishan P on Apr 14, 2011 3:03 PM

  • At new control break statement

    hi all,
    I have a requirement where I have to display records for non duplicate matnr.
    I have used this control break statement and got
    stars for all other fields except matn in the outputr.
    code:    at new matnr.
                              write: /10 sy-vline , wa_mara-matnr COLOR 5,
                                      30 sy-vline , wa_mara-ersda COLOR 5 ,
                                      50 sy-vline , wa_mara-ernam COLOR 5 ,
                                      70 sy-vline , wa_mara-laeda COLOR 5 ,
                                      90 sy-vline , wa_mara-mtart COLOR 5 ,
                                      110 sy-vline , wa_mara-matkl COLOR 5 ,
                                      130 sy-vline , wa_mara-meins COLOR 5 ,
                                      150 sy-vline.
                            ENDAT.
    plese do send me solution for this.
    with regards,
    ASHA.

    FAQ. This has been discussed many times in the forum. Please search.

Maybe you are looking for