Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Po date in me21n

Former Member
0 Kudos

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

5 REPLIES 5

former_member181995
Active Contributor
0 Kudos

Yes this can be done in BADI:ME_PROCESS_PO_CUST

Method:PROCESS_HEADER

0 Kudos

dear amit,

i create BADI. for that. but how to valdate means which structure is having date no idea.

can you please explain.

0 Kudos

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.

former_member181995
Active Contributor
0 Kudos

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.

0 Kudos

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