Urgent ..... check the program code,

The below is my code, my superior say that ,this is not correct
he suggest me  not use  OCCUR or With header line,
And even is there anything worng in ''Start od selection''
so anyone check my code and tell me what is worng in it and what correct is required
Tables: LIKP, LIPS, VBRK, VBRP, KNA1, MARA, MAKT, vbpa, VBAK.
DATA : itab type STANDARD TABLE OF ZTARA_STRUC WITH HEADER LINE.
Select-options: so_kunnr for kna1-kunnr,
So_Fkdat for vbrk-fkdat.
data : container type ref to cl_gui_custom_container,
       grid type ref to cl_gui_alv_grid,
       fieldcat type lvc_t_fcat.
DATA : lt_vbrk type STANDARD TABLE OF vbrk WITH HEADER LINE,
       lt_vbrp TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
       lt_VBAK TYPE STANDARD TABLE OF VBAK WITH HEADER LINE,
       lt_veda TYPE STANDARD TABLE OF veda WITH HEADER LINE,
       lt_kna1 TYPE STANDARD TABLE OF KNA1 WITH HEADER LINE,
       it_vbak type standard table of vbak with header line.
Start-of-selection.
so_kunnr = so_kunnr-low.
So_Fkdat = So_Fkdat-low.
SELECT kunnr Name1 ort01 FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE lt_kna1
  WHERE kunnr in so_kunnr.
loop at lt_kna1.
   itab-CUSTOMER_NUMBER = lt_kna1-kunnr.
   itab-CUSTOMER_NAME = lt_kna1-Name1.
   itab-city = lt_kna1-ort01.
SELECT vbeln fkdat kunag FROM VBRK INTO CORRESPONDING FIELDS OF TABLE lt_vbrk
  WHERE kunag = itab-CUSTOMER_NUMBER
    AND Fkdat in So_Fkdat.
if sy-SUBRC = 0.
LOOP AT lt_vbrk.
itab-SOLD2PARTY = lt_kna1-kunnr.
itab-INVOICE_DATE = lt_vbrk-Fkdat.
itab-Vbeln = lt_vbrk-Vbeln.
SELECT POSNR Matnr ARKTX  FROM vbrp INTO CORRESPONDING FIELDS OF TABLE lt_vbrp
  WHERE vbeln = itab-Vbeln.
LOOP AT lt_vbrp.
itab-MATERIAL_DESCRIP = lt_vbrp-ARKTX.
SELECT AUDAT FROM VBAK INTO CORRESPONDING FIELDS OF TABLE lt_VBAK
  WHERE VBELN = itab-VBELN.
LOOP AT lt_VBAK.
itab-AUDAT = lt_VBAK-AUDAT.
SELECT VBEGDAT  VENDDAT FROM veda INTO CORRESPONDING FIELDS OF TABLE lt_veda
  WHERE VBELN = itab-CUSTOMER_NUMBER.
  LOOP AT lt_veda.
itab-VBEGDAT = lt_veda-VBEGDAT.
itab-VENDDAT = lt_veda-VENDDAT.
   ENDLOOP.
    ENDLOOP.
      ENDLOOP.
        ENDLOOP.
         ENDLOOP.
*select * FROM vbak INTO CORRESPONDING FIELDS OF TABLE it_vbak
WHERE VBELN = itab-VBELN
and ERDAT = itab-invoice_date.
*LOOP AT it_vbak.
*itab-VBELN = it_vbak-VBELN.
itab-INVOICE_DATE   = it_vbak-ERDAT.
APPEND itab.
*ENDLOOP.
else.
exit.
  endif.
APPEND itab.
          ENDLOOP.
call screen 9000.
*&      Module  STATUS_9000  OUTPUT
      text
MODULE STATUS_9000 OUTPUT.
  SET PF-STATUS 'MAIN MENU'.
  SET TITLEBAR 'TITLE'.
CREATE OBJECT CONTAINER
   EXPORTING
    PARENT                      =
     CONTAINER_NAME              = 'CUS_CONTAINER'
    STYLE                       =
    LIFETIME                    = lifetime_default
    REPID                       =
    DYNNR                       =
    NO_AUTODEF_PROGID_DYNNR     =
   EXCEPTIONS
     CNTL_ERROR                  = 1
     CNTL_SYSTEM_ERROR           = 2
     CREATE_ERROR                = 3
     LIFETIME_ERROR              = 4
     LIFETIME_DYNPRO_DYNPRO_LINK = 5
     others                      = 6
