How to display output parameters in storedprocedures in front end?

hi all ,thank you for all the support.
Now i want your help .Here below i have given the general format of stored procedure we are using in our application . In procedure we are catching the exception and assigning to an output variable P_STATUS .
If any exception occurs ,How we display this caught exception from front end that means how we display the exception in front end .We are using VB.NET and VS 2005 and Oracle 9i for development.
CREATE OR REPLACE PROCEDURE SELECTINTERVALS
P_MINVAL INTEGER,
P_MAXVAL INTEGER,
P_INTERVAL     INTEGER,
P_USERID VARCHAR2,
P_STATUS OUT VARCHAR2
AS
BEGIN
          SELECT STATEMENT or INSERT STATEMENT     
EXCEPTION
          WHEN OTHERS THEN
          ROLLBACK;
          P_STATUS:=SQLERRM;
END;
If anybody knows, please help me
thanks & regards

Both methods are wrong. Returning error/exit codes for the reasons I've stated above.
As for handling the exception... If you want to propagate the exception, then DO NOT CHANGE IT INTO A MEANINGLESS USER EXCEPTION!
This is useless:
WHEN OTHERS THEN
ROLLBACK;
P_STATUS:=SQLERRM;
RAISE_APPLICATION_ERROR(-20011, SQLERRM);
Why it is meaningless? Because the caller now has to parse the error message to determine just what the actual root exception was... as the root exception number has been replaced with a meaningless number.
This is meaningful and (almost) correct:
[pre]
when OTHERS then
rollback;
raise; -- re-raise the exception
PS. It makes better sense to trap the actual exception like no data found, duplicate PK violations, etc... it seldom makes sense to trap all other exceptions and then do something like a rollback.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to Get the Debugger Screen in WEB Front end of SRM

    Hi Gurus,
    I have couple of questions for SRM.
    1. How to Get the Debugger Screen in WEB Front end of SRM so i can debug the application which is running in EBP system??
    2. How to set the flag for external debugging (HTTP)??
    3. Using SICF how to set the ITS services ( Like BBPSC01 )for internal ITS so as soon as i place the order it should stop at the break point which i have set in the application.
    Thanks.
    Regards,
    Manoj Tiwari

    Setting up Debugging for Integrated ITS
    Tcode SICF.
    Select service (e.g. default_hostàbcàguiàsapàitsàbbpsc01).
    Change service settings and insert parameter ~GENERATEDYNDPRO=1.
    Find program to debug. E.g. SE93. Enter bbpsc01 à Display and get Program field (SAPLBBP_SC_UI_ITS)
    Execute SE38 and enter program name.
    Turn HTTP Debugging ON. UtilitiesàSettingsàDebugging. Click Actv and username.
    Add HTTP Breakpoint. Display source code and select Utilitiesàbreakpointsàset.
    On “External Debugging” select ‘HTTP Breakpoint’.
    Remember to remove breakpoints, deactivate debugging and remove parameter GENERATEDYNPRO.
    Can run program RSBREAKPOINTS to find which programs you have breakpoints set in.
    Have fun with EBP
    If you have any more questions i would be happy to help you. Send me mail on [email protected]

  • How to display output without fieldnames in write statements

    hi,
    can any one tell how to get output with all fields values of a table without writing fieldnames in write statement.
    giv proper code for this task.Thaks in advance.

    hiii
    if you want to write just values then you can use write statement only ..no need to do anything else.simply write as follows
    LOOP AT t_customer INTO fs_customer.
      WRITE:/ fs_customer-customer_no,
              fs_customer-customer_name,
              fs_customer-customer_amount.
    ENDLOOP
    reward if useful
    thx
    twinkal

  • How to display output only sort format in alv

    Hi Experts,
    I have one problem in alv output display. I'm developing alv report for orders raised during the period.I want to display each order wise value(netwr) and order quatity (kwmeng) . i set 8 radio buttons one radio btn click then i want output ex.in grid display click on sort then each order wise calculate the value and quantity . that particular data to display when click on radio button.
    ex:click on sort in grid display.
    (branch) (order no)     (quantity)   (value)                        (BSTNK)
    AMUM     0000003354     2             10                                    3,271
    AMUM     0000003354     1              10                                    6,542
                                                       (above qty sum 2+1=3)  
    (SUM) =   AMUM       0000003354            3                       20            9,813
    HIP2         0000003362     2           5     17,810
    HIP2             0000003362     1          5     23,075
    (sum) = HIP2          0000003362                 10           40,885
    i display output in alv griddisplay.client asking one rb put in selection screen i want output like above only sum col.
    when i click one radio button output is come like (sum) above.
    Please help me.
    Thanks & Regards,
    Balakrishna Gajula

    hi you need to use sortinfo for your requirement.
    ie see the below code.
    "declare sortinfo at data declaration
    data:   wa_sort     type slis_sortinfo_alv,      "''' add this
                layout      type slis_layout_alv.          "add this
    ""make the below changes in your fieldcat
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'Td - Rvdt'.
      wa_fieldcat-fieldname = 'QUANTITY'.
      wa_fieldcat-do_sum    = 'X'.          """"""add this to your  *QUANTITY field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'temp''.
      wa_fieldcat-fieldname = 'VALUE'.
      wa_fieldcat-do_sum    = 'X'.             """"""add this to your  *VALUE field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    """"" you need to add this after workarea of fieldcat
      wa_sort-fieldname =  'BRANCH'.  " Here Branch indicates the fieldname
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
      clear wa_sort.
      wa_sort-fieldname = 'ORDERNO'.
      append wa_sort to it_sort.
      clear wa_sort.
    " in your alv fm add sortinfo
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = it_fieldcat
          it_sort            = it_sort                   """""""""add this
        tables
          t_outtab           = final                   " your internal table name
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    This solves your purpose.
    Regards,
    koolspy.

  • How to display output with 5min & 10min averages?

    Hi I’ve Data Like below in SqlServer Table
    DateTimeMin
    Field
    Value
    2014-10-09 11:01:00
    some
    1
    2014-10-09 11:02:00
    some
    2
    2014-10-09 11:03:00
    some
    3
    2014-10-09 11:04:00
    some
    4
    2014-10-09 11:05:00
    some
    5
    2014-10-09 11:06:00
    some
    6
    2014-10-09 11:07:00
    some
    7
    2014-10-09 11:08:00
    some
    8
    2014-10-09 11:09:00
    some
    9
    2014-10-09 11:10:00
    some
    10
    If I Run a query, I need Output like below (5 minute average)
    DateTimeMin
    Field
    Value
    2014-10-09 11:05:00
    some
    3
    2014-10-09 11:10:00
    some
    8
    If it’s 10 minute average, I need output like below
    DateTimeMin
    Field
    Value
    2014-10-09 11:10:00
    some
    5.5
    at where clause, I've to use  DateTimeMin between
    2014-10-09 11:01:00 and 2014-10-09 11:10:00
    Please advise, how?

    Hi Visakh
    at present I'm getting output like below
    ID
    DateTimeMin
    Value
    1
    2014-10-09 11:05:00
    3
    2
    2014-10-09 11:10:00
    8
    How to get output like below(I need to add the Field Column)
    ID
    DateTimeMin
    Field
    Value
    1
    2014-10-09 11:05:00
    some
    3
    2
    2014-10-09 11:10:00
    some
    8
    I tried several ways, but unable to get it(The Field Data is same from min 1 to 10)

  • How to: display large error note in the front panel?

    hi guys,
    When "error out" has an error, I would like to display HUGE RED TEXT in the FRONT PANEL saying: "STOP, ERROR DETECTED!"  )
    How to do that?
    Thanks for your help.
    Solved!
    Go to Solution.

    Place an indicator on the panel. Set the text to HUGE and RED, and set its value to "STOP, ERROR DETECTED!". Make it not visible. When you get an error, use the "Visible" property node to display it.
    To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

  • How to bring the RFC table values to front end

    All
    I want to display a table in front end
    For that I connect to the RFC .Get into the table .
    Here pl tell me how to get the values from the table
    I did the following
    JCO.Function func = getDefaultJCoConnection().getJCoFunction("Z_TestRFC");
    getDefaultJCoConnection().execute(func);
    JCO.Table records=func.getTableParameterList().getTable("ET_TestTable");
    ArrayList list=new ArrayList();
    for (int i = 0; i < records.getNumRows(); i++, records.nextRow()) {
    list.add(records.getString("Name"));            
    return list;
    But the table contains 4 columns Name,Address,age,remarks
    In the above code I'm able to take just one column which is "Name" which works fine
    I want to take all the values to front end
    Please suggest
    Murali

    sateesh
    If I iterate all other fields where do I store them to take it to my jsp
    If u see I added that column value in one ArrayList
    So you want me to create 4 ArrayList and add populate them inside that for loop.
    could you please elaborate on the same.or could you please improve that code and post
    Thanks in advance
    Murali

  • How can i configure Distributed cache servers and front-end servers for Streamlined topology in share point 2013??

    my question is regarding SharePoint 2013 Farm topology. if i want go with Streamlined topology and having (2 distribute cache and Rm servers+ 2 front-end servers+ 2 batch-processing servers+ cluster sql server) then how distributed servers will
    be connecting to front end servers? Can i use windows 2012 NLB feature? if i use NLB and then do i need to install NLB to all distributed servers and front-end servers and split-out services? What will be the configuration regarding my scenario.
    Thanks in Advanced!

    For the Distributed Cache servers, you simply make them farm members (like any other SharePoint servers) and turn on the Distributed Cache service (while making sure it is disabled on all other farm members). Then, validate no other services (except for
    the Foundation Web service due to ease of solution management) is enabled on the DC servers and no end user requests or crawl requests are being routed to the DC servers. You do not need/use NLB for DC.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to edit data in mtl_system_items_interface table from front end.

    Hi All,
    As i dont have create/update transaction permissions on mtl_system_items_interface from back end.
    I need to update the failed records in mtl_system_items_interface and reprocess them again.
    Kindly suggest mr how to proceed from apps front end to query and update.
    Thanks in advance
    Regards
    Santosh

    Hi Santosh,
    I think there is no front-end access to reprocess the failed records.
    For help, some useful Metalink Notes are:
    FAQ for Item Import [ID 109628.1 ]
    A Guideline to IOI Error Messages and Solutions [ID 52746.1]
    INCOIN: Basic Steps for Researching Failed Item Imports [ID 552683.1]
    Understanding Item Import and Debugging Problems with Item Import [ID   268968.1]
    Item API Or Concurrent Manager, Which One Is Best For Item Creation? [ID   760498.1]
    reagrds
    Sanjay

  • SPOOL - how to display output list of more then 255 characters?

    Hi,
    First of all, I would like to say hi to all of you here, as a new member :)!
    I've just discovered this forum - I'm very new and let's say unexperienced in SAP, unlike you :)!
    Didn't know where to put my subject (in what folder) so I apologize in advance if I'm mistaken... I work as an ABAP programmer in SAP Core and SAP IS-T and currently I'm worried about this problem:(!
    We have these huge reports in IS-T that have to be run in background, because of lot of data. Most of reports are very wide and don't fit in those 255 characters that is SAP standard for spool display. Now I'm dealing with this RFC that has to provide spool display with 800 characters, and this has to be on production by tomorrow:)!!!!!
    First I created new format type (ZX_65_800) in transaction SPAD and assigned it to my local printer. I thought this would be enough, but I was wrong. Because when I try to run my programe in background, the system doesn't offer me my format at all :(!
    Is there anything else I must do in order to get it.... (I work in Release 620)
    If anyone had the same problem, please contact me!
    Thanks,
    BR,
    Sanja

    Hi All,
    We have been looking for a solution for what I believe is the same problem, for more than 2 years now. I would just like to verify with you, if your requirement are similar to ours.
    Problem:
    1.     Requirement is to run large HR reports – either standard or with Ad Hoc Query in background mode in a company with more than 50,000 employees.
    2.     Nobody wants printed reports these days.  We want to save the forests. Customers prefer to be emailed an Excel file so they can do further data analysis, filtering, pivot tables etc.
    3.     Reports are running OK in foreground for smaller sections of the organisation, where you send the output to Excel from ALV, or save as a local file in spreadsheet format.
    4.     But large reports for entire company are awkward, tie up your PCs resources, and complex reports accessing many tables can timeout before completion.
    5.     So scheduling these reports to run in background would be the ideal solution.
    6.     However when we access the report output from SP02, we find that most reports (say with more than 13 or so fields) have an output wider than 255 characters and the output of the spool file wraps to the next line in Excel.  It is very tricky to then parse the data back into one row for each employee.  And you have a problem if you output is for 50,000 or so employees, because then you file is 100,000 rows and will not load completely into Excel – limit problem of 65,536 characters.
    7.     We simply want a spool file that does not wrap the data to the next line after 255 characters.
    8.     But how to explain this simple requirement to some technical people. It seems a lot of posts on SDN think we always want to print a spool file.  NO – remember the forests!
    Possible Solutions:
    I see a lot of posts here that refer to OSS note 186603, but they don’t mention the target for the output of the spool is to import into an Excel File (i.e. spreadsheet format).  Just search for 186603 or ” Spool request with more than 255 columns”.  There is also a reference to OSS note 313566.  I am not sure if these will work?
    I have also seen the suggestions that you need to define a customer printer format that does not wrap the output after 255 characters (create a new format type in transaction SPAD).
    Did you find a solution yet to this problem, do the solutions above work, or can anyone else help us!
    John McKee

  • How to display output serially ?

    hi,
    i have a table and there is a coloum abc, in that data are like that
    PEN
    PENCIL
    BAG
    so now i want a sql query which will display as per my choice serially , like i want pencil should b first then BAG should be second and so on..
    thanks
    Edited by: Hi FRNzzz!! on Apr 22, 2010 10:50 PM

    Hi,
    What are the rules which determine that 'LG08' comes before 'LH07', and 'LH07' comes before 'LH09'?
    It looks like there are no rules, other than "'LG08' comes before 'LH07', and 'LH07' comes before 'LH09'"; that is, the order of those strings has nothing to do with the strings themselves.
    If that's the case, then you should have a table to store information that is related to the different possible m_vr values.
    You may already have such a table, for other uses. If so, add a column for the sort order.
    If you do not already have such a table, create one:
    CREATE TABLE     m_vr_lookup
    (       m_vr          VARCHAR2 (4)     PRIMARY KEY
    ,     sort_order     NUMBER
    );The populate the table with each possible value of m_vr and its relative sort order:
    INSERT INTO m_vr_lookup (m_vr, sort_order) VALUES ('LG08',  100);
    INSERT INTO m_vr_lookup (m_vr, sort_order) VALUES ('LH07',  200);
    INSERT INTO m_vr_lookup (m_vr, sort_order) VALUES ('LH09',  300);
    INSERT INTO m_vr_lookup (m_vr, sort_order) VALUES ('LG01',  400);
    COMMIT;For sort_order, you don't have to use numbers that are multiples of 100. You don't even have to use numbers. I did, because they're convenient. If you add new m_vrf bvalues later, you can give them sort_orders like 150, 125 or 100.003.
    Wheneve you need to use this sort order, join to the m_vr_lookup table, like this:
    SELECT       mvr.*
    FROM            mvr
    LEFT OUTER JOIN       m_vr_lookup     ON     mvr.m_vr     = m_vr_lookup.m_vr
    ORDER BY  mvr.m_sno
    ,            m_vr_lookup.sort_order
    ;Use an outer join (like I did above) if you're not sure that all the m_vr values in mvr are also in m_vr_lookup.
    If you are sure (for example, if you made a foreign key constraint on mvr), and if mvr.m_vr is never NULL, then you can use a more efficient inner join; just change "LEFT OUTER JOIN" to "JOIN" in the query above.
    If you need help, post CREATE TABLE and INSERT statements for your sample data (including the lookup table). Also post the results you want from that data, and an explanation of how you get those results.
    Make sure the results you post correspond to the data you post.
    In your last message, you said the sample data for m_sno=12345 was the following 5 rows:
    12345 LG01 01-JAN-03
    12345 LG02 05-FEB-03
    12345 LG08 03-JUN-07
    12345 LH07 03-FEB-06
    12345 L202 01-FEB-03but the output for that m_sno was 6 rows, including:
    12345 LH09 05-FEB-08Was that a mistake, or is part of the problem generating new rows?

  • How to display output of from clause query?

    Hi. I am using Forms Developer 10g. I have a datablock which uses a from_clause_query. In my from_clause_query, i used a WITH AS SELECT.
    I am trying to display the output of this query in my forms but the first column, V_CUTOFF_TO is not displayed, probably because it is not a database item. It was a result of my initial WITH AS SELECT query months. How can i display this along with the output of my from_clause_query. Thanks in advance for the help. By the way, i am trying to post the contents of my from_clause_query here but it says Sorry, this content is not allowed. I dont know why?

    Here is how you should most your code for it to be legible.
    WITH months AS
      (SELECT ADD_MONTHS(:V_DATE_FROM,LEVEL-1) m_first ,
        (ADD_MONTHS(:V_DATE_FROM, LEVEL    -0 )-1) m_last
      FROM dual
        CONNECT BY LEVEL < MONTHS_BETWEEN(:V_DATE_TO,:V_DATE_FROM) + 1
      EQUIP_per_month AS
      (SELECT COUNT(TRANS_CODE) V_COUNT,
        m_last V_CUTOFF_TO,
        trans_code,
        transformer,
        DATE_COMMISSION,
        DATE_DECOMMISSION,
        CLASSIFICATION,
        SUBSTATION_CODE
      FROM
        (SELECT C.TRANS_CODE,
          C.TRANSFORMER,
          C.SUBSTATION_CODE,
          C.DATE_COMMISSION,
          C.DATE_DECOMMISSION,
          C.CLASSIFICATION,
          m_last
        FROM SPM_TRANS C
        CROSS JOIN months
        WHERE CLASSIFICATION              IS NOT NULL
        AND SUBSTR(C.SUBSTATION_CODE,6,4) <>'M001'
        AND C.DATE_COMMISSION             IS NOT NULL
        AND (C.DATE_PRIVATELY_OWNED       IS NULL
        OR C.DATE_PRIVATELY_OWNED          > m_first)
        AND (SUBSTR(C.TRANS_CODE,5,1) '5'
        AND SUBSTR(C.TRANS_CODE,5,1) '9')
        AND (:P_GRID             = SUBSTR(C.SUBSTATION_CODE, 1,1)
        OR :P_GRID              IS NULL)
        AND (:P_REGION           = SUBSTR(C.SUBSTATION_CODE, 2,4)
        OR :P_REGION            IS NULL)
        AND (C.DATE_DECOMMISSION > m_first
        OR C.DATE_DECOMMISSION  IS NULL)
        AND C.DATE_COMMISSION   <= m_last
        AND (:P_BRANCH           =
          (SELECT DISTINCT BRANCH_CODE
          FROM SPM_SUBSTATIONS
          WHERE C.SUBSTATION_CODE = SUBSTATION_CODE
        OR :P_BRANCH IS NULL)
        AND (:P_ACC   =
          (SELECT DISTINCT ACC_CODE
          FROM SPM_SUBSTATIONS
          WHERE C.SUBSTATION_CODE = SUBSTATION_CODE
        OR :P_ACC                    IS NULL)
        AND (:P_DISTRICT              = SUBSTR(C.SUBSTATION_CODE, 6,4)
        OR :P_DISTRICT               IS NULL)
        AND (RTRIM(:P_CLASSIFICATION) = RTRIM(CLASSIFICATION)
        OR :P_CLASSIFICATION         IS NULL)
        AND (:P_VOLTLEVEL             = SUBSTR(C.TRANS_CODE, 1,1)
        OR :P_VOLTLEVEL              IS NULL)
      GROUP BY m_lAst,
        trans_code,
        transformer,
        DATE_COMMISSION,
        DATE_DECOMMISSION,
        CLASSIFICATION,
        SUBSTATION_CODE
    SELECT V_CUTOFF_TO,
      A.trans_code,
      S.SUBSTATION_CODE,
      A.transformer,
      A.DATE_COMMISSION,
      A.DATE_DECOMMISSION,
      A.CLASSIFICATION
    FROM
      (SELECT *
      FROM
        (SELECT trans_code,
          transformer,
          DATE_COMMISSION,
          DATE_DECOMMISSION,
          CLASSIFICATION,
          SUBSTATION_CODE,
          V_CUTOFF_TO
        FROM EQUIP_per_month
        GROUP BY trans_code,
          transformer,
          DATE_COMMISSION,
          DATE_DECOMMISSION,
          CLASSIFICATION,
          SUBSTATION_CODE,
          V_CUTOFF_TO
      ) A,
      SPM_SUBSTATIONS S
    WHERE A.SUBSTATION_CODE = S.SUBSTATION_CODE
    ORDER BY V_CUTOFF_TO,
      S.SUBSTATION_CODE,
      TRANS_CODE);The V_CUTOFF_TO , your first column, may not to be getting a (not null ) value.
    Regards,
    Edited by: Prabodh on Jun 21, 2012 2:41 PM

  • How to display output in a single line?

    Hi
    im getting the out put in the following way
    100006        1120             01
                                          02
                                          03
    100007        1410            01
                                         02
                                         03
    but i want the output as follows
    100006         1120           01,02,03
    100007          1410          01,02,03
    Can any body tell me the code for this?

    Hi Dilip
    this is my full code
    im not getting the proper out put..
    eg : i have material 1000002 for this 3 inspection types are there 01,02,03
                                1000003 for this 1 inspection types are there 05
    following program giving me the out put as
                                1000002      1410          03
                                1000003       2140         05
                                                                   01
                                                                   02
                                                                   03
                                                                   05
    but i want the output as follows
                              1000002          1410        01
                                                                   02
                                                                   03
                              1000003          2140       05
    can u help me on this also?
    TABLES:MARC.
    TYPE-POOLS: SLIS.
    SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
      SELECT-OPTIONS:S_MATNR FOR MARC-MATNR.
      PARAMETERS:P_WERKS TYPE MARC-WERKS.
      SELECTION-SCREEN:END OF BLOCK B1.
      TYPES:BEGIN OF TYPE_FINAL,
            ART TYPE QMAT-ART,
            MATNR TYPE MARC-MATNR,
            WERKS TYPE MARC-WERKS,
            END OF TYPE_FINAL,
            BEGIN OF TYPE_QMAT,
            ART TYPE QMAT-ART,
            MATNR TYPE QMAT-MATNR,
            END OF TYPE_QMAT.
    DATA:IT_FINAL TYPE TABLE OF TYPE_FINAL,
          WA_FINAL LIKE LINE OF IT_FINAL,
          I_FINAL TYPE TABLE OF TYPE_FINAL,
          IT_QMAT TYPE TABLE OF TYPE_QMAT,
          WA_QMAT LIKE LINE OF IT_QMAT.
          DATA: i_FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV,
                W_FCAT TYPE SLIS_FIELDCAT_ALV.
    field-symbols: <fs_fin> TYPE TYPE_FINAL.
      START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM PROCESS_DATA.
      PERFORM DISPLAY_DATA.
    form GET_DATA .
      SELECT MATNR
             WERKS
        FROM MARC
        INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
        WHERE MATNR IN S_MATNR.
        IF IT_FINAL[] IS NOT INITIAL.
          SELECT ART
                 MATNR
                 WERKS
            FROM QMAT
            INTO CORRESPONDING FIELDS OF TABLE IT_QMAT
            FOR ALL ENTRIES IN IT_FINAL
            WHERE MATNR = IT_FINAL-MATNR
            AND WERKS = IT_FINAL-WERKS.
        ENDIF.
        SORT IT_FINAL BY
        MATNR
        WERKS
        ART.
        DELETE ADJACENT DUPLICATES FROM IT_FINAL COMPARING
        MATNR
        WERKS
        ART.
    endform.                    " GET_DATA
    form PROCESS_DATA .
    move it_final to i_final.
    REFRESH IT_FINAL.
    LOOP AT I_FINAL assigning <fs_fin>.
    LOOP AT IT_QMAT INTO WA_QMAT where MATNR = <fs_fin>-MATNR.
                                   P_werks = <fs_fin>-werks.
    *REFRESH i_final.
    IF sy-subrc eq 0.
    <fs_fin>-ART = WA_QMAT-ART.
    APPEND <fs_fin>-ART TO i_final.
    ENDIF.
      ENDLOOP.
    ENDLOOP.
    form DISPLAY_DATA .
    W_FCAT-FIELDNAME = 'MATNR '.
    W_FCAT-SELTEXT_M = 'MATERIAL NUMBER'.
    W_FCAT-OUTPUTLEN = '18'.
    APPEND W_FCAT TO I_FCAT.
    W_FCAT-FIELDNAME = 'WERKS'.
    W_FCAT-SELTEXT_M = 'PLANT'.
    W_FCAT-OUTPUTLEN = '04'.
    APPEND W_FCAT TO I_FCAT.
    W_FCAT-FIELDNAME = 'ART'.
    W_FCAT-SELTEXT_M = 'INSPECTION TYPE'.
    W_FCAT-OUTPUTLEN = '08'.
    APPEND W_FCAT TO I_FCAT.
                     " DISPLAY_DATA
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM = SY-REPID
       IT_FIELDCAT = I_FCAT[]
       I_DEFAULT = 'X'
       I_SAVE = 'A'
      TABLES
        t_outtab = i_final[].
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input         = WA_FINAL-MATNR.
    endform.
    FORM BUILD_FCAT USING FIELD TYPE SLIS_FIELDNAME
                          TEXT TYPE  dd03p-scrtext_m
                          LENGTH TYPE dd03p-outputlen.
      W_FCAT-FIELDNAME = FIELD.
      W_FCAT-SELTEXT_M = TEXT.
      W_FCAT-OUTPUTLEN = LENGTH.
      APPEND W_FCAT TO i_FCAT.
      CLEAR W_FCAT.
      ENDFORM.
    thanks & Regards
    Smitha

  • How to display output with 3 levels in ALV

    He experts,
         I have on classical report & it output is with 3 levels, like
               Ex:  material no<Level-1>
                            customer no<Level-2>
                                                date<Level-3>.
             For this i used 2 select staments within select & endselect statmens.
    Now i want to display in ALV. I can't use Hierarchy FM for this bcoz more than 2 levels.
    Plz help on this
    Regards.

    Hi Kumar,
    Thanks for response
      Here i don't need drill down capability....
                   is it possible to diplay <level-1>  <level-2>   <level-3> by using ALV Grid FM. If not alternative solutions
    Regards.

  • How to display output of SQL Loader in a readable format

    Hi All,
    We have an inbound interface wherein we are uploading data from a flat file to Oracle Applications.
    The entire process is happening in a request set -
    1. Loading from flat file to staging tables via SQL Loader
    2. Validating Data in staging tables
    3. Uploading in Oracle standard tables
    User says that the log file which shows the output of SQL Loader (step 1) is not readable and they want the data in some particular format which is understandable/readable for them.
    Firstly, help me understand is it possible.
    Also I have heard about BAD file, can anyone tell me where is it created and by what name and can we fetch that file created ?
    Any pointers would be really helpful.
    Regards,
    Shruti

    Hi
    DATA :
      w_i TYPE i VALUE 1,
      w_temp TYPE i VALUE 1..
    WHILE w_temp LE 10.
      w_i = 1.
      WHILE w_i LE w_temp.
        WRITE :
          w_i.
        ADD 1 TO w_i.
      ENDWHILE.
      SKIP.
      ADD 1 TO w_temp.
    ENDWHILE.
    Regards
    Pavan

Maybe you are looking for

  • HP Laserjet 2200 Series PCL5

      Printing not working properly My printer stop printing with anything coming out -- isn't grabbing the paper from the tray. It sounds like it's going to print (rollers going) and nothing comes out. The red exclamation point light is coming on. I hav

  • Can T420 use 3 display with out a dock.

    Can T420 use 3 displays with out a dock. One on a laptop display, one via VGA port and another one via DISPLAY port. I use T420  4178-BYT with Intel HD Graphic 3000 (no nvidia).

  • TS1538 iPad not turning on. Vertical colored lines followed by a black screen. Help!

    My iPad is a little less than a year old. While playing a game on my iPad, multicolored vertical lines appeared across left side of iPad followed by a black screen. After a few seconds the screen flicked back on....then a few more vertical colored li

  • Iphone 5...updated IOS 2/7/12 now HTTP works for 1min per 5min period.

    I have an iPhone 5 I recently updated to the latest IOS. Before the update, everything fine. After the update, HTTP over TCP acts as if it is being "time sliced" in that I have 1 minute of connectivity and then 3 or 4 minutes off before the pattern r

  • No user groups created while opening Ad HOC Query

    Hello Folks, When I try to open "S_PH0_48000513 - Ad Hoc Query" under Human Resources->Information System->Reporting Tools I get the error message "No user groups created". Can someone please let me know what kind of groups are needed to be created a