on 12-22-2020 5:12 AM
Hi,
We have a custom field for account assignment in EBKN (ME51N), however the inputted value for this custom field does not get saved in the table. Is it possible to update EBKN just before a purchase requisition is saved, so that the input for our custom field gets saved in table EBKN? Are there any user-exits or BADI I can use?
Thank you.
Regards,
Kath
Method POST doesn't allow any change to data, onmy provided to trigger other processes. (Data is protected from update as some update FM calls are already registred)
Could you consider
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raymond,
I have tried in method CHECK however, my_state->protect is still "X" in this method, thus no change is allowed. With regards to process_account, this method is not called for single account assignment pop-up input so this is also not possible.
Not sure if the field is incorrectly added to the coding block since the custom field value is actually saved for other types of purchase requisitions. (This type of PR allows the user to input the value directly on the single account assignment screen, if input is made here then the value is saved)
It is only when user tries to create a framework PR with an item category of B, that the value inputted in the custom field does not get saved. (This type of PR requires user to input the value on a pop-up screen for single account assignment, if input is made here, the value is not saved).
Check in your Customizing if this field is allowed with
Is the pop-up a standard one (as triggered by a click on 'more' pushbutton) or a FM called in the BAdI implementation.
Is the Account assignment already locked in the transaction (e.g. following documents, too late to cprrect)
Hi Raymond,
I am using the same Account assignment category of Order (Non Capital) and the same GL account for both types of requisition but only the type where a pop-up custom subscreen is called that the value does not get saved.
After inputting the values in the pop-up custom subscreen and upon pressing enter, the whole account assignment tab is now greyed out and not available for input (I also think this is why my_state->protect is "X" since modification is no longer allowed).
I also checked our code and for the requisition type where the value is saved, method PROCESS_ACCOUNT is called and I think this is why the value is saved into EBKN since it calls SET_EXKN method in our code.
Update:
I am using the BADI ME_PROCESS_REQ_CUST and using Method POST to call set_exkn to save the custom field. However, in SET_EXKN and SET_EXKNX, there is this checking if my_state->protect is blank but
since my_state->protect is 'X' , the EBKN custom field is not being updated. I tried to force the value for my_state->protect to be blank and I was able to update the EBKN table. However, I do not know how to do this without forcing the data.
Any help would be much appreciated.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to extend the table with the required custom field and then you may check the BAdI: ME_PROCESS_REQ_CUST to update the required data during save.
Refer the note: 611175 - ME_PROCESS_REQ_CUST: Documentation for detailed BAdI documentation.
Also refer the doc: Add Custom Field to Purchase Requisition – MEREQ001
Also check the note: 638849 - ME51N: User-defined fields are not transferred
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasoon,
Table is already extended to include the custom field. I am also using the BADI ME_PROCESS_REQ_CUST and using Method POST to call set_exkn to save the custom field. However, in SET_EXKN and SET_EXKNX, there is this checking
and since my_state->protect is 'X' , the EBKN custom field is not being updated. I tried to force the value for my_state->protect to be blank and I was able to update the EBKN table. However, I do not know how to do this without forcing the data.
Thank you.
Regards,
Kath
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.