Itab code

hai,
  Suppose itab is having 10 records, Write what will be the output of
           Loop at itab.
                   if sy-tabix between 1 and 5.
                  write: /sy-index.
                    else if : sy-index between 6 and 10.
                  write: /sy-tabix.
           Endif.
           Endloop.
                                               regards,
                                                aravind.

Hi,
1)SY-INDEX has no effect in <b>LOOP....ENDLOOP</b>, only the SY-TABIX will hold the index of the record that is in the loop pass. So you the output will be all zeroes.
2)The reverse for <b>DO....ENDDO</b> only SY-INDEX will hold the current pass.
<b>Execute the Program to know the difference.</b>
REPORT zztest.
DATA : itab TYPE STANDARD TABLE OF mara WITH HEADER LINE.
START-OF-SELECTION.
  SELECT * FROM mara INTO TABLE itab UP TO 100 ROWS.
*---No effect on SY-INDEX
  WRITE : / 'SY-INDEX in LOOP...ENDLOOP'.
  LOOP AT itab.
    IF sy-tabix BETWEEN 1 AND 5.
      WRITE: / 'SY-INDEX', sy-index.
    ELSEIF sy-index BETWEEN 6 AND 10.
      WRITE: / 'SY-TABIX', sy-tabix.
    ENDIF.
  ENDLOOP.
*---No effect on SY-TABIX
  SKIP 1.
  WRITE : / 'SY-TABIX in DO...ENDO'.
  DO 10 TIMES.
    WRITE: / 'SY-INDEX', sy-index,
             'SY-TABIX', sy-tabix.
  ENDDO.
*---An Exception
  SKIP 1.
  WRITE : / 'An Exception'.
  DO 10 TIMES.
    LOOP AT itab.
      IF sy-tabix BETWEEN 1 AND 5.
        WRITE: / 'SY-INDEX', sy-index,
                 'SY-TABIX', sy-tabix.
      ENDIF.
    ENDLOOP.
  ENDDO.
<b>This is the Output</b>
<b>SY-INDEX in LOOP...ENDLOOP</b>
SY-INDEX          0
SY-INDEX          0
SY-INDEX          0
SY-INDEX          0
SY-INDEX          0
<b>SY-TABIX in DO...ENDO</b>
SY-INDEX          1  SY-TABIX          1
SY-INDEX          2  SY-TABIX          1
SY-INDEX          3  SY-TABIX          1
SY-INDEX          4  SY-TABIX          1
SY-INDEX          5  SY-TABIX          1
SY-INDEX          6  SY-TABIX          1
SY-INDEX          7  SY-TABIX          1
SY-INDEX          8  SY-TABIX          1
SY-INDEX          9  SY-TABIX          1
SY-INDEX         10  SY-TABIX          1
<b>An Exception</b>
SY-INDEX          1  SY-TABIX          1
SY-INDEX          1  SY-TABIX          2
SY-INDEX          1  SY-TABIX          3
SY-INDEX          1  SY-TABIX          4
SY-INDEX          1  SY-TABIX          5
SY-INDEX          2  SY-TABIX          1
SY-INDEX          2  SY-TABIX          2
SY-INDEX          2  SY-TABIX          3
SY-INDEX          2  SY-TABIX          4
SY-INDEX          2  SY-TABIX          5
SY-INDEX          3  SY-TABIX          1
SY-INDEX          3  SY-TABIX          2
SY-INDEX          3  SY-TABIX          3
SY-INDEX          3  SY-TABIX          4
SY-INDEX          3  SY-TABIX          5
SY-INDEX          4  SY-TABIX          1
SY-INDEX          4  SY-TABIX          2
SY-INDEX          4  SY-TABIX          3
SY-INDEX          4  SY-TABIX          4
SY-INDEX          4  SY-TABIX          5
SY-INDEX          5  SY-TABIX          1
SY-INDEX          5  SY-TABIX          2
SY-INDEX          5  SY-TABIX          3
SY-INDEX          5  SY-TABIX          4
SY-INDEX          5  SY-TABIX          5
SY-INDEX          6  SY-TABIX          1
SY-INDEX          6  SY-TABIX          2
SY-INDEX          6  SY-TABIX          3
SY-INDEX          6  SY-TABIX          4
SY-INDEX          6  SY-TABIX          5
SY-INDEX          7  SY-TABIX          1
SY-INDEX          7  SY-TABIX          2
SY-INDEX          7  SY-TABIX          3
SY-INDEX          7  SY-TABIX          4
SY-INDEX          7  SY-TABIX          5
SY-INDEX          8  SY-TABIX          1
SY-INDEX          8  SY-TABIX          2
SY-INDEX          8  SY-TABIX          3
SY-INDEX          8  SY-TABIX          4
SY-INDEX          8  SY-TABIX          5
SY-INDEX          9  SY-TABIX          1
SY-INDEX          9  SY-TABIX          2
SY-INDEX          9  SY-TABIX          3
SY-INDEX          9  SY-TABIX          4
SY-INDEX          9  SY-TABIX          5
SY-INDEX         10  SY-TABIX          1
SY-INDEX         10  SY-TABIX          2
SY-INDEX         10  SY-TABIX          3
SY-INDEX         10  SY-TABIX          4
SY-INDEX         10  SY-TABIX          5
Regards,
AS

