Mistake in codes

Hello Experts,
I hav written a procedure to migrate data from one table into another. One issue is arising regarding this part. in my table i am getting the value of lookup fsr in most of the fsr column
begin
                               select a.rep_id into salesrep_id
                               from salesrep a ,
                               retailer_applicants_temp b
                               where UPPER(a.salesperson) like ('%'||UPPER(c1.FSR)||'%')
                               and a.active ='Y';
                               dbms_output.put_line('ERROR:'||c1.FSR);
                                exception
                                when others then
                                 l_msg := 'LOOKUP FSR';
                               raise no_chance;
                              end;I have attached my whole procedure too. I am making any mistakes???
CREATE OR REPLACE procedure LOTTO_BI.migrate_retailers IS
x_val varchar2(1000);
no_chance exception;
l_msg varchar2(1000);  
salesrep_id varchar2(10);
applicant_ID number;                        
begin
   for c1 in( SELECT TRADING_NAME,
                            RETAILER_NUMBER,
                            COMPANY_NAME,
                            ADDRESS_LINE1,
                            DISTRICT,
                            CONTACT_PERSON,
                            OFFICE_PHONE,
                            MOBILE_PHONE,
                            MORALITY_STATUS,
                            NIC_NUMBER,
                            OTHER_CONTACT,
                            BUSINESS_TYPE,
                            BUSINESS_REGISTRATION_NUMBER,
                            RETAILER_CODE,
                            UPLOADED,
                            FSR,
                            CITY,
                            INT_AUDIT,
                            CONTRACT_SIGNAGE,
                            SIGNAGE_AUDIT,
                            ESCONNECT,
                            PASSWORD,
                            TERMINAL,
                            PRINTERL,
                            MODEM,
                            SIMCARD,
                            BANKACCOUNT,
                            MESSAGE,
                            rowid
              FROM Retailer_applicants_temp
              WHERE nvl(uploaded,'N') != 'Y')
                loop--c1
                           declare           
                            l_cm_status varchar2(250);
                            code varchar2(25);
                            l_bu varchar2(50);
                            x char(1);
                             x_cnt number;
                             x_code varchar2(25);
                             x_status varchar2(25);
                             l_status varchar2(25);
                            begin
                              ---VALIDATE RECORD  find values
                              if c1.trading_name is null then
                               l_msg := 'Invalid trading';
                               raise no_chance;
                              end if;
                              if c1.address_line1 is null then
                               l_msg := 'Invalid address';
                               raise no_chance;
                              end if;
                              begin
                                select 'X'
                                into x
                                from lookup_header a ,
                                        lookup_lines b
                                where a.id =b.header_id
                                and a.code ='DISTRICT'
                                and b.code =c1.district;
                                exception
                                when others then
                                 l_msg := 'Invalid district';
                               raise no_chance;
                              end;
                              if c1.CONTACT_PERSON is null then
                                l_msg := 'Invalid Contact Person';
                                raise no_chance;
                              end if;
                               if c1.OFFICE_PHONE is null then
                                l_msg := 'Invalid office number';
                                raise no_chance;
                              end if;
                              if c1.MORALITY_STATUS like 'No CM%' then
                                l_cm_status := 'PENDING';
                              elsif c1.MORALITY_STATUS =  'CM-Pending' then
                                l_cm_status := 'PENDING';
                              elsif c1.morality_status = 'No CM - Was Rejected' then
                               l_cm_status :=  'REJECTED';
                              elsif c1.MORALITY_STATUS like 'CM%' then
                               l_cm_status := 'CM';
                              elsif c1.MORALITY_STATUS in ('Audit - Rejected','Terminated','FP - Minor Offence','Naturalized') then
                               l_cm_status := 'PENDING';
                              else
                               l_msg := 'CM pattern undefined';
                               raise no_chance;
                              end if;
                               if c1.NIC_NUMBER is null then
                               l_msg := 'Invalid NIC Number';
                               raise no_chance;
                              end if;
                              if c1.retailer_number ='200999' then
                                l_bu := 'INDEPENDENT';
                              else
                                l_bu := upper(c1.business_type);
                               end if;
                              if l_bu is null then
                                l_msg := ' Invalid bu';
                                raise no_chance;
                              end if; 
                               if c1.BUSINESS_REGISTRATION_NUMBER is null then
                               l_msg := 'Invalid BRN num';
                               raise no_chance;
                              end if;
                              if c1.FSR is null then
                               l_msg := 'Invalid FSR';
                               raise no_chance;
                              end if;
                              begin
                               select a.rep_id into salesrep_id
                               from salesrep a ,
                               retailer_applicants_temp b
                               where UPPER(a.salesperson) like ('%'||UPPER(c1.FSR)||'%')
                               and a.active ='Y';
                               dbms_output.put_line('ERROR:'||c1.FSR);
                                exception
                                when others then
                                 l_msg := 'LOOKUP FSR';
                               raise no_chance;
                              end;
                             if c1.CITY is null then
                               l_msg := 'Invalid City';
                               raise no_chance;
                              end if;
                              begin
                              x_code := upper(substr(rtrim(ltrim(c1.trading_name)),1,3));
                               Select ltrim(rtrim(to_char(count(*)+1,'0000'))) into x_cnt from retailer_applicants where
                               retailer_code like x_code||'%';
                               x_code := x_code||x_cnt;
                              exception
                              when others then
                              l_msg := 'Unable to gen code';
                              raise no_chance;
                              end;
                              begin
                                      if c1.retailer_number is not null then
                                          select agent_status
                                          into x_status
                                          from lotto_retailers
                                          where retailer_num =c1.retailer_number;
                                         if x_status = 'Terminated' then
                                            l_status := 'REJECTED';
                                        elsif x_status = 'Active' then
                                           l_status := 'APPROVED';
                                         elsif x_status = 'Inactive' then
                                            l_status := 'APPROVED';
                                         else
                                            l_msg := 'Invalid status';
                                            raise no_chance;
                                          end if;
                                    else
                                          l_status :='PENDING';
                                     end if;
                              end;
                              INSERT INTO retailer_applicants
                              (APPLICANT_ID,
                                RETAILER_CODE,
                                TRADING_NAME,
                                RETAILER_NAME,
                                ADDRESS_LINE1,
                                DISTRICT,
                                OFFICE_PHONE,
                                CONTACT_PERSON,
                                MORALITY_STATUS,
                                APPLICATION_STATUS,
                                FSR_ID,
                                RETAILER_NUMBER,
                                COMPANY_NAME,
                                CITY,
                                MOBILE_PHONE,
                                NIC_NUMBER,
                                BUSINESS_REGISTRATION_NUMBER,
                                BUSINESS_STRUCTURE,
                                MORALITY_STATUS_COMMENT,
                                CREATED_BY,
                                CREATED_DATE,
                                INTERNAL_AUDIT,
                                CONTRACT_SIGN,
                                ESCONNECT,
                                "PASSWORD",
                                TERMINAL,
                                PRINTER,
                                MODEM,
                                SIMCARD,
                                BANKACCOUNT)
                                values
                                (lotto_retappl_seq.nextval,
                                 x_code,
                                 c1.trading_name,
                                 c1.trading_name,
                                 c1.address_line1,
                                 c1.district,
                                 c1.office_phone,
                                 c1.contact_person,
                                 l_cm_status,
                                 x_status,
                                 salesrep_id,
                                 c1.retailer_number,
                                 c1.company_name,
                                 c1.city,
                                 c1.mobile_phone,
                                 c1.nic_number,
                                 c1.business_registration_number,
                                 l_bu,
                                 c1.morality_status,
                                 user,
                                 sysdate,
                                 c1.int_audit,
                                 c1.contract_signage,
                                 c1.esconnect,
                                 c1.password,
                                 c1.terminal,
                                 c1.printerl,
                                 c1.modem,
                                 c1.simcard,
                                 c1.bankaccount
                              --UPDATE Temp
                                Update retailer_applicants_temp
                                set uploaded = 'Y' ,
                                     message = 'Uploaded Successfully'
                                where rowid = c1.rowid;
                            exception
                            when no_chance then
                            update Retailer_applicants_temp
                            set message = l_msg,
                                 uploaded = 'E'
                            where rowid =c1.rowid;
                            end;
                end loop;--c1
exception
when others then
dbms_output.put_line('ERROR:'||sqlerrm);
rollback;
end;
/Edited by: Kevin CK on Sep 7, 2010 2:29 PM

I've made some progress. Now i am getting a no data found at the following line
       begin
                                      if c1.retailer_number is not null then
                                          select agent_status
                                          into x_status
                                          from lotto_retailers
                                          where retailer_num =c1.retailer_number;
                                         if x_status = 'Terminated' then
                                            l_status := 'REJECTED';
                                        elsif x_status = 'Active' then
                                           l_status := 'APPROVED';
                                         elsif x_status = 'Inactive' then
                                            l_status := 'APPROVED';
                                         else
                                            l_msg := 'Invalid status';
                                            raise no_chance;
                                          end if;
                                    else
                                          l_status :='PENDING';
                                     end if;
                              endI have checked and i have 3 status only.

Similar Messages

  • ALV  report in ECC 6.0  'TOP-OF-PAGE'

    Hi Friends,
    Please, Kindly help me on below issue with Alv report for 'TOP-OF-PAGE' in ECC 6.0.
    I have written the following code for "top-of-page' which is not getting the text given on this event, please help me if i committed any mistake in code.
    type-pools : slis.
    TABLES : KNA1,VBAK.
    TYPES: BEGIN OF ty_kna1,
            kunnr TYPE kna1-kunnr,
            land1 TYPE kna1-land1,
            name1 TYPE kna1-name1,
            ort01 TYPE kna1-ort01,
           END OF ty_kna1.
    TYPES: BEGIN OF ty_vbak,
            vbeln TYPE vbak-vbeln,
            erdat TYPE vbak-erdat,
            ernam TYPE vbak-ernam,
            netwr TYPE vbak-netwr,
          END OF ty_vbak.
    DATA : W_KNA1 TYPE TY_KNA1,
           W_VBAK TYPE TY_VBAK,
           I_KNA1 TYPE STANDARD TABLE OF TY_KNA1,
           I_VBAK TYPE STANDARD TABLE OF TY_VBAK.
    DATA : W_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
           I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : V_REPID LIKE SY-REPID.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
    INITIALIZATION.
    V_REPID = SY-REPID.
    PERFORM BUILD_FIELDCAT.
    PERFORM EVENT_CALL.
    PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
    PERFORM DATA_RETRIEVAL.
    PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *&      Form  BUILD_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    form BUILD_FIELDCAT .
    W_FIELDCAT-TABNAME    = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME  = 'KUNNR'.
    W_FIELDCAT-SELTEXT_M = 'CUST NAME'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME    = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME  = 'LAND1'.
    W_FIELDCAT-SELTEXT_M = 'COUNTRY'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME    = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME  = 'NAME1'.
    W_FIELDCAT-SELTEXT_M = 'NAME'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME    = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME  = 'ORT01'.
    W_FIELDCAT-SELTEXT_M = 'CITY'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    endform.                    " BUILD_FIELDCAT
    *&      Form  DATA_RETRIEVAL
          text
    -->  p1        text
    <--  p2        text
    form DATA_RETRIEVAL .
    SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1
                                   INTO TABLE I_KNA1
                                   WHERE KUNNR IN S_KUNNR.
    endform.                    " DATA_RETRIEVAL
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = '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                         = ALV_LAYOUT
       IT_FIELDCAT                       = I_FIELDCAT[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = V_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
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = I_KNA1
    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_DATA
    *&      Form  BUILD_LISTHEADER
          text
         -->P_IT_LISTHEADER  text
    form BUILD_LISTHEADER  using i_listheader TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'CUSTOMER DETAILS'.
      HLINE-TYP = 'H'.
      append hline to it_listheader.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = I_LISTHEADER
       i_logo                   =
       I_END_OF_LIST_GRID       =
    endform.                    " BUILD_LISTHEADER
    *&      Form  EVENT_CALL
          text
    -->  p1        text
    <--  p2        text
    form EVENT_CALL .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.                    " EVENT_CALL
    *&      Form  POPULATE_EVENT
          text
    -->  p1        text
    <--  p2        text
    form POPULATE_EVENT .
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
    Thanks in Advance,
    Chandra.

    type-pools : slis.
    TABLES : KNA1,VBAK.
    TYPES: BEGIN OF ty_kna1,
    kunnr TYPE kna1-kunnr,
    land1 TYPE kna1-land1,
    name1 TYPE kna1-name1,
    ort01 TYPE kna1-ort01,
    END OF ty_kna1.
    TYPES: BEGIN OF ty_vbak,
    vbeln TYPE vbak-vbeln,
    erdat TYPE vbak-erdat,
    ernam TYPE vbak-ernam,
    netwr TYPE vbak-netwr,
    END OF ty_vbak.
    DATA : W_KNA1 TYPE TY_KNA1,
    W_VBAK TYPE TY_VBAK,
    I_KNA1 TYPE STANDARD TABLE OF TY_KNA1,
    I_VBAK TYPE STANDARD TABLE OF TY_VBAK.
    DATA : W_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : V_REPID LIKE SY-REPID.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
    WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
    INITIALIZATION.
    V_REPID = SY-REPID.
    PERFORM BUILD_FIELDCAT.
    PERFORM EVENT_CALL.
    PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
    PERFORM DATA_RETRIEVAL.
    PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *& Form BUILD_FIELDCAT
    text
    --> p1 text
    <-- p2 text
    form BUILD_FIELDCAT .
    W_FIELDCAT-TABNAME = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME = 'KUNNR'.
    W_FIELDCAT-SELTEXT_M = 'CUST NAME'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME = 'LAND1'.
    W_FIELDCAT-SELTEXT_M = 'COUNTRY'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME = 'NAME1'.
    W_FIELDCAT-SELTEXT_M = 'NAME'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-TABNAME = 'I_KNA1'.
    W_FIELDCAT-FIELDNAME = 'ORT01'.
    W_FIELDCAT-SELTEXT_M = 'CITY'.
    APPEND W_FIELDCAT TO I_FIELDCAT.
    CLEAR W_FIELDCAT.
    endform. " BUILD_FIELDCAT
    *& Form DATA_RETRIEVAL
    text
    --> p1 text
    <-- p2 text
    form DATA_RETRIEVAL .
    SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1
    INTO TABLE I_KNA1
    WHERE KUNNR IN S_KUNNR.
    endform. " DATA_RETRIEVAL
    *& Form DISPLAY_DATA
    text
    --> p1 text
    <-- p2 text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = V_REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = '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 = ALV_LAYOUT
    IT_FIELDCAT = I_FIELDCAT[]
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS = V_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
    I_HTML_HEIGHT_TOP = 0
    I_HTML_HEIGHT_END = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    IR_SALV_FULLSCREEN_ADAPTER =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = I_KNA1
    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_DATA
    *& Form BUILD_LISTHEADER
    text
    -->P_IT_LISTHEADER text
    form TOP_OF_PAGE using i_listheader TYPE SLIS_T_LISTHEADER.
    DATA HLINE TYPE SLIS_LISTHEADER.
    HLINE-INFO = 'CUSTOMER DETAILS'.
    HLINE-TYP = 'H'.
    append hline to it_listheader.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = I_LISTHEADER
    i_logo =
    I_END_OF_LIST_GRID =
    endform. " BUILD_LISTHEADER
    *& Form EVENT_CALL
    text
    --> p1 text
    <-- p2 text
    form EVENT_CALL .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = V_EVENTS
    EXCEPTIONS
    LIST_TYPE_WRONG = 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. " EVENT_CALL
    *& Form POPULATE_EVENT
    text
    --> p1 text
    <-- p2 text
    form POPULATE_EVENT .
    READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
    IF SY-SUBRC EQ 0.
    WA_EVENT-FORM = 'TOP_OF_PAGE'.
    MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
    ENDIF.
    just change the code  as i have u will get it
    plz reward points if useful

  • Missing Accounting Entry ( rcv_receiving_sub_ledger & rcv_Accounting_Event)

    Hello,
    Any help is highly appreciated. Below is our problem.
    We have a PO which was reveived in Oct-11 and somehow( a bug maybe ) There was no RECEIVE accounting entries created for this PO.
    Now we are trying to re-create the accounting entries for this receipt and post them in DEC-11
    For October we did a manual JE to balance.
    I've a open SR with Oracle but not getting solution. Here are the steps analyst described.
    1.) Update transaction date in rcv_trx table to december date (lets say sysdate)
    2.) Then run a code where it calls this API.
         RCV_AccrualAccounting_GRP.Create_AccountingEvents(
                   p_api_version => 1.0,
                   p_source_type => 'RECEIVING',
                   p_rcv_transaction_id =>l_parent_trx_id,
                   --p_direct_delivery_flag=>l_direct_delivery_flag,
                   --p_gl_group_id          => l_je_group_id
                   x_return_status => l_return_status,
                   x_msg_count => l_msg_count,
                   x_msg_data => l_msg_data
    And this fails even though the periods are OPEN.
    Here is the log file:
    Receipt_TXN : 6156606
    PO Header ID : 452874
    Consigned PO : N
    Error ocurred while creating Accounting
    l_msg_count : 1
    l_msg_data : FND FND_AS_UNEXPECTED_ERROR N PKG_NAME RCV_AccEvents_PVT N PROCEDURE_NAME Create_ReceivingEventStatement -50 N ERROR_TEXT ORA-01403: no data found
    Receipt_TXN : 6156593
    PO Header ID : 453806
    Consigned PO : N
    Error ocurred while creating Accounting
    l_msg_count : 2
    l_msg_data :
    Thanks

    Hi
    Found the issue, Silly mistake.
    Code had "fnd_client_info.set_org_context" for initialization, It should be mo_global.set_policy_context since we are on R12.
    Thanks
    Manu

  • Question for cl_gui_frontend_services= file_save_dialog

    Hi Expert.
    I made simple test page.
    there is nothing but this code in oninitlization
    * event handler for data retrieval
      DATA: ld_filename TYPE string,
            ld_path TYPE string,
            ld_fullpath TYPE string,
            ld_result TYPE i.
    * Display save dialog window
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
    *      window_title      = ' '
          DEFAULT_EXTENSION = 'XLS'
          default_file_name = 'accountsdata'
          INITIAL_DIRECTORY = 'c:temp'
        CHANGING
          filename          = ld_filename
          path              = ld_path
          fullpath          = ld_fullpath
    * Check user did not cancel request
      CHECK ld_result EQ '0'.
    and that shows
    "method:FILE_SAVE_DIALOG ,line : 164
    An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object."
    why this error caught?
    Did I miss something or made mistake BSP code above?
    should I create some object before call cl_gui_frontend_services=>file_save_dialog?
    I don't have any clue on this.
    help me please. thanks .

    Oh yes - this most certainly will not work from BSP.  This class and any other that uses the control framework are written as proxy objects to code that actually executes as part of the SAPGui on the client machine.
    BSP is completly web centric.  Its output can only be ran in a browser.  To the browser the output of BSP doesn't look any different than any other web page that might come from ASP, JSP, PHP, etc. 
    Also because BSP runs in a browser - the amount of interaction that can occur with the client (particularly around file downloads) is somewhat limited. There is no file download element or a file save as dialog object. There are other ways to attach content to an HTTP Response or place it in a hidden iFrame - the browser is then responsible for intrepting this information and offering the file save as or open dialog based upon the appropriate MIME Type. 
    This weblog is the primer on BSP downloads written by the Jedi Master himself:
    <a href="/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents:///people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
    If you search you will find other examples in the older BSP weblogs as well.

  • Problem occured while creating a .dll file which has to be used in CIN

    hi all,
    i am a rookie in labview,iam getting an error while trying to build .dll file  in vc++ 6.0 , i followed all the instructions available in labview "using External Code" manual,the error was as follows;
    Compiling...
    CINsample2.c
    Linking...
    Running LVSB Utility
    The system cannot find the path specified.
    Error executing c:\winnt\system32\cmd.exe.
    sample1.dll - 1 error(s), 0 warning(s)
    plz help.
    santosh.
    Regards,
    santosh

    Hi santosh,
    It sounds to me that you are mistaking CINs (Code Interface Node) with
    DLLs (Dynamic-Link Library). You mention that you want to create a DLL
    in Microsoft Visual C++, but the errors you are getting are related to
    CINs.
    Don't worry! Here are my favorite links to getting started creating and using DLLs with Microsoft Visual C++ and LabVIEW:
    How to Build a DLL with Visual C++
    Creating and Calling LabVIEW DLLs with Various Data Types from Microsoft Visual C++
    I hope that this helps you to get on the right path.
    Have fun!
    - Philip Courtois, Thinkbot Solutions

  • How do i get a text field to autopopulate based on responses in two groups of radio buttons

    I am using Adobe Acrobat Pro and am very new to this.
    What I want to achieve:
    I have two sets of radio buttons; one group is "Likelihood" choices and the other group are "Consequence" choices. Based on what the user picks in those two groups, I want the form to auto-populate the risk rating in another field. E.g If the user picks "Insignificant" in the consequence group and "Rare" in the likelihood group; the field titled Risk Rating should display the word "Low". If they pick "Insignificant" and "Almost Certain" the Risk Rating field should display "Moderate". Please let me know if you need further information. Thanks in advance.

    You can use something like this code as the custom calculation script of the risk rating field:
    var consequence = this.getField("Consequence").valueAsString;
    var likelihood = this.getField("Likelihood").valueAsString;
    if (consequence=="Insignificant" && likelihood=="Rare") event.value = "Low";
    else if (consequence=="Insignificant" && likelihood=="Almost Certain") event.value = "Moderate";
    // etc.
    else event.value = "";
    Edit: Fixed small mistake in code.

  • Foreign Currency valuation reverse

    Hi All,
    Foreign currency revaluation we do every month end to reverse posting of all open items i.e vendor, customer and G/L accounts and Reversal is usually done for the next day which falls into next posting period. when do this steps I made a mistake,  T-code FAGL_FC_VAL
    under Posting Tab
    the document date and posting date is 31.10 and by mistaken Reversal posting date I given 01.08 (instead 01.11), the batch was created and entries were posted. So please help me how can I reverse this posted entries? once reversed then, I can do the Revaluation again with proper date.

    Hi,
    I tested same Scenario in our test client to reset. The system reset all documents but when I try to post again in FAGL_FC_VAL with correct reversal posting date, after execute the system says List contains no data. Then I checked in messages, those document already valuated with valuation are 01 on 31.10.2011.
    How can I reverse on the proposed reversal posting date? Please suggest.

  • Up to the period : Fiscal year period Exit variable is not working

    Hi Experts,
    I have the following code to get the upto the Fiscal year period variable .It shoudl fetch the Values  From the starting of the Fiscal period like 2009001 whatever the  period user enters.But currnelty it is not woking.Please let me know am I doing any mistake in code.currently it is only fetching for the month user enters not up to the period.
    Prasad
    Variable Name : ZUPTOPER
    User Entry  Var : 0P_FPER
    WHEN 'ZUPTOPER'.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = '0P_FPER'.
            fper = loc_var_range-low.
            fper+4(3) = '001'.
            CLEAR l_s_range.
            l_s_range-low      = fper.
            l_s_range-high     = loc_var_range-low.
            l_s_range-sign     = 'I'.
            l_s_range-opt      = 'BT'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.

    Hi Prasad,
    This would be happening if you have put the user entry variable in the global filter of your query.
    As a result the complete data set is restrcted to get the data only for one month.
    Please use the variable for user entry month in a selection and not globally.
    -Vikram

  • Feed issues

    I don't understand why I'm getting a complex object type
    error:
    http://76.12.98.40/test3.cfm
    Code:
    <cffeed source="
    http://www.sixtyrivers.blogspot.com/atom.xml"
    properties="theFeed" query="rsFeed">
    <cfif rsFeed.RecordCount GTE 1>
    <cfoutput>
    #theFeed.title#<br>
    </cfoutput>
    <cfoutput query="rsFeed" maxrows="5">
    <cfif theFeed.version IS "atom_1.0">
    <a href="#linkhref#">#title#</a>
    <cfelse>
    <a href="#rsslink#">#title#</a>
    </cfif>
    <p>#content#</p>
    </cfoutput>
    <cfelse>
    <h3>No RSS Feed Currently Available</h3>
    </cfif>
    Can anyone help?

    I just tried it again, it's working, the scene is
    beautiful...
    oops, my mistake, your code should work if the feed source
    xml probably had some problem.

  • Recommend Flash CS3/Actionscript 3 Books?

    I am looking to buy two books: one on Flash CS3 and one on
    ActionScript 3.0 (probably one by Colin Moock). Any
    recommendations?

    I'll add a little more of a review to the ActionScript 3.0
    Cookbook. For the most part the recipes inside are pretty good. I
    have been unimpressed though with the amount of spelling mistakes
    and code errors. The errata on O'Reilly's website doesn't contain
    all the errors either and I was finding a lot more that were not
    listed yet. Generally I've found O'Reilly books to be edited pretty
    good, this book though seems like it slipped through the reviewers
    or something. Still, like I said its a good book and has some good
    info in it - just be aware that there are a lot of errors
    throughout it.
    I am eagerly awaiting the delivery of Colin's book, my past
    experiences have been that his books are a cut above everyone
    elses.

  • ANSI Standard decode to CASE

    Hi all,
    select
    id
    ,one
    ,two
    From
         (select id
         , one
         , two
         , Max(decode(TYPE, "ER", 3*4, 4*7)
         from
              (select id
              , sum(one) as one
              , sum(two) as two
              from t1
              group by id)
         group by id, one, two
         ) temp inner join t2....
    The above query is just a sample structure to tell the problem that i am facing. It works fine, but i need to convert it to ANSI Standard.
    Hence I need to convert the DECODE to CASE statement. but if i convert to CASE, i need to use any of the GROUP BY FUNCTIONS, but if i use the MAX of any group by functions, the result would be wrong...how to overcome it
    Thanks

    Hi,
    Yes I did a silly mistake, the code I gave was for only the decode but when I converted it to case statement, there was a silly mistake, which i corrected.
    Now i corrected it to
    Select
         COL1
         , Col2
         , MAX(CASE WHEN Upper(TYPE) = 'YR' THEN Round(3.43*3, 2) END) AS CALC1
         , Max(CASE WHEN Upper(TYPE) = 'ZP' THEN Round(3.12*12, 2) END) AS CALC2
    From
         Group by....
    but now when i add a sum of the calc1 & calc2, I am not getting any results the column is blank. Is there anything that i missed
    Select
         COL1
         , Col2
         , MAX(CASE WHEN Upper(TYPE) = 'YR' THEN Round(3.43*3, 2) END) AS CALC1
         , Max(CASE WHEN Upper(TYPE) = 'ZP' THEN Round(3.12*12, 2) END) AS CALC2
         , (MAX(CASE WHEN Upper(TYPE) = 'YR' THEN Round(3.43*3, 2) END
         + Max(CASE WHEN Upper(TYPE) = 'ZP' THEN Round(3.12*12, 2) END)) as SUM3
    From
         Group by....
    Thanks

  • Solaris specific cmake files missing in XMP toolkit

    XMP_Config.cmake references Solaris specific files:
            execute_process(COMMAND "uname" OUTPUT_VARIABLE OSNAME)
            string(TOUPPER "${OSNAME}" OSNAME)
            if ( ${OSNAME} MATCHES SUNOS)
                execute_process(COMMAND "uname" "-p" OUTPUT_VARIABLE PLATFORM_SUNOS_ARCH)
                string(TOUPPER "${PLATFORM_SUNOS_ARCH}" PLATFORM_SUNOS_ARCH)
                if ( ${PLATFORM_SUNOS_ARCH} MATCHES SPARC)
             include(${XMP_ROOT}/build/XMP_sunos_sparc.cmake)
                else()
             include(${XMP_ROOT}/build/XMP_sunos_intel.cmake)
                endif()
            else()
         include(${XMP_ROOT}/build/XMP_Linux.cmake)
            endif()
    However, these files do not exist in the build directory (or anywhere in the package).
    I am trying to get this compiled on Solaris, so this is causing me grief.
    Where can I get these files?

    Hi Bejhan,
        XMP SDK is not supported on Solaris platform. In past we provided support for Solaris and by mistake this code was left in SDK. I can help you to build the xmptoolkit for Solaris but you have to do some more work on your side to get it done. Again, you may face crashes on SPARC Solaris due to endian (big & little).
       Please follow the following steps in order to build it on Solaris
      1. Go to the build/shared directory
      2. Create a copy SharedConfig_Linux.cmake and name it SharedConfig_sunos_sparc.cmake OR SharedConfig_sunos_intel.cmake depends whether you are using SPARC or intel processor.
      3. Make some changes in newly created cmake files
         a. set XMP_PLATFORM_FOLDER to intelsolaris<_x64> or sparcsolaris<_x64> (depending upon 32/64 bit machine. for 64-bit machine add _x64 suffix)
         b. Set XMP_GCC_PATH=<gcc path>
         c. Set XMP_GCC_LIBPATH=<gcc libpath>
    4. Make a copy of ToolchainRelEng.cmake to ToolchainRelEng_sunos_<intel/sparc>.cmake and fix the gcc path's
    Hope this will help you.
    -Sunil

  • Can u pepople say one thing 'what is debugging' and how to debugg ?

    what is the debugging ?
    and how to dubugg the report ?

    when the actual output is differ from the expected output then there is some mistake in code, then we use Abap Debugger.
    In debugger we analyze, how the data is flowing in the program, what values are contained by variabes at run time.
    Internal tables are populating properly or not.
    u can start the ABAP / 4 Debugger in different ways
    1 : By entering
    /H in command box. and Clicking the Execute button .
    2 : In ABAP / 4 editor, by executing a program
    Choosing Program-->Execute -->Debugging
    from the Menu.
    3 : Setting Breakpoint in the Program.
    following links will help u to understand it better.
    http://www.sap-basis-abap.com/sapab002.htm
    http://www.sappro.com/downloads/Settings&SystemAreas.pdf

  • Tips on Changing Find bar_buttons location & highlights

    Taking the archived topic a bit farther https://support.mozilla.org/en-US/questions/976166?page=1,
    I added code for the "phrase not found" <u>background & text color</u>.
    Thanks to cor-el & all others that contributed.
    I wanted the "Phrase not found" label to show up better. So I played around & added this to the already great code to bring back old Find bar characteristics, offered by others in the above topic. It all still works in Fx 30 - for me.
    Added to code in the link, this colors background of "Phrase not found" (yellow) & makes font red, bold.
    Colors or bolding are easily changed.
    <pre><nowiki>* Add background color to "Phrase not found;" set font color & make bold */
    .findbar-container>.findbar-find-status {
    background-color:#ff8 !important;
    color: red;
    font-weight: bold;
    }</nowiki></pre>
    Don't know why, but using "code block" formatting in this forum, inserts blank line after, "...<b>findbar-find-status {</b>"
    The following is for "coding-challenged" users - like me. Changes up background color & font weight for <u>active</u> "Highlight All" & "Match Case" labels. Can change text color as well, if desired.
    <pre><nowiki>/* add a background color to the checked Highlight and Case sensitive buttons.
    Make checked buttons' font bold; change font color if desired. */
    .findbar-highlight[checked]>label {
    background-color: lightgreen !important;
    color: black;
    font-weight: bold;
    .findbar-case-sensitive[checked]>label {
    background-color: lightgreen !important;
    font-weight: bold;
    .findbar-case-sensitive[checked]+label { display:none !important; } /* hide "(Case sensitive)" label</nowiki></pre>
    Those now using userChrome.css to add code for GUI changes might try Stylish addon https://addons.mozilla.org/en-US/firefox/addon/stylish/?src=search.
    It allows instantly previewing new code ("styles") effect on Fx or Tb, rather than having to restart.
    <b>Important!</b> - it also <u>alerts to errors</u> in the entered code; giving indication of error type & the line, space where the error exists. Easier to find mistakes - why code isn't working.
    Very simple - just click "Write new style," give it a name; copy / paste code like from this topic; then click Preview to see effect (or it may point out errors). Also, many custom styles for almost anything, available on Userstyles.org - can be instantly loaded.

    Unable to add an image.
    UPDATE 7/18/2014 - problems posting images:
    Using a 3rd party image host: Screen of Find Bar changes, using cor-el's code from other linked discussion and my additional code in this discussion.
    If you don't like the color choices or bold font, just change them or "comment out" specific lines. If you want the change back, just uncomment. Like:
    <b>background-color:#ff8 !important;
    color: fuchsia;
    <span style="color:#ff0000">/*</span>font-weight: bold;<span style="color:#ff0000">*/</span></b>
    [IMG]http://i59.tinypic.com/dyucfn.jpg[/IMG]
    Note: adding image link from hosting site (copying the host's usual full path "[IMG]... [/IMG]" , doesn't imbed the image - only inserts the link (if embedding by that method ever worked on this forum). Though I can follow the above link.
    Note: my entry in the edit screen for the closing "IMG" in brackets (just above) is entered <b>correctly</b> - inside brackets. Forum software appears to change the closing bracket statement into a forum help link.
    Below, using html code to insert an image (using a formatting toolbar) seems to work here, but most users wouldn't have that capability.
    <img src="http://i59.tinypic.com/dyucfn.jpg" alt="">

  • At End Of Error.

    Hello Freinds,
    I am using At End Of..End At in my code but I am getting a runtime memory error.
    the code is  
    SORT gi_itab1 BY prctr poper ryear ktext.
      gi_itab2[] = gi_itab1[].
      CLEAR : gi_itab.
      REFRESH : gi_itab.
      LOOP AT gi_itab2 INTO gw_itab2.
        AT END OF prctr.
          SUM.
          APPEND gw_itab2 TO gi_itab2.
        ENDAT.
      ENDLOOP.
    I am getting error at the point APPEND gw_itab2 TO gi_itab2.
    The data is also just of 2 records.The data is not passing and also I am getting memory error.
    Please point out the mistake in code.

    Hi Jaydeep,
      This error is coming because of the infinite loop.
      You are looping at the table gi_itab2.
    and inside the loop you are appending the work area to the same table gi_itab2.
    so,this loop will not end and going to infinite loop which results in runtime error.
    try appending to another internal table gi_itab3.
    (APPEND gw_itab2 TO gi_itab3.)
    Hope this will help.
    Regards,
    Swarna Munukoti.

Maybe you are looking for

  • Using Sharepoint as an archival and document management

    Hello,  I was asked by my manager to look for possible solutions to convert our archive paper file cabinets that are full of student records into digital format. We do not utilize sharepoint yet at the school but I was researching and found that shar

  • Any recommendations or templates for User authentication with Flash sites?

    Looking to register, validate email registration and autheticate users to restrict access to individual accounts.  Does anyone have recommendations or templates?  It seems there would be a template out there that is generic for this purpose.

  • I didn't receive what I brought

    So I brought a $25 iTunes card and went to purchase the $9.99 diamond pack on Edjing and I didn't receive it, but you guys took my money from my account. That's $10 dollars gone. After this I went to check and I had $15 in my account and I still didn

  • Query: Best practice SAN switch (network) access control rules?

    Dear SAN experts, Are there generic SAN (MDS) switch access control rules that should always be applied within the SAN environment? I have a specific interest in network-based access control rules/CLI-commands with respect to traffic flowing through

  • DP93 SD document item is not account assigned to itself

    HII, While running TA DP93 getting error "Sales and distribution document item is not account assigned to itself". I have implimented the note 1343813... after technical analysis in the vbap(item table) it's not storing object number. Could please sh