How to read a checkbox in ALV (FM used)

Hi Experts,
I have generated an ALV grid using funtion module. There are 9 coloumns with checkbox col at first position. Each row has a checkbox. Now I want to read that particular row for which  the checkbox is checked. Kindly tell me the procedure.
Points will be awarded...
Thanks,
Vishal S.

Hi
1. You will have to make the field editable. In the field catalog set the EDIT = 'X' for the check box field.
2. Once the check box is checked, call the method CHECK_CHANGED_DATA of the grid in the PAI of the screen which will update the internal table. Now, you can just loop at the internal table with a where clause on the check box field.
loop at itab where checkbox = 'x'.
endloop.
same thread...
Re: Output Format for Amount in SAP Script PO
Re: Checkbox in ALV
Steps..
In the layout you need to have the BOX_FIELDNAME with a value..Let's say BOX
Declare the same value BOX in the internal table that you display in the output..
Then if the check box is selected...automatically the internal table will be filled X in the BOX column..
Check this example..
TYPE-POOLS: slis.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
DATA: s_layout TYPE slis_layout_alv.
DATA: BEGIN OF itab OCCURS 0,
icon TYPE icon-id,
vbeln TYPE vbeln,
kunnr TYPE kunnr,
erdat TYPE erdat,
box TYPE c,
END OF itab.
DATA: v_repid TYPE syrepid.
START-OF-SELECTION.
Get the data.
SELECT vbeln kunnr erdat UP TO 100 ROWS
FROM vbak
INTO CORRESPONDING FIELDS OF TABLE itab.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No data found'.
LEAVE LIST-PROCESSING.
ENDIF.
Modify the record with red light.
itab-icon = '@0A@'.
MODIFY itab TRANSPORTING icon WHERE NOT vbeln IS initial.
v_repid = sy-repid.
Get the field catalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'ICON'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-seltext_l = 'Status'.
s_fieldcatalog-icon = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'KUNNR'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'KUNNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog.
Set the layout.
s_layout-box_fieldname = 'BOX'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = s_layout
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = t_fieldcatalog[]
TABLES
t_outtab = itab.
FORM SET_PF_STATUS *
--> EXTAB *
FORM set_pf_status USING extab TYPE slis_t_extab.
SET PF-STATUS 'TEST2'.
ENDFORM.
FORM user_command *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
Check the ucomm.
IF ucomm = 'DETAIL'.
LOOP AT itab WHERE box = 'X'.
itab-icon = '@08@'.
MODIFY itab TRANSPORTING icon.
ENDLOOP.
ENDIF.
selfield-refresh = 'X'.
ENDFORM.
<b>Reward if usefull</b>

