2008 Apr 29 8:25 AM
Hi all,
I have code in the User exit - EXIT_RFEBBU10_001 - which will be triggered by the transaction code FF.5.
My code is to update the Standard Database table FEBEP
My code is.
Update FEBEP
SET FWAER = ''
FWBTR = '0.00'
where KUKEY = i_febep-kukey AND
ESNUM = i_febep-esnum.
But this is not updating the database table with FWBTR as 0.00 and FWEAR as nothing, but SY-SUBRC is 0 while debugging.
I used the same code in a seperate executable program that time it is updating the table, but inside the User Exit it is not doing.
Please tell me how to solve this...
Points assured
Regards,
Prabhu
2008 Apr 29 9:05 AM
Hello Prabhu,
I'm sorry to say that your whole approach is incorrect i.e. everything you are doing in this user-exit from start to finish is incorrect and it is against SAP Best Practice!
Firstly, you are trying to modify (update) a SAP standard database table - which is not recommended in the first place but then again I see you are trying to change a database full with highly sensitive information (The Electronic Bank Statement Line Item table)!!! Not only you may land up in big trouble personally for doing this but also I don't think your client's system auditors will be too pleased about that. So, Never Do This
Then, you are wondering if you could use a Commit Work statement in your user-exit - which is again not recommended. Let the system take care of that after it leaves your exit and before completing the transaction. So, again, Never Do This
Now, to solve your issue, you should be first reading the documentation of SAP Enhancement FEB00001 because your user-exit function module is linked to this enhancement. This is well documented and shows you how to code this exit. I think if you require any changes in the line items you should make changes in the export parameter E_FEBEP because SAP allows you to change E_FEBEP and finally don't forget to set the export parameter E_UPDATE = 'X' after you have changed data in any structure or table parameters to confirm changes back to SAP.
Hope this helps.
Cheers,
Sougata.
Hi all,
I have code in the User exit - EXIT_RFEBBU10_001 - which will be triggered by the transaction code FF.5.
My code is to update the Standard Database table FEBEP
My code is.
Update FEBEP
SET FWAER = ''
FWBTR = '0.00'
where KUKEY = i_febep-kukey AND
ESNUM = i_febep-esnum.
But this is not updating the database table with FWBTR as 0.00 and FWEAR as nothing, but SY-SUBRC is 0 while debugging.
I used the same code in a seperate executable program that time it is updating the table, but inside the User Exit it is not doing.
Please tell me how to solve this...
Points assured
Regards,
Prabhu
2008 Apr 29 8:29 AM
There can be multiple reasons, may be after you change the value SAP it self overrides the value which makes it zero. so when is this table populated during the same transaction or it is already there when this transaction is executed?
2008 Apr 29 8:29 AM
Hi ,
Yes this can be a problem that value is been overwritten after update statement.
Also, try commit work statement after the update query.
Please reward points if it works.
2008 Apr 29 8:31 AM
Hi,
Can we use COMMIT WORK in the user exit.....
regards,
Prabhu
2008 Apr 29 8:34 AM
Try and avoid using COMMIT WORK in a user exit. This could also commit data to database which is not (yet) supposed to be stored. Maybe there are some checks that still need to be performed or whatever. Let SAP do the commit in this case, to make sure data remains consistent.
If problem is within COMMIT WORK, try and use a perform on commit, or use FM in update task.
2008 Apr 29 8:34 AM
Hi,
commit statement in userexit:
You should not do that.
After the user exits code is triggered, the transaction's own commits statements will commit the database anyway
Regards
Kiran Sure
2008 Apr 29 8:32 AM
Hi,
after using the update statement to modify a table record u must use COMMIT WORK statement.
Regards,
Aravind M
2008 Apr 29 9:05 AM
Hello Prabhu,
I'm sorry to say that your whole approach is incorrect i.e. everything you are doing in this user-exit from start to finish is incorrect and it is against SAP Best Practice!
Firstly, you are trying to modify (update) a SAP standard database table - which is not recommended in the first place but then again I see you are trying to change a database full with highly sensitive information (The Electronic Bank Statement Line Item table)!!! Not only you may land up in big trouble personally for doing this but also I don't think your client's system auditors will be too pleased about that. So, Never Do This
Then, you are wondering if you could use a Commit Work statement in your user-exit - which is again not recommended. Let the system take care of that after it leaves your exit and before completing the transaction. So, again, Never Do This
Now, to solve your issue, you should be first reading the documentation of SAP Enhancement FEB00001 because your user-exit function module is linked to this enhancement. This is well documented and shows you how to code this exit. I think if you require any changes in the line items you should make changes in the export parameter E_FEBEP because SAP allows you to change E_FEBEP and finally don't forget to set the export parameter E_UPDATE = 'X' after you have changed data in any structure or table parameters to confirm changes back to SAP.
Hope this helps.
Cheers,
Sougata.
2023 May 03 1:06 PM
Good day
This is the piece of code i added to my user exit EXIT_RFEBBU10_001
IF I_FEBKO-KTONR = '01122387740019' AND I_FEBEP-TEXTS = 'FIMT' AND I_FEBEP-VGINT = 'ZR07'.
E_FEBEP-KOSTL = 'REGION1'.endif.
The challenge now is the program is not updating the cost centre field and business area field returning an error
Error during update of table FEBEP
Kindly assist so that the cost centre field is update as these transaction are Bank charges and must include cost centre field not covered in the MT940 EBS file from the Bank
Regards
Phillip
2023 May 04 6:32 AM
philpchingwaro
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |