2 weeks ago
I implemented the BAdI BUPA_FURTHER_CHECKS to check data when BP data has been modified by the user, based on the country of the BP and the BP tax numbers that I get by calling respectively the function modules BUA_ADDRESS_GET_ALL and BUP_BUPA_TAX_GET.
These function modules work well if I use the role 000000 (General), but BUP_BUPA_TAX_GET returns nothing if I use the role FLCU01 (CVI: FI customer).
Why? How to know which function module to use to get the changed data? Currently, I'm picking the function modules whose name seem to match the purpose (like "BU*TAX*GET"...), it's a little bit crazy.
Thanks.
Sandra
2 weeks ago - last edited 2 weeks ago
The BUP_BUPA_TAX_GET function module only works if the BUTX application has been loaded.
BUTX is the application to handle tax identification numbers for business partners as can be seen in the tables TBZ0A/TBZ0B ("Central BP: Tax Numbers").
To make sure that it's the application BUTX, you may display the function modules in table TBZ1F, filter OBJAP = 'BUPA', APPLI = 'BUTX' and ZTPKT = 'ISSTA' (initialization event), you find the function module BUTX_BUPA_EVENT_ISSTA. Add a breakpoint and run BP to see if you stop in this function module.
You will see that it runs with the role 000000, but not with the role FLCU01.
To make sure that BUP_BUPA_TAX_GET is the function module to use (when the application BUTX is loaded), check that it belongs to the same function group as BUTX_BUPA_EVENT_ISSTA. The answer is yes, so it can be used.
To know the list of applications loaded for each role, you may add a breakpoint in the subroutine APPLI_OF_RLTYP_GET of SAPLBUSS (function group BUSS).
If the application BUTX is not loaded, it means that BUP_BUPA_TAX_GET will return nothing, instead you can read the database table directly. In the case of the BUTX application, it's the table DFFKBPTAXNUM as you can see by looking at the function module in the table TBZ1F behind the event ZTPKT = 'ISDAT' (read data), which is BUTX_BUPA_EVENT_ISDAT, it's easy to see the SELECT in the called subroutine GET_BPTAXNUM.
In the user exit, call the function module BUS_PARAMETERS_ISSTA_GET to know which applications are loaded.
If BUTX is loaded, you may call BUP_BUPA_TAX_GET to get the values eventually modified by the user, otherwise the user cannot change the values so you may read the data directly from the database table DFFKBPTAXNUM.
Concerning BUA_ADDRESS_GET_ALL, by applying the above logic, you'll see that it's best to use directly BUA_BUPA_MEMORY_ADDRESSES_GET, because it belongs to the same function group as BUA_BUPA_EVENT_ISSTA which belongs to the application BUA ("Central Bus.Partner: Addresses"). In fact, BUA_ADDRESS_GET_ALL works because it calls BUA_ADDRESS_FIND_WITH_PRTN_ALL which calls BUA_BUPA_MEMORY_ADDRESSES_GET.
Note that the transaction BP forces to save any change when switching between roles, so when switching from role 000000 to FLCU01, you are sure that the changes are stored in the database and you won't need to call BUP_BUPA_TAX_GET to retrieve the changed data, you'll get it from the database.
Sandra
NB 1: my system is S/4HANA 2023 FPS 1
NB 2: the above information concerns BDT - Business Data Toolset, you can find more information in the SAP Help Portal, for instance SAP S/4HANA > SAP Business Partner > Functions > Business Data Toolset > Function Overview > Data Maintenance Without Dialog > Direct Input (events ISSTA and ISDAT) : https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/74b0b157c81944ffaac6ebc07245b9dc/9a953d58d442a007e10...
I implemented the BAdI BUPA_FURTHER_CHECKS to check data when BP data has been modified by the user, based on the country of the BP and the BP tax numbers that I get by calling respectively the function modules BUA_ADDRESS_GET_ALL and BUP_BUPA_TAX_GET.
These function modules work well if I use the role 000000 (General), but BUP_BUPA_TAX_GET returns nothing if I use the role FLCU01 (CVI: FI customer).
Why? How to know which function module to use to get the changed data? Currently, I'm picking the function modules whose name seem to match the purpose (like "BU*TAX*GET"...), it's a little bit crazy.
Thanks.
Sandra
2 weeks ago - last edited 2 weeks ago
The BUP_BUPA_TAX_GET function module only works if the BUTX application has been loaded.
BUTX is the application to handle tax identification numbers for business partners as can be seen in the tables TBZ0A/TBZ0B ("Central BP: Tax Numbers").
To make sure that it's the application BUTX, you may display the function modules in table TBZ1F, filter OBJAP = 'BUPA', APPLI = 'BUTX' and ZTPKT = 'ISSTA' (initialization event), you find the function module BUTX_BUPA_EVENT_ISSTA. Add a breakpoint and run BP to see if you stop in this function module.
You will see that it runs with the role 000000, but not with the role FLCU01.
To make sure that BUP_BUPA_TAX_GET is the function module to use (when the application BUTX is loaded), check that it belongs to the same function group as BUTX_BUPA_EVENT_ISSTA. The answer is yes, so it can be used.
To know the list of applications loaded for each role, you may add a breakpoint in the subroutine APPLI_OF_RLTYP_GET of SAPLBUSS (function group BUSS).
If the application BUTX is not loaded, it means that BUP_BUPA_TAX_GET will return nothing, instead you can read the database table directly. In the case of the BUTX application, it's the table DFFKBPTAXNUM as you can see by looking at the function module in the table TBZ1F behind the event ZTPKT = 'ISDAT' (read data), which is BUTX_BUPA_EVENT_ISDAT, it's easy to see the SELECT in the called subroutine GET_BPTAXNUM.
In the user exit, call the function module BUS_PARAMETERS_ISSTA_GET to know which applications are loaded.
If BUTX is loaded, you may call BUP_BUPA_TAX_GET to get the values eventually modified by the user, otherwise the user cannot change the values so you may read the data directly from the database table DFFKBPTAXNUM.
Concerning BUA_ADDRESS_GET_ALL, by applying the above logic, you'll see that it's best to use directly BUA_BUPA_MEMORY_ADDRESSES_GET, because it belongs to the same function group as BUA_BUPA_EVENT_ISSTA which belongs to the application BUA ("Central Bus.Partner: Addresses"). In fact, BUA_ADDRESS_GET_ALL works because it calls BUA_ADDRESS_FIND_WITH_PRTN_ALL which calls BUA_BUPA_MEMORY_ADDRESSES_GET.
Note that the transaction BP forces to save any change when switching between roles, so when switching from role 000000 to FLCU01, you are sure that the changes are stored in the database and you won't need to call BUP_BUPA_TAX_GET to retrieve the changed data, you'll get it from the database.
Sandra
NB 1: my system is S/4HANA 2023 FPS 1
NB 2: the above information concerns BDT - Business Data Toolset, you can find more information in the SAP Help Portal, for instance SAP S/4HANA > SAP Business Partner > Functions > Business Data Toolset > Function Overview > Data Maintenance Without Dialog > Direct Input (events ISSTA and ISDAT) : https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/74b0b157c81944ffaac6ebc07245b9dc/9a953d58d442a007e10...
| User | Count |
|---|---|
| 15 | |
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |