cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Userexit for Tocde MSC1N

Former Member
0 Kudos

Hi,

I'm working on one object where the requirement is that every time a batch is created in a certain plant the system has to classify it automatically by inserting certain values in the classification view.

The information required is:

- Batch Standard (for Pigments) from MARA-FERTH into QM_00002(Characteristics Name)

- Plant (in which batch was created) from the material document (MSEG-WERKS) or batch master (MCHA-WERKS) by which the batch was created into QM_000003

- Valuation type(if material is split valuated) from MSEG-BWART or MCHA-BWTAR into LOBM_BWTAR

EXIT_SAPLV01Z_012 to be used to classify user-defined characteristics in the background when creating a new batch using the central function module VB_CREATE_BATCH during activated batch classification.

And EXIT_SAPLV01Z_014 (SAPLV1ZN )for inserting the characteristics in Classification View.

But in the debug mode for MSC1N the EXIT_SAPLV01Z_014 is not applicable for the same Transaction.

Can any1 help me out to proceed with this.

Thanks in Advance.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

i am working on user exit SAPLV1ZN. As u said it is not triggering in debugging mode. Hope u might have solved this issue. Please help me how u approached in this regard.Its very urgent to me.If possible just paste your code also for reference..u can mail directly to my office id pavan.k.kumar@accenture.com

Earlier response will be so useful for me...

Thanks in advance

Regards

Pavan

Former Member
0 Kudos

"But in the debug mode for MSC1N the EXIT_SAPLV01Z_014 is not applicable for the same Transaction"

May I know what you mean here.is not get triggering in the debug mode?

Former Member
0 Kudos

Hi all i am working on EXIT_SAPLV01Z_014 this exit

for t code msc1n.But i am unable to trigger this in debugging mode can anyone help in this regard

Former Member
0 Kudos

Hi,

Try putting BREAK-POINT. in your user exit...

If this doesn't work, make sure your CMOD project is activated and all that.

If that doesn't work, then read the documentation of

1) the SMOD project itself (try SPRO->IMG Reference)

2) the component (ie function module documentation)

to make sure that the user exit gets called as you think.

Cheers,

Phil

Former Member
0 Kudos

Hi,

Execute this code to find the Userexit for your txn:


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


Former Member
0 Kudos

these are the user exits for Tocde MSC1N

BATCHCHK - Function Module Exits for Check in Case of Batch Changes

MBCFC010- Propose batch number on Inventory Management item

SAPLCHVW- Batch where-used list

SAPLMHD1-Shelf life expiration date

SAPLV01D-Determining the initial status of a batch

SAPLV01P-Function Module Exits at Time Batches Are Updated

SAPLV01Z-CFCs for internal batch number assignment

SAPLV1ZE-CFCs for external batch number assignment

SAPLV1ZN-CFCs for batch valuation in VB_CREATE_BATCH

this may be useful in someway.

reward if useful

Message was edited by: Ashok Kumar Prithiviraj