Thursday, 25 May 2017

Requirement Tracking Number BEDNR in ME51n FM enhancement f4if_field_value_request






FUNCTION f4if_field_value_request.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module F4IF_FIELD_VALUE_REQUEST, Start                                                                                                   A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZF4_FUN_MOD_BEDNR.    "active version
DATA LV_SEARCH_NAME TYPE CHAR25.
IF SY-TCODE 'ME51N' OR SY-TCODE 'ME52N' OR SY-TCODE 'ME53N'.
  CLEAR LV_SEARCH_NAME.
  IF FIELDNAME 'BEDNR'.
  LV_SEARCH_NAME 'TSABT'.
  SEARCHHELP LV_SEARCH_NAME.
  ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*

Wednesday, 24 May 2017

FOR RESTRICTING THE WARNING IN ME51N SCREEN FOR F4 HELP AFNAM ( Name of Requisitioner/Requeste)


Include   LSDSDF05


FORM f4proz_step_selone
     TABLES record_tab STRUCTURE seahlpres
     USING shlp_top TYPE shlp_descr_t
     CHANGING shlp_tab TYPE shlp_descr_tab_t
              shlp_curr TYPE shlp_descr_t
              callcontrol TYPE ddshf4ctrl
              ocxinterface STRUCTURE ddshocxint.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form F4PROZ_STEP_SELONE, Start                                                                                                                    A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZME51N_MSG_LSDSDF05.    "active version
 "FOR RESTRICTING THE WARNING IN ME51N SCREEN FOR F4 HELP AFNAM
  IF SY-TCODE 'ME51N' OR SY-TCODE 'ME52N' OR SY-TCODE 'ME53N' .
  IF SHLP_TAB[] IS INITIAL.
  IF SHLP_TOP-SHLPNAME 'TSABT'.
    DATAVAR TYPE STRING.
    CLEAR VAR.
    MESSAGE S813(DHINTO VAR.
    CALLCONTROL-STEPRC 12.
    EXIT.
  ENDIF.
  ENDIF.
  ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*

PO Release Strategy Enhancement in Function Module ME_REL_STRATEGIE_EKKO


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module ME_REL_STRATEGIE_EKKO, End                                                                                                        A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZPO_RESET_RELEASE_STRATEGY.    "active version

IF cekko-gnetw LT f1.
          PERFORM reset
            USING e_frgst e_frggr
                  e_frgzu e_frgkz e_frgrl.
          e_reset 'X'.
ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*
ENDFUNCTION.

Tuesday, 23 May 2017

Hide Profit Margin in Sale Order and Invoice


include     program

ZSD_PROFIT_MARGIN_HIDE

********************************** Hide Profit Margin in Sale Order and Invoice **************************************
  DATAauth_subrc LIKE sy-subrc,
        ls_pcauth  TYPE zsd_promar.
  IF screen-name 'FCODE'.
    auth_subrc 4.
  ENDIF.
  SELECT  SINGLE FROM zsd_promar
          INTO ls_pcauth
          WHERE kalsm EQ komk-kalsm
            AND stunr EQ komv-stunr.
  IF sy-subrc 0.
    AUTHORITY-CHECK OBJECT 'Z_KONH_KLS'
               ID 'ZKALSM' FIELD komk-kalsm
               ID 'ZSTUNR' FIELD komv-stunr
               ID 'ACTVT' DUMMY.
    auth_subrc sy-subrc.
    IF auth_subrc NE 0  AND screen-name 'RV61A-SELKZ'
                        OR   screen-name 'KOMV-KAWRT'
                        OR   screen-name 'RV61A-AWEIN'
                        OR   screen-name 'KOMV-KBETR'
                        OR   screen-name 'RV61A-KOEIN'
                        OR   screen-name 'KOMV-KPEIN'
                        OR   screen-name 'KOMV-KMEIN'
                        OR   screen-name 'KOMV-KWERT'
                        OR   screen-name 'KOMV-KWERT_K'
                        OR   screen-name 'KOMV-KUMZA'
                        OR   screen-name 'RV61A-MEINS'
                        OR   screen-name 'KOMV-KUMNE'
                        OR   screen-name 'RV61A-KMEI1').
      screen-active 0.
      MODIFY SCREEN.
    ENDIF.
  ENDIF.
***************************** End of Profit Margin **********************************************




----------------------------------------------------------------------*
INCLUDE LV69AFZZ .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Form  USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form userexit_field_modific_leer.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form USEREXIT_FIELD_MODIFIC_LEER, Start                                                                                                           A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZSD_PROFIT_MARGIN.    "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*

endform.                               " USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
*&      Form  USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form userexit_field_modific_kzwi.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2) Form USEREXIT_FIELD_MODIFIC_KZWI, Start                                                                                                           A
*$*$-Start: (2)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2  ZSD_PROFIT_MARGIN.    "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End:   (2)---------------------------------------------------------------------------------$*$*

endform.                               " USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
*&      Form  USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form userexit_field_modific_kopf.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(3) Form USEREXIT_FIELD_MODIFIC_KOPF, Start                                                                                                           A
*$*$-Start: (3)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 3  ZSD_PROFIT_MARGIN.    "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End:   (3)---------------------------------------------------------------------------------$*$*

endform.                               " USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
*&      Form  USEREXIT_FIELD_MODIFICATION
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form userexit_field_modification.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(4) Form USEREXIT_FIELD_MODIFICATION, Start                                                                                                           A
*$*$-Start: (4)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 4  ZSD_PROFIT_MARGIN.    "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End:   (4)---------------------------------------------------------------------------------$*$*

endform.                               " USEREXIT_FIELD_MODIFICATION
*

ZVA41 sales document create


Function Module

SD_SALESDOCUMENT_CREATE


function sd_salesdocument_create.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module SD_SALESDOCUMENT_CREATE, Start                                                                                                    A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZVA41_UPDATE_ORDER_QTY.    "active version
DATA MID3(4),
       GV_TCODE TYPE SY-TCODE.
IMPORT GV_TCODE TO GV_TCODE FROM MEMORY ID MID3.
CLEAR MID3.
IF GV_TCODE 'ZVA41'.
LOOP AT SALES_ITEMS_IN.
      SALES_SCHEDULES_IN-ITM_NUMBER SALES_ITEMS_IN-ITM_NUMBER.
      SALES_SCHEDULES_IN-SCHED_LINE SALES_ITEMS_IN-ITM_NUMBER.
      SALES_SCHEDULES_IN-REQ_QTY SALES_ITEMS_IN-TARGET_QTY.
      APPEND SALES_SCHEDULES_IN.
ENDLOOP.
ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*




Automatically Update KUNNR ADRNR in DP91 or VA02 or VA03


Include  LV09AF20


FORM PARTNER_ON_POS_EXISTS  USING FIT_XVBPA TYPE LV09A_TY_XVBPA
                                  FIF_PARVW TYPE PARVW_4
                                  FIF_NRART LIKE TPAR-NRART
                                  FIF_PARNR
                                  FIF_POSNR LIKE VBPAV-POSNR
                                  FIF_OBJECTKEY type SWO_TYPEID
                         CHANGING FEF_XVBPA_INDEX LIKE SY-TABIX
                                  FEF_POSNR       LIKE VBPAV-POSNR.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form PARTNER_ON_POS_EXISTS, Start                                                                                                                 A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2  ZVBAP_KUNNR_UPDATE_DP91_V4.    "active version
******** added by chellam - 15.06.2015
IF SY-TCODE 'DP91' OR SY-TCODE 'VA02' OR SY-TCODE 'VA03' .
IF SY-DYNNR 1000.
*break testabap.
DATA LV_KUNNR TYPE KNA1-KUNNR,
       lv_vbeln type vbak-vbeln.

