08-08-2007 8:16 AM
I am new with user exit , I come to that point where the change is required
but how to proceed , to do the further required process
Desired Functionality is as follows:
Create sales order user exit logic to populate the Special processing indicator field on the sales order line item depending on values on the Customer Master and on the custom pre-ticket table (ZCMPF).Access the customer master for the sold-to partner.
If KNA1-KATR1 = 1A (pre-ticket all), populate the VBKD-SDABW field with the value of PRET pre-ticketing). This value should copy into all line-items as well.
If KNA1-KATR1 = 1B (pre-ticket specified materials), use the sold-to customer with the material ID for each line item to access the ZCMPF table. If a record exists for the customer/material combination, and if the Pre-ticket indicator is not blank, populate the VBKD-SDABW field for the line-item with the value of PRET.
08-08-2007 8:23 AM
hello chakrapani..
its nice qus u been asked but as much as i knw u shud use this user exit MV45AFZZ
but m not sure it may solve ur problem it may not be..
but be carefully write ur own code it it.
reward if helpfull.
amit
08-08-2007 8:25 AM
Hi,
u can write the logic in the include MV45AFZZ..Inside the include write the code in the FORM "USEREXIT_MOVE_FIELD_TO_VBKD".
Regards,
nagaraj
08-08-2007 8:27 AM
Hi,
Check out this documentation.....
http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
Under user exits>user exits in sales>user exits in sales document processing
Have a look at the following exits
For Header fields: Modify user exit in include MV45AFZZ(USEREXIT_MOVE_FIELD_TO_VBAK) to populate the new fields.
For Item level fields: Modify user exit in include MV45AFZZ(USEREXIT_MOVE_FIELD_TO_VBAP) to populate the new fields.
USEREXIT_SAVE_DOCUMENT_PREPARE
Regards
08-08-2007 8:31 AM
&----
*& Report ZUSEREXIT *
*& *
&----
*& *
*& *
&----
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.
DON'T FORGET TO REWARD
08-08-2007 9:39 AM
Hi,
For the below stated requirement , first you need to find the correct user exit. This can be provided by the functional team , if not then you need to find it.
You can try using these exits :
Exit Name
SDAPO001
SDTRM001
V45A0001
V45A0002
V45A0003
V45A0004
V45E0001
V45E0002
V45L0001
V45P0001
V45S0001
V45S0003
V45S0004
V45W0001
V46H0001
V60F0001
By putting a break point on the exit you can check that which exits are being triggered at the required point. Then you can write in the piece of code that suits your requirement.
Hope that helps.
If you have any issues mail me at harmeet.delhi@gmail.com
REWARD POINTS IF USEFUL.
Harmeet Singh.