Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need user Exit for VF01 trxn

Former Member
0 Kudos
336

Hi All.

Need user exit for VF01 trxn, I need to validate item details

My validations like,

If billing type (VBRK-FKART) some value and (VBRP-WERKS) plant some value

then assign VBRP-KTGRM = some value.

endif.

When we double click on particular item, the validation should be taken place.

Is there any user exit to the same.

Thanks

Selva...

1 ACCEPTED SOLUTION

Former Member
0 Kudos
114

hi,

Check these exits..

Exit Name           Description

J_3RSINV
SDVFX001            User exit header line in delivery to accounting
SDVFX002            User exit for A/R line in transfer to accounting
SDVFX003            User exit cash clearing in transfer to accounting
SDVFX004            User exit G/L line in transfer to accounting
SDVFX005            User exit reserves in transfer to accounting
SDVFX006            User exit tax line in transfer to accounting
SDVFX007            User exit: Billing plan during transfer to Accounting
SDVFX008            User exit: Processing of transfer structures SD-FI
SDVFX009            Billing doc. processing KIDONO (payment reference number)
SDVFX010            User exit item table for the customer lines
SDVFX011            Userexit for the komkcv- and kompcv-structures
V05I0001            User exits for billing index
V05N0001            User Exits for Printing Billing Docs. using POR Procedure
V60A0001            Customer functions in the billing document
V60P0001            Data provision for additional fields for display in lists
V61A0001            Customer enhancement: Pricing

4 REPLIES 4

Former Member
0 Kudos
115

hi,

Check these exits..

Exit Name           Description

J_3RSINV
SDVFX001            User exit header line in delivery to accounting
SDVFX002            User exit for A/R line in transfer to accounting
SDVFX003            User exit cash clearing in transfer to accounting
SDVFX004            User exit G/L line in transfer to accounting
SDVFX005            User exit reserves in transfer to accounting
SDVFX006            User exit tax line in transfer to accounting
SDVFX007            User exit: Billing plan during transfer to Accounting
SDVFX008            User exit: Processing of transfer structures SD-FI
SDVFX009            Billing doc. processing KIDONO (payment reference number)
SDVFX010            User exit item table for the customer lines
SDVFX011            Userexit for the komkcv- and kompcv-structures
V05I0001            User exits for billing index
V05N0001            User Exits for Printing Billing Docs. using POR Procedure
V60A0001            Customer functions in the billing document
V60P0001            Data provision for additional fields for display in lists
V61A0001            Customer enhancement: Pricing

Former Member
0 Kudos
114

use the below code to findout exits based on T code.

REPORT Z_USER_EXIT NO STANDARD PAGE HEADING line-size 150.
 
TABLES : TSTC, TADIR,
TRDIR, TFDIR, ENLFDIR.
TABLES : TSTCT.
 
TYPES: BEGIN OF T_INC,
NAME(72),
END OF T_INC.
 
TYPES: BEGIN OF T_TADIR,
PGMID LIKE TADIR-PGMID, "Program ID in Requests and Tasks
OBJECT LIKE TADIR-OBJECT, "Object Name in Object Directory
OBJ_NAME LIKE TADIR-OBJ_NAME, "Object Name in Object Directory
END OF T_TADIR.
 
TYPE-POOLS:ICON.
 
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA: VALUE1(100).
 
DATA: PNAME LIKE TFDIR-PNAME,
TYPE(6),
INCLUDE LIKE TFDIR-INCLUDE,
T TYPE T_INC OCCURS 0 WITH HEADER LINE,
IC TYPE ICON_D,
V_DEVCLASS LIKE TADIR-DEVCLASS,
V_TEXT(60) TYPE C.
.
 
PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.
TYPES: BEGIN OF T_MOD,
NAME LIKE MODSAPT-NAME,
MODTEXT LIKE MODSAPT-MODTEXT,
TYP LIKE MODSAP-TYP,
MEMBER LIKE MODSAP-MEMBER,
END OF T_MOD.
DATA: I_MOD TYPE T_MOD OCCURS 0 WITH HEADER LINE,
I_BADI TYPE STANDARD TABLE OF T_TADIR WITH HEADER LINE ,
I_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
WA_BDCDATA TYPE BDCDATA.
 
 
*&---------------------------------------------------------------
 
