2012 Dec 27 11:48 AM
Dear Experts,
I am trying to update the fields BLCKD and BLCKT i.e. Status as blocked and some text in Block Text field for a PR Item.
Implemented BADI ME_PROCESS_REQ_CUST method POST for this but even after using the SET_DATA method when the PR is saved it does not shows status Blocked and neither the block text is there.
Should I use the method SET_DATAX before SET_DATA but in that case the structure MEREQ_ITEMX does not have fields BLCKD and BLCKT to set it to 'X'.
How to update these fields for item when PR is created?
Any pointers are appreciated...
Thanks,
Anubhav
2012 Dec 28 11:35 AM
Hello Anubhav,
As the Blocked status is at PR item, you need to use method PROCESS_ITEM, as in method POST only PR header is available.
Hope this is helpful.
2012 Dec 28 11:35 AM
Hello Anubhav,
As the Blocked status is at PR item, you need to use method PROCESS_ITEM, as in method POST only PR header is available.
Hope this is helpful.
2012 Dec 28 12:05 PM
Hi Puneet,
I am using the below code in method PROCESS_ITEM
DATA
ls_reqitm TYPE mereq_item.
ls_reqitm = im_item->get_data( ).
**check some conditions and if true
ls_reqitm-blckd = '1'.
ls_reqitm-blckt = lc_blck_txt.
im_item->set_data( ls_reqitm ).
But that does not set the field values as passed.
Should I use the method SET_DATAX before SET_DATA but in that case the structure MEREQ_ITEMX does not have fields BLCKD and BLCKT to set it to 'X'.
Thanks,
Anubhav
2012 Dec 31 5:56 AM
Hello Anubhav,
Yes, method SET_DATAX is needed to be called. But method SET_DATAX needs to be called after the calling of method SET_DATA.
Regards,
Puneet Desai
2014 Feb 10 1:19 PM
hello , look at structure MEREQ_ITEM_S_CUST_ALLOWED
i enhance it with 2 fields:
BLCKD BLCKD
BLCKT BLCKT
and my abap code in method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM is working now !!!
CHECK im_count = 1 .
DATA reqdata TYPE mereq_item .
reqdata = im_item->get_data( ) .
reqdata-blckd = '1' .
reqdata-blckt = 'text' .
*
im_item->set_data( reqdata ) .
DATA: ls_datax TYPE mereq_itemx.
MOVE: 'X' TO ls_datax-blckd,
'X' TO ls_datax-blckt .
im_item->set_datax( ls_datax ) .
2015 Mar 10 10:21 AM
Hello Anubhav,
Is your issue resolved. Could you please explain me how you have achieved this.
My requirement is almost same as your's Need to change block status .
I am checking with both the method in the implementation of BADI ME_PROCESS_REQ_CUST
method POST & PROCESS_ITEM . I passed the values through SET_DATA and then SET_DATAX but still not working.
I even tried to add two fields in the structure MEREQ_ITEM_S_CUST_ALLOWED but being standard field this raises an error with eban table like two fields in same name.
Thanks in Advance ,
G.Gowri Sankar
2015 Mar 11 8:13 AM
Hi Gowri,
I do not have access to that system anymore but from what I recollect I implemented the BADI ME_REQ_POSTED Method POSTED and then called a FM in update task. This FM was used to change the BLCKD field using standard BAPIs for PR.
Since the FM is called update task it is executed after the LUW for BADI is completed which means that EBAN now has data for this PR item and it can be updated.
Hope this helps.
Thanks,
Anubhav
2020 Mar 12 3:12 PM
I am facing the same problem and I think the problem is in structure
MEREQ_ITEM_S_CUST_ALLOWED
which has the updatable fields. I am going to see if I can append it the BLCKD and BLCKT fields