09-10-2008 5:20 AM
here i am able to give any doc date while creating Purchase order.
buy requirement is date should be today's date or before todays date. it should never be greater than todays date.
any idea how to get it done??
regards
chandramani
09-10-2008 5:27 AM
Yes this can be done in BADI:ME_PROCESS_PO_CUST
Method:PROCESS_HEADER
09-10-2008 5:48 AM
dear amit,
i create BADI. for that. but how to valdate means which structure is having date no idea.
can you please explain.
09-10-2008 6:11 AM
in the method PROCESS_HEADER you can see the parameter IM_HEADER,
you can use the parameter and read the header information using the method GET_DATA
header = im_header->get_data.
now header will have the information you want , if you want to change that use the method SET_DATA of the im_header parameter.
09-10-2008 6:39 AM
Ck,
See this sampla code which i used once:
METHOD if_ex_me_process_po_cust~process_header .
DATA : he_data TYPE mepoheader.
CALL METHOD im_header->get_data
RECEIVING
he_data = he_data.
he_header = he_data.
IF ( he_data-bsart NE 'SER' AND re_data-bsart NE 'POL' ).
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use
ENDIF.
ENDMETHOD.
09-12-2008 6:07 AM
hi amit,
i did like this
METHOD if_ex_me_process_po_cust~process_header .
DATA : he_data TYPE mepoheader.
CALL METHOD im_header->get_data
RECEIVING
he_data = he_data.
he_header = he_data.
IF he_data-bedat < sy-datum.
error message.
ENDIF.
ENDMETHOD.
but its giving error.
i don know more about class.
can you help