on 2012 Jan 05 7:03 AM
Dear All,
Working for SRM component "/SAPSRM/WDC_DODC_RFQ_H_BD" there is field "OPEN_DATE_TIME" which i need to make it mandatory .
There is standard config to do the same but its not happening through that is there any way I could do the same.
I have also tried to enhanced the application and made it mandatory in MODIFYVEW method and given the error message also but it allowed the RFx to get publised even tough the date is not entered.
Really appreciate the same if anyone has come across such requirement.
Thanks
Ankit Jain
Request clarification before answering.
Hi,
For display the field as mandatory you can add a new entry in the following path in SPRO:
SAP Supplier Relationship Management --> SRM Server --> Cross-Application Basic Settings --> Extensions and Field Control (Personalization) --> Configure Field Control --> Configure Control for Fields on Header Level --> Metadata for Fields on Document Headers
Add a new entry with:
Field: OPEN_TIME_DATE
Bus: BUS2200
And check the checkboxes; Visible, Enabled and Requiered.
But, with this you only display the field as mandatory. For add a message of error you need to implement the badi BBP_DOC_CHECK_BADI for the filter BUS2200.
Regards,
Ricardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my system works fine, I've added the following code in badi BBP_DOC_CHECK_BADI and I can't publish my RFX without filling that field...
DATA: ls_bid_header TYPE bbp_pds_bid_header_d,
ls_messages TYPE LINE OF bbp_tmessages_badi.
IF flt_val EQ 'BUS2200'.
CALL FUNCTION 'BBP_PD_BID_GETDETAIL'
EXPORTING
i_guid = iv_doc_guid
IMPORTING
e_header = ls_bid_header.
IF ls_bid_header-open_time IS INITIAL.
CLEAR ls_messages.
ls_messages-msgty = 'E'.
ls_messages-msgid = 'ZYOUR_MESSAGE_CLASS'.
ls_messages-msgno = 000.
APPEND ls_messages TO et_messages.
ENDIF.
ENDIF.
Thanks for the updates
Yeah I agree this wont allow to publish the RFx . BAPI will written the data which is saved in the database . And here when we will give error this will stop us to publish the RFx.
But the thing is if User has enter the data at run time and we could read this data MODIFYVIEW at this point when we read data we wont get current data in the BADI. So we wont be able to track the same.
We will give error message in a MODIFYVIEW this will allow us publish just try publishing from some other TAB except the header tab . Want functionality same as SUBMISSION DEADLINE just above this field.
Thanks & Regards,
Ankit
I think BAPI retrieve the data from buffer (that means runtime data) if you call the function module with the guid. If you use the object_id I think retrieve the data from data base. If you use it within these BADIs...
In my system if I change some data i got the runtime data in my "check badi"...
try and tell us.
Hello,
Please let me know coding that you have done in MODIFYVEW.
Or try to use below one.
data: lr_input_field type ref to cl_wd_input_field.
lr_input_field ?= view->get_element( 'OPEN_TIME_DATE' ).
lr_input_field->set_state( cl_wd_input_field=>e_state-required ).
endif.
Thanks,
Neelima
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.