Proble with control breaks

Hi,
When i use control breaks  and write a output i get astreix(*) in the output.
I even tried with a local vriable but the value is not displayed in the output. i need to output the material description in the output.
My code is as follows:
LOOP AT lt_output INTO wa_output.
    AT NEW matnr.
      CLEAR: lv_matdesc.
      MOVE: wa_output-maktx TO lv_matdesc.
      WRITE: / '|',  wa_output-matnr, 30(40) lv_matdesc, 80(5)
             wa_output-cocode, 86(4) wa_output-valarea, 93  '|'.
    ENDAT.
      AT END OF matnr.
      WRITE: / '|', 2(91) sy-uline, 93 '|'.
      WRITE: / '|', '*', 4(15) wa_output-matnr, 93 '|'.
      WRITE:/'|', 48(10) lv_mat_qty, 59(4) wa_output-bum, 70(15)
            lv_mat_amt, 85 wa_output-curr, 93 '|'.
      WRITE: / '|', 2(91) sy-uline, 93 '|'.
      CLEAR: lv_mat_qty, lv_mat_amt.
    ENDAT.
    AT LAST.
      WRITE: / '|', 2(91) sy-uline , 93 '|'.
      WRITE: / '|', '***', 5(15) 'Total', 93 '|'.
      WRITE:/'|', 48(10) lv_total_qty, 59(4) wa_output-bum, 70(15)
            lv_total_amt, 85 wa_output-curr, 93 '|'.
      WRITE: / '|', 2(91) sy-uline, 93 '|'.
    ENDAT.
  ENDLOOP.
The output looks like this:
9M27W8.X9B.0               ****************************************          ****  ****
WE 4700001289   001  04/10/2002                  1.000  PC              31,667.65 CAD
WE 4700001454   001  07/29/2002                  1.000  PC              30,074.63 CAD
WE 4700001455   001  07/29/2002                  1.000  PC              30,074.63 CAD
WE 4700001457   001  07/29/2002                  1.000  PC              30,513.47 CAD
*9M27W8.X9B.0
4.000  ****           122,330.38 *****
**Total
1,441.000  ****        38,926,097.05 *****

Hi,
LOOP AT lt_output INTO wa_output.
wa_out = wa_output.    " and use this variable in the events to print the data instead of wa_output.
AT NEW matnr.
CLEAR: lv_matdesc.
MOVE: wa_output-maktx TO lv_matdesc.
WRITE: / '|', wa_output-matnr, 30(40) lv_matdesc, 80(5)
wa_output-cocode, 86(4) wa_output-valarea, 93 '|'.
ENDAT.
AT END OF matnr.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
WRITE: / '|', '*', 4(15) wa_output-matnr, 93 '|'.
WRITE:/'|', 48(10) lv_mat_qty, 59(4) wa_output-bum, 70(15)
lv_mat_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
CLEAR: lv_mat_qty, lv_mat_amt.
ENDAT.
AT LAST.
WRITE: / '|', 2(91) sy-uline , 93 '|'.
WRITE: / '|', '***', 5(15) 'Total', 93 '|'.
WRITE:/'|', 48(10) lv_total_qty, 59(4) wa_output-bum, 70(15)
lv_total_amt, 85 wa_output-curr, 93 '|'.
WRITE: / '|', 2(91) sy-uline, 93 '|'.
ENDAT.
ENDLOOP.