DATA :  LS_XVBPA LIKE LINE OF FIT_XVBPA,
        LV_POSNR TYPE VBAP-POSNR.
get PARAMETER ID 'AUN' FIELD lv_vbeln.
*get PARAMETER ID 'APO' FIELD lv_item.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
                INPUT  lv_vbeln
           IMPORTING
                OUTPUT lv_vbeln.
LOOP AT FIT_XVBPA INTO LS_XVBPA.

  SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
                WHERE VBELN lv_vbeln
                AND POSNR <> 0
                AND   PARVW LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR LS_XVBPA-KUNNR.
LS_XVBPA-adrnp LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR LV_KUNNR.
SELECT SINGLE ADRNR FROM KNA1 INTO (LS_XVBPA-adrnr)
WHERE KUNNR LS_XVBPA-KUNNR.
ENDIF.
MODIFY FIT_XVBPA FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR ADRNR.
ENDLOOP.
ENDIF.
ENDIF.
ENDENHANCEMENT
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*


Function Module  SD_PARTNER_DATA_GET enhancement



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module SD_PARTNER_DATA_GET, End                                                                                                          A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZVBAP_KUNNR_UPDATE_DP91_V4.    "active
IF SY-TCODE 'DP91' OR SY-TCODE 'VA02' OR SY-TCODE 'VA03' .
IF SY-DYNNR 1000.
*break testabap.
DATA LV_KUNNR TYPE KNA1-KUNNR,
       lv_vbeln type vbak-vbeln.

DATA :  LS_XVBPA LIKE LINE OF FET_XVBPA,
        LV_POSNR TYPE VBAP-POSNR.
get PARAMETER ID 'AUN' FIELD lv_vbeln.

      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
                INPUT  lv_vbeln
           IMPORTING
                OUTPUT lv_vbeln.
LOOP AT FET_XVBPA INTO LS_XVBPA.

  SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
                WHERE VBELN lv_vbeln
                AND POSNR <> 0
                AND   PARVW LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR LS_XVBPA-KUNNR.
LS_XVBPA-adrnp LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR LV_KUNNR.
*BREAK TESTABAP.
SELECT SINGLE ADRNR FROM KNA1 INTO (LS_XVBPA-adrnr)
WHERE KUNNR LS_XVBPA-KUNNR.
ENDIF.
MODIFY FET_XVBPA FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR ADRNR.
ENDLOOP.
 FET_XVBPA_ACTUAL[] FET_XVBPA[].
 FET_YVBPA[] FET_XVBPA[].
 FET_YVBPA_ACTUAL[] FET_YVBPA[].
ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*
ENDFUNCTION.




*************************************************************************


Include    LV09CF29

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form UPDATE_DATA_FROM_V09A, End                                                                                                                   A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZVBAP_KUNNR_UPDATE_DP91_V2.    "active version
******** added by chellam - 15.06.2015
IF SY-TCODE 'DP91' AND SY-DYNNR 1000 AND SY-UNAME 'ABAP'.

DATA LV_KUNNR TYPE KNA1-KUNNR,
       lv_vbeln type vbak-vbeln.
DATA :  LS_XVBPA LIKE LINE OF lt_xvbpa,
        LV_POSNR TYPE VBAP-POSNR.

get PARAMETER ID 'AUN' FIELD lv_vbeln.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
                INPUT  lv_vbeln
           IMPORTING
                OUTPUT lv_vbeln.

LOOP AT lt_xvbpa INTO LS_XVBPA.

  SELECT SINGLE KUNNR POSNR FROM VBPA INTO (LV_KUNNR,LV_POSNR)
                WHERE VBELN lv_vbeln
                AND POSNR <> 0
                AND   PARVW LS_XVBPA-PARVW.