IF SY-SUBRC <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GRID
  EXPORTING
   I_SHELLSTYLE      = 0
   I_LIFETIME        =
     I_PARENT          =  CONTAINER
   I_APPL_EVENTS     = space
   I_PARENTDBG       =
   I_APPLOGPARENT    =
   I_GRAPHICSPARENT  =
   I_NAME            =
   I_FCAT_COMPLETE   = SPACE
  EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT   = 2
    ERROR_CNTL_LINK   = 3
    ERROR_DP_CREATE   = 4
    others            = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
   I_BUFFER_ACTIVE               =
   I_BYPASSING_BUFFER            =
   I_CONSISTENCY_CHECK           =
    I_STRUCTURE_NAME              = 'ZTARA_STRUC'
   IS_VARIANT                    =
   I_SAVE                        =
   I_DEFAULT                     = 'X'
   IS_LAYOUT                     =
   IS_PRINT                      =
   IT_SPECIAL_GROUPS             =
   IT_TOOLBAR_EXCLUDING          =
   IT_HYPERLINK                  =
   IT_ALV_GRAPHICS               =
   IT_EXCEPT_QINFO               =
   IR_SALV_ADAPTER               =
  CHANGING
     IT_OUTTAB                     = itab[]
   IT_FIELDCATALOG               = lt_fcat
   IT_SORT                       =
   IT_FILTER                     =
  EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR                 = 2
    TOO_MANY_LINES                = 3
    others                        = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE.                 " STATUS_9000  OUTPUT
*&      Module  USER_COMMAND_9000  INPUT
      text
MODULE USER_COMMAND_9000 INPUT.
case sy-ucomm.
when 'BACK'.
Leave Program.
when others.
Leave Program.
endcase.
ENDMODULE.                 " USER_COMMAND_9000  INPUT

hI
USE types DECLARATION LIKE THIS SEE THIS PROGRAM AND YOU CAN UNDERSTAND VERY EASILY
**************DATA TYPES DECLARATION **********************
TABLES: HRP1001, HRP1026, HRP1000,PCHDY.
TYPE-POOLS SLIS.
TYPES :BEGIN OF ST_OUTPUT,
        COUNT TYPE STRING,
        OBJID TYPE HRP1001-OBJID,
        STEXT TYPE HRP1000-STEXT,
        BEGDA TYPE HRP1000-BEGDA,
        ENDDA TYPE HRP1000-ENDDA,
        CANCRT TYPE T77CRT-CANCRT,
        AEDTM TYPE HRP1026-AEDTM,
        UNAME TYPE HRP1026-UNAME,
        LSTEXT TYPE HRP1000-STEXT,
       RINVT TYPE T777V-RINVT,
       END OF ST_OUTPUT.
TYPES: BEGIN OF ST_HRP1000,
        OBJID TYPE HRP1001-OBJID,
        STEXT TYPE HRP1000-STEXT,
       END OF ST_HRP1000.
TYPES : BEGIN OF ST_HRP1001,
         OTYPE TYPE HRP1001-OTYPE,
         OBJID TYPE HRP1001-OBJID,
         RELAT type hrp1001-RELAT,
         BEGDA TYPE HRP1001-BEGDA,
         ENDDA TYPE HRP1001-ENDDA,
         SCLAS TYPE HRP1001-SCLAS,
         SOBID TYPE HRP1001-SOBID,
        END OF ST_HRP1001.
TYPES : BEGIN OF ST_HRP1026,
         OTYPE TYPE HRP1026-OTYPE,
         OBJID TYPE HRP1001-OBJID,
         AEDTM TYPE HRP1026-AEDTM,
         UNAME TYPE HRP1026-UNAME,
         DELET TYPE HRP1026-DELET,
         CANCR TYPE HRP1026-CANCR,
        END OF ST_HRP1026.
TYPES : BEGIN OF ST_REASON,
         CANCR TYPE HRP1026-CANCR,
         CANCRT TYPE T77CRT-CANCRT,
        END OF ST_REASON.
TYPES : BEGIN OF ST_SOBID,
         OTYPE TYPE HRP1001-OTYPE,
         OBJID TYPE HRP1001-OBJID,
         RELAT type hrp1001-OBJID,
         BEGDA TYPE HRP1001-BEGDA,
         ENDDA TYPE HRP1001-ENDDA,
         SCLAS TYPE HRP1001-SCLAS,
         SOBID TYPE HRP1001-OBJID,
        END OF ST_SOBID.
TYPES : BEGIN OF ST_OBJID,
         OBJID TYPE HRP1001-OBJID,
        END OF ST_OBJID.
TYPES : BEGIN OF ST_LOCATION,
         OTYPE TYPE HRP1001-OTYPE,
         OBJID TYPE HRP1001-OBJID,
         RSIGN TYPE HRP1001-RSIGN,
         RELAT TYPE HRP1001-RELAT,
         SCLAS TYPE HRP1001-SCLAS,
         SOBID TYPE HRP1001-SOBID,
        END OF ST_LOCATION.
TYPES : BEGIN OF ST_LOCATION1,
         OTYPE TYPE HRP1001-OTYPE,
         OBJID TYPE HRP1001-OBJID,
         RSIGN TYPE HRP1001-RSIGN,
         RELAT TYPE HRP1001-RELAT,
         SCLAS TYPE HRP1001-SCLAS,
         SOBID TYPE HRP1001-OBJID,
        END OF ST_LOCATION1.
TYPES : BEGIN OF ST_LSTEXT,
         OTYPE TYPE HRP1000-OTYPE,
         OBJID TYPE HRP1000-OBJID,
         LSTEXT TYPE HRP1000-STEXT,
        END OF ST_LSTEXT.
TYPES : BEGIN OF ST_OBJID_SH,
         OTYPE TYPE HRP1000-OTYPE,
         OBJID TYPE HRP1000-OBJID,
        END OF ST_OBJID_SH.
DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
DATA : IT_LSTEXT TYPE STANDARD TABLE OF ST_LSTEXT.              "TOS STORE THE TEXT OF COURCE LOCATION
DATA : WA_LSTEXT TYPE ST_LSTEXT.
DATA : IT_LOCATION TYPE STANDARD TABLE OF ST_LOCATION.          " TO STORE THE LOCATION OF COURCE
DATA : WA_LOCATION TYPE ST_LOCATION.
DATA : IT_LOCATION1 TYPE STANDARD TABLE OF ST_LOCATION1.        " TO CONVERT SOBID INTO OBJID FOR COURCE LOCATION
DATA : WA_LOCATION1 TYPE ST_LOCATION1.
DATA : IT_SOBID TYPE STANDARD TABLE OF ST_SOBID.                " TO CHANGE THE SOBID OF HRP1001 TO OBJID OF HRP1026
DATA : WA_SOBID TYPE ST_SOBID.                                   " BY USING FOR ALL ENTRIES
DATA : IT_REASON TYPE STANDARD TABLE OF ST_REASON.              "TO STORE T HE REASON FOR CANCELL TEXT
DATA : WA_REASON TYPE ST_REASON.
DATA : IT_OUTPUT TYPE STANDARD TABLE OF ST_OUTPUT.               "OUTPUT FEILDS OF REPORT.
DATA : WA_OUTPUT TYPE ST_OUTPUT.
DATA : IT_OUTPUT_1 TYPE STANDARD TABLE OF ST_OUTPUT.               " TEMP OUTPUT FEILDS OF REPORT.
DATA : WA_OUTPUT_1 TYPE ST_OUTPUT.
DATA : IT_HRP1000 TYPE STANDARD TABLE OF ST_HRP1000.             "DATA FROM HRP1000 TABLE
DATA : WA_HRP1000 TYPE ST_HRP1000.
DATA : IT_HRP1001 TYPE STANDARD TABLE OF ST_HRP1001.             "DATA FROM HRP1001 TABLE
DATA : WA_HRP1001 TYPE ST_HRP1001.
DATA : IT_HRP1026 TYPE STANDARD TABLE OF ST_HRP1026.              "DATA FROM HRP1026 TABLE
DATA : WA_HRP1026 TYPE ST_HRP1026.
DATA : IT_OBJID TYPE STANDARD TABLE OF ST_OBJID.                  " TO STORE THE OBJID OF HRP1001
DATA : WA_OBJID TYPE ST_OBJID.
DATA: WS_FCAT    TYPE SLIS_FIELDCAT_ALV .                         " FEILDCATALOG FOR ALV REPORT
DATA: IN_FCAT    TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_LAYOUT   TYPE SLIS_LAYOUT_ALV.
DATA : LV_COUNT TYPE I.                                           "FEILD FOR SERIAL NUMBER
***************************END OF DATA DECLARATION******************************************
***********SELECTION SCREEN DESIGN***********************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
**********END OF SELECTION SCREEN DESIGN*****************
*****INITIALIZATION VENT TO ASIGN DEFAULT VALUES TO OTYPE
*INITIALIZATION.
S_OTYPE-LOW = 'D'.
S_OTYPE-SIGN = 'I'.
S_OTYPE-OPTION = 'EQ'.
APPEND S_OTYPE.
CLEAR S_OTYPE.
*************END OF EVENT INITIALIZATION*****************
*********VALIDATION FOR SCREEN FIELDS********************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
IF S_OBJID IS NOT INITIAL.
    SELECT OTYPE OBJID FROM HRP1000
                 INTO TABLE IT_OBJID_SH
                 WHERE OTYPE = 'D'.
