0 Replies Latest reply: Jun 11, 2009 9:21 AM by exca last RSS

SAP Customer Exit Variable (0P_KEYD2,0P_KEYD3)

exca last
Currently Being Moderated

Hi Sap gurus, I activated 0FIAR_C03 and filled with data. but, I want to exclude some standard properties of the query. my query should based on just only documant date but the standard query uses some variables that calculates posting key date (0P_KEYD2) and clearing key date (0P_KEYD3).

 

I tried to solve this situation with loading posting date (0PSTNG_DATE) and clearing date (0CLEAR_DATE) with documant date but result is not true. I tried to debug RSVAREXIT_0P_KEYD2, RSVAREXIT_0P_KEYD3 function modules but I couldn't understand. what does this codes? eventhough I filled posting date and clearing date with documant date, can this code create different value from documant date?

 

FUNCTION RSVAREXIT_0P_KEYD2.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(I_VNAM) LIKE  RSZGLOBV-VNAM
*"     VALUE(I_VARTYP) LIKE  RSZGLOBV-VARTYP
*"     VALUE(I_IOBJNM) LIKE  RSZGLOBV-IOBJNM
*"     VALUE(I_S_COB_PRO) TYPE  RSD_S_COB_PRO
*"     VALUE(I_S_RKB1D) TYPE  RSR_S_RKB1D
*"     VALUE(I_S_RKB1F) TYPE  RRO01_S_RKB1F
*"     VALUE(I_THX_VAR) TYPE  RRO01_THX_VAR
*"     VALUE(I_STEP) TYPE  I DEFAULT 0
*"  EXPORTING
*"     VALUE(E_T_RANGE) TYPE  RSR_T_RANGESID
*"  EXCEPTIONS
*"      UNKNOWN_VARIABLE
*"      UNEXPECTED_VARTYPE
*"      VARIABLE_INITIAL
*"----------------------------------------------------------------------
  DATA:
      LS_RA_SID  TYPE   RSR_S_RANGESID,
      L_THX_VAR  TYPE   RRO01_SX_VAR.

  REFRESH E_T_RANGE.

  IF I_STEP EQ 0.                      " without popup set to sy-datum
     CLEAR: LS_RA_SID.
     LS_RA_SID-SIGN = 'I'.
     LS_RA_SID-OPT = 'EQ'.
     LS_RA_SID-LOW = SY-DATUM.
     APPEND LS_RA_SID TO E_T_RANGE.

  ELSEIF I_STEP EQ 1.                  " before popup appears
                                       " set to nothing so we get called
                                       " a second time after popup has
                                       " appeared

  ELSE.                                " after popup has appeared
                                       " same as variable 0P_KEYDT

   READ TABLE I_THX_VAR WITH TABLE KEY VNAM = '0P_KEYDT' INTO L_THX_VAR
.
    IF SY-SUBRC EQ 0.
      E_T_RANGE[] = L_THX_VAR-RANGE[].
    ENDIF.

  ENDIF.
ENDFUNCTION.

 

 

 

FUNCTION RSVAREXIT_0P_KEYD3.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(I_VNAM) LIKE  RSZGLOBV-VNAM
*"     VALUE(I_VARTYP) LIKE  RSZGLOBV-VARTYP
*"     VALUE(I_IOBJNM) LIKE  RSZGLOBV-IOBJNM
*"     VALUE(I_S_COB_PRO) TYPE  RSD_S_COB_PRO
*"     VALUE(I_S_RKB1D) TYPE  RSR_S_RKB1D
*"     VALUE(I_S_RKB1F) TYPE  RRO01_S_RKB1F
*"     VALUE(I_THX_VAR) TYPE  RRO01_THX_VAR
*"     VALUE(I_STEP) TYPE  I DEFAULT 0
*"  EXPORTING
*"     VALUE(E_T_RANGE) TYPE  RSR_T_RANGESID
*"  EXCEPTIONS
*"      UNKNOWN_VARIABLE
*"      UNEXPECTED_VARTYPE
*"      VARIABLE_INITIAL
*"----------------------------------------------------------------------
  DATA:
      LS_RA_SID  TYPE   RSR_S_RANGESID,
      L_THX_VAR  TYPE   RRO01_SX_VAR.

  REFRESH E_T_RANGE.

  IF I_STEP EQ 0.                      " without popup set to sy-datum
      CLEAR: LS_RA_SID.
      LS_RA_SID-SIGN = 'I'.
      LS_RA_SID-OPT = 'EQ'.
      LS_RA_SID-LOW = SY-DATUM.
      APPEND LS_RA_SID TO E_T_RANGE.

  ELSEIF I_STEP EQ 1.                  " before popup appears
                                       " set to nothing so we get called
                                       " a second time after popup has
                                       " appeared

    ELSE.                              " after popup has appeared
                                       " set to variable 0P_KEYDT
   READ TABLE I_THX_VAR WITH TABLE KEY VNAM = '0P_KEYDT' INTO L_THX_VAR
.
    IF SY-SUBRC EQ 0.
      E_T_RANGE[] = L_THX_VAR-RANGE[].
    ENDIF.

  ENDIF.
ENDFUNCTION.

 

Edited by: exca last on Jun 11, 2009 9:14 AM

 

Edited by: exca last on Jun 11, 2009 9:15 AM

Actions