START-OF-SELECTION.
 
  SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
 
  IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
 
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
 
    IF SY-SUBRC NE 0.
 
      SELECT SINGLE * FROM TRDIR WHERE NAME = TSTC-PGMNA.
 
      IF TRDIR-SUBC EQ 'F'.
* Function Module name
        SELECT SINGLE * FROM TFDIR WHERE PNAME = TSTC-PGMNA.
 
* Additional Attributes for Function Modules
        SELECT SINGLE * FROM ENLFDIR
          WHERE FUNCNAME = TFDIR-FUNCNAME.
 
* Directory of Repository Objects
        SELECT SINGLE * FROM TADIR WHERE PGMID = 'R3TR'
        AND OBJECT = 'FUGR'
        AND OBJ_NAME EQ ENLFDIR-AREA.
 
* Get development class of the object
        MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
      ENDIF.
    ENDIF.
 
* Get the SAP enhancements of the development class of the object
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'SMOD'
    AND DEVCLASS = V_DEVCLASS.
* Get Transaction Code Texts.
    SELECT SINGLE * FROM TSTCT WHERE SPRSL EQ SY-LANGU AND
    TCODE EQ P_TCODE.
 
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
      LOOP AT JTAB.
* Getting the components of a exit.
 
        SELECT A~NAME A~MODTEXT B~TYP B~MEMBER
        INTO CORRESPONDING FIELDS OF TABLE I_MOD
        FROM MODSAPT AS A
        INNER JOIN MODSAP AS B ON B~NAME = A~NAME
        WHERE A~SPRSL = SY-LANGU
        AND A~NAME = JTAB-OBJ_NAME
        AND B~TYP  ''.
        LOOP AT I_MOD.
          AT NEW MODTEXT.
            FORMAT COLOR COL_GROUP INTENSIFIED OFF.
            WRITE:/(150) SY-ULINE.
            WRITE:/1 SY-VLINE,
            2 JTAB-OBJ_NAME HOTSPOT ON,
            21 SY-VLINE ,
            22 I_MOD-MODTEXT,
            92 SY-VLINE,
            /1 SY-ULINE(150).
          ENDAT.
          CLEAR:PNAME,INCLUDE.
* Deriving the include name inorder to chech whether the exit is *
*implemented or not
 
          SELECT PNAME INCLUDE INTO
          (PNAME ,INCLUDE)
          FROM TFDIR
          WHERE FUNCNAME = I_MOD-MEMBER.
          endselect.
          PNAME = PNAME+3(37).
          CONCATENATE PNAME 'U' INCLUDE INTO PNAME.
* Reads the function module
          READ REPORT PNAME INTO T.
 
          LOOP AT T WHERE NAME CS 'include'.
            CLEAR:PNAME,field1.
            SHIFT T-NAME LEFT DELETING LEADING SPACE.
            SPLIT T-NAME AT ' ' INTO field1 PNAME.
            SHIFT PNAME RIGHT DELETING TRAILING ''.
            SHIFT PNAME RIGHT DELETING TRAILING '.'.
            SHIFT PNAME LEFT DELETING LEADING SPACE.
 
          ENDLOOP.
 
          FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
* read the include file
          READ REPORT PNAME INTO T.
          IF SY-SUBRC = 0.
            IC = ICON_OKAY.
          ELSE.
            IC = ''.
          ENDIF.
* For Exit Types
          IF I_MOD-TYP = 'E'.
            TYPE = 'Func.'.
          ELSEIF I_MOD-TYP = 'S'.
            TYPE = 'Screen'.
          ELSEIF I_MOD-TYP = 'C'.
            TYPE = 'Menu'.
          ENDIF.
          WRITE: /92 SY-VLINE,
          93 IC,
          98 SY-VLINE,
          99 TYPE,
          106 SY-VLINE,
          107 I_MOD-MEMBER HOTSPOT ON,
          150 SY-VLINE.
          CLEAR:PNAME,IC,field1,TYPE.
        ENDLOOP.
 
      ENDLOOP.
      WRITE:/(150) SY-ULINE.
      DESCRIBE TABLE JTAB.
      SKIP.
      FORMAT COLOR COL_TOTAL INTENSIFIED ON.
      WRITE:/ 'No of Exits:' , SY-TFILL.
    ELSE.
      FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
      WRITE:/(95) 'No User Exit exists'.
    ENDIF.
 