Similar Messages

  • Update statement is not working. module pool program,why? check this code

    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.

    Hi,
      try to use
    start-of-selection.
    call screen 100.
    module pai input.
    endmodule
    <b>Reward points</b>
    Regards

  • How to update field values in a database table using module pool prg?

    hi
    how to update field values in a database table using module pool prg?
    we created a customized table, and we put 2 push buttons in screen painter update and display.
    but update is not working?
    data is enter into screen fields and to internal table, but it is not updated in database table.
    thanks in adv
    vidya

    HI,
    we already used the update statement. but its not working.
    plz check this.
    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.
    endform.                    " move_data
    thanks in adv
    vidya

  • BDC - Number of records

    Hi Peers,
    I am using call transaction method.  After executing the program and data is uploaded, i want to display i) number of records processed ii) no., of error records  iii) no., of success records on the same screen.  So where do i capture this no., of records field.  Any help is appreciated.  Thank you.

    Hi CSR
    data: lv_error type i,
            lv_count type i,
            lv_succ type i.
    loop at itab.
    code....
    "increment error variable when ever you have a error...
    lv_error = lv_error + 1.
    endloop.
    describe TABLE itab LINES lv_count.
    lv_succ = lv_count - lv_error.
    write:/ 'total number of records:' , lv_count.
    write:/' Number of errors :',lv_error.
    write:. ' procdes records: ' , lv_succ.
    Award points if helpful

  • Copying Dynamic Internal Table

    Hi All,
            I have created a Dynamic internal table using field symbols.  Now i need to copy that dynamic itab to another internal table, because I am not familiar with field symbols. Can anybody tell me how can i copy that dyn_itab to another itab.
    code which I used to create dyn_table:
    LS_FIELDCATALOG-FIELDNAME = 'CHINA_TOT'.
    LS_FIELDCATALOG-INTTYPE = 'I'.
    append LS_FIELDCATALOG to LT_FIELDCATALOG.
    assign LT_DATA to <FS_DATA>.
    call method cl_alv_table_create=>create_dynamic_table
         exporting
           it_fieldcatalog = LT_FIELDCATALOG
         importing
           ep_table = <FS_DATA>
         exceptions
           generate_subpool_dir_full = 1
           others = 2
    if sy-subrc <> 0.
    endif.
    So <FS_1> now points to our dynamic internal table.
    assign <FS_DATA>->* to <FS_1>.
    HERE <FS_1> is a dynamic itab.

    First you need to create another table with the structure that you have.
    call method cl_alv_table_create=>create_dynamic_table
         exporting
           it_fieldcatalog = LT_FIELDCATALOG
         importing
           ep_table = <FS_DATA2>
         exceptions
           generate_subpool_dir_full = 1
           others = 2
    field-symbols  : <fs_line1>, <fs_line2>, <fs_tmp1>, <fs_tmp2>.
    assign <FS_DATA2->* to <FS_2>.
    Now FS_1 and FS_2 are the tables.
    Also create work areas for the tables.
    CREATE DATA gw_line1 LIKE LINE OF <fs_1>
    CREATE DATA gw_line2 LIKE LINE OF <fs_2>.
    ASSIGN gw_line1->* TO <fs_line1>.
    assign gw_line2->* to <fs_line2>.
    With field symbols, you cannot move the rows directly, you will have to move it field by field.
    Once all the values are populated in the first table, copy it with the following logic.
    loop at <fs_1> into <fs_line1>
    Loop at   LT_FIELDCATALOG into LS_FIELDCATALOG.
    ASSIGN COMPONENT ls_fieldcatalog-fieldname OF STRUCTURE <fs_line1> TO <fs_tmp1>.
    ASSIGN COMPONENT ls_fieldcatalog-fieldname OF STRUCTURE <fs_line2> TO <fs_tmp2>.
    <fs_tmp2> = <fs_tmp1>
    endloop.
    append <fs_line2> to <fs_2>
    endloop.

  • Download Internal table to Excel with different Tabs -  ole2_object

    Hi All,
    I am using  ole2_object to download the data from internal table to Excel file. As per different values in sorting key, data will be downloading in different tab in same Excel file.
    In my internal table one field is of character type and some times contains number as value.
    e.g.  itab-code = ‘000002’.
    While downloading to Excel, Excel consider this value as numeric and remove the leading zero.
    Any suggestions for how to set format property as ‘Text’ for this cell, will highly appreciated.
    Sample  code -
       data: gs_excel type ole2_object,
             gs_wbooklist type ole2_object,
             gs_application type ole2_object,
             gs_wbook type ole2_object,
             gs_activesheet type ole2_object,
             gs_sheets type ole2_object,
             gs_newsheet type ole2_object,
             gs_cell type ole2_object.
       create object gs_excel 'EXCEL.APPLICATION'.
       get property of gs_excel 'workbooks' = gs_wbooklist.
       get property of gs_wbooklist 'Application' = gs_application.
       set property of gs_application 'SheetsInNewWorkbook' = 1.
       call method of gs_wbooklist 'Add' = gs_wbook.
       get property of gs_application 'ActiveSheet' = gs_activesheet.
       set property of gs_activesheet 'Name' = datasheet_name.
      call method of gs_excel 'Cells' = gs_cell exporting #1 = v_row           
                                              #2 = v_col.
      set property of gs_cell 'value' = <f>.
    GET PROPERTY OF gs_cell 'Font' = gs_Font.
    SET PROPERTY OF gs_Font 'Bold' = 1 .
    Thanks.
    Regards,
    Meenakshi.

    Hello,
    Just concatenate ' infont of the fields, which you want to treat as a text.
    Like,
    itab-code = '00002'.
    concatenate '''' itab-code  into itab-code.
    modify itab.
    You can also set the text properties of the cell by,
      SET PROPERTY OF gs_cell 'NumberFormat' = '@' .
    but, it will remove the leading zeros and set the format as text.
    Regards,
    Naimesh

  • Hiii select option validation on screen

    Hi
    please advise how do i do check on selection screen
    Suppose i have a internal table ITAB which has value as below
    ITAB-->
    BUKRS----CODE
    AA-------01
    AA-------08
    AA-------07
    BB-------03
    BB-------04
    i have on selection screen as below:
    Paremeters: P_bukrs
    select_options: S_CODE
    i have to do a check when user enter value on s_code that it is valid for the bukrs
    please advise.  can we do a loop with S_code

    Hi,
    Try like this,
    Just copy paste and execute the code.
    REPORT  z10_test
            NO STANDARD PAGE HEADING
            MESSAGE-ID z10_test.
    Types: begin of t_tab,
           bukrs type bukrs,
           code(4) type c,
           end of  t_tab.
    data: itab type standard table of t_tab with header line.
    parameters: p_bukrs like itab-bukrs.
    select-options: s_code for itab-code.
    AT SELECTION-SCREEN on S_code.
    itab-bukrs = 'AA'.
    itab-code = '01'.
    append itab.
    itab-bukrs = 'AA'.
    itab-code = '08'.
    append itab.
    itab-bukrs = 'AA'.
    itab-code = '07'.
    append itab.
    itab-bukrs = 'BB'.
    itab-code = '03'.
    append itab.
    itab-bukrs = 'BB'.
    itab-code = '04'.
    append itab.
    loop at itab where code in s_code and
                       bukrs = p_bukrs.
    if sy-subrc ne 0.
    exit.
    endif.
    endloop.
    message e000.   <--- Error message.
    Hope this helps.
    Edited by: jagannathan krishnan on Feb 4, 2008 7:12 AM

  • Regarding BDC session to run immediately after creation

    Hi Abapers,
    Please help me out from the following situation.
    I need to run the BDC session immediately after creating. I beleive using RSBDCSUB we can achieve it.
    If it so please let me know how can we use this.....
    Please let me know if any other solutions.
    Thanx in advance.
    will reward with points for the usefull answers.

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    If user want BDC in foreground use a CALL TRANSACTION and don't create a BDC butt fill a BDCDATA structure table and then
    codeCALL TRANSACTION 'transaction' USING itab[/code]
    You can specify the way to process in OPTIONS and MODE parameters.
    Look at
    Using CALL TRANSACTION USING for Data Transfer
    something like
    if foreground is initial.
    BDC_OPEN_GROUP
    endif.
    fill bdcdata
    if foreground is initial.
    BDC_INSERT
    BDC_CLOSE_GROUP
    SUBMIT RSBDCSUB WITH MAPPE = group_name
    else.
    CALL transaction USING data MODE mode.
    endif.
    CODE  --->
    code
    DATA : w_nom TYPE apq_grpn ,
    w_kbetr(16) ,
    w_datab(10) ,
    w_datbi(10) ,
    w_kpein(5) ,
    w_kmein(3) .
    CHECK is_data-flag EQ 'A' OR
    is_data-flag EQ 'B' OR
    is_data-flag EQ 'C'.
    REFRESH itg_bdcdata.
    Batch-input name.
    CONCATENATE 'Hauss_'
    sy-uzeit
    is_data-knumh+4(6)
    INTO w_nom.
    Open Batch-input.
    PERFORM p_open_bdc USING w_nom.
    Choix type cond.
    PERFORM p_bdc_dynpro USING 'SAPMV13A'
    '0100'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=ANTA'.
    PERFORM p_bdc_field USING 'RV13A-KSCHL'
    gw_kschl.
    Choix de la clef.
    PERFORM p_bdc_dynpro USING 'SAPLV14A'
    '0100'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=WEIT'.
    PERFORM p_bdc_field USING 'RV130-SELKZ(01)'
    'X'.
    Enregistre la nouvelle condition.
    PERFORM p_bdc_dynpro USING 'SAPMV13A'
    '1510'.
    PERFORM p_bdc_field USING 'BDC_OKCODE'
    '=SICH'.
    PERFORM p_bdc_field USING 'KOMG-VKORG'
    is_data-vkorg.
    PERFORM p_bdc_field USING 'KOMG-VTWEG'
    is_data-vtweg.
    PERFORM p_bdc_field USING 'KOMG-KUNNR'
    is_data-kunnr.
    PERFORM p_bdc_field USING 'KOMG-MATNR'
    is_data-matnr.
    PERFORM p_bdc_field USING 'KOMG-WERKS'
    is_data-werks.
    PERFORM p_bdc_field USING 'KOMG-AUART_SD'
    is_data-auart_sd.
    PERFORM p_bdc_field USING 'KOMG-INCO1(01)'
    is_data-inco1.
    WRITE is_data-kbetr2 TO w_kbetr.
    PERFORM p_bdc_field USING 'KONP-KBETR(01)'
    w_kbetr.
    WRITE is_data-kpein TO w_kpein.
    PERFORM p_bdc_field USING 'KONP-KPEIN(01)'
    w_kpein.
    WRITE is_data-kmein TO w_kmein.
    PERFORM p_bdc_field USING 'KONP-KMEIN(01)'
    w_kmein.
    WRITE is_data-datab TO w_datab.
    PERFORM p_bdc_field USING 'RV13A-DATAB(01)'
    w_datab.
    WRITE is_data-datbi TO w_datbi.
    PERFORM p_bdc_field USING 'RV13A-DATBI(01)'
    w_datbi.
    Save the transaction.
    PERFORM p_insert_bdc USING 'VK11'.
    Close the Batch-input..
    PERFORM p_close_bdc.
    COMMIT WORK AND WAIT.
    SUBMIT rsbdcsub WITH mappe = w_nom
    WITH von = sy-datum
    WITH bis = sy-datum
    EXPORTING LIST TO MEMORY
    AND RETURN.[/code]

  • Module pool - to save number range

    hi all,
    when i save the entry one number is generated through number range object, but if i press again save, next number is generated, this happens every time i save the entry. how to avoid this?
    Thanks

    hi,
    i have written the foll. code,  i have to add more than 1 entry in itab , after adding all the entry i save it , but when i add 1st entry and press enter it goes to screen 1001 ie initial screen,
    when 'SAVE'.
    move itab-reldt+4(2) to sub.
    MOVE ITAB-RELDT+0(4) TO YEAR.
    SELECT SINGLE * FROM NRIV INTO ZNRIV WHERE OBJECT = 'ZABC'
    AND SUBOBJECT = SUB AND TOYEAR = YEAR.
    call function 'NUMBER_RANGE_ENQUEUE'
             exporting
                   object              = 'ZABC'   "Create with SNUM
             exceptions
                   foreign_lock        = 1
                   object_not_found    = 2
                   system_failure      = 3
                   others              = 4.
    if sy-subrc ne 0.
      message e086 with 'Lock error' sy-subrc.
    endif.
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        nr_range_nr                   = ZNRIV-NRRANGENR
        object                        = 'ZABC'
       IGNORE_BUFFER                 = 'X'
       SUBOBJECT                     = SUB
       TOYEAR                        = YEAR
    IMPORTING
       NUMBER                        = NUM.
    LOOP AT ITAB.
    MOVE NUM TO ITAB-CODE.
    MODIFY ITAB.
    message W012(zdes) with ITAB-CODE.
    insert ZDESIGN FROM TABLE ITAB.
    CLEAR OK_CODE.
    clear itab.
    *clear zdesign.
    ENDLOOP.
    call function 'NUMBER_RANGE_DEQUEUE'
        exporting
          object                 = 'ZABC'.
    *WHEN 'MODI'.
    SET SCREEN 1001.

  • Delete repeat fields

    Hello.
    I have a internal table with some fields, and many fiels are repeat. I would delete the fields that are repeat, but not all the fields of this record.
    Example:
    Code    Name     Price    Date    Num
    10          X           20       12-10    9
    10          X           20       15-10    12
    15          R           14       14-10    8
    15          R           14       12-10    5
    and i would....
    10          X            20       12-10    9
                                          15-10   12
    15         R             15     14-10     8
                                         12-10    5
    Thanks!!!!

    Hi,
    Please try this.
    data: string_old(5),
          string_new(5).
    sort itab.
    loop at itab.
      at first.
        move: itab-code(2)  to string_old(2),
              itab-name(1)  to string_old+2(1),
              itab-price(2) to string_old+3(2).
        continue.
      endat.    
      move: itab-code(2)  to string_new(2),
            itab-name(1)  to string_new+2(1),
            itab-price(2) to string_new+3(2).
      if string_old = string_new.
        move: spaces to itab-code(2),
              spaces to itab-name(1),
              spaces to itab-price(2).
        modify itab.
      endif.
      string_old = string_new.
    endloop.
    Regards,
    Ferry Lianto

  • Where the documentation is provided for the Standard Function module ?

    If there is no documentation provided for the standard function module in SE37 what is the best way to understand the functionality of the function module?Is there any where we can find the documentation?
    Please dont say the From coding part its too vast to understand
    Ex: HRCM_ORGSTRC_INFO_TABLE_GET
    Paint for me ..
    Regards
    sas
    Edited by: Julius Bussche on Mar 18, 2009 1:17 PM

    O Really thanks amit !!
    Are you able to understand the below code and please provide your valuable inputs what we are understanding is the same.
    PERFORM read_infotypes.
    *-- ********************************************************** NMP
    *-- IF scb frozen then write to itab-scb field.  nmp 11/2001.
    *-- ********************************************************** NMP
    *--Begin of Change by vneld - 01/17/2007
    *  IF PA0001-ZZBERN NE SPACE.
    *    FROZEN = PA0001-ZZBERN.
    *  ENDIF.
    *  ITAB-SCB = FROZEN.
    *-- ********************************************************** NMP
    *--end of Change by  vneld- 01/17/2007
      PERFORM get_date USING '92'
                       CHANGING w_hiredate.
      PERFORM get_date USING '93'
                       CHANGING w_rehire.
      PERFORM get_date USING '94'
                       CHANGING w_termdate.
      IF NOT ( w_rehire IS INITIAL ).
        w_hiredate = w_rehire.
        itab-code = 'R'.
      ELSE.
        itab-code = 'H'.
      ENDIF.
      IF p0001-persg = '3'.
        itab-code = 'T'.
      ENDIF.
    *Change by Mdukes
    ** We need HIRE,Rehire & term  within 13 month`s window
    ** But if someone Hire in IT ,change dept and then terminated .
    ** We need to exclude that person from the list  .
    ** We need to change his Org.Unit by END_DATE 12/31/9999 from Pa0001.
      CLEAR:result_tab.REFRESH:result_tab.
      CALL FUNCTION 'HRCM_ORGSTRC_INFO_TABLE_GET'
        EXPORTING
          PLVAR          = '01'
          ROOT_OTYPE     = 'O'
          ROOT_OBJID     = P0001-ORGEH
          BEGDA          = SY-DATUM
          ENDDA          = P0001-ENDDA
          PATH_ID        = EVPATH
          PATH_DEPTH     = 10
        TABLES
          ORG_INFO_TABLE = result_tab
        EXCEPTIONS
          PATH_ERROR     = 1
          ROOT_ERROR     = 2
          OTHERS         = 3.
    *  CALL FUNCTION 'RH_STRUC_GET'
    *    EXPORTING = 'O'
    *      act_objid       = PA0001-ORGEH
    *      act_wegid       =  EVPATH
    *      act_plvar       =  TYPE
    *      act_tflag       = space
    *      act_vflag       = space
    *      authority_check = space
    *    TABLES
    *      result_tab      = result_tab
    *    EXCEPTIONS
    *      no_plvar_found  = 1
    *      no_entry_found  = 2
    *      OTHERS          = 3.
    * reading the Org.Unit based on employee Org.unit (Evaluation Path 'O-O'.
    * After that making sure the latest Pa0001 org.unit is part of selection org.unit
    * If yes, set the flag to = 1 . Otherwise ignore the rec .
    * We want only IT folks hire/rehire/term within 13 monthu2019s window
    * if somebody change the dept and get term within 13 monthu2019s .it
    * Should show up in hire but not in term report .
      CLEAR:REC.
      lOOP AT result_tab.
        read table PCHOBJID with key low = result_tab-OBJID.
        if sy-subrc = 0 .
          Rec = 1.
          EXIT.
        Endif.
      ENDLOOP.
      if rec  = 1.
    *--begin of change by vneld- 01/17/07
        CHECK ( ( w_hiredate >= w_13th_mnth_date AND w_hiredate <= sy-datum )
          OR
              ( w_termdate >= w_13th_mnth_date AND w_termdate <= sy-datum ) ).
    *--end of change by vneld- 01/17/07
    **---check for hires or terms in the calendar year.
    **---No future terms
    *  CHECK ( ( W_HIREDATE(4) = SY-DATUM(4) ) OR
    *  ( W_TERMDATE(4) = SY-DATUM(4) AND W_TERMDATE <= SY-DATUM ) ).
        CONCATENATE p0002-vorna p0002-nachn INTO itab-name SEPARATED BY ' '.
    *--Begin of change by vneld 03/29/2007
    *--get supervisor name
        data : lname(20),
               fname(20).
        clear: lname,
               fname.
        Select vorna nachn from pa0002 into (fname ,lname)
               where pernr =  p0001-zzsuper_no.
        endselect.
        CONCATENATE lname fname INTO itab-supv SEPARATED BY ' '.
    *  itab-supv = p0001-zzsuper_text.
    *--End of change by vneld 03/29/2007
    *----get employee group text
        CLEAR t501t.
        SELECT SINGLE * FROM t501t WHERE sprsl = 'EN' AND
                                         persg = p0001-persg.
        IF sy-subrc EQ 0.
          itab-group = t501t-ptext.
        ENDIF.
        PERFORM get_dept.
        PERFORM get_position.
        PERFORM append_fields.
      endif.
    ENDFORM.                    " PROCESS_EMPLOYEE
    Edited by: saslove sap on Mar 19, 2009 7:45 AM

  • Tablecontrol in modulepool

    Hi to all,
    I have a tablecontrol in modulepool program.I have to modify some cells in my table control and then those records should be updated in actual database table after pressing save button.And also the modified records should also be maintained in some Ztable after modification.
    If any body having code for the same scenario please provide it.
    Please help me.It is very urgent.
    Thanks
    suresh

    http://sapmaterial.com/files/database_update.pdf
    try this :
    *& Module Pool ZCUST_CALL_REC
    PROGRAM ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data: v_kun_low like ZCUST_CALL_REC-kunnr ,
    v_kun_high like ZCUST_CALL_REC-kunnr,
    v_bud_low like ZCUST_CALL_REC-budat,
    v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
    JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
    MANDT LIKE ZCUST_CALL_REC-MANDT,
    kunnr like ZCUST_CALL_REC-kunnr,
    budat like ZCUST_CALL_REC-budat,
    code like ZCUST_CALL_REC-code,
    remarks like ZCUST_CALL_REC-remarks,
    end of itab.
    *data:begin of Jtab occurs 0,
    MANDT LIKE ZCUST_CALL_REC-MANDT,
    kunnr like ZCUST_CALL_REC-kunnr,
    budat like ZCUST_CALL_REC-budat,
    code like ZCUST_CALL_REC-code,
    remarks like ZCUST_CALL_REC-remarks,
    end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *& Module USER_COMMAND_9000 INPUT
    text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9002'.
    perform update on commit.
    WHEN 'DELETE'.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9002'.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_9000 INPUT
    *& Module STATUS_9000 OUTPUT
    text
    MODULE STATUS_9000 OUTPUT.
    SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_9000 OUTPUT
    *& Module USER_COMMAND_9001 INPUT
    text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE. " USER_COMMAND_9001 INPUT
    *& Module STATUS_9001 OUTPUT
    text
    MODULE STATUS_9001 OUTPUT.
    SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT to zcust_call_rec-MANDT.
    move itab-kunnr to zcust_call_rec-kunnr.
    move itab-budat to zcust_call_rec-budat.
    move itab-code to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE. " STATUS_9001 OUTPUT
    *& Module USER_COMMAND_9002 INPUT
    text
    module USER_COMMAND_9002 input.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'UPDATE'.
    perform move_data.
    UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
    IF SY-SUBRC = 0.
    MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
    ELSE.
    MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
    ENDIF.
    WHEN 'DELETE'.
    perform move_data.
    DELETE ZCUST_CALL_REC FROM TABLE ITAB.
    IF SY-SUBRC = 0.
    MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
    ELSE.
    MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
    ENDIF.
    endcase.
    endmodule. " USER_COMMAND_9002 INPUT
    *& Module STATUS_9002 OUTPUT
    text
    module STATUS_9002 output.
    SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule. " STATUS_9002 OUTPUT
    *& Module update_table OUTPUT
    text
    module update_table output.
    move itab-MANDT to zcust_call_rec-MANDT.
    move itab-kunnr to zcust_call_rec-kunnr.
    move itab-budat to zcust_call_rec-budat.
    move itab-code to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule. " update_table OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT mandt kunnr budat code remarks FROM zcust_call_rec INTO
    table itab
    WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr IS INITIAL
    AND NOT v_kun_low IS INITIAL
    AND NOT v_kun_high IS INITIAL.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_kun_low
    IMPORTING
    OUTPUT = r_kunnr-low.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_kun_high
    IMPORTING
    OUTPUT = r_kunnr-high.
    r_kunnr-option = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
    AND NOT v_kun_low IS INITIAL
    AND v_kun_high IS INITIAL.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_kun_low
    IMPORTING
    OUTPUT = r_kunnr-low.
    r_kunnr-SIGN = 'I'.
    r_kunnr-OPTION = 'EQ'.
    APPEND r_kunnr.
    PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
    AND v_kun_low IS INITIAL
    AND NOT v_kun_high IS INITIAL.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_kun_low
    IMPORTING
    OUTPUT = r_kunnr-low.
    r_kunnr-SIGN = 'I'.
    r_kunnr-OPTION = 'EQ'.
    APPEND r_kunnr.
    PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
    AND v_kun_low IS INITIAL
    AND v_kun_high IS INITIAL.
    IF SY-SUBRC = 0.
    MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
    CALL SCREEN '9000'.
    ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF R_BUDAT IS INITIAL
    AND NOT v_BUD_low IS INITIAL
    AND NOT v_BUD_high IS INITIAL.
    r_budat-low = v_bud_low.
    r_budat-high = v_bud_high.
    r_budat-option = 'BT'.
    r_budat-sign = 'I'.
    append r_budat.
    ELSEIF R_BUDAT IS INITIAL
    AND NOT v_BUD_low IS INITIAL
    AND v_BUD_high IS INITIAL.
    r_budat-low = v_bud_low.
    r_budat-high = v_bud_high.
    r_budat-option = 'EQ'.
    r_budat-sign = 'I'.
    append r_budat.
    ELSEIF R_BUDAT IS INITIAL
    AND v_BUD_low IS INITIAL
    AND NOT v_BUD_high IS INITIAL.
    r_budat-HIGH = v_bud_HIGH.
    r_budat-option = 'EQ'.
    r_budat-sign = 'I'.
    append r_budat.
    ELSEIF R_BUDAT IS INITIAL
    AND v_BUD_low IS INITIAL
    AND v_BUD_high IS INITIAL.
    IF SY-SUBRC = 0.
    MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
    CALL SCREEN '9000'.
    r_budat-low = ''.
    r_budat-option = ''.
    r_budat-sign = ''.
    ENDIF.
    ENDIF.
    ENDFORM.
    *& Form update
    text
    --> p1 text
    <-- p2 text
    form update .
    commit work.
    endform. " update
    *& Form move_data
    text
    --> p1 text
    <-- p2 text
    form move_data .
    clear itab.
    refresh itab.
    move-corresponding zcust_call_rec to itab.
    MOVE ZCUST_CALL_REC-MANDT TO ITAB-MANDT.
    MOVE ZCUST_CALL_REC-KUNNR TO ITAB-KUNNR.
    MOVE ZCUST_CALL_REC-BUDAT TO ITAB-BUDAT.
    MOVE ZCUST_CALL_REC-CODE TO ITAB-CODE.
    MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
    APPEND ITAB.
    delete itab where kunnr is initial.
    endform. " move_data
    Regards
    vasu

  • Issue for retrive data form ITAB in SAP R/3

    Case:HOW CAN WE FETCH DATA FROM TRANSPARENT TABLE
    scenario:calculating net price for material on sales order
    (on the basis of material number,sales organization,distribution channel,division,sale to partY ,sales office)
    For this 5 prices are calculated :
    a)zmrp
    b)zlbj
    c)zmlb
    d)zdij
    e)mwst
    A bapi is developed through which all these data are fetched using joins on transparent and pooled tables.
    Bapi is properly working in Sap Environment.But when fetching data from non sap environment(.NET) only pooled tables are returning data.
    Transparent tables are returning blank data.
    And also if in query of transprent table if  in " where Clause " all parameters are hard codded then transparent table also return data in non sap envirnment.
    for eg...
    instead of writing ---
    select data from tranparent table where matnr= (matnr variable made in bapi entered by user) and vkorg=(sales org  variable made in bapi) ....same with all conditions
    if we write(returing data)----
    select data from tranparent table where matnr='5476665987' and vkorg='1400' ....same with all conditions
    BAPI Code is given below:
                                                                                    FUNCTION ZBAPI_BAR3.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(MATNR) TYPE  ZBAPI_IMPORT2-MATNR
    *"     VALUE(VKORG) TYPE  ZBAPI_IMPORT2-VKORG
    *"     VALUE(VTWEG) TYPE  ZBAPI_IMPORT2-VTWEG
    *"     VALUE(KUNNR) TYPE  ZBAPI_IMPORT2-KUNNR
    *"     VALUE(SPART) TYPE  ZBAPI_IMPORT2-SPART
    *"     VALUE(AUART) TYPE  ZBAPI_IMPORT2-AUART
    *"     VALUE(VKBUR) TYPE  ZBAPI_IMPORT2-VKBUR
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    *"  TABLES
    *"      ITAB STRUCTURE  ZBAPI_TABLE3
      DATA: LAND1  LIKE KNA1-LAND1  ,
            REGIO  LIKE KNA1-REGIO  ,
            WERKS  LIKE VBAP-WERKS  ,
           KNUMH  LIKE A004-KNUMH  ,
                   KNUMH LIKE ZBAPI_TABLE3-Knumh  ,
            KBETR   LIKE  COND_KONW-Kbetr ,
           LIKE ZBAPI_TABLE3-KBETR  ,
          KNUMH1(10) TYPE C ,
                KNUMH2(10) TYPE C ,
                KNUMH3(6) TYPE C ,
         KNUMH2 LIKE ZBAPI_TABLE3-KNUMH  ,
         KNUMH3 LIKE ZBAPI_TABLE3-KNUMH  ,
         KNUMV LIKE  ZBAPI_TABLE3-KNUMV  ,
            KDGRP  LIKE KNVV-KDGRP  ,
            TAXKD  LIKE KNVI-TAXKD  ,
            TAXM1  LIKE MLAN-TAXM1  ,
            ADRNR  LIKE TVBUR-ADRNR ,
            REGION LIKE ADRC-REGION ,
            DATE  TYPE A503-DATAB .
      SELECT SINGLE KDGRP FROM KNVV INTO KDGRP WHERE KUNNR  = KUNNR AND VKORG = VKORG AND VTWEG = VTWEG AND SPART = SPART   .
      SELECT SINGLE LAND1 REGIO  FROM KNA1 INTO (LAND1,REGIO)  WHERE KUNNR  = KUNNR .
      SELECT SINGLE WERKS FROM VBAP INNER JOIN VBAK ON VBAPVBELN = VBAKVBELN  INTO WERKS  WHERE AUART = AUART  .
      SELECT SINGLE TAXKD FROM KNVI INTO TAXKD WHERE KUNNR = KUNNR AND ALAND = LAND1 AND TATYP = 'MWST' .
      SELECT SINGLE TAXM1 FROM MLAN INTO TAXM1 WHERE MATNR = MATNR AND ALAND = LAND1  .
      SELECT SINGLE ADRNR FROM TVBUR INTO ADRNR WHERE VKBUR = VKBUR  .
      SELECT SINGLE REGION FROM ADRC INTO REGION WHERE ADDRNUMBER = ADRNR   .
      DATE = SY-DATUM .
      SELECT SINGLE KNUMH FROM A931 INTO KNUMH1 WHERE KAPPL = 'V' AND KSCHL = 'ZMRP' AND VKORG = VKORG AND VTWEG = VTWEG AND WERKS = '1410' AND KUNNR = KUNNR AND MATNR = MATNR AND KFRST = SPACE AND DATAB LE DATE AND DATBI GE DATE  .
    SELECT SINGLE KNUMH FROM A931 INTO KNUMH1 WHERE KAPPL = 'V' AND KSCHL = 'ZMRP' AND VKORG = '1400' AND VTWEG = '10' AND WERKS = '1410' AND KUNNR = '0000100163' AND MATNR = 'A10AN027PNSL' AND KFRST = SPACE AND DATAB LE DATE AND DATBI GE DATE  .
      SELECT SINGLE zkarigar FROM zkari INTO KNUMH1 WHERE erdat = '20070410' .
    SELECT SINGLE KNUMH FROM A004 INTO KNUMH1 WHERE KAPPL = 'V' AND KSCHL = 'ZMRP' AND VKORG = VKORG AND VTWEG = VTWEG AND MATNR = MATNR  AND DATAB LE DATE AND DATBI GE DATE  .
    *'0000280050'
    CLEAR KNUMH .
    CLEAR KBETR .
    SELECT SINGLE KNUMH FROM A503 INTO KNUMH1 WHERE KAPPL = 'V' AND KSCHL = 'MWST' AND ALAND = LAND1 AND WKREG = REGION AND REGIO = REGIO
    AND TAXK1 = TAXKD  AND TAXM1 = TAXM1 AND KFRST = SPACE  AND DATAB LE DATE AND DATBI GE DATE and knumh = '0000279708'.
    concatenate '0000' KNUMH into knumh1 .
    **KNUMH1 = KNUMH .
    **select single kbetr from konp into kbetr where knumh = knumh1 .
    **knumh3 = knumh1+4(6) .
    ***itab-kbetr = kbetr .
    **concatenate '0000' knumh3 into knumh2 .
    **write:/ knumh2 .
    ITAB-KNUMH1 =  KNUMH2 .
    ITAB-KNUMH1 = KNUMH1 .
      APPEND ITAB .
    *loop at itab .
    *write:/ itab-knumh1 .
    *endloop .
    CLEAR KNUMH .
    CLEAR KBETR .
      SELECT SINGLE KNUMH FROM A940 INTO KNUMH WHERE KAPPL = 'V' AND KSCHL = 'ZDIJ' AND VKORG = VKORG AND VTWEG = VTWEG AND KDGRP = KDGRP AND MATNR = MATNR AND KFRST = SPACE AND DATAB LE DATE AND DATBI GE DATE .
      SELECT SINGLE KNUMH FROM A931 INTO KNUMH WHERE KAPPL = 'V' AND KSCHL = 'ZDIJ' AND VKORG = VKORG AND VTWEG = VTWEG AND WERKS = WERKS AND KUNNR = KUNNR AND MATNR = MATNR AND KFRST = SPACE AND DATAB LE DATE AND DATBI GE DATE  .
    ITAB-KNUMH =  KNUMH.
    APPEND ITAB .
    CLEAR KNUMH .
    CLEAR KBETR .
    ITAB-KNUMH =  KNUMH .
    APPEND ITAB .
    COMMIT WORK AND WAIT.
    ENDFUNCTION.
    Thanks & Regrds
    Amrish

    I believe you posted in the wrong forum.
    This forum is dedicated to development and deployment of .Net applications that connect and interact with BusinessObjects Enterprise, BusinessObjects Edge, or Crystal Reports Server. This includes the development of applications using the BusinessObjects Enterprise, Report Application Server, Report Engine, and Web Services SDKs.
    Ludek

  • Not able to find the Error in code !

    please help me to find the error in my code. When I Added x1~kondm its not giving anything i.e
    *join t178t as x1
    *on   p1kondm = x1kondm
    in the SQL part !
    REPORT YINTERACTIVEPROGRAM01.
    TABLES:VBAP,
           VBPA,
           VBRP,
           VBRK,
           KNA1,
           ADRC,
           TPAR,
           TVKGG,
           TVM1T,
           TVM2T,
           TVM3T,
           TVM4T,
           VBKD,
           SZA1_D0100,
           T178T.
    TYPES:BEGIN OF TY_TAB,
             VBELN LIKE VBAK-VBELN,
             VKORG LIKE VBAK-VKORG,
             ERDAT LIKE VBAK-ERDAT,
             AUGRU LIKE VBAK-AUGRU,
             BSTDK LIKE VBKD-BSTDK,
             BSTDK_E LIKE VBKD-BSTDK_E,
             spart like vbap-spart,
             kondm like vbap-kondm,
             waerk like vbap-waerk,
             netwr like vbap-netwr,
             kwmeng like vbap-kwmeng,
             vkaus like vbap-vkaus,
             land1 like vbpa-land1,
             nrart like tpar-nrart,
           vtext like tpar-vtext,
             parvw like tpar-parvw,
             name1 like adrc-name1,
             name2 like adrc-name2,
             name3 like adrc-name3,
             name4 like adrc-name4,
             ort01 like kna1-ort01,
             pstlz like kna1-pstlz,
             vtext like t178t-vtext,
          END  OF TY_TAB.
    DATA: ITAB TYPE STANDARD TABLE OF TY_TAB WITH HEADER LINE.
    parameters:salesno like itab-vbeln.
    select s1~vbeln
           s1~vkorg
           s1~erdat
           s1~augru
           k1~BSTDK
           k1~BSTDK_E
           p1~spart
           p1~kondm
           p1~waerk
           p1~netwr
           p1~kwmeng
           p1~vkaus
           r1~land1
           t1~nrart
          t1~vtext
           t1~parvw
           n1~name1
           n1~name2
           n1~name3
           n1~name4
           c1~ort01
           c1~pstlz
           x1~vtext
    into corresponding fields of table itab
    from  vbak as s1
    join  VBKD as k1
    on   s1vbeln = k1VBELN
    join vbap as p1
    on   k1vbeln = p1vbeln
    *join t178t as x1
    *on   p1kondm = x1kondm
    join vbpa as r1
    on   p1vbeln = r1vbeln
    join tpar as t1
    on   r1parvw = t1parvw
    join ADRC as n1
    on   r1adrnr = n1addrnumber
    join kna1 as c1
    on   r1land1 = c1land1
    where k1vbeln = salesno and  s1vbeln = salesno and p1~vbeln = salesno
    and  r1~vbeln = salesno.
    loop AT ITAB.
      WRITE : /(30)'VBELN: ',  ITAB-VBELN,
              /(30)'VKORG: ',  ITAB-VKORG,
              /(30)'ERDAT: ',  ITAB-ERDAT,
              /(30)'AUGRU: ',  ITAB-AUGRU,
              /(30)'BSTDK: ',  ITAB-BSTDK,
              /(30)'BSTDK_E:', ITAB-BSTDK_E,
              /(30)'SPART: ',  itab-spart,
              /(30)'KONDM: ',  itab-kondm,
              /(30)'WAERK: ',  itab-waerk,
              /(18)'NETWR: ' , itab-netwr,
              /(18)'KWMENG: ', itab-kwmeng,
              /(10)'VKAUS:',   itab-vkaus,
              /(30)'LAND1:',   itab-land1,
              /(30)'NRART:',   itab-nrart,
              /(30)'PARVW:',   itab-parvw,
              /(30)'ADDR1:',   itab-name1,
              /(30)'ADDR2:',   itab-name2,
              /(30)'ADDR3:',   itab-name3,
              /(30)'ADDR4:',   itab-name4,
              /(30)'PSTLZ:',   itab-pstlz,
              /(30)'ORT01:',   itab-ort01,
              /(30)'Compiler desc:',   itab-vtext.
               uline.
    ENDLOOP.
                if sy-subrc <> 0.
                write : / 'No data found'.
                endif.

    hi,
      u failed to check relationship between tables and as well as mandatory fields need to be checked, i noticed following
    from vbak as s1
    join VBKD as k1
    on s1vbeln = k1VBELN
    join vbap as p1
    on k1vbeln = p1vbeln and k1posnr = p1posnr
    *join t178t as x1
    *on p1kondm = x1kondm
    join vbpa as r1
    on p1vbeln = r1vbeln   <b>and p1posnt = r1posnr </b> join tpar as t1
    on r1parvw = t1parvw
    join ADRC as n1
    on r1adrnr = n1addrnumber     <b> * No relation between these two tables/b]     
    join kna1 as c1
    on r1land1 = c1land1 <b>and r1kunnr = c1kunnr</b> <i>'here u need to check mandatory fields also</i>
    where k1vbeln = salesno and s1vbeln = salesno and p1~vbeln = salesno
    and r1~vbeln = salesno.
    anyway, in performance point of view, writeing code with this much joins is not acceptable.
    comeback if you need any further help
    regards,
    pavan
    Message was edited by:
            pavan kumar pisipati

  • Command return code of 255 (65280) during Grid Infrastructure Installation

    I am trying to create a 2-node RAC 11gR2. I am using OEL 5 Update 4. I am using NFS as shared storage. The time on both node is same. Both nodes have 4GB RAM each. Following is my IP settings from /etc/hosts on both nodes:
    [oracle@vis ~]$ cat /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    # Public
    10.8.5.191 vis.awc.com vis
    10.8.5.192 vsstest.awc.com vsstest
    #Private
    192.168.0.101 vis-priv.awc.com vis-priv
    192.168.0.102 vsstest-priv.awc.com vsstest-priv
    #Virtual
    10.8.5.166 vis-vip.awc.com vis-vip
    10.8.5.170 vsstest-vip.awc.com vsstest-vip
    # SCAN
    10.8.5.182 rac-scan.awc.com rac-scan
    #NAS
    192.168.0.101 nas1.awc.com nas1
    I am getting error during the Grid Infrastructure installation, when I run the root.sh script through root. Following is the logfile showing the error (/u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log):
    2010-02-02 11:58:05: The configuration parameter file /u01/app/11.2.0/grid/crs/install/crsconfig_params is valid
    2010-02-02 11:58:05: Checking for super user privileges
    2010-02-02 11:58:05: User has super user privileges
    2010-02-02 11:58:05: ### Printing the configuration values from files:
    2010-02-02 11:58:05: /u01/app/11.2.0/grid/crs/install/crsconfig_params
    2010-02-02 11:58:05: /u01/app/11.2.0/grid/crs/install/s_crsconfig_defs
    2010-02-02 11:58:05: ASM_DISCOVERY_STRING=
    2010-02-02 11:58:05: ASM_DISKS=
    2010-02-02 11:58:05: ASM_DISK_GROUP=
    2010-02-02 11:58:05: ASM_REDUNDANCY=
    2010-02-02 11:58:05: ASM_SPFILE=
    2010-02-02 11:58:05: ASM_UPGRADE=false
    2010-02-02 11:58:05: CLSCFG_MISSCOUNT=
    2010-02-02 11:58:05: CLUSTER_GUID=
    2010-02-02 11:58:05: CLUSTER_NAME=rac-scan
    2010-02-02 11:58:05: CRS_NODEVIPS='vis-vip/255.248.0.0/eth0,vsstest-vip/255.248.0.0/eth0'
    2010-02-02 11:58:05: CRS_STORAGE_OPTION=2
    2010-02-02 11:58:05: CSS_LEASEDURATION=400
    2010-02-02 11:58:05: DIRPREFIX=
    2010-02-02 11:58:05: DISABLE_OPROCD=0
    2010-02-02 11:58:05: EMBASEJAR_NAME=oemlt.jar
    2010-02-02 11:58:05: EWTJAR_NAME=ewt3.jar
    2010-02-02 11:58:05: EXTERNAL_ORACLE_BIN=/opt/oracle/bin
    2010-02-02 11:58:05: GNS_ADDR_LIST=
    2010-02-02 11:58:05: GNS_ALLOW_NET_LIST=
    2010-02-02 11:58:05: GNS_CONF=false
    2010-02-02 11:58:05: GNS_DENY_ITF_LIST=
    2010-02-02 11:58:05: GNS_DENY_NET_LIST=
    2010-02-02 11:58:05: GNS_DOMAIN_LIST=
    2010-02-02 11:58:05: GPNPCONFIGDIR=/u01/app/11.2.0/grid
    2010-02-02 11:58:05: GPNPGCONFIGDIR=/u01/app/11.2.0/grid
    2010-02-02 11:58:05: GPNP_PA=
    2010-02-02 11:58:05: HELPJAR_NAME=help4.jar
    2010-02-02 11:58:05: HOST_NAME_LIST=vis,vsstest
    2010-02-02 11:58:05: ID=/etc/init.d
    2010-02-02 11:58:05: INIT=/sbin/init
    2010-02-02 11:58:05: IT=/etc/inittab
    2010-02-02 11:58:05: JEWTJAR_NAME=jewt4.jar
    2010-02-02 11:58:05: JLIBDIR=/u01/app/11.2.0/grid/jlib
    2010-02-02 11:58:05: JREDIR=/u01/app/11.2.0/grid/jdk/jre/
    2010-02-02 11:58:06: LANGUAGE_ID=AMERICAN_AMERICA.AL32UTF8
    2010-02-02 11:58:06: MSGFILE=/var/adm/messages
    2010-02-02 11:58:06: NETCFGJAR_NAME=netcfg.jar
    2010-02-02 11:58:06: NETWORKS="eth0"/10.8.0.0:public,"eth1"/192.168.0.0:cluster_interconnect
    2010-02-02 11:58:06: NEW_HOST_NAME_LIST=
    2010-02-02 11:58:06: NEW_NODEVIPS='vis-vip/255.248.0.0/eth0,vsstest-vip/255.248.0.0/eth0'
    2010-02-02 11:58:06: NEW_NODE_NAME_LIST=
    2010-02-02 11:58:06: NEW_PRIVATE_NAME_LIST=
    2010-02-02 11:58:06: NODELIST=vis,vsstest
    2010-02-02 11:58:06: NODE_NAME_LIST=vis,vsstest
    2010-02-02 11:58:06: OCFS_CONFIG=
    2010-02-02 11:58:06: OCRCONFIG=/etc/oracle/ocr.loc
    2010-02-02 11:58:06: OCRCONFIGDIR=/etc/oracle
    2010-02-02 11:58:06: OCRID=
    2010-02-02 11:58:06: OCRLOC=ocr.loc
    2010-02-02 11:58:06: OCR_LOCATIONS=/u01/shared_config/ocr_configuration
    2010-02-02 11:58:06: OLASTGASPDIR=/etc/oracle/lastgasp
    2010-02-02 11:58:06: OLRCONFIG=/etc/oracle/olr.loc
    2010-02-02 11:58:06: OLRCONFIGDIR=/etc/oracle
    2010-02-02 11:58:06: OLRLOC=olr.loc
    2010-02-02 11:58:06: OPROCDCHECKDIR=/etc/oracle/oprocd/check
    2010-02-02 11:58:06: OPROCDDIR=/etc/oracle/oprocd
    2010-02-02 11:58:06: OPROCDFATALDIR=/etc/oracle/oprocd/fatal
    2010-02-02 11:58:06: OPROCDSTOPDIR=/etc/oracle/oprocd/stop
    2010-02-02 11:58:06: ORACLE_BASE=/u01/app/oracle
    2010-02-02 11:58:06: ORACLE_HOME=/u01/app/11.2.0/grid
    2010-02-02 11:58:06: ORACLE_OWNER=oracle
    2010-02-02 11:58:06: ORA_ASM_GROUP=dba
    2010-02-02 11:58:06: ORA_DBA_GROUP=oinstall
    2010-02-02 11:58:06: PRIVATE_NAME_LIST=
    2010-02-02 11:58:06: RCALLDIR=/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc3.d /etc/rc.d/rc4.d /etc/rc.d/rc5.d /etc/rc.d/rc6.d
    2010-02-02 11:58:06: RCKDIR=/etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d /etc/rc.d/rc4.d /etc/rc.d/rc6.d
    2010-02-02 11:58:06: RCSDIR=/etc/rc.d/rc3.d /etc/rc.d/rc5.d
    2010-02-02 11:58:06: RC_KILL=K19
    2010-02-02 11:58:06: RC_KILL_OLD=K96
    2010-02-02 11:58:06: RC_START=S96
    2010-02-02 11:58:06: SCAN_NAME=rac-scan.awc.com
    2010-02-02 11:58:06: SCAN_PORT=1521
    2010-02-02 11:58:06: SCRBASE=/etc/oracle/scls_scr
    2010-02-02 11:58:06: SHAREJAR_NAME=share.jar
    2010-02-02 11:58:06: SILENT=false
    2010-02-02 11:58:06: SO_EXT=so
    2010-02-02 11:58:06: SRVCFGLOC=srvConfig.loc
    2010-02-02 11:58:06: SRVCONFIG=/var/opt/oracle/srvConfig.loc
    2010-02-02 11:58:06: SRVCONFIGDIR=/var/opt/oracle
    2010-02-02 11:58:06: VNDR_CLUSTER=false
    2010-02-02 11:58:06: VOTING_DISKS=/u01/shared_config/voting_disk
    2010-02-02 11:58:06: ### Printing other configuration values ###
    2010-02-02 11:58:06: CLSCFG_EXTRA_PARMS=
    2010-02-02 11:58:06: CRSDelete=0
    2010-02-02 11:58:06: CRSPatch=0
    2010-02-02 11:58:06: DEBUG=
    2010-02-02 11:58:06: DOWNGRADE=
    2010-02-02 11:58:06: HAS_GROUP=oinstall
    2010-02-02 11:58:06: HAS_USER=root
    2010-02-02 11:58:06: HOST=vis
    2010-02-02 11:58:07: IS_SIHA=0
    2010-02-02 11:58:07: OLR_DIRECTORY=/u01/app/11.2.0/grid/cdata
    2010-02-02 11:58:07: OLR_LOCATION=/u01/app/11.2.0/grid/cdata/vis.olr
    2010-02-02 11:58:07: ORA_CRS_HOME=/u01/app/11.2.0/grid
    2010-02-02 11:58:07: SUPERUSER=root
    2010-02-02 11:58:07: UPGRADE=
    2010-02-02 11:58:07: VF_DISCOVERY_STRING=/u01/shared_config/voting_disk
    2010-02-02 11:58:07: addfile=/u01/app/11.2.0/grid/crs/install/crsconfig_addparams
    2010-02-02 11:58:07: crscfg_trace=1
    2010-02-02 11:58:07: crscfg_trace_file=/u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log
    2010-02-02 11:58:07: hosts=
    2010-02-02 11:58:07: oldcrshome=
    2010-02-02 11:58:07: oldcrsver=
    2010-02-02 11:58:07: osdfile=/u01/app/11.2.0/grid/crs/install/s_crsconfig_defs
    2010-02-02 11:58:07: parameters_valid=1
    2010-02-02 11:58:07: paramfile=/u01/app/11.2.0/grid/crs/install/crsconfig_params
    2010-02-02 11:58:07: platform_family=unix
    2010-02-02 11:58:07: srvctl_trc_suff=0
    2010-02-02 11:58:07: unlock_crshome=
    2010-02-02 11:58:07: user_is_superuser=1
    2010-02-02 11:58:07: ### Printing of configuration values complete ###
    2010-02-02 11:58:07: Oracle CRS stack is not configured yet
    2010-02-02 11:58:07: CRS is not yet configured. Hence, will proceed to configure CRS
    2010-02-02 11:58:07: Cluster-wide one-time actions... Done!
    2010-02-02 11:58:17: set owner/group of OCR path
    2010-02-02 11:58:17: Oracle CRS home = /u01/app/11.2.0/grid
    2010-02-02 11:58:17: Host name = vis
    2010-02-02 11:58:17: CRS user = oracle
    2010-02-02 11:58:17: Oracle CRS home = /u01/app/11.2.0/grid
    2010-02-02 11:58:17: GPnP host = vis
    2010-02-02 11:58:17: Oracle GPnP home = /u01/app/11.2.0/grid/gpnp
    2010-02-02 11:58:17: Oracle GPnP local home = /u01/app/11.2.0/grid/gpnp/vis
    2010-02-02 11:58:17: GPnP directories verified.
    2010-02-02 11:58:17: Checking to see if Oracle CRS stack is already configured
    2010-02-02 11:58:17: Oracle CRS stack is not configured yet
    2010-02-02 11:58:17: ---Checking local gpnp setup...
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" does not exist
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cwallet.sso" does not exist
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr/cwallet.sso" does not exist
    2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp/vis: profile_ok 0 wallet_ok 0 r/o_wallet_ok 0
    2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp/vis: INVALID (bad profile/wallet)
    2010-02-02 11:58:18: ---Checking cluster-wide gpnp setup...
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/profiles/peer/profile.xml" does not exist
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/wallets/peer/cwallet.sso" does not exist
    2010-02-02 11:58:18: The setup file "/u01/app/11.2.0/grid/gpnp/wallets/prdr/cwallet.sso" does not exist
    2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp: profile_ok 0 wallet_ok 0 r/o_wallet_ok 0
    2010-02-02 11:58:18: chk gpnphome /u01/app/11.2.0/grid/gpnp: INVALID (bad profile/wallet)
    2010-02-02 11:58:18: gpnp setup checked: local valid? 0 cluster-wide valid? 0
    2010-02-02 11:58:18: gpnp setup: NONE
    2010-02-02 11:58:18: GPNP configuration required
    2010-02-02 11:58:18: Validating for SI-CSS configuration
    2010-02-02 11:58:18: Retrieving OCR main disk location
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc
    2010-02-02 11:58:18: Unable to retrieve ocr disk info
    2010-02-02 11:58:18: Checking to see if any 9i GSD is up
    2010-02-02 11:58:18: libskgxnBase_lib = /etc/ORCLcluster/oracm/lib/libskgxn2.so
    2010-02-02 11:58:18: libskgxn_lib = /opt/ORCLcluster/lib/libskgxn2.so
    2010-02-02 11:58:18: SKGXN library file does not exists
    2010-02-02 11:58:18: OLR location = /u01/app/11.2.0/grid/cdata/vis.olr
    2010-02-02 11:58:18: Oracle CRS Home = /u01/app/11.2.0/grid
    2010-02-02 11:58:18: Validating /etc/oracle/olr.loc file for OLR location /u01/app/11.2.0/grid/cdata/vis.olr
    2010-02-02 11:58:18: /etc/oracle/olr.loc already exists. Backing up /etc/oracle/olr.loc to /etc/oracle/olr.loc.orig
    2010-02-02 11:58:18: Oracle CRS home = /u01/app/11.2.0/grid
    2010-02-02 11:58:18: Oracle cluster name = rac-scan
    2010-02-02 11:58:18: OCR locations = /u01/shared_config/ocr_configuration
    2010-02-02 11:58:18: Validating OCR
    2010-02-02 11:58:18: Retrieving OCR location used by previous installations
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrmirrorconfig_loc
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc3
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc4
    2010-02-02 11:58:18: Opening file OCRCONFIG
    2010-02-02 11:58:18: Value () is set for key=ocrconfig_loc5
    2010-02-02 11:58:18: Checking if OCR sync file exists
    2010-02-02 11:58:18: No need to sync OCR file
    2010-02-02 11:58:18: OCR_LOCATION=/u01/shared_config/ocr_configuration
    2010-02-02 11:58:18: OCR_MIRROR_LOCATION=
    2010-02-02 11:58:18: OCR_MIRROR_LOC3=
    2010-02-02 11:58:18: OCR_MIRROR_LOC4=
    2010-02-02 11:58:19: OCR_MIRROR_LOC5=
    2010-02-02 11:58:19: Current OCR location=
    2010-02-02 11:58:19: Current OCR mirror location=
    2010-02-02 11:58:19: Current OCR mirror loc3=
    2010-02-02 11:58:19: Current OCR mirror loc4=
    2010-02-02 11:58:19: Current OCR mirror loc5=
    2010-02-02 11:58:19: Verifying current OCR settings with user entered values
    2010-02-02 11:58:19: Setting OCR locations in /etc/oracle/ocr.loc
    2010-02-02 11:58:19: Validating OCR locations in /etc/oracle/ocr.loc
    2010-02-02 11:58:19: Checking for existence of /etc/oracle/ocr.loc
    2010-02-02 11:58:19: Backing up /etc/oracle/ocr.loc to /etc/oracle/ocr.loc.orig
    2010-02-02 11:58:19: Setting ocr location /u01/shared_config/ocr_configuration
    2010-02-02 11:58:19: Creating or upgrading Oracle Local Registry (OLR)
    2010-02-02 11:58:20: OLR successfully created or upgraded
    2010-02-02 11:58:20: /u01/app/11.2.0/grid/bin/clscfg -localadd
    2010-02-02 11:58:21: Keys created in the OLR successfully
    2010-02-02 11:58:21: GPnP setup state: none
    2010-02-02 11:58:21: Creating local GPnP setup for clustered node...
    2010-02-02 11:58:21: Oracle CRS home = /u01/app/11.2.0/grid
    2010-02-02 11:58:21: Oracle GPnP wallets home = /u01/app/11.2.0/grid/gpnp/vis/wallets
    2010-02-02 11:58:21: Checking if GPnP setup exists
    2010-02-02 11:58:21: /u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cwallet.sso wallet must be created
    2010-02-02 11:58:21: Removing old wallets/certificates, if any
    2010-02-02 11:58:21: Creating GPnP Root Wallet...
    2010-02-02 11:58:21: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -nologo
    2010-02-02 11:58:22: Creating GPnP Root Certificate...
    2010-02-02 11:58:22: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -self_signed -dn "CN=GPnP_root" -keysize 1024 -validity 9999 -nologo
    2010-02-02 11:58:24: Exporting GPnP Root Certificate...
    2010-02-02 11:58:24: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -dn "CN=GPnP_root" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
    2010-02-02 11:58:25: Creating GPnP Peer Wallet...
    2010-02-02 11:58:25: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -auto_login -nologo
    2010-02-02 11:58:25: Creating GPnP Profile Reader Wallet...
    2010-02-02 11:58:25: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -auto_login -nologo
    2010-02-02 11:58:26: Creating GPnP PA Wallet...
    2010-02-02 11:58:26: /u01/app/11.2.0/grid/bin/orapki wallet create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -auto_login -nologo
    2010-02-02 11:58:27: Adding private key to GPnP Peer Wallet...
    2010-02-02 11:58:27: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -dn "CN=GPnP_peer" -keysize 1024 -nologo
    2010-02-02 11:58:28: Adding private key to GPnP PA Wallet...
    2010-02-02 11:58:28: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -dn "CN=GPnP_pa" -keysize 1024 -nologo
    2010-02-02 11:58:29: Creating certificate request for GPnP Peer Wallet...
    2010-02-02 11:58:29: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -dn "CN=GPnP_peer" -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/certreq.txt" -nologo
    2010-02-02 11:58:30: Creating certificate request for GPnP PA Wallet...
    2010-02-02 11:58:30: /u01/app/11.2.0/grid/bin/orapki wallet export -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -dn "CN=GPnP_pa" -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/certreq.txt" -nologo
    2010-02-02 11:58:31: Creating certificate for GPnP Peer Wallet...
    2010-02-02 11:58:31: /u01/app/11.2.0/grid/bin/orapki cert create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/certreq.txt" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -validity 9999 -nologo
    2010-02-02 11:58:32: Creating certificate for GPnP PA Wallet...
    2010-02-02 11:58:32: /u01/app/11.2.0/grid/bin/orapki cert create -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/root" -pwd gpnp_wallet1 -request "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/certreq.txt" -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -validity 9999 -nologo
    2010-02-02 11:58:33: Adding Root Certificate TP to GPnP Peer Wallet...
    2010-02-02 11:58:33: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
    2010-02-02 11:58:34: Adding Root Certificate TP to GPnP Profile Reader Wallet...
    2010-02-02 11:58:34: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
    2010-02-02 11:58:34: Adding Root Certificate TP to GPnP PA Wallet...
    2010-02-02 11:58:34: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/root/b64certificate.txt" -nologo
    2010-02-02 11:58:35: Adding PA Certificate as a TP into a GPnP Peer Wallet...
    2010-02-02 11:58:35: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
    2010-02-02 11:58:36: Adding peer Certificate as a TP into a GPnP PA Wallet...
    2010-02-02 11:58:36: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
    2010-02-02 11:58:37: Adding PA Certificate as a TP into a GPnP Profile Reader Wallet...
    2010-02-02 11:58:37: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
    2010-02-02 11:58:38: Adding peer Certificate as a TP into a GPnP Profile Reader Wallet...
    2010-02-02 11:58:38: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/prdr" -pwd gpnp_wallet1 -trusted_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
    2010-02-02 11:58:39: Adding PA Certificate as a TP into a GPnP Peer Wallet...
    2010-02-02 11:58:39: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -pwd gpnp_wallet1 -user_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/peer/cert.txt" -nologo
    2010-02-02 11:58:40: Adding peer Certificate as a TP into a GPnP PA Wallet...
    2010-02-02 11:58:40: /u01/app/11.2.0/grid/bin/orapki wallet add -wallet "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa" -pwd gpnp_wallet1 -user_cert -cert "/u01/app/11.2.0/grid/gpnp/vis/wallets/pa/cert.txt" -nologo
    2010-02-02 11:58:41: GPnP Wallets ownership/permissions successfully set.
    2010-02-02 11:58:41: GPnP Wallets successfully created.
    2010-02-02 11:58:41: <--- GPnP wallets successfully created
    2010-02-02 11:58:41: Creating GPnP peer profile --->
    2010-02-02 11:58:41: Oracle CRS home = /u01/app/11.2.0/grid
    2010-02-02 11:58:41: Oracle GPnP profiles home = /u01/app/11.2.0/grid/gpnp/vis/profiles
    2010-02-02 11:58:41: Oracle GPnP profiles parameters:
    2010-02-02 11:58:41: paloc==
    2010-02-02 11:58:41: cname=rac-scan=
    2010-02-02 11:58:41: cssdisco=/u01/shared_config/voting_disk=
    2010-02-02 11:58:41: cssld=400=
    2010-02-02 11:58:41: asmdisco==
    2010-02-02 11:58:41: asmspf==
    2010-02-02 11:58:41: netlst="eth0"/10.8.0.0:public,"eth1"/192.168.0.0:cluster_interconnect=
    2010-02-02 11:58:41: ocrid==
    2010-02-02 11:58:41: clusterguid==
    2010-02-02 11:58:41: Checking if GPnP setup exists
    2010-02-02 11:58:41: /u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml profile must be created
    2010-02-02 11:58:41: OCRID is not available, hence not set in GPnP Profile
    2010-02-02 11:58:42: ClusterGUID is not available, hence not set in GPnP Profile
    2010-02-02 11:58:42: gpnptool: run /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf=""
    2010-02-02 11:58:42: Running as user oracle: /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf=""
    2010-02-02 11:58:42: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/11.2.0/grid/bin/gpnptool create -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -prf -prf_sq=1 -prf_cn=rac-scan -prf_pa="" -hnet=gen -gen:hnet_nm="*" -gen:net=net1 -net1:net_ip="10.8.0.0" -net1:net_ada="eth0" -net1:net_use="public" -gen:net=net2 -net2:net_ip="192.168.0.0" -net2:net_ada="eth1" -net2:net_use="cluster_interconnect" -css=css -css:css_dis="/u01/shared_config/voting_disk" -css:css_ld=400 -asm=asm -asm:asm_dis="++no-value-at-profile-creation--never-updated-through-ASM++" -asm:asm_spf="" '
    2010-02-02 11:58:42: Removing file /tmp/fileXUKYkK
    2010-02-02 11:58:42: Successfully removed file: /tmp/fileXUKYkK
    2010-02-02 11:58:42: /bin/su successfully executed
    2010-02-02 11:58:42: gpnptool: rc=0
    2010-02-02 11:58:42: gpnptool output:
    Resulting profile written to "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml".
    Success.
    2010-02-02 11:58:42: gpnptool: run /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws
    2010-02-02 11:58:42: Running as user oracle: /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws
    2010-02-02 11:58:42: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/11.2.0/grid/bin/gpnptool sign -p="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -o="/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml" -ovr -w="file:/u01/app/11.2.0/grid/gpnp/vis/wallets/peer" -rmws '
    2010-02-02 11:58:43: Removing file /tmp/file4E7Vnj
    2010-02-02 11:58:43: Successfully removed file: /tmp/file4E7Vnj
    2010-02-02 11:58:43: /bin/su successfully executed
    2010-02-02 11:58:43: gpnptool: rc=0
    2010-02-02 11:58:43: gpnptool output:
    Resulting profile written to "/u01/app/11.2.0/grid/gpnp/vis/profiles/peer/profile.xml".
    Success.
    2010-02-02 11:58:43: GPnP peer profile create successfully completed.
    2010-02-02 11:58:43: <--- GPnP peer profile successfully created
    2010-02-02 11:58:43: GPnP local setup successfully created
    2010-02-02 11:58:43: Registering ohasd
    2010-02-02 11:58:43: init file = /u01/app/11.2.0/grid/crs/init/init.ohasd
    2010-02-02 11:58:43: Copying file /u01/app/11.2.0/grid/crs/init/init.ohasd to /etc/init.d directory
    2010-02-02 11:58:43: Setting init.ohasd permission in /etc/init.d directory
    2010-02-02 11:58:43: init file = /u01/app/11.2.0/grid/crs/init/ohasd
    2010-02-02 11:58:43: Copying file /u01/app/11.2.0/grid/crs/init/ohasd to /etc/init.d directory
    2010-02-02 11:58:43: Setting ohasd permission in /etc/init.d directory
    2010-02-02 11:58:43: Removing "/etc/rc.d/rc3.d/S96ohasd"
    2010-02-02 11:58:43: Removing file /etc/rc.d/rc3.d/S96ohasd
    2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc3.d/S96ohasd
    2010-02-02 11:58:43: Failed to remove file:
    2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc3.d/S96ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:43: Removing "/etc/rc.d/rc5.d/S96ohasd"
    2010-02-02 11:58:43: Removing file /etc/rc.d/rc5.d/S96ohasd
    2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc5.d/S96ohasd
    2010-02-02 11:58:43: Failed to remove file:
    2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc5.d/S96ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:43: Removing "/etc/rc.d/rc0.d/K19ohasd"
    2010-02-02 11:58:43: Removing file /etc/rc.d/rc0.d/K19ohasd
    2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc0.d/K19ohasd
    2010-02-02 11:58:43: Failed to remove file:
    2010-02-02 11:58:43: Creating a link "/etc/rc.d/rc0.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:43: Removing "/etc/rc.d/rc1.d/K19ohasd"
    2010-02-02 11:58:43: Removing file /etc/rc.d/rc1.d/K19ohasd
    2010-02-02 11:58:43: Failure with return code 1 from command rm /etc/rc.d/rc1.d/K19ohasd
    2010-02-02 11:58:44: Failed to remove file:
    2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc1.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:44: Removing "/etc/rc.d/rc2.d/K19ohasd"
    2010-02-02 11:58:44: Removing file /etc/rc.d/rc2.d/K19ohasd
    2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc2.d/K19ohasd
    2010-02-02 11:58:44: Failed to remove file:
    2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc2.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:44: Removing "/etc/rc.d/rc4.d/K19ohasd"
    2010-02-02 11:58:44: Removing file /etc/rc.d/rc4.d/K19ohasd
    2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc4.d/K19ohasd
    2010-02-02 11:58:44: Failed to remove file:
    2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc4.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:44: Removing "/etc/rc.d/rc6.d/K19ohasd"
    2010-02-02 11:58:44: Removing file /etc/rc.d/rc6.d/K19ohasd
    2010-02-02 11:58:44: Failure with return code 1 from command rm /etc/rc.d/rc6.d/K19ohasd
    2010-02-02 11:58:44: Failed to remove file:
    2010-02-02 11:58:44: Creating a link "/etc/rc.d/rc6.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-02-02 11:58:44: The file ohasd has been successfully linked to the RC directories
    2010-02-02 11:58:44: Starting ohasd
    2010-02-02 11:58:44: itab entries=
    2010-02-02 11:58:49: Created backup /etc/inittab.no_crs
    2010-02-02 11:58:49: Appending to /etc/inittab.tmp:
    2010-02-02 11:58:50: h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
    2010-02-02 11:58:50: Done updating /etc/inittab.tmp
    2010-02-02 11:58:50: Saved /etc/inittab.crs
    2010-02-02 11:58:50: Installed new /etc/inittab
    2010-02-02 11:58:55: ohasd is starting
    2010-02-02 11:58:55: Checking ohasd
    2010-02-02 11:58:55: ohasd started successfully
    2010-02-02 11:58:55: Creating CRS resources and dependencies
    2010-02-02 11:58:55: Configuring HASD
    2010-02-02 11:58:55: Registering type ora.daemon.type
    2010-02-02 11:58:59: Registering type ora.mdns.type
    2010-02-02 11:59:00: Registering type ora.gpnp.type
    2010-02-02 11:59:01: Registering type ora.gipc.type
    2010-02-02 11:59:02: Registering type ora.cssd.type
    2010-02-02 11:59:04: Registering type ora.cssdmonitor.type
    2010-02-02 11:59:07: Registering type ora.crs.type
    2010-02-02 11:59:08: Registering type ora.evm.type
    2010-02-02 11:59:09: Registering type ora.ctss.type
    2010-02-02 11:59:10: Registering type ora.asm.type
    2010-02-02 11:59:13: Registering type ora.drivers.acfs.type
    2010-02-02 11:59:14: Registering type ora.diskmon.type
    2010-02-02 11:59:34: ADVM/ACFS is configured
    2010-02-02 11:59:35: Successfully created CRS resources for cluster daemon and ASM
    2010-02-02 11:59:35: Checking if initial configuration has been performed
    2010-02-02 11:59:35: Starting CSS in exclusive mode
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.gipcd' on 'vis'
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.mdnsd' on 'vis'
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.gipcd' on 'vis' succeeded
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.mdnsd' on 'vis' succeeded
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.gpnpd' on 'vis'
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.gpnpd' on 'vis' succeeded
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.cssdmonitor' on 'vis'
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.cssdmonitor' on 'vis' succeeded
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.cssd' on 'vis'
    2010-02-02 12:00:04: CRS-2672: Attempting to start 'ora.diskmon' on 'vis'
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.diskmon' on 'vis' succeeded
    2010-02-02 12:00:04: CRS-2676: Start of 'ora.cssd' on 'vis' succeeded
    2010-02-02 12:00:04: Querying for existing CSS voting disks
    2010-02-02 12:00:04: Performing initial configuration for cluster
    2010-02-02 12:00:51: Start of resource "ora.ctssd -init" Succeeded
    2010-02-02 12:00:51: Creating or upgrading OCR keys
    2010-02-02 12:00:51: Command return code of 255 (65280) from command: /u01/app/11.2.0/grid/bin/ocrconfig -upgrade oracle oinstall
    2010-02-02 12:00:51: Failed to create Oracle Cluster Registry configuration, rc 255
    2010-02-02 12:00:51: Exiting exclusive mode
    2010-02-02 12:00:51: Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
    2010-02-02 12:00:51: Stop of resource "ora.crsd -init" failed
    2010-02-02 12:00:51: Failed to stop CRSD
    2010-02-02 12:01:20: Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_vis.log for details

    Hi,
    I am trying to setup Oracle 11gR2 RAC setup on RHEL 5.4 64-bit machine, during grid installation i am also getting the same error.
    2010-07-12 03:12:42: Removing file /etc/rc.d/rc6.d/K19ohasd
    2010-07-12 03:12:42: Failure with return code 1 from command rm /etc/rc.d/rc6.d/K19ohasd
    2010-07-12 03:12:42: Failed to remove file:
    2010-07-12 03:12:42: Creating a link "/etc/rc.d/rc6.d/K19ohasd" pointing to /etc/init.d/ohasd
    2010-07-12 03:12:42: The file ohasd has been successfully linked to the RC directories
    2010-07-12 03:12:42: Starting ohasd
    2010-07-12 03:12:42: itab entries=
    2010-07-12 03:12:47: Created backup /etc/inittab.no_crs
    2010-07-12 03:12:47: Appending to /etc/inittab.tmp:
    2010-07-12 03:12:47: h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
    2010-07-12 03:12:47: Done updating /etc/inittab.tmp
    2010-07-12 03:12:47: Saved /etc/inittab.crs
    2010-07-12 03:12:47: Installed new /etc/inittab
    2010-07-12 03:13:03: ohasd is starting
    2010-07-12 03:13:03: Checking ohasd
    2010-07-12 03:13:03: ohasd started successfully
    2010-07-12 03:13:03: Creating CRS resources and dependencies
    2010-07-12 03:13:03: Configuring HASD
    2010-07-12 03:13:03: Registering type ora.daemon.type
    2010-07-12 03:13:04: Registering type ora.mdns.type
    2010-07-12 03:13:04: Registering type ora.gpnp.type
    2010-07-12 03:13:04: Registering type ora.gipc.type
    2010-07-12 03:13:05: Registering type ora.cssd.type
    2010-07-12 03:13:05: Registering type ora.cssdmonitor.type
    2010-07-12 03:13:06: Registering type ora.crs.type
    2010-07-12 03:13:06: Registering type ora.evm.type
    2010-07-12 03:13:07: Registering type ora.ctss.type
    2010-07-12 03:13:07: Registering type ora.asm.type
    2010-07-12 03:13:08: Registering type ora.drivers.acfs.type
    2010-07-12 03:13:08: Registering type ora.diskmon.type
    2010-07-12 03:13:35: ADVM/ACFS is configured
    2010-07-12 03:13:35: Successfully created CRS resources for cluster daemon and ASM
    2010-07-12 03:13:35: Checking if initial configuration has been performed
    2010-07-12 03:13:35: Starting CSS in exclusive mode
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.gipcd' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.mdnsd' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.mdnsd' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.gipcd' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.gpnpd' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.gpnpd' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.cssdmonitor' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.cssdmonitor' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.cssd' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2672: Attempting to start 'ora.diskmon' on 'lodvmrhn3'
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.diskmon' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: CRS-2676: Start of 'ora.cssd' on 'lodvmrhn3' succeeded
    2010-07-12 03:14:04: Querying for existing CSS voting disks
    2010-07-12 03:14:05: Performing initial configuration for cluster
    2010-07-12 03:14:06: Start of resource "ora.ctssd -init" Succeeded
    2010-07-12 03:14:06: Creating or upgrading OCR keys
    2010-07-12 03:14:06: Command return code of 255 (65280) from command: /u01/app/11.2.0/grid/bin/ocrconfig -upgrade oracle oinstall
    2010-07-12 03:14:06: Failed to create Oracle Cluster Registry configuration, rc 255
    2010-07-12 03:14:06: Exiting exclusive mode
    2010-07-12 03:14:06: Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
    2010-07-12 03:14:06: Stop of resource "ora.crsd -init" failed
    2010-07-12 03:14:06: Failed to stop CRSD
    2010-07-12 03:14:34: Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_lodvmrhn3.log for details
    Please hel me to resole the issue.
    I have followed exact steps mentioned in the http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnLinuxUsingNFS.php

Maybe you are looking for