2009 Jan 06 10:34 AM
Hi experts,
Are there any function module or BAPI to block vendor posting like tcode: FK05?
Thanks and regards,
Hung.
2009 Jan 06 12:02 PM
Hi Hung,
I found function module " VENDOR_UPDATE" helpful in you case.
Check import parameter I_LFB1 in this FM, there is a field called SPERR. If you put "X" in this field vendor gets blocked for a company code.
Regards,
Ramesh.
2009 Jan 06 11:45 AM
Hi Hung,
I suppose this could be done through BADI's.
You could find the BAdi for your transaction using the followins steps.
1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
2. In 'Display' mode, go to 'Methods' tab.
3. Double click the method 'Get Instance' to display it source code.
4. Set a breakpoint on 'CALL METHOD cl_exithandler => get_class_name_by_interface'.
5. Then run your transaction.
6. The screen will stop at this method.
7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.
2009 Jan 06 12:02 PM
Hi Hung,
I found function module " VENDOR_UPDATE" helpful in you case.
Check import parameter I_LFB1 in this FM, there is a field called SPERR. If you put "X" in this field vendor gets blocked for a company code.
Regards,
Ramesh.
2009 Jan 08 1:27 PM
2010 May 17 8:38 AM
Hi Ramesh
I have tried your solutions using VENDOR_UPDATE to block a vendor but I get the error below
" System error in table LFA1, account vendor_number
updating"
can you assit.
Regards
Pepele
2009 Jan 07 6:10 AM
Hi.
Refer this BAdi.
Business Add-in
ENDOR_ADDRSCR_CHG Change Address Screen in the Master Data Maintenance
ENDOR_ADD_DATA Additional Vendor Data
ENDOR_ADD_DATA_BI Additional Data for Vendors (Batch Input and ALE)
ENDOR_ADD_DATA_CS Additional Data for Vendors (Subscreen 4000)
ENDOR_FIELDSTATUS Change Field Status for Vendors
Regards.
Jay
2024 Feb 26 10:03 PM
...and 'VENDOR_UPDATE' + commit still works for BP in S/4 HANA so you can update for example SPERM.
Vendor has LFA1-SPERM (Centrally imposed purchasing block) and Business Partner equivalent is "Purchasing block" (GS_LFA1-SPERM / All Purchasing Organization Block).
There is also second LFM1-SPERM (Purchasing block at purchasing organization level) in transaction BP called "Purchasing block POrg level" (GS_LFM1-SPERM / Selected Purchasing Organization BLock).
There are many old tables, FMs, BAPIs which still work fine in S4 (thanks to CVI). So similarly, you can change the BP client/customer with old SD_CUSTOMER_MAINTAIN_ALL (e.g. KNVV-ZTERM).
2024 Feb 27 4:01 PM
Basically VENDOR_UPDATE is an update task FM, no check performed, only SQL statement, IMHO that was a wrong answer. For S/4HANA look at class CL_MD_BP_MAINTAIN.
2024 Feb 27 4:26 PM
Yes, VENDOR_UPDATE is old. It needed also FMs for change documents and of course there are much better methods (especially related to BP) but it 100% works on S/4 (if you don't have time to replace it with something newer). Thanks.
2024 Feb 28 3:31 PM
Technically there are no difference betwenn using update task FM and direct Abap SQL statemlents...