关于BAPI查找供应商代码

radiofan 2017-01-13 09:15:39
请教各位,哪个SAP的BAPI可以通过输入供应商名称关键字查找供应商代码?谢谢 BAPI_VENDOR_FIND吗?
...全文
267 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq296015668 2017-01-17
  • 打赏
  • 举报
回复
。。这个的话直接咨询BAPI不是更好吗。 以下内容转至http://stackoverflow.com/questions/21805272/usage-of-bapi-vendor-find After many tries and fails I've found out the solution. REPORT zbss00_lieferant_anzeigen. PARAMETERS: p_ccode TYPE bapivendor_10-comp_code. TYPES: tab1 TYPE TABLE OF BAPIVENDOR_10. Data: g_tab_selopt type table of BAPIVENDOR_10, g_tab_result type table of BAPIVENDOR_11, l_vendor_no type BAPIVENDOR_11, g_selopt type BAPIVENDOR_10. g_selopt-COMP_CODE = p_ccode. g_selopt-TABNAME = 'LFB1'. g_selopt-FIELDNAME = 'MANDT'. g_selopt-FIELDVALUE = '900'. APPEND g_selopt TO g_tab_selopt. CALL FUNCTION 'BAPI_VENDOR_FIND' * EXPORTING * MAX_CNT = 0 * PL_HOLD = ' ' * IMPORTING * RETURN = TABLES selopt_tab = g_tab_selopt result_tab = g_tab_result . loop at g_tab_result into l_vendor_no. write: /, 'Vendor No: ', l_vendor_no-VENDOR_NO. endloop. In this example, I've searched for vendors by company code in the table "LFB1" where mandt is equal to 900. I set MANDT 900 because i needed to get all vendors and in my case all vendors have 900 in MANDT column. This may not be the proper way, but at least it works. If anyone knows a better way to do this, please feel free to write. I'll edit the answer according to that...

2,679

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 ERP/CRM
社区管理员
  • ERP/CRM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