Similar Messages

  • 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

  • Two column region with control break

    Hi there,
    I'd like to create a report with multiple columns. There is an excellent thread here:
    Two column region, is that possible?
    However, it seems to be very hard to implement control breaks based on column value. I had a test of new 3.1 interactive report and it does not seem to have this feature either.
    Just wondering if anybody else has done something similar or has similar requirement?
    Thanks in advance,
    Ben

    Hi there,
    I'd like to create a report with multiple columns. There is an excellent thread here:
    Two column region, is that possible?
    However, it seems to be very hard to implement control breaks based on column value. I had a test of new 3.1 interactive report and it does not seem to have this feature either.
    Just wondering if anybody else has done something similar or has similar requirement?
    Thanks in advance,
    Ben

  • 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 export interactive reports with control break

    Hi to all,
    I have this interactive report:
    select "Work ID", MA01_WORK_GROUP_ID, "Relco",
    "Data Esecuzione", "Stato"
    from (
    SELECT ma01.ma01_work_id as "Work ID", ma01.ma01_work_type_id, ma01.MA01_WORK_GROUP_ID,
    MA01.MA01_START_DATE as "Data Esecuzione",
    MA01.MA01_END_DATE as "Data Fine Esecuzione",
    (SELECT ma07.ma07_system_id
    FROM mobi_aes.ma07_work_system ma07
    WHERE ma07.ma07_work_id = ma01.ma01_work_id
    --and ma07.ma07_SYSTEM_TYPE_ID = 10
    and ma07.ma07_SYSTEM_TYPE_ID in (10, 70, 90)
    AND ROWNUM < 2) AS "ID Contatore",
    (SELECT ma03_value
    FROM mobi_aes.ma03_work_metadata
    WHERE ma03_work_id = ma01.ma01_work_id
    AND ma03_name = 'FORNITURA') AS "Fornitura",
    (SELECT ma03_value
    FROM mobi_aes.ma03_work_metadata
    WHERE ma03_work_id = ma01.ma01_work_id
    AND ma03_name = 'RELCO') AS "Relco",
    MA93.MA93_DESCRIPTION as "Stato"
    FROM mobi_aes.ma05_work_status ma05, mobi_aes.ma01_work ma01, mobi_aes.MA93_STATUS_TYPE ma93, ma11_planning ma11
    WHERE ma01.ma01_work_id = ma05.ma05_work_id
    and ma11.ma11_WORK_ID = ma01.ma01_WORK_ID
    and ma93.MA93_STATUS_ID = ma05.ma05_STATUS_ID
    and ma05.MA05_STATUS_ID in ('AS','CO','NI')
    AND UPPER (ma01.ma01_work_group_id) = DECODE(:P103_WORK_GROUP_ID,'-1',UPPER (ma01.ma01_work_group_id),:P103_WORK_GROUP_ID)
    and trunc(ma11.ma11_start_date) >= DECODE(:P103_START_DATE,'-1',to_date('01/01/1970','dd/MM/yyyy'),to_date(:P103_START_DATE,'dd/MM/yyyy'))
    and trunc(ma11.ma11_END_DATE) <= DECODE(:P103_END_DATE,'-1',to_date('31/12/9999','dd/MM/yyyy'),to_date(:P103_END_DATE,'dd/MM/yyyy'))
    ), mobi_aes.ma51_work_type ma51
    where ma51.ma51_work_type_id = ma01_work_type_id
    and ma51.ma51_work_type_id in (7,50)
    I set a control break on the "Relco" column, so APEX generates correctly more "sub-report".
    I need to export into csv file every single "sub-report".
    Is it possible ?
    Does another solution exist ?
    Thanks for all
    Francesco

    Hello,
    Getting the breaks in the csv export doesn't work unfortunately.
    You would need to create your own procedure to get the correct csv.
    There are many blog posts for that
    e.g http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.sumneva.com/

  • Control break-statement: SUM

    Hi All,
    I am woking with Control break-statmens, SUM.
    LOOP AT IT_SELECT.
    AT NEW PSPNR.
    SUM.
    WRITE:/ IT_SELECT-WERKS,
            IT_SELECT-PSPHI,
            IT_SELECT-PSPNR,
            IT_SELECT-VERNA,
            IT_SELECT-KZWI2,
            IT_SELECT-DMBTR.
    ENDAT.
    ENDLOOP.
    WERKS from EKPO type Char & VERNA from PRPS type Char are displaying as ***************.
    How can I get the actual values instead of ********** for the above Char type fields?
    Thanks in advance,
    Kal Chand

    Hi,
    Go throught his link. This is same for all control break statements.
    Re: output not getting properly
    Hope this helps you
    Raj

  • Aggragate and Control Break problem

    According to HELP:
    "Aggregates are displayed after each control break and at the end of the report within the column they are defined. "
    I have report with control break by 1 field.. I've added SUM aggregate function to Orders column.
    For now I can see summary by group but no summary at the end of report.
    Is this know problem?
    Thank you,
    alex

    Alex,
    Well, the help text may be misleading. But aggregates are displayed in both places mentioned, just not simultaneously. It should be easy to see the grand totals by toggling off the control break settings.
    If you want to see both at the same time, I'd add that to Carl's Post 3.1 Enhancement Request thread: Enhancement Request Thread : Post 3.1
    Thanks,
    Marco

  • 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

  • Preserving control break formatting in report downloads with BI Publisher

    Hello,
    I am using APEX 4.0.2 and would like to know if anyone has a step by step process or tutorial for preserving control break formatting in an interactive report that has been downloaded to any or all of the available file formats. I am using BI Publisher, to which I am very new, to do the report printing of the Reports Region to a PDF, RTF, XLS, CSV or HTML file. Currently, when we download the report to any of the file formats, the formatting is stripped out and only standard row/columns are being saved.
    BTW, I have changed my username to something more friendly but it has not yet taken effect.
    Thanks,
    Marcy

    Hi Venkat,
    Thanks for your quick respond.
    1.) Auto Run is enabled. And the report runs automatically as well. But then it ignores the dashboard prompt (as a regular report would do as well). But when I choose some values in the prompt and then press go. Then it says I have to press on view as well.
    2.) no that is not the case. My report is so big that it always need a scroll bar ;) also adjusting the size settings in the dashboard doesn't help. The only occurs when viewing in HTML, when previewing in excel or RTF it all just work fine.
    3.) true, but ow well this is the least importetant one ;) so if this doesn't work, than it doesn't work ;)
    4.) Ok, I will have a look on that.
    5.) I did enabled HTML and EXCEL outputs in my BIP report. But when the first point is working, then I don't want to see the control bar anymore and I want to have the output on the dashboard in HTML and then I want to build a button, or a link or something that exports the request to excel. Is that possible?

  • 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.

  • 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

  • Problem with control IDs

    I have two different panels in my program with various controls. The .h file
    created by Labwindows for my .uir is partially reproduced below:
    #include
    #ifdef __cplusplus
    extern "C" {
    #endif
    /* Panels and Controls: */
    #define PANEL 1
    #define PANEL_DATE 2
    #define PANEL_FILE 3
    #define PANEL_EWTR 4
    #define PANEL_PROCESS 5
    #define PANEL_CONVERT 6
    #define PANEL_DONE 7
    #define PANEL_PRINT 8
    #define PANEL_SAVE 9
    #define PANEL_TEXTBOX 10
    #define PANEL_TEMP 11
    #define PANEL_RH 12
    #define PANEL_ATM 13
    #define PANEL_MARKER_FREQ 14
    #define PANEL_MARKER_DB 15
    #define PANEL_MARKER_MIN 16
    #define PANEL_MARKER_MAX 17
    #define PANEL_MARKER_RIGHT 18
    #define PANEL_MARKER_LEFT 19
    #define PANEL_GRAPH 20
    #define PANEL_SCALE 21
    #define PANEL_MARKER 22
    #define PANEL_TEXTMSG_3 23
    #define PANEL_TEXTMSG_4 24
    #define PANEL_TEXTMSG_2 25
    #define PANEL_TEXTMSG 26
    #define PANEL_2 2
    #define PANEL_2_GRAPH 2
    #define PANEL_2_N_5 3
    #define PANEL_2_N_4 4
    #define PANEL_2_N_3 5
    #define PANEL_2_N_2 6
    #define PANEL_2_N_1 7
    #define PANEL_2_LED_5 8
    #define PANEL_2_LED_4 9
    #define PANEL_2_LED_3 10
    #define PANEL_2_LED_2 11
    #define PANEL_2_LED_1 12
    #define PANEL_2_DONE 13
    #define PANEL_2_MARKER_FREQ 14
    #define PANEL_2_MARKER_DB 15
    #define PANEL_2_MARKER_MIN 16
    #define PANEL_2_MARKER_MAX 17
    #define PANEL_2_MARKER_RIGHT 18
    #define PANEL_2_MARKER_LEFT 19
    #define PANEL_2_PRINT 20
    #define PANEL_2_BUTTON_5 21
    #define PANEL_2_BUTTON_4 22
    #define PANEL_2_BUTTON_3 23
    #define PANEL_2_BUTTON_2 24
    #define PANEL_2_BUTTON_1 25
    #define PANEL_2_CURRENT 26
    #define PANEL_2_TEXTMSG_2 27
    #define PANEL_2_TEXTMSG_3 28
    #define PANEL_2_TEXTMSG_4 29
    #define PANEL_2_TEXTMSG 30
    #define PANEL_2_MARKER 31
    The problem is that Labwindows has assigned the same control ID to controls
    in the two panels, for example, PANEL_MARKER_MIN and PANEL_2_MARKER_MIN have
    the same ID, i.e. 16. If I try to use both of these controls in the same
    "case" statment, I get an error "Duplicate case label '16'." If I try to
    modify the .h file manually, and change the ID for PANEL_2_MARKER_MIN to
    216, there is no error and the program executes but it no longer recognizes
    mouse clicks on the PANEL_2_MARKER_MIN control.
    Is there some way to fix this problem? Is there a way to force Labwindows
    to assign different IDs for all controls, regardless of what panel they are
    in?
    Thank you for your help in advance.

    "...The problem is that Labwindows has assigned the same control ID to
    controls
    in the two panels, for example, PANEL_MARKER_MIN and PANEL_2_MARKER_MIN have
    the same ID, i.e. 16. If I try to use both of these controls in the same
    "case" statment, I get an error "Duplicate case label '16'." ..."
    UIR editor counts controls inside the single panel they are in. In your
    example, PANEL_MARKER_MIN and PANEL_2_MARKER_MIN have the same ID 'cause
    both are the 16th control in their panel, rare case but it happens...
    There is no way to force UIR editor to assign specific IDs to controls,
    unless you add in one panel decoration controls or text messages and put
    them before the other control in 'panel order' (ctrl+t in the editor): with
    that trick you put in one panel all controls star
    ting with order 0 (that is,
    with control ID starting from 1 in the .h file), while in the second you
    have non-operative contrls with lower IDs and operative controls or
    indicator with higher IDs. This is NOT a polite solution since it relies on
    the number of controls in the panels: every time you add new controls to a
    panel, you should manage how IDs are assigned to them in order to avoid this
    problem...
    The best solution is to have two nested cases in your code, first one to
    manage different panels, second one to manage different controls:
    switch (panel) {
    case PANEL:
    switch (control) {
    case PANEL_MARKER_MIN:
    break;
    // other controls of PANEL must be put here
    break;
    case PANEL_2:
    switch (control) {
    case PANEL_2_MARKER_MIN:
    break;
    // Other controls of PANEL_2 here
    break;
    That way you avoid any possible confusion and control mismatching that can
    c
    ause bizarre beaviour to your progrma.
    Hope that helps
    Roberto

  • 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...

  • Advice on importing old mini dv tapes with timecode breaks

    I've dug out mini DV tapes from storage which contain priceless (at least to me) family footage. Some of these tapes are close to 11 years old.
    Before these tapes degrade and rot further, I'm trying to generate tape archive files on my hard drive using Final Cut Pro 10.1 from these old tapes.
    The issue I'm having is with timecode breaks on some of the tapes. After a few minutes of an import, sometimes the video will go a little wonky and I'll get a timecode break and the import process aborts itself. When this happens, I'm forced to start the archive all over again from the beginning, as far as I can tell. If I get lucky, sometimes I'll get through the import after another try but other times the tape is so badly damaged that I can't get through the entire tape.
    I believe there used to be a setting to tell Final Cut Pro to ignore these breaks. It now appears this setting is gone. Or am I missing something? If it's gone, is there some kind of workaround I can employ?
    Otherwise, if Final Cut Pro isn't up to the task, can someone please recommend software that will help me convert my tapes to archives on my hard drive?
    PS. I've used a head cleaning tape on my camera to limit the problem but it still happens with some of the tapes.

    You need a DV device to be attached and recognized by your Mac.
    Open QTime X.
    File>New Movie Recording.
    In the control bar click the small triangle.
    A list of devices appears to record from.
    Make the DV/camera selection and start capturing.
    It's all manual start stop and very basic but does capture.
    Al

  • 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

  • Problem executing an Online Form in Web DynPro(Adobe Form)

    Gurus, I am trying to create an Online Form in Web DynPro(Adobe Form), i could successfully create the form and deploy it. But when i executed, i am getting the below error. << com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Error during

  • Table Component and Row Height

    I am using XCelsius 4.5 and using the table component.  Is there anyway the row height on the table component can be linked to the Excel file?  It is not dynamically changing or wrapping text based on the amount of data that is imported in.

  • How to migrate business rule

    I have created one Configurable business rule for Position in Development instance... I want to Migrate business rule created in dev instance to PROD instance. I want the steps to Migrate. Is there any FNDLOAD command available for this..??? Thanks i

  • #NA in preview mode, but looks fine in workspace?

    I recently upgraded to the newest fix pack and I'm not able to see data show up on the preview anymore.  I may have changed something in between and the upgrade issue may be a coincidence... The formula's I'm using are: =VLOOKUP((CONCATENATE($A$5,$B$

  • Mountain Lion Calendar problem

    hey everyone I have just upgraded to Mountain Lion, but I am having a small problem.  My iphone and ipad will share calendar dates via the cloud but for some reason I cannot seem to get my mac to communiate with either so the mac will not pick up the