2012 May 25 9:50 AM
Dear all
I need to control the document date in me21n ,what is the user-exit to control the document date when creating PO.
Thanks
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod Kumar
2012 May 25 10:10 AM
Hi Karthik,
All the exits related to PO are available in function group XM06:
for PO created date:
EXIT_SAPMM06E_017 include ZXM06U42
With regards,
Dear all
I need to control the document date in me21n ,what is the user-exit to control the document date when creating PO.
Thanks
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod Kumar
2012 May 25 9:57 AM
What do you mean by Document date ? Is it the creation date of Purchase order ? Why do want to alter the PO creation creation date ?
Thanks,
Anjan .
2012 May 25 10:08 AM
Thanks for ur reply anjaneya
when placing PO , user used to change doc date to previous period , so need to put the control in that , user can put the date that should be belongs to current months date for example sytem date is may25 user can give the doc.date from may01 to may25 , other wise system should show the error.how to acheive this
2012 May 25 11:13 AM
Hi Karthik,
If the EXIT_SAPMM06E_017 is maintained in the project created in CMOD and if it is active on change of Document date this EXIT will be called.
You can also check with other EXITS in XM06
Logic for your requirement:
REPORT ZTEST_IT.
PARAMETERS:DATE TYPE SY-DATUM.
DATA:LV_MONTH(6) TYPE N,
LV_MONTH_D(6) TYPE N,
LV_DATE(2) TYPE N,
LV_DATE_D(2) TYPE N.
LV_MONTH = SY-DATUM(6).
LV_MONTH_D = DATE(6).
LV_DATE = SY-DATUM+6(2).
LV_DATE_D = DATE+6(2).
IF LV_MONTH = LV_MONTH_D.
IF LV_DATE_D >= 1 AND LV_DATE_D <= LV_DATE.
WRITE:'With in range'.
ELSE.
WRITE:'Out of range'.
ENDIF.
ELSE.
WRITE:'Out of range'.
ENDIF.
In the user -exit include program replace the parameters date ( in the above test program ) with I_EKKO-BEDAT and put the conditon only for ME21N or ME21 like below:
IF SY-TCODE EQ 'ME21N' OR SY-TCODE EQ 'ME21'.
endif.
With regards,
2012 May 25 10:10 AM
Hi Karthik,
All the exits related to PO are available in function group XM06:
for PO created date:
EXIT_SAPMM06E_017 include ZXM06U42
With regards,
2012 May 25 10:15 AM
2012 May 25 10:38 AM
Hi,
Have you created the user-exit inside a project and activated it ?If not please do it and check.
With regards,
2012 May 25 10:19 AM
Hi Karthik,
user exit (SMOD)
MM06E005 Customer fields in purchasing document
BADI (SE18)
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order:
Please reward points if helpful.
With Regards,
Sudhir S
2012 May 25 11:31 AM
DEAR ALL ,
Thanks for ur all reply , i got the sol thro MM06E005 EXIT_SAPMM06E_012 , i have another doubt ,enhancement MM06E005 have 10 function exit , is ther any option to use remaining exits in new cmod project
2012 May 25 12:20 PM
hi Karthik,
All the exits of a single enhancement can be assigned to only one project.
Several exits are combined into one Enhancement , that will be assigned
to a single project.
Regards...
Sultana
2012 May 25 11:50 AM
ME_PROCESS_PO can't be used by customers.
Use BADI ME_PROCESS_PO_CUST and PROCESS_HEADER and put the below code .
data: ls_mepoheader type mepoheader.
ls_mepoheader = im_header->get_data( ).
ls_mepoheader-AEDAT = sy-datum - 8 . @ Here u put the dates wyou want And it will also lead to a warning that DOC date is in past .
CALL METHOD im_header->set_data
EXPORTING
im_data = ls_mepoheader
.
It should work
Thanks,
Anjan . .
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |