2013 Oct 22 8:16 AM
Hi Experts,
Please have a look on to the below screen in purchase order creation.
When we give the condition type and click on the details button. The below screen will come.
I wanted to make the vendor mandatory while the user is creating purchase order. Now PO is getting created even without vendor number. How to achieve this?
2013 Oct 22 8:27 AM
hi,
Check for any Badi's , else you can create implicit enhancements & throw a message pop-up.
Thanks,
Sharath
2013 Oct 22 8:29 AM
Hi try,
SPRO - > Materials Management - > purchasing - purchase order -> define screen layout at document level.
Select me21n and click on details - > double click on Reference data, item and check vendor number as requires and go back to the screen layout and save it , tr will be generated.
Next time when you try to create po the vendor filed will be mandatory.
Regards,
Madhumahesh.
2013 Oct 22 8:32 AM
HI,
Check with function may we have possibility through config level. Because in my screen the Vendor field is not available.
Other wise go to include LV69AF02.
Create implicit enhancement in subroutine kbild_initialisieren.
check with below code.
loop at screen.
if screen-name = 'KOMV-LIFNR'.
screen-input = 1.
modify screen.
endif
endloop
Regards,
Rajesh.
2013 Oct 22 8:48 AM
You could try with BAdI ME_PROCESS_PIO_CUST, in method IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER you could add a code like
METHOD if_ex_me_process_po_cust~process_header .
INCLUDE mm_messages_mac.
DATA: ls_header TYPE mepoheader.
ls_header = im_header->get_data( ).
IF ls_header-lifnr IS INITIAL.
mmpur_metafield mmmfd_vendor.
mmpur_message_forced 'E' '06' 049 ' ' ' ' ' ' ' '.
im_header->invalidate( ).
EXIT.
ENDIF.
But did you first check available Customizing options ?
Regards,
Raymond
2013 Oct 22 11:40 AM
Hello Raymond,
Will the above code work for the details of the pricing condition type. (Since it is item).
BR
2013 Oct 22 12:27 PM
No, of course, you will be required to use another method like IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM, there use method IF_PURCHASE_ORDER_ITEM_MM~GET_CONDITIONS on IM_ITEM to get required data.
Regards,
Raymond
2013 Oct 22 2:02 PM
2013 Oct 22 8:49 AM