Skip to Content
0

Changing Purchase group field during Purchase requisition save in User Exit

May 19, 2017 at 03:39 AM

129

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Jürgen L
May 19, 2017 at 04:27 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Paul Puvvula May 19, 2017 at 05:13 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Paul Puvvula May 19, 2017 at 04:08 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

1
Alexandre Arcanjo Pereira May 19, 2017 at 07:04 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Paul Puvvula May 19, 2017 at 08:39 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
May 22, 2017 at 06:49 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded