Application Development and Automation 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: 
Read only

User Exit

Former Member
0 Likes
871

Hi,

My requirement is to make PAN number as mandatory while creating vendor.

In XK01 PAN field was not there. After making settings in SPRO one extra tab 'CIN Detail' came inside xk01 and inside that PAN number is there. Through SPRO settings i cannot make this field as mandatory. So using user exit i have to write validations. I dont know which user exit i have to use. Can you please help me to find out the user exit. Please.. this is very urgent.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Hi Hima.

Please check the following exit

EXIT_SAPMF02K_001

Vendors: User Exit for Checks prior to saving

Find out which table your fields for the PAN has been added to ..by clicking on the technical details on the screen....

Once it is identified and if the table is present in the (importing/tables/changing) parameters of the exit..you can write the code and block the "SAVE" operation until the user fills the field by giving messages on the screen..

Also look out for the BADI documentation for VENDOR_ADD_DATA in se18

Regards

Byju

7 REPLIES 7
Read only

Former Member
0 Likes
816

Hi,

RFKRRANZ User exits: Accounts Payable Information System

SAPMF02K User exits: Vendor master data

http://help.sap.com/saphelp_470/helpdata/en/5b/d233f543c611d182b30000e829fbfe/frameset.htm

Regards,

V.Balaji

Reward if Usefull...

Read only

abapdeveloper20
Contributor
0 Likes
816

Hi hima,

Check this program . It will give you o/p as list of userexits asscociated with ANY TRANSACTION given as input..

REPORT ZUSEREXIT NO STANDARD PAGE HEADING.
.
*report zuserexit no standard page heading.
TABLES : TSTC, TADIR, MODSAPT, MODACT, TRDIR, TFDIR, ENLFDIR.
         TABLES : TSTCT.

DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.

PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.

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'.
            SELECT SINGLE * FROM TFDIR WHERE PNAME = TSTC-PGMNA.
            SELECT SINGLE * FROM ENLFDIR WHERE FUNCNAME =
            TFDIR-FUNCNAME.
            SELECT SINGLE * FROM TADIR WHERE PGMID = 'R3TR'
                               AND OBJECT = 'FUGR'
                               AND OBJ_NAME EQ ENLFDIR-AREA.

            MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
          ENDIF.
       ENDIF.
       SELECT * FROM TADIR INTO TABLE JTAB
                     WHERE PGMID = 'R3TR'
                       AND OBJECT = 'SMOD'
                       AND DEVCLASS = V_DEVCLASS.
        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.
           WRITE:/(95) SY-ULINE.
           FORMAT COLOR COL_HEADING INTENSIFIED ON.
           WRITE:/1 SY-VLINE,
                  2 'Exit Name',
                 21 SY-VLINE ,
                 22 'Description',
                 95 SY-VLINE.
           WRITE:/(95) SY-ULINE.
           LOOP AT JTAB.
              SELECT SINGLE * FROM MODSAPT
                     WHERE SPRSL = SY-LANGU AND
                            NAME = JTAB-OBJ_NAME.
                   FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
                   WRITE:/1 SY-VLINE,
                          2 JTAB-OBJ_NAME HOTSPOT ON,
                         21 SY-VLINE ,
                         22 MODSAPT-MODTEXT,
                         95 SY-VLINE.
           ENDLOOP.
           WRITE:/(95) 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.
      ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.

AT LINE-SELECTION.
   GET CURSOR FIELD FIELD1.
   CHECK FIELD1(4) EQ 'JTAB'.
   SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
   CALL TRANSACTION 'SMOD' AND SKIP FIRST   SCREEN.

*---End of Program

Reward if useful

~Lakshmiraj~

Read only

Former Member
0 Likes
817

Hi Hima.

Please check the following exit

EXIT_SAPMF02K_001

Vendors: User Exit for Checks prior to saving

Find out which table your fields for the PAN has been added to ..by clicking on the technical details on the screen....

Once it is identified and if the table is present in the (importing/tables/changing) parameters of the exit..you can write the code and block the "SAVE" operation until the user fills the field by giving messages on the screen..

Also look out for the BADI documentation for VENDOR_ADD_DATA in se18

Regards

Byju

Read only

0 Likes
816

Hi Byju,

I dont know how to use BADI. Can you please help me to find out for that.

Read only

0 Likes
816

Hi Hima,

For the PAN field you have created...press F1 -> click on technical properties and let me know which table the field is stored in ........

Also try the exit solution suggested....Please close one of the post so that i can help you better...

regards

Byju

Read only

Former Member
0 Likes
816

u will try using field exit..

Regards

Sugumar G

Read only

Former Member
0 Likes
816

Hi,

Can you tell me which user exit did you use to make PAN No field mandatory.

RFKRRANZ User exits

SAPMF02K User exits

BADI's : VENDOR_ADD_DATA_CS, VENDOR_ADD_DATA

These exits dont have CIN details (PAN No) fields as an interface.

I want to make PAN No field mandatory in some cases, so need to write the code but can not find right BADI, Exit.

Please reply if you have a solution.

Thanks in advance!!!