2006 Aug 10 10:30 AM
Hi Friends,
Is there any way to make CIN details Mandatory while entering new vendor or while modifying existing vendor.
Please suggest..
Pankaj
2006 Aug 10 10:57 AM
Yes it is possible. You have to use function exit.
SMOD Project: SAPMF02K.
Exit: EXIT_SAPMF02K_001.
You can raise an error message if CIN details are empty.
I have implemented this exit for a company where vendors were within india, so if you have the same situation you can make use of the code given below-
DATA : L_LIFNR TYPE J_1IMOVEND-LIFNR.
FIELD-SYMBOLS : <FS> TYPE J_1IMOVEND.
FIELD-SYMBOLS : <FS1> TYPE T020.
TABLES : J_1IMOVEND.
DATA : L_FIELD TYPE STRING VALUE '(SAPLJ1I_MASTER)J_1IMOVEND'.
DATA : L_FIELD1 TYPE STRING VALUE '(SAPMF02K)T020'.
IF I_LFA1-KTOKK EQ 'ZM02' OR I_LFA1-KTOKK EQ 'ZM03'.
ASSIGN (L_FIELD1) TO <FS1>.
IF SY-SUBRC EQ 0.
IF SY-TCODE EQ 'XK01' OR SY-TCODE EQ 'FK01' OR SY-TCODE EQ 'FK03'
OR SY-TCODE EQ 'XK02' OR SY-TCODE EQ 'FK02' OR SY-TCODE EQ 'XK03'.
IF <FS1>-AKTYP EQ 'H' OR <FS1>-AKTYP EQ 'V'.
ASSIGN (L_FIELD) TO <FS>.
IF SY-SUBRC EQ 0.
SELECT SINGLE LIFNR INTO L_LIFNR
FROM J_1IMOVEND WHERE LIFNR EQ I_LFA1-LIFNR.
*
IF SY-SUBRC NE 0.
IF <FS>-J_1ICSTNO IS INITIAL OR <FS>-J_1ILSTNO IS INITIAL
OR <FS>-J_1IEXCD IS INITIAL OR <FS>-J_1IEXRN IS INITIAL
OR <FS>-J_1IPANNO IS INITIAL.
MESSAGE E398(00) WITH 'Please Enter' 'CIN Details'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Hi Friends,
Is there any way to make CIN details Mandatory while entering new vendor or while modifying existing vendor.
Please suggest..
Pankaj
2006 Aug 10 10:57 AM
Yes it is possible. You have to use function exit.
SMOD Project: SAPMF02K.
Exit: EXIT_SAPMF02K_001.
You can raise an error message if CIN details are empty.
I have implemented this exit for a company where vendors were within india, so if you have the same situation you can make use of the code given below-
DATA : L_LIFNR TYPE J_1IMOVEND-LIFNR.
FIELD-SYMBOLS : <FS> TYPE J_1IMOVEND.
FIELD-SYMBOLS : <FS1> TYPE T020.
TABLES : J_1IMOVEND.
DATA : L_FIELD TYPE STRING VALUE '(SAPLJ1I_MASTER)J_1IMOVEND'.
DATA : L_FIELD1 TYPE STRING VALUE '(SAPMF02K)T020'.
IF I_LFA1-KTOKK EQ 'ZM02' OR I_LFA1-KTOKK EQ 'ZM03'.
ASSIGN (L_FIELD1) TO <FS1>.
IF SY-SUBRC EQ 0.
IF SY-TCODE EQ 'XK01' OR SY-TCODE EQ 'FK01' OR SY-TCODE EQ 'FK03'
OR SY-TCODE EQ 'XK02' OR SY-TCODE EQ 'FK02' OR SY-TCODE EQ 'XK03'.
IF <FS1>-AKTYP EQ 'H' OR <FS1>-AKTYP EQ 'V'.
ASSIGN (L_FIELD) TO <FS>.
IF SY-SUBRC EQ 0.
SELECT SINGLE LIFNR INTO L_LIFNR
FROM J_1IMOVEND WHERE LIFNR EQ I_LFA1-LIFNR.
*
IF SY-SUBRC NE 0.
IF <FS>-J_1ICSTNO IS INITIAL OR <FS>-J_1ILSTNO IS INITIAL
OR <FS>-J_1IEXCD IS INITIAL OR <FS>-J_1IEXRN IS INITIAL
OR <FS>-J_1IPANNO IS INITIAL.
MESSAGE E398(00) WITH 'Please Enter' 'CIN Details'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
2006 Aug 12 5:29 AM
Hi Sharath,
Greate solution.
Thanks a lot , My problem is solved with solution given by you
Pankaj
2008 Oct 28 7:06 PM
Hello Sharath, Have you ever comeacross sending the CIN details via IDOC. I dont see any segments for J_1IMOVEND. I guess we have to do custom coding to send this segment via CREMAS.
Incase if you have done any ALE/IDOC work related to CIN details please let me know.
2013 Oct 17 1:29 PM
2015 Apr 23 11:33 AM
Hello,
Kindly tell me how to make field mandatory CIN details in Customer Master Data transaction code is FD01.. To know more detail please see screenshot.
Thank u, Yograj