IF SY-SUBRC EQ 0.
SEARCH HELP FOR QUALIFICATION.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
             DDIC_STRUCTURE         = ' '
        RETFIELD               =  'OBJID'
             PVALKEY                = ' '
       DYNPPROG               = SY-REPID
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_OBJID'
             STEPL                  = 0
             WINDOW_TITLE           =
             VALUE                  = ' '
       VALUE_ORG              = 'S'
             MULTIPLE_CHOICE        = ' '
             DISPLAY                = ' '
             CALLBACK_PROGRAM       = ' '
             CALLBACK_FORM          = ' '
             MARK_TAB               =
           IMPORTING
             USER_RESET             =
      TABLES
        VALUE_TAB              =  IT_OBJID_SH
             FIELD_TAB              =
             RETURN_TAB             = RETURN_TAB
             DYNPFLD_MAPPING        =
           EXCEPTIONS
             PARAMETER_ERROR        = 1
             NO_VALUES_FOUND        = 2
             OTHERS                 = 3
    IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.
   IF SY-SUBRC NE 0.
     MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA.' TYPE 'E'.
   ENDIF.
ENDIF.
REFRESH IT_OBJID.
***************VALIDATION OF SCREEN FIELDS ENDS***********
*****************START OF SELECTION ************************
START-OF-SELECTION.
  SELECT OTYPE
         OBJID
         RELAT
         BEGDA
         ENDDA
         SCLAS
         SOBID FROM HRP1001 INTO TABLE IT_HRP1001
                    WHERE OTYPE = 'D'
                        AND OBJID IN S_OBJID
                        AND BEGDA GE DATE-LOW
                        AND ENDDA LE DATE-HIGH
                        AND ( SCLAS = 'E' OR SCLAS = 'ET' ).
  IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
  ENDIF.
  LOOP AT IT_HRP1001 INTO WA_HRP1001.
    WA_SOBID-OTYPE = WA_HRP1001-OTYPE.
    WA_SOBID-OBJID = WA_HRP1001-OBJID.
    WA_SOBID-RELAT = WA_HRP1001-RELAT.
    WA_SOBID-BEGDA = WA_HRP1001-BEGDA.
    WA_SOBID-ENDDA = WA_HRP1001-ENDDA.
    WA_SOBID-SCLAS = WA_HRP1001-SCLAS.
    WA_SOBID-SOBID = WA_HRP1001-SOBID.
    APPEND WA_SOBID TO IT_SOBID.
  ENDLOOP.
  SELECT OTYPE
         OBJID
         AEDTM
         UNAME
         DELET
         CANCR
        NCONT
          FROM HRP1026
          INTO TABLE IT_HRP1026
          FOR ALL ENTRIES IN IT_SOBID
             WHERE OBJID = IT_SOBID-SOBID
             AND ( OTYPE = 'E' OR OTYPE = 'ET' )
                 AND DELET = 'X' AND
                 BEGDA GE DATE-LOW  AND
                 ENDDA LE DATE-HIGH.
  IF SY-SUBRC EQ 0.
    SELECT OBJID
           STEXT
           FROM HRP1000
           INTO TABLE IT_HRP1000
           FOR ALL ENTRIES IN IT_SOBID
              WHERE OBJID = IT_SOBID-SOBID AND
                    BEGDA GE DATE-LOW  AND
                    ENDDA LE DATE-HIGH.
    SELECT CANCR
           CANCRT
           FROM T77CRT
           INTO TABLE IT_REASON
           FOR ALL ENTRIES IN IT_HRP1026
           WHERE CANCR = IT_HRP1026-CANCR
             AND LANGU = 'E' .
********PERFORM FOR GETTING T HE LOCATION OF THE COURCE**
  PERFORM GET_LOCATION.
**************END OF LOCATION OF COURCE ******************
  ELSE.
    MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
  ENDIF.
*****PERFORM FOR GETTING DATA INTO THE FINAL INTERNAL TABLE IT_OUTPUT**
  PERFORM GET_DATA.
*********************************END OF PERFORM ET DATA ***************
***********LOGIC FOR PRONTING NUMBER OF RECORDS ***********************
  LV_COUNT = 0.
  LOOP  AT IT_OUTPUT INTO WA_OUTPUT.
    LV_COUNT = LV_COUNT + 1.
    WA_OUTPUT-COUNT = LV_COUNT.
    APPEND WA_OUTPUT TO IT_OUTPUT_1.
  ENDLOOP.
  REFRESH IT_OUTPUT.
  IT_OUTPUT = IT_OUTPUT_1.
********************END OF LOGIC FOR NUMBER OF RECORDS ***************
****************DISPLAYING OUTPUT BY USEING GRID DISPLAY**********
  PERFORM ALV_DISPLAY.
****************************END OF PERFORM FOR DISPLAYING **********
*&      Form  PERFORM_ALV
DISPLAY THE RECORDS IN ALV GRID FORMAT.
FORM ALV_DISPLAY.
  PERFORM FIELD_CATALOG USING 'COUNT' 'Sr. No.'.
  PERFORM FIELD_CATALOG USING 'OBJID' 'COURCE ID.'.
  PERFORM FIELD_CATALOG USING 'STEXT' 'COURCE NAME'.
    PERFORM FIELD_CATALOG USING 'LSTEXT' 'COURCE LOATION'.
  PERFORM FIELD_CATALOG USING 'BEGDA' 'BEGIN DATE '.
  PERFORM FIELD_CATALOG USING 'ENDDA' 'END DATE '.
  PERFORM FIELD_CATALOG USING 'CANCRT' 'REASON'.
  PERFORM FIELD_CATALOG USING 'AEDTM' 'DATE Of CANCEL'.
PERFORM FIELD_CATALOG USING 'NCONT' 'NUMBER OF BOOKINGS'.
PERFORM FIELD_CATALOG USING 'LOCTX' 'COURCE LOCATION'.
  PERFORM FIELD_CATALOG USING 'UNAME' 'WHO CANCELLED'.
PERFORM FIELD_CATALOG USING 'LSTEXT' 'COURCE LOATION'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_STRUCTURE_NAME = 'IT_OUTPUT'
      I_GRID_TITLE     = ' Cancelled courses with reason '
      IT_FIELDCAT      = IN_FCAT
    TABLES
      T_OUTTAB         = IT_OUTPUT.
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    "PERFORM_ALV
*&      Form  FIELD_CATALOG
      text
     -->FIELD_NAME text
     -->DIS_TEXT   text
FORM FIELD_CATALOG USING FIELD_NAME DIS_TEXT.
  CLEAR WS_FCAT.
  WS_FCAT-TABNAME = 'IT_OUTPUT'.
  WS_FCAT-FIELDNAME = FIELD_NAME.
  WS_FCAT-SELTEXT_M = DIS_TEXT.
  APPEND WS_FCAT TO IN_FCAT .
ENDFORM.                    "FIELD_CATALOG
*&      Form  GET_DATA
      text
-->  p1        text
<--  p2        text
FORM GET_DATA .
*sort it_sobid by objid.
  LOOP AT IT_SOBID INTO WA_SOBID." where otype eq s_otype and objid eq s_objid.
    READ TABLE IT_HRP1026 WITH KEY OBJID = WA_SOBID-SOBID OTYPE = WA_SOBID-SCLAS INTO WA_HRP1026.
    IF SY-SUBRC EQ 0.
      READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
   READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
      WA_OUTPUT-OBJID = WA_HRP1026-OBJID.
      WA_OUTPUT-BEGDA = WA_SOBID-BEGDA.
      WA_OUTPUT-ENDDA = WA_SOBID-ENDDA.
      WA_OUTPUT-AEDTM = WA_HRP1026-AEDTM.
      WA_OUTPUT-UNAME = WA_HRP1026-UNAME.
   WA_OUTPUT-NCONT = WA_HRP1026-NCONT.
   READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
      WA_OUTPUT-STEXT = WA_HRP1000-STEXT.
      READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
      WA_OUTPUT-CANCRT = WA_REASON-CANCRT.
      CLEAR WA_REASON-CANCRT.
      READ TABLE IT_LOCATION1 WITH KEY OBJID = WA_HRP1026-OBJID INTO WA_LOCATION1..
      READ TABLE IT_LSTEXT WITH KEY OBJID = WA_LOCATION1-SOBID OTYPE = 'F' INTO WA_LSTEXT.
             WA_OUTPUT-LSTEXT = WA_LSTEXT-LSTEXT.
             CLEAR WA_LSTEXT-LSTEXT.
      APPEND WA_OUTPUT TO IT_OUTPUT.
      CLEAR WA_OUTPUT.
      CLEAR WA_OUTPUT-CANCRT.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " GET_DATA