*For Badi's..
* Select BADI entries
    SELECT PGMID
    OBJECT
    OBJ_NAME
    FROM TADIR
    INTO CORRESPONDING FIELDS OF TABLE I_BADI
    WHERE ( PGMID = 'R3TR' ) AND
    ( OBJECT = 'SXSD' ) AND
    ( DEVCLASS = V_DEVCLASS ).
 
 
* Write BADI detail header
    data:v_count type i.
    DESCRIBE TABLE I_BADI LINES V_COUNT.
    IF V_COUNT > 0.
 
      WRITE: /(95) SY-ULINE.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      WRITE: /1 SY-VLINE,
      2 'BADI',
      31 SY-VLINE,
      32 'Description',
      95 sy-vline.
      WRITE: /(95) SY-ULINE.
* Write BADI results
      LOOP AT I_BADI.
        CLEAR V_TEXT.
        SELECT SINGLE TEXT
        FROM SXS_ATTRT
        INTO V_TEXT
        WHERE ( SPRSL = SY-LANGU ) AND
        ( EXIT_NAME = I_BADI-OBJ_NAME ).
 
        FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
        WRITE: /1 SY-VLINE,
        2 I_BADI-OBJ_NAME HOTSPOT ON,
        31 SY-VLINE,
        32 V_TEXT,
        95 SY-VLINE.
      ENDLOOP.
 
      FORMAT COLOR COL_TOTAL INTENSIFIED ON.
      WRITE: /(95) SY-ULINE.
      WRITE: /1 SY-VLINE,
      2 'Total BADI''s:',
      31 SY-VLINE,
      32 V_COUNT,
      95 SY-VLINE.
      WRITE: /(95) SY-ULINE.
 
    ELSE.
      WRITE: /(95) 'No BADI''s exist.'.
    ENDIF.
 
 
 
 
  ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95) 'Transaction Code Does Not Exist'.
  ENDIF.
 
AT LINE-SELECTION.
  GET CURSOR FIELD FIELD1 VALUE VALUE1.
  IF FIELD1(4) EQ 'JTAB'.
* Jump to transaction SMOD
 
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
  ELSEIF FIELD1(5) EQ 'I_MOD'.
* Viewing the function
    SUBMIT WB_MNGR_START_FROM_TOOL_ACCESS AND RETURN
    WITH ACTION = 'DISPLAY'
* WITH OBJDATA = p_object_data
    WITH OBJ_TYPE = 'FF'
    WITH OBJ_NAME = VALUE1
    WITH ENCL_OBJ = ''
    WITH POSITION = ''
    WITH INCLUDE = ''
    WITH VERSION = ''
    WITH TOOL = 'CL_FUNCTION_BUILDER'
    WITH NEWWNDOW = ''
    WITH OBJLIST = ''.
* Direct BADI to transaction SE18
 
  ELSEIF FIELD1(6) EQ 'I_BADI'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(29).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
  ENDIF.
 
 
TOP-OF-PAGE.
 
  WRITE:/(150) SY-ULINE.
  FORMAT COLOR COL_HEADING INTENSIFIED ON.
  WRITE:/1 SY-VLINE,
  2 'Exit Name',
  21 SY-VLINE ,
  22 'Description',
  92 SY-VLINE,
  93 'Imp.',
  98 SY-VLINE,
  99 'Type',
  106 SY-VLINE,
  107 'Function Name',
  150 SY-VLINE,
  /1 SY-ULINE.

~Satya

saranwin
Contributor
0 Kudos
114

Hey,

Use Function Module : EXIT_SAPLV60B_011 to validate the line item values.

Regards,

Saravanan M

Former Member
0 Kudos
114

Hi,

In SE38, search for program RV60AFZ*. These are the user-exits for billing. Put breakpoint in any of the forms that you may find suitable for your requirement, RV60AFZC is used for filling VBRK and VBRP. It is working in our system.

Hope this helps.

Regards,

nEnE