IF LV_POSNR IS INITIAL.
LS_XVBPA-KUNNR LS_XVBPA-KUNNR.
LS_XVBPA-adrnp LS_XVBPA-ADRNR.
ELSEIF LV_POSNR IS NOT INITIAL.
LS_XVBPA-KUNNR LV_KUNNR.
*BREAK TESTABAP.
SELECT SINGLE NAME1 ADRNR FROM KNA1 INTO (LS_XVBPA-name1,LS_XVBPA-adrnr)
WHERE KUNNR LS_XVBPA-KUNNR.
ENDIF.
MODIFY lt_xvbpa FROM LS_XVBPA INDEX SY-TABIX TRANSPORTING KUNNR NAME1 ADRNR.
ENDLOOP.
 gt_xvbpa[] lt_xvbpa[].
ENDIF.
ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*
ENDFORM.                               " UPDATE_DATA_FROM_V09A






Automatically Plant Has to come in VF01 and VF02 and VF03


Include  MV60AF0X_XVBRP_TCTRL_SCROLLEN


FORM xvbrp_ctrl_init.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form XVBRP_CTRL_INIT, Start                                                                                                                       A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZVBAP_KUNNR_UPDATE_VF01.    "active version
IF SY-TCODE 'VF01' OR SY-TCODE 'VF02' OR SY-TCODE 'VF03' .
  IF SY-DYNNR 0104 .

DATA LV_WERKS TYPE EKPO-WERKS,
       LV_ITEM TYPE VBAP-POSNR.

LOOP AT XVBRP.
CLEARLV_WERKS.
SELECT SINGLE WERKS FROM VBAP INTO LV_WERKS
              WHERE VBELN XVBRP-aubel.
*              AND POSNR = XVBRP-VGPOS.
XVBRP-WERKS LV_WERKS.
MODIFY XVBRP INDEX SY-TABIX TRANSPORTING WERKS.
ENDLOOP.
FET_XVBPA_ACTUAL[] FET_XVBPA[].
 FET_YVBPA[] FET_XVBPA[].
 FET_YVBPA_ACTUAL[] FET_YVBPA[].

ENDIF.
ENDIF.
ENDENHANCEMENT.

CAT2 FM HELP_START Function Module Exit


function help_start.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module HELP_START, Start                                                                                                                 A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZWBS_F4_HELP_CAT2.    "active version

 IF SY-TCODE 'CAT2' AND HELP_INFOS-FIELDNAME 'RPROJ' AND HELP_INFOS-DYNPROFLD 'CATSD-RPROJ'
         AND HELP_INFOS-DYNPPROG 'SAPLCATS'AND HELP_INFOS-MENUFUNCT 'HC' .
      TYPESBEGIN OF TY_PA0000,
               PERNR TYPE PA0000-PERNR,
               ENDDA TYPE PA0000-ENDDA,
               BEGDA TYPE PA0000-BEGDA,
               STAT2 TYPE PA0000-STAT2,
             END OF TY_PA0000.
      DATA  GT_PA0000 TYPE TABLE OF TY_PA0000,
              GS_PA0000 TYPE TY_PA0000.

      TYPES BEGIN OF TY_EMP,
                OBJID    TYPE HRP1001-OBJID,
                VARYF    TYPE HRP1001-VARYF,
                BEGDA    TYPE HRP1001-BEGDA,
                ENDDA    TYPE HRP1001-ENDDA,
                SOBID    TYPE HRP1001-SOBID,
                PROZT    TYPE HRP1001-PROZT,
                DEL_FLAG,
              END OF TY_EMP.
      DATA :  GT_HRP1001 TYPE TABLE OF TY_EMP,
              GS_HRP1001 TYPE TY_EMP.

      TYPES BEGIN OF TY_FINAL,
                WBS        TYPE PRPS-POSID,
                WBS_NAME   TYPE PRPS-POST1,
              END OF TY_FINAL.
      DATA :  GT_FINAL TYPE TABLE OF TY_FINAL,
              GS_FINAL TYPE TY_FINAL.
      DATA W_RETURN TYPE  BAPIRETURN1.
      DATAP_RECORD TYPE P9011.
      DATA LV_SEQNR       TYPE PA9011-SEQNR,
             LV_CHECK_PERNR TYPE PA9011-PERNR.
      DATA LV_START_DATE TYPE SY-DATUM,
             LV_END_DATE   TYPE SY-DATUM.

      TYPESBEGIN OF TY_PA9011,
               PERNR     TYPE PA9011-PERNR,
               SUBTY     TYPE PA9011-SUBTY,
               OBJPS     TYPE PA9011-OBJPS,
               SPRPS     TYPE PA9011-SPRPS,
               ENDDA     TYPE PA9011-ENDDA,
               BEGDA     TYPE PA9011-BEGDA,
               SEQNR     TYPE PA9011-SEQNR,
               AEDTM     TYPE PA9011-AEDTM,
               UNAME     TYPE PA9011-UNAME,
               CLNT_CODE TYPE PA9011-CLNT_CODE,
               CLIENT    TYPE PA9011-CLIENT,
               TEAM_CODE TYPE PA9011-TEAM_CODE,
               TEAM      TYPE PA9011-TEAM,
               BILLABLE  TYPE PA9011-BILLABLE,
             END OF TY_PA9011.
      DATA GT_PA9011 TYPE TABLE OF TY_PA9011,
             GS_PA9011 TYPE PA9011.

      DATA LV_PSPHI TYPE PRPS-PSPHI.
      DATA LV_FNAME     TYPE CHAR40,
             LV_LNAME     TYPE CHAR40,
             LV_EMPNO     TYPE CHAR10,
             G_MESSAGE_V1 TYPE STRING,
             G_MESSAGE_V2 TYPE STRING,
             G_MESSAGE_V3 TYPE STRING,
             G_MESSAGE_V4 TYPE STRING.
DATAW_FIELD(40).
FIELD-SYMBOLS<FS_START_DATE>.

DATAW_PERNR(40).
FIELD-SYMBOLS<FS_PERNR>.

DATA LV_DATE TYPE CHAR10.
      TYPES BEGIN OF TY_EMP1,
                EMPLOYEE_NO   TYPE PA0001-PERNR,
                EMPLOYEE_NAME TYPE PA0001-ENAME,
              END OF TY_EMP1.
      DATA :  GT_FINAL1 TYPE TABLE OF TY_EMP1,
              GS_FINAL1 TYPE TY_EMP1.
      DATA LV_PROJ  TYPE PRPS-POSID.
      DATA GV_PRPS TYPE PRPS.
      DATA LV_INDEX TYPE VALUE 1.
TYPES T_RETURN_TAB  TYPE DDSHRETVAL.
DATAI_RETURN_TAB TYPE STANDARD TABLE OF T_RETURN_TAB,
      W_RETURN_TAB TYPE T_RETURN_TAB.
DATAI_DYNPFIELDS LIKE STANDARD TABLE OF DYNPREAD,
      W_DYNPFIELDS TYPE DYNPREAD.

    W_PERNR '(SAPLCATS)CATSFIELDS-PERNR'.
    ASSIGN (W_PERNR)  TO <FS_PERNR>.
    CONDENSE <FS_PERNR>.
      IF GT_PA0000[] IS INITIAL.
        SELECT
              PERNR
              ENDDA
              BEGDA
              STAT2
              FROM PA0000
              INTO TABLE GT_PA0000
              WHERE PERNR <FS_PERNR>
              AND STAT2 '3'.
      ENDIF.

      IF GT_PA0000[] IS NOT INITIAL.
        CLEAR GT_HRP1001[].
        SELECT
              OBJID
              VARYF
              BEGDA
              ENDDA
              SOBID
              PROZT
              FROM HRP1001
              INTO CORRESPONDING FIELDS OF TABLE GT_HRP1001
              FOR ALL ENTRIES IN GT_PA0000
              WHERE OBJID GT_PA0000-PERNR
              AND OTYPE 'P'
              AND SCLAS 'PJ' .
      ENDIF.