*&      Form  GET_LOCATION
      text
-->  p1        text
<--  p2        text
FORM GET_LOCATION .
SELECT OTYPE
       OBJID
       RSIGN
       RELAT
       SCLAS
      SOBID
      FROM HRP1001
      INTO TABLE IT_LOCATION
      FOR ALL ENTRIES IN IT_HRP1026
      WHERE OTYPE = 'E' AND OBJID = IT_HRP1026-OBJID
       AND RSIGN = 'A' AND RELAT = '024' AND SCLAS = 'F'
                AND BEGDA GE DATE-LOW AND ENDDA LE DATE-HIGH.
IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
  ENDIF.
  LOOP AT IT_LOCATION INTO WA_LOCATION.
    WA_LOCATION1-OTYPE = WA_LOCATION-OTYPE.
    WA_LOCATION1-OBJID = WA_LOCATION-OBJID.
        WA_LOCATION1-RSIGN = WA_LOCATION-RSIGN.
    WA_LOCATION1-RELAT = WA_LOCATION-RELAT.
    WA_LOCATION1-SCLAS = WA_LOCATION-SCLAS.
    WA_LOCATION1-SOBID = WA_LOCATION-SOBID.
    APPEND WA_LOCATION1 TO IT_LOCATION1.
   CLEAR WA_LOCATION1.
  ENDLOOP.
SELECT OTYPE
       OBJID
       STEXT
       FROM HRP1000
       INTO TABLE IT_LSTEXT
       FOR ALL ENTRIES IN IT_LOCATION1
       WHERE OBJID = IT_LOCATION1-SOBID
          AND OTYPE = 'F'.
         AND BEGDA GE DATE-LOW
         AND ENDDA LE DATE-HIGH.
ENDFORM.                    " GET_LOCATION