Similar Messages

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to read data from a router by using labview

    I am a  beginner labview. How to read data from a router by using labview ? 

    What kind of data are you trying to read?
    Does the router behave like a webserver that you log into?  If so, search the forums for threads discussing HTML.

  • How To Read RTF file in JAVA?  Using  iText?

    How To Read RTF file in JAVA?  Using  iText?.....
    import java.io.*;
    import com.lowagie.text.*;
    import com.lowagie.text.rtf.*;
    public class RTF3 {
    public static void main(String[] args) {
    // System.out.println("This example generate a RTF file name Sample.rtf");
    // Create Document object
    Document myDoc = new Document();
    try {
    // Create writer to listen document object
    // and directs RTF Stream to the file Sample.rtf
    RtfWriter2.getInstance(myDoc, new FileOutputStream("Sample.rtf"));
    // open the document object
    myDoc.open();
    // Create a paragraph
         Paragraph p = new Paragraph();
         p.add("Helloworld in Rtf file..amazing isn't");
         // Add the paragraph to document object
    myDoc.add(p);
    catch(Exception e) {
    System.out.println(e);
    //close the document
    myDoc.close();
    Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.Rectangle.width()F
         at com.lowagie.text.rtf.document.RtfPageSetting.rectEquals(RtfPageSetting.java:433)
         at com.lowagie.text.rtf.document.RtfPageSetting.guessFormat(RtfPageSetting.java:362)
         at com.lowagie.text.rtf.document.RtfPageSetting.setPageSize(RtfPageSetting.java:341)
         at com.lowagie.text.rtf.RtfWriter2.setPageSize(RtfWriter2.java:248)
         at com.lowagie.text.Document.open(Unknown Source)
         at view.RTF3.main(RTF3.java:23)
    CAN you HELP me?

    import com.lowagie.text.Document;
    import com.lowagie.text.rtf.parser.RtfParser;
    import java.io.FileInputStream;
    String inputFile = "sample.rtf";
    Document document = new Document();
    document.open();
    RtfParser parser = new RtfParser(null);
    parser.convertRtfDocument(new FileInputStream(inputFile), document);

  • How to read data from the data provider using javascript

    Hi,
    Please let me know how to read the data from the dataprovider using javascript(query assigned to the data provider).
    My query has filter charateristics, free charateristics, charateristics in rows and key figure in column.
    Thanks a lot for your kind help
    Regards
    Kandasamy

    Kandaswamy,
    Assign an ID to your table item , then in JavaScript , you can use ID.innerHTML and you will get the HTML code within that table for the same , then you can find out how best to get the exact value you desire from the innerHTML value which is a string with the entire HTML from within the table item.
    Arun
    Hope it helps....

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • How to read output rows in alv

    I have made alv grid. i have given checkbox for user to select the row.
      so how to read the selected rows.

    hi
    *REPORT YMS_ALVINTER.
    *& tables declaration
    TABLES: VBRK,VBRP.
    *& type-pools declaration
    TYPE-POOLS: SLIS.
    *& data declaration
    DATA: G_REPID TYPE SY-REPID.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, "mara
    WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_EVENT TYPE SLIS_ALV_EVENT,
    T_EVENT TYPE SLIS_T_EVENT.
    DATA: V_VBELN LIKE VBRK-VBELN,
    V_MATNR LIKE VBRP-MATNR.
    DATA: BEGIN OF IT_VBRK OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    WAERK LIKE VBRK-WAERK,
    VKORG LIKE VBRK-VKORG,
    FKDAT LIKE VBRK-FKDAT,
    BUKRS LIKE VBRK-BUKRS,
    NETWR LIKE VBRK-NETWR,
    END OF IT_VBRK.
    DATA: BEGIN OF IT_VBRP OCCURS 0,
    VBELN LIKE VBRP-VBELN,
    POSNR LIKE VBRP-POSNR,
    FKIMG LIKE VBRP-FKIMG,
    VRKME LIKE VBRP-VRKME,
    NETWR LIKE VBRP-NETWR,
    MATNR LIKE VBRP-MATNR,
    ARKTX LIKE VBRP-ARKTX,
    END OF IT_VBRP.
    *& selection screen
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN,
    S_FKDAT FOR VBRK-FKDAT,
    S_MATNR FOR VBRP-MATNR.
    SELECTION-SCREEN END OF BLOCK B.
    **INITIALIZATION.
    INITIALIZATION.
    G_REPID = SY-REPID.
    S_FKDAT-LOW = SY-DATUM - 200.
    S_FKDAT-HIGH = SY-DATUM.
    APPEND S_FKDAT.
    ***AT SELECTION-SCREEN.
    AT SELECTION-SCREEN.
    IF NOT S_VBELN IS INITIAL.
    SELECT SINGLE VBELN FROM VBRK
    INTO V_VBELN
    WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE E001(ZZ2).
    ENDIF.
    ENDIF.
    IF NOT S_MATNR IS INITIAL.
    SELECT SINGLE MATNR FROM MARA
    INTO V_MATNR
    WHERE MATNR IN S_MATNR.
    IF SY-SUBRC <> 0.
    MESSAGE E001(ZZ2).
    ENDIF.
    ENDIF.
    ***START-OF-SELECTION.
    START-OF-SELECTION.
    PERFORM GET_DATA_VBRK.
    *& Form GET_DATA_VBRK
    text
    --> p1 text
    <-- p2 text
    FORM GET_DATA_VBRK .
    SELECT VBELN
    WAERK
    VKORG
    FKDAT
    BUKRS
    NETWR
    INTO TABLE IT_VBRK
    FROM VBRK
    WHERE VBELN IN S_VBELN
    AND FKDAT IN S_FKDAT.
    ENDFORM. " GET_DATA_VBRK
    *& Form GET_DATA_VBRP
    text
    --> p1 text
    <-- p2 text
    FORM GET_DATA_VBRP .
    SELECT VBELN
    POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO TABLE IT_VBRP
    WHERE VBELN = IT_VBRK-VBELN.
    ENDFORM. " GET_DATA_VBRP
    ***END-OF-SELECTION.
    END-OF-SELECTION.
    PERFORM EVENT_LIST.
    PERFORM GET_FIELD_CATALOG.
    PERFORM LIST_DISP .
    *& Form list_disp
    text
    FORM LIST_DISP .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_PF_STATUS_SET = 'POPUP'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    I_HTML_HEIGHT_TOP =
    I_HTML_HEIGHT_END =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRK
    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.
    ENDFORM. " LIST_DISP
    *& Form GET_FIELD_CATALOG
    text
    --> p1 text
    <-- p2 text
    FORM GET_FIELD_CATALOG .
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = G_REPID
    I_INTERNAL_TABNAME = 'IT_VBRK'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = G_REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = IT_FIELDCAT
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " GET_FIELD_CATALOG
    *& Form event_list
    text
    --> p1 text
    <-- p2 text
    FORM EVENT_LIST .
    CLEAR WA_EVENT.
    WA_EVENT-NAME = 'USER_COMMAND'.
    WA_EVENT-FORM = 'USER_COMMAND'.
    APPEND WA_EVENT TO T_EVENT.
    CLEAR WA_EVENT.
    ENDFORM. " event_list
    *& Form user_command
    text
    -->R_UCOMM text
    -->RS_SELFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&IC1'.
    READ TABLE IT_VBRK INDEX RS_SELFIELD-TABINDEX.
    PERFORM GET_DATA_VBRP.
    PERFORM BUILD_FIELDCATALOG_VBRP .
    PERFORM DISPLAY_ALV_VBRP.
    ENDCASE.
    ENDFORM. "user_command
    *& Form BUILD_FIELDCATALOG_VBRP
    text
    --> p1 text
    <-- p2 text
    FORM BUILD_FIELDCATALOG_VBRP .
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = G_REPID
    I_INTERNAL_TABNAME = 'IT_VBRP'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = G_REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = IT_FIELDCAT
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " BUILD_FIELDCATALOG_VBRP
    *& Form DISPLAY_ALV_VBRP
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_ALV_VBRP .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT =
    IT_FIELDCAT = IT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    I_HTML_HEIGHT_TOP =
    I_HTML_HEIGHT_END =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRP
    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.
    ENDFORM. " DISPLAY_ALV_VBRP
    Message was edited by:
            Rammohan Nagam
    Message was edited by:
            Rammohan Nagam

  • WDABAP - How to read data from filtered ALV table

    HI
    In Web Dynpro for ABAP.
    I have a view with an ALV table on it.
    I would like to know how to read the data that's been filtered in the ALV table?
    Regards

    I've managed to find out that during runtime the following code returns a reference to a class pool:
    data: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
    lr_salv_wd_table = wd_This->wd_cpIfc_ALV_GRAPHICS_DATA( )
    Two of the attributes of this class pool are:
              <b>IG_COMPONENTCONTROLLER~R_COMPONENT =    </b>                                       
    <b>          IF_COMPONENTCONTROLLER~R_COMPONENT =    </b>
    The attributes, IG_COMPONENTCONTROLLERR_COMPONENT and IF_COMPONENTCONTROLLERR_COMPONENT references a class CL_SALV_WD_C_TABLE. This class has an attribute R_RESULT_DATA which references a class CL_SALV_WD_RESULT_DATA_TABLE. The attribute T_RESULT_DATA contains the filtered data.
    Now I need to find out how I can access these attributes in the view.
    Regards

  • How to read green light from ALV list display during BDC

    Hi,
    I am currently writing a BDC on CK11 transaction, after the user enters all the data he has to check log for any errors. The log is shown using ALV LIST DISPLAY and the errors are identified by RED lights on ALV LIST DISPLAY. At this point in BDC i have to either save or exit depending the status lights shown on the screen.
    Does anybody has any idea on how to read these lights from the screen ?
    thanks
    Udai

    Hi,
    I agree with Rich here. Never seen this done before (and I'm pretty sure you can't do it), but if someone has a funky way of doing it please share!
    Cheers,
    Pat.

  • How to Read a checkbox status from Controller

    Hi All,
    How can I read the checkbox status from the controller!.
    Note: I am using crm_ic tags
    Thanks, Sudeep..

    thanks.

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • How to read a spread sheet ( .xls ) file using a pl/sql procedure or func

    Hello All,
    Is it possible to read a spread sheet using Oracle pl.sql .
    I know their is a util package that is read a file but how to read a spread sheet ... ?
    thanks
    kumar

    hi kumar,
    Here is an example of how i read an excel file
    DECLARE
    l_start_file_name varchar2(50) := 'invoice_excel_c';
    l_end_file_name varchar2(50)   := '.csv';
    l_file_name varchar2(100);
    l_sql varchar(32767);
    refresh_cdc varchar2(5) := '00304';
    begin
    l_file_name := l_start_file_name||REFRESH_CDC||l_end_file_name;
    l_sql :=
    'create table exter_invoice_excel               '||
    '(                                              '||
    'Product_name                varchar2(255),     '||
    'Net_Sales                   Number,            '||
    'Net_Adjustments             Number,            '||
    'Cancels_Count               Number,            '||
    'Cancels_Amount              Number,            '||
    'Cashes_Count                Number,            '||
    'Cashes_Amount               Number,            '||
    'Claims_Count                Number,            '||
    'Claims_Amount               Number,            '||
    'Returns_Count               Number,            '||
    'Returns_Amount              Number,            '||
    'Free_Prize_Count            Number,            '||
    'Free_Prize_Amount           Number,            '||
    'Free_Promo_Count            Number,            '||
    'Free_Promo_Amount           Number,            '||
    'Promo_Credit_Count          Number,            '||
    'Promo_Credit_Amount         Number,            '||
    'Return_Commission           Number,            '||
    'Net_Discounts               Number,            '||
    'Total_Fees                  Number,            '||
    'Sales_Commission            Number,            '||
    'Cash_Commission             Number,            '||
    'Tkt_Charge                  Number,            '||
    'Subscription_Commission     Number,            '||
    'Interim_Sweeps              Number,            '||
    'Net_Due                     Number,            '||
    'Retailer_id                 Number,            '||
    'Retailer_Name               varchar2(255)      '||
    ')                                              '||
                  'ORGANIZATION EXTERNAL (                 '||
                  ' TYPE oracle_loader                     '||
                   ' DEFAULT DIRECTORY GTECHFILES          '||
                   ' ACCESS PARAMETERS (                   '||
                   '   RECORDS DELIMITED BY NEWLINE        '||
                   '      CHARACTERSET WE8MSWIN1252        '||
                   '   BADFILE ''invoice_excel.bad''       '||
                   '   DISCARDFILE ''invoice_excel.dis''   '||
                   '   LOGFILE ''invoice_excel.log''       '||
                   '   FIELDS TERMINATED BY '','' RTRIM      '||
                   '  MISSING FIELD VALUES ARE NULL        '||
                   '   )                                   '||
                   '   LOCATION ('''||l_file_name||''')    '||
                   ' )                                     '||
                   'PARALLEL                               '||
                   'REJECT LIMIT UNLIMITED ';
            execute immediate l_sql;
          l_sql:=  'INSERT INTO INVOICE_EXCEL_TEMP                '||
                      ' ( Product_name               ,            '||
                      '  Net_Sales                   ,            '||
                      '  Net_Adjustments             ,            '||
                      '  Cancels_Count               ,            '||
                      '  Cancels_Amount              ,            '||
                      '  Cashes_Count                ,            '||
                      '  Cashes_Amount               ,            '||
                      '  Claims_Count                ,            '||
                      '  Claims_Amount               ,            '||
                      '  Returns_Count               ,            '||
                      '  Returns_Amount              ,            '||
                      '  Free_Prize_Count            ,            '||
                      '  Free_Prize_Amount           ,            '||
                      '  Free_Promo_Count            ,            '||
                      '  Free_Promo_Amount           ,            '||
                      '  Promo_Credit_Count          ,            '||
                      '  Promo_Credit_Amount         ,            '||
                      '  Return_Commission           ,            '||
                      '  Net_Discounts               ,            '||
                      '  Total_Fees                  ,            '||
                      '  Sales_Commission            ,            '||
                      '  Cash_Commission             ,            '||
                      '  Tkt_Charge                  ,            '||
                      '  Subscription_Commission     ,            '||
                      '  Interim_Sweeps              ,            '||
                      '  Net_Due                     ,            '||
                      '  Retailer_id                 ,            '||
                      '  Retailer_Name               ,            '||
                      '  SOURCE                      ,            '||
                      '  INSERTED_DATE               ,            '||
                      '  CDC                         ,            '||
                      '  UPLOADED                                 '||
                      ')                                          '||
    '              select                                         '||
                      '  ltrim(rtrim(product_name)) ,             '||
                      '  Net_Sales                   ,            '||
                      '  Net_Adjustments             ,            '||
                      '  Cancels_Count               ,            '||
                      '  Cancels_Amount              ,            '||
                      '  Cashes_Count                ,            '||
                      '  Cashes_Amount               ,            '||
                      '  Claims_Count                ,            '||
                      '  Claims_Amount               ,            '||
                      '  Returns_Count               ,            '||
                      '  Returns_Amount              ,            '||
                      '  Free_Prize_Count            ,            '||
                      '  Free_Prize_Amount           ,            '||
                      '  Free_Promo_Count            ,            '||
                      '  Free_Promo_Amount           ,            '||
                      '  Promo_Credit_Count          ,            '||
                      '  Promo_Credit_Amount         ,            '||
                      '  Return_Commission           ,            '||
                      '  Net_Discounts               ,            '||
                      '  Total_Fees                  ,            '||
                      '  Sales_Commission            ,            '||
                      '  Cash_Commission             ,            '||
                      '  Tkt_Charge                  ,            '||
                      '  Subscription_Commission     ,            '||
                      '  Interim_Sweeps              ,            '||
                      '  Net_Due                     ,            '||
                      '  Retailer_id                 ,            '||
                      '  Retailer_Name               ,            '||               
                      ' '''||l_file_name                           ||''', '||
                      '   sysdate                    ,            '||
                      ' '''||    REFRESH_CDC                       ||''', '||
                      '''N'''                                      || 
                      'FROM                                       '||
                      'exter_invoice_excel                        '||
                      'WHERE retailer_id is not null and ltrim(rtrim(product_name)) in (''Loto'',''Inst Tk'')';
            execute immediate l_sql;   
            l_sql :='drop table exter_invoice_excel';
            execute immediate l_sql;
    exception
    when others then
    rollback;
    l_sql :='drop table exter_invoice_excel';
    execute immediate l_sql;
    debug_message('INVOICE_EXCEL_UPLOAD/'||REFRESH_CDC,'Unexpected Error '||sqlerrm);
    END;
    --truncate table invoice_excel_tempjust go through the code, it would help u for sure
    cheers

  • How to read DefaultTrace files, What are other useful trace files

    Hi,
    I was trying to debug some issue using Default Trace file and it is painful. Can anyone point out some tips and tricks to do debugging. And how to read Default Trace file.
    Also what are the other useful trace files available? Please point out.
    Thanks,
    Deepak

    Hello Deepak,
    Here is the link with all infos how to use Log Viewer to view logfiles:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/5f1140d72dc442e10000000a1550b0/frameset.htm
    As all program generated logs are written to Default Trace file, it is the only file to check for  logs.
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers
    Message was edited:
    You can perform the following activities using the Log Viewer UI:
    &#9679;     Connect to and view logs on multiple servers
    &#9679;     Add log files
    &#9679;     Add log files from a log directory
    &#9679;     Customize the columns for the log records that are displayed
    &#9679;     Search for log records that meet specific criteria
    &#9679;     Filter log records by specific criteria
    &#9679;     Sort log records
    &#9679;     Merge log files within and across servers
    &#9679;     Use the refresh function to display the latest logs
    &#9679;     Open archives of log files
    &#9679;     Save log files to comma separated value (CSV) files and open them using Microsoft Excel.

  • How to read the hard disk serial number using java this is urgent

    Please do let me know any knows how to read the hard disk unique number provided by manufactruer using java library

    I don't know; I think the fate of the free worldrests upon the answer.
    Well, as long as the non-free world stays unharmed,
    it can't be so bad ...I think the "Axis of Evil" constitutes a group of countries that are just "misunderstood".

Maybe you are looking for

  • How to enable Validate and Export in FDM task

    Hi everyone I am working with setting up an FDM Task to Import, Validate and Export data to HFM. The Task is able to import data to FDM, but I cannot make the process start the Validate and Export functions. If I do the process manually, then data is

  • Cannot transfer information from imac to Macbook -- please help me! :-)

    Hi. I recently got a MacBook and am trying to transfer information from my G3 imac to the MacBook. When I set up the MacBook, I used the Setup Assistant, hooked up the 2 computers with a firewire cable and selected to transfer information from my ima

  • How to install cc on macbook???

    how can I install the creative cloud on my macbook- I've tried so many times but it doesn't work- helpppp

  • [CS2/CS3 AS] Color Management vs Scripting

    Argh! Okay, I've got a very simple script whose purpose in life is to shut off all ligatures in all stories. Literally 3 lines long. tell application "Adobe Illustrator" tell front document   set ligature of every character of every story to false  

  • Problema con iOS 7

    No tengo transparencia en mi iPhone 4S con iOS 7