*    W_FIELD = '(SAPLCATS)CATSFIELDS-DATEFROM'.
*    ASSIGN (W_FIELD)  TO <FS_START_DATE>.
*    CONDENSE <FS_START_DATE>.
*          LV_DATE = <FS_START_DATE>.
    data gv_workdate type char10,
       mid3(3).
clear gv_workdate.
IMPORT gv_workdate TO gv_workdate FROM MEMORY ID mid3.
LV_DATE gv_workdate.
      LV_INDEX 1.
      IF GT_HRP1001[] IS NOT INITIAL.
        LOOP AT GT_HRP1001 INTO GS_HRP1001.
          IF LV_DATE BETWEEN GS_HRP1001-BEGDA AND GS_HRP1001-ENDDA.
            GS_HRP1001-DEL_FLAG ''.
          ELSE.
            GS_HRP1001-DEL_FLAG 'X'.
          ENDIF.
          MODIFY GT_HRP1001 FROM GS_HRP1001 INDEX LV_INDEX TRANSPORTING DEL_FLAG.
          CLEAR GS_HRP1001.
          LV_INDEX LV_INDEX + 1.
        ENDLOOP.
        DELETE GT_HRP1001 WHERE DEL_FLAG 'X'.
      ENDIF.
      IF GT_HRP1001[] IS NOT INITIAL.
        CLEAR GT_FINAL[].
        LOOP AT GT_HRP1001 INTO GS_HRP1001.
          CONCATENATE 'PR' GS_HRP1001-SOBID INTO GS_HRP1001-SOBID.
          CONDENSE GS_HRP1001-SOBID.

          CLEAR LV_PSPHI,LV_PROJ,GV_PRPS.
          DATA LV_PS_POSNR TYPE PRPS-PSPNR.
          SELECT SINGLE PSPNR POST1 FROM PRPS INTO LV_PS_POSNR,GS_FINAL-WBS_NAME WHERE OBJNR GS_HRP1001-SOBID.

          CALL FUNCTION 'CJDW_PRPS_SELECT_SINGLE'
            EXPORTING
              POSNR             LV_PS_POSNR
            IMPORTING
              E_PRPS            GV_PRPS
            EXCEPTIONS
              MISSING_PARAMETER 1
              NOT_FOUND         2
              OTHERS            3.

          GS_FINAL-WBS LV_PS_POSNR.

          CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
            EXPORTING
              INPUT  GS_FINAL-WBS
            IMPORTING
              OUTPUT GS_FINAL-WBS.
           APPEND GS_FINAL TO GT_FINAL.
          CLEAR GS_FINAL.
          LV_INDEX LV_INDEX + 1.
        ENDLOOP.
      ENDIF.
IF GT_FINAL[] IS NOT INITIAL.
  CLEAR I_RETURN_TAB[],I_DYNPFIELDS[].
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
       RETFIELD               'WBS'
       DYNPPROG               =  'SAPLCATS'
       DYNPNR                 =  '2200'
       DYNPROFIELD            'CATSD-RPROJ'
        WINDOW_TITLE           ' F4 HELP FOR WBS'
       VALUE_ORG              'S'
      TABLES
        VALUE_TAB              =   GT_FINAL
        RETURN_TAB  I_RETURN_TAB.
      IF SY-SUBRC AND LINESI_RETURN_TAB 1.
        READ TABLE I_RETURN_TAB INTO W_RETURN_TAB INDEX 1.
        SELECTION 'X'.
        SELECT_VALUE =  W_RETURN_TAB-FIELDVAL.
        EXIT.
      ENDIF.
ENDIF.
EXIT.
ENDIF.
**********************************

ENDENHANCEMENT.
*$*$-End:   (1)---------------------------------------------------------------------------------$*$*