Similar Messages

  • How to check the tran code for specific activity.

    Hello friends ,
    could you please let me know how to check the tran code for specific activity . AS in table , i can check , what transaction does what ? But now i need to check the transaction for specific activity .
    E.g , For Administrator workbench , there is transcation like RSA1 .
    thanks in advance
    Regards

    Hi,
    try the TSTC table with SE16.
    Hope it helps,
    MG

  • Authorization group - to restrict other users to not see the program code

    Hi,
    I have developed report program. Is it possible to restrict the other users to don't see the program code.
    Thanks in advance.
    Regards,
    Eswar

    Eswar:
    SAP does not allow you to restrict access to your report programs. Anybody with the right autorizations can see your programs.
    There are some tricks to achieve someting like that. Tricks consists basically in write your code without enter between lines. I think there are no effective way in SAP or ABAP to protect programs source code from curious eyes.
    Ex.:
    REPORT ztest. TABLES: ztable. DATA: g_var1...
    Regards.
    Rafael Rojas.

  • Table for the program code

    Hi Freinds,
    is there any table to store the  program code , i mean whatever we write in  SE 38 will it be stores any data base tables? we have one option to get the code that is READ REPORT INTO ITAB. other than this is there any database tables for this?
    Regards,
    Tirumal.

    Hi Reddy,
      Table: REPOSRC there is only programm name but not code by using program name you can get code into your report by using Read Report syntax.
    Example,
    parameters: p_pname type reposrc-PROGNAME.
    data: Begin of table occurs 10,
             line(150),
            end of table.
    read report p_pname into table.
    loop at table.
      write / table.
    endloop.
    Plzzzzzz Reward if useful,
    Mahi.

  • Why does it say my coupon code is "Invalid coupon code. Please check the coupon code and re-enter."

    When I enter my coupon code to get my serial number it says "Invalid coupon code. Please check the coupon code and re-enter." It is the correct coupon code. And I have just deactivated my lisence on my old computer.

    If you had not deactivated it on the old computer and it is a Windows machine there would have been a chance of getting it using Belarc Advisor
    (http://www.belarc.com/free_download.html).  I do not know if you can still do so.
    You can try contacting Adobe support via chat and see if they can help.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Table to check the T.codes usage

    Hi,
    I want to know the table name in R/3 which will be displaying the transaction codes usage details as i can check the current days usage in st03n by selecting the transaction profile but intend to have the list for the previous days
    Appreciate for your solution and <removed_by_moderator>
    Read the "Rules of Engagement"
    Regards,
    Dheeraj
    Edited by: Juan Reyes on Feb 11, 2009 12:24 PM

    Use tables TSTC (list of tcodes) and CDHDR(where used list of tcodes) to write a ABAP program.
    Or If else you can use ST03N to see the list of tcodes used by users.
    Re: User Information
    Regards,
    Jazz

  • Extended program check -  The program ZZZ does not exist as a main program

    Program ZZZ is the Include program of program AAA. I dont understand this error on Extended program check."The program ZZZ does not exist as a main program"

    why are you runnign Code inspector the include program.You shoudl check only your main programs

  • How to send Mail to external system - Check the program ?

    Hi all,
          The following is a ABAP Program to Send a mail to external mail id. this program is not showing error but when executed it say "No message sent"
    what i've to do to overcome this hurdles. if any solution or prerequisites then '
    please give me a solution. 
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Thanks in Advance,
        Manian

    Hi,
       I can get the idea but i'm asking u about the prerequisites such as SCOT - sap connect or something else has to be done before executing the program.
    if i need any pls let me know?
    I've tried the program but it say " No Message sent" and i didn't get any mail to mail id.
    thanks in advance,
      Manian.

  • To check the source code(VI) in absence of real hardware

    I need to check the VI , which is developed to measure pressure with pressure transducer.
    Later this VI is deplyed in the Test stand system as .exe file. At the test stand system we have all the hardware from the PCI DAq card to the pressure transducer.
    But the system where the software is there dont have the hardware.
     So how can i check the code in absence of hardware?
    Can the Simulate signal will be helpful or we should need atleat pci-Daq card and waveform generator to check the code.
    Any suggestions in this regard will be helpful
    Many thanks
    Regards
    Kirit

    Hi Kirit,
    You should go in MAX, and under My System, right click on "Devices and interfaces" then 'Create new ' and then 'NI-DAQmx simulated device'. In the M series or any , you can find both PCI, PXI cards.Select the particular device and click ok. This should allow you to test your code with a simulated device.

  • Check the source code in absence of physical Hardware

    For one of my applications, i have to work with 4 counters.So i increased counter input channels from 2 to 4 in the source code. But we are yet to get the hardware as we have a PCI card which can read 2 counters. But before we go for the hardware purchase, i want to make sure my source code which has 4 counters work.
    I want to know whether there is any provision to check increased counter channels functioning.
    Pls give me suggestion & procedure if you have any for this type of issues.
    thank you in advance
    -KIRIT

    Do you not know what the typical measurement is supposed to be? By failing data, I mean a measurement that is outside what you would expect. You need this if the count is supposed to be some value and you have code that takes some sort of action when it is outside a limit. If you don't really care, then just set it up to return a range of nominal values.
    Below is some simple code to generate a random number between a min and max range. You can replace the min and max with constants or just have the random count be a constant.
    I hope you are aware that the simulated count function would be used in place of the DAQmx Read/DAQ Assistant. For counters, you cannot use a simulate DAQmx device to return anything but a 0. You could have a case statement with one case having the DAQmx function and the other case having the simulated data function.
    Message Edited by Dennis Knutson on 07-24-2008 01:05 PM
    Attachments:
    Random Number Between a Range.PNG ‏3 KB

  • Check the coupon code section for limited time deal

    Latest offer: 'Save Over 50% Off Today's Woot' In the last day, 4 promos have been used. Community sourced deals are a great source of discounts and coupons. How do wingnuts gain the best Woot Coupon Code guidance? Take a look at our 5 Woot offers including 5 sales. A basic search of the Internet will provide you with a detailed listing of available Woot Coupon Code for sale. That has changed. The Sellout! The last time an offer was used was July 10, 2015.How to use a Woot coupon Woot features "tons of cool stuff, sold cheap." Sign up for the Deal of the Day to receive discounts of 50-90% on the best brands. Herein you shall learn in regard to the shortcuts of Woot Coupon Code. Page offers last chance deals for hardcore cheapskates.. Check the Woot!plus section for limited time deal events. One way I guard against that is by refusing to buy sharply discounted Woot Coupon Code. Get more info :- http://aulaworld.com/woot-coupon-code/

    Find a serial number
    For anything else contact support directly or work things out with your reseller.
    Mylenium

  • How to syntax check the source code of custom methos of classes?

    Hi,
    Experts,
    I want to check the syntax errors is present or not in methods of classes, to check that is there any function module or classes for that?
    Thank U,
    Shabeer Ahmed.

    T.CODE :- SLIN
    USING THIS T.CODE CHECK SYNTAX ERROR AND ALL
    LIKE
    SYNTAX
    PERFOMR/FORM
    FUNCTION
    AUTHORIZATION
    CHECK LOAD TABLE
    SET/GET PARAMETER IDs
    MESSAGE
    etc....

  • Check the source code

    Hi Folks,
    I know it should be very basic question. I am not a complete technical person, but i am trying to understand the code. Please guide me for the below issues.
    How to see the source code for method (which is inside the interface) ?
    [SE24 --> Double Click Interface --> Method tab]
    I can see code for some method by click the Code button in Class --> Methods. But there are some extra method defined inside the interface. How to see those source code.

    place the cursor over that method and click the where - used lists button which will show you all the classes that are using this method
    Thanks
    Bala Duvvuri

  • Is there anyway that I can view the program code behind the vi diagram?

    e.g. to view the vi code in C++ instead of G.

    G is translated into assembly code directly.
    There is no low level language like c needed.
    So there is nothing to view except assembly coding.
    greetings from the Netherlands

  • Error #2048: Security sandbox violation: Urgent Checked the forum none of the solutions worked

    Hi all,
        I am new to flex . I am trying to connect to my localhost using the XMLSocket like below
        var xmlsock:XMLSocket = new XMLSocket(); // Line #187
        xmlsock.connect(127.0.0.1, 8080);
        xmlsock.send(xml);
      But after a Minute I get this below error
      Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: app:/main.swf cannot load data from 127.0.0.1:8080.
        at main/handleLogin()[C:\Documents and Settings\Vulcantech\My Documents\Flex Builder 3\src\main.mxml:187]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
        at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
        at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
        at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Thanks in advance
    Balaji

    Hi Alex,
       Thanks for the Link . I saw the link and have done the same steps as said in that . I have created a crossdomain.xml file in my 127.0.0.1 and i can also see that the policy being accepted in the  "C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs" . I have pasted the lines in policyfiles.txt below.
        OK: Root-level SWF loaded: app:/main.swf
        OK: Policy file accepted: http://127.0.0.1/crossdomain.xml
       But I still get that sandbox violation error. I have tried the below solutions and none of them worked
           1) security.allowDomain("*");
           2) crossdomain xml in the webroot of the accessing server like below
                        <?xml version="1.0"?>
                         <!DOCTYPE cross-domain-policy SYSTEM “http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd”> 
                         <cross-domain-policy>
                            <site-control permitted-cross-domain-
    policies="all" />
                             <allow-access-from domain="*" to-ports="*" />
                       </cross-domain-policy>
           3) I saw that adding the Application path in the  "C:\Documents and Settings\username\Application Data\Flash Player\#Security\FlashPlayerTrust\flexbuilder.cfg" will remove the sandbox violation but this also didnt work        
           4)  "Project - Properties - Flex Compiler - Additional compiler arguments:" add   -use-network=true  and then recompile and post to server
           5) I have also checked the policy file logs
    Thanks in advance
    Balaji

Maybe you are looking for

  • Is it possible to connect Thunderbolt display to a PC (hp pavilion) modem?

    Is this possible through some sort of adaptor? I have an old PC modem I need to run some programs, however it's currently hooked up to one of those huge CRT monitors from like 1998 and I'd like to free up some space. Edit: for example could I somehow

  • HFS and case sensitive file systems

    I recently received a pre-installed Macbook. The file system is HFS+ (Apple_HFS according to 'diskutil list'). This file system is not case sensitive but I would like it to be. Is there a way to deactivate the HFS wrapper responsible for that without

  • Using Trex for Vendor Search in SRM

    Experts,    Please let me know if you used TREX to optimize the vendor search in SRM 7.0, ECC 6.0 EP4.    Please let me know any tips or suggestions regarding the implementation. Thanks in advance Regards, Scott

  • Help, I did a bad bad thing

    well guys, I dropped my powerbook recently and the hard drive went bad. make the story short I tried to replace the hard drive and then broke the trackpad ribbon clamp that connects to the logic board ( never work on your computer when you are mad ).

  • Creating a Storage Handling Unit With The Same # As A Storage Unit

    Hello dear WM and MM experts, I'm beginning to use Handling Units and Storage Units. From what I've been reading, it seems like you can have a HU enter the warehouse in the form of a SU with the same ID#. Is that correct? If that's the case, what tra