cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Purchase group field during Purchase requisition save in User Exit

Former Member
0 Kudos

Hi All,

I would like to know if anyone has changed any standard Purchase requisition fields at Item level. I want to update the Purchase group field if the user did not provide it. This should happen after the save operation.

2 steps:

1. A warning message should be shown to the user.

2. The purchase group field should be automatically updated

I found that the following exits are called in succession after the save.

EXIT_SAPLMEREQ_008

EXIT_SAPLMEREQ_006

Exit EXIT_SAPLMEREQ_008 does not have reference to Item to update the Purchase group.

Exit '006' does not have any importing/exporting data. I am not sure how to update the purchase group field at item level using these 2 Exits.

Is there another way, please let me know.

Thanks,

Paul.

Accepted Solutions (0)

Answers (6)

Answers (6)

raymond_giuseppi
Active Contributor
0 Kudos

Read the documentation of method CHECK of BAdI ME_PROCESS_REQ_CUST or of interface IF_EX_ME_PROCESS_REQ_CUST. This method is executed when required explicitly by user or at SAVE. There execute a GET_ITEMS, LOOP AT items and call GET_DATA[X] and SET_DATA to change the value.

Former Member
0 Kudos

Hi Alexandre,

No, I did not check these. Kindly let me know if you have used the above exits/badi. I am looking to update the purchase group field at item level after the save function.

Thanks,

Paul.

0 Kudos

Hello

Did you check the others exit in the MEREQ001?

Transaction SMOD = MEREQ001

Or maybe the badi = ME_PROCESS_REQ_CUST

Best regards

Alexandre Arcanjo Pereira

Former Member
0 Kudos

Hi,

The functional person says no. Since the user may not know the purchase group and a wrong entry may result in the tasks being assigned to incorrect buyers etc.,

Any idea how to enhance the 2 exits to save the Item data in Purchase Requisition.

Thanks,

Paul.

Jelena
Active Contributor

I'm very much confused by this business process... If the users are such idiots that cannot be trusted with filling in this piece of information then don't make the field available for entry at all. (For bonus points - build a screen for simplified PR entry and just use BAPI to create it.)

If the actual concern is workflow then there are the workflow specific user exits, I believe, that allow to direct the approval differently.

Otherwise it just doesn't make sense: if you open the field for entry then there is no guarantee that those users who do fill it in do it "correctly" either. And switching the value behind the scenes is actually not a good UI design. This will for sure end up with the angry users claiming "I did not enter THAT!" when things go wrong.

Former Member
0 Kudos

Hi Jurgen,

Thats a good idea, but I want to default it with a value if it is blank when saved. The reason being if it is blank, it is not being assigned to an agent to work on. It is lying there without anybody to take care of it.

I am able to populate this in an Exit EXIT_SAPLMEREQ_005. But this is not during save operation. Whenever anybody hits enter, it is populated.

I would like to know how we update the purchase group field after the save operation like the 2 steps I mentioned in original post.

Paul.

JL23
Active Contributor
0 Kudos

why don't you just customize the field as mandatory?