显示凭证-销售凭证流 / 相关索引表

本文探讨了IDOC产生的财务凭证未能在凭证流中显示的问题,并提供了具体的解决方案,包括使用功能模块出口EXIT_SAPLIEDI_102进行处理的方法。此外,还讨论了凭证显示但无法查看详细信息的情况及解决思路。

RV_CALL_DISPLAY_TRANSACTION


GJAHR = VBFA-GJAHR

VBELN = VBFA-VBELN           / VBELV

VBTYP = VBFA-VBTYP_N      / VBTYP_V


1 , IDOC 产生的财务凭证未能显示在凭证流中  (STO 外向交货单 --自动发票校验)

SMOD
FEDI0001 FI 中 EDI 的功能模块出口
EXIT_SAPLIEDI_102

data: lc_vbeln like likp-vbeln,
      lc_xblnr like bkpf-xblnr.
clear: lc_xblnr.
read table document_data with key fnam = 'BKPF-XBLNR'.
if sy-subrc eq 0.
  lc_xblnr = document_data-fval.
endif.
loop at document_data.
  if document_data-fnam = 'BKPF-AWTYP' .
    document_data-fval = 'VBRK'.
    modify document_data transporting fval.
  elseif   document_data-fnam = 'BKPF-AWKEY' .
    document_data-fval = lc_xblnr.
    modify document_data transporting fval.
  elseif document_data-fnam = 'BKPF-XBLNR'.
    clear: lc_vbeln.
    select single vgbel into lc_vbeln
    from vbrp
    where vbeln = document_data-fval.
    if not lc_vbeln is initial.
      document_data-fval = lc_vbeln.
      modify document_data transporting fval.
    endif.
  endif.
endloop.

2 , 显示在凭证流中但双击凭证未能显示

Include : LV05CF01

//  under CONVERT_TO_LOCAL_CURRENCY

*    vbfa_tab-matnr(4)   = vbrk-bukrs.      "--old
    vbfa_tab-matnr(4)   = xdoc_num-bukrs.   "--new - change



相关索引表

Table CDS viewDDL sourceShort Description
VAKPA V_VAKPA_CDSV_VAKPASales Index: Orders by Partner Function
VAPMA V_VAPMA_CDSV_VAPMASales Index: Order Items by Material
VLKPA V_VLKPA_CDSV_VLKPASD Index: Deliveries by Partner Functions
VLPMA V_VLPMA_CDSV_VLPMASD Index: Delivery Items by Material
VRKPA V_VRKPA_CDSV_VRKPASales Index: Bills by Partner Functions
VRPMA V_VRPMA_CDSV_VRPMASD Index: Billing Items per Material


VBFA - 凭证流读取

1 , CL_SD_DOCUMENT_FLOW_RT


2 , RV_ORDER_FLOW_INFORMATION
    层次显示 SD 凭证流 (VBFA 直接只能查一层 )


VBTYP
if_sd_doc_category
cl_sd_doc_category_util


VBUK/VBUP - 销售相关状态表

状态表 VBUK,VBUP 已无数据 , 状态直接存在主表中。


VBAK/VBAP => 增加 状态结构 
LIKP/LIPS =>


Read VBUK related data from Document (VBAK, LIKP, VBRK)
SD_VBUK_READ_FROM_DOC
SD_VBUK_READ_FROM_DOC_MULTI


Read VBUP related data from Document (VBAP, LIPS)
SD_VBUP_READ_FROM_DOC
SD_VBUP_READ_FROM_DOC_MULTI

flowchart TD %% 界面层(用户交互入口) subgraph 界面层(Presentation Layer) direction TB A1[主窗口<br/>(标题栏+菜单栏)] A2[功能标签页<br/>- 数据管理<br/>- 收支统计<br/>- 可视化分析<br/>- 预算管理<br/>- 财务报告<br/>- 历史查询] A3[交互组件<br/>- 表格/按钮<br/>- 对话框<br/>- 日期选择器<br/>- 图表画布] A1 --> A2 --> A3 end %% 业务逻辑层(核心处理中心) subgraph 业务逻辑层(Business Logic Layer) direction TB B1[数据管理模块<br/>- 导入/录入/删除<br/>- 备份/恢复<br/>- 数据筛选清洗] B2[财务分析模块<br/>- 收支统计计算<br/>- 类别分析<br/>- 可视化图表生成] B3[预算管理模块<br/>- 预算设置/保存<br/>- 使用进度监控<br/>- 超支提醒] B4[报告生成模块<br/>- Word报告创建<br/>- 数据填充<br/>- 报告存储] B5[辅助工具模块<br/>- 文件夹创建<br/>- 日期处理<br/>- 字体初始化] B1 <--> B2 <--> B3 <--> B4 B5 --> B1 & B2 & B3 & B4 end %% 数据层(数据存储支撑) subgraph 数据层(Data Layer) direction TB C1[核心数据存储<br/>- 收支记录(内存DataFrame)] C2[文件存储<br/>- Excel/CSV/TXT(原始数据)<br/>- 备份文件(finance_backup)<br/>- 预算文件(finance_budget.xlsx)<br/>- 报告文件(finance_reports)] C1 <--> C2 end %% 层间交互关系 A3 --> B1 A3 --> B2 A3 --> B3 A3 --> B4 B1 --> C1 B1 --> C2 B2 --> C1 B3 --> C2 B4 --> C2 %% 样式定义(贴合报告美观要求) classDef layerStyle fill:#f0f8ff,stroke:#165DFF,stroke-width:2px,rounded:10px classDef moduleStyle fill:#e8f4f8,stroke:#0E42B3,stroke-width:1px,rounded:8px class A1,A2,A3,B1,B2,B3,B4,B5,C1,C2 layerStyle class B1,B2,B3,B4,B5 moduleStyle
最新发布
11-08
function processEntries() { const voucher = document.querySelector('input[type="text"]:nth-of-type(1)').value; const date = document.querySelector('input[type="text"]:nth-of-type(2)').value; document.querySelectorAll('.tab tr:not(:first-child)').forEach(row => { const subject = row.querySelector('td:nth-child(2) input').value; if (!subject || !TABLE_CONFIG[subject]) return; // 构造唯一标识(基于凭证字号、日期、摘要) const entryId = `${voucher}-${date}-${row.querySelector('td:first-child input').value}`; //const entryId = `${voucher}-${date}-${row.querySelector('td:first-child input').value}-${row.querySelector('td:nth-child(3) input').value}-${row.querySelector('td:nth-child(4) input').value}` // 查找是否已存在相同标识的行 const table = document.querySelector(TABLE_CONFIG[subject].table); const existingRow = findRowById(table, entryId); if (existingRow) { // 如果行已存在,更新当前行的字段内容 updateRowFields(existingRow, row); } else { // 如果行不存在,插入新行 const entry = { date: date, voucher: voucher, abstract: row.querySelector('td:first-child input').value, debit: parseFloat(row.querySelector('td:nth-child(3) input').value) || 0, credit: parseFloat(row.querySelector('td:nth-child(4) input').value) || 0 }; updateDetailTable(TABLE_CONFIG[subject].table, entry); } }); } // 根据唯一标识查找已存在的行 function findRowById(table, entryId) { const rows = Array.from(table.rows).slice(2, -2); // 跳过表头和合计行 return rows.find(row => { const rowId = `${row.cells[1].textContent}-${row.cells[0].textContent}-${row.cells[2].textContent}`; return rowId === entryId; }); } // 更新已存在行的字段内容 function updateRowFields(existingRow, sourceRow) { // 更新日期 existingRow.cells[0].textContent = sourceRow.querySelector('td:nth-child(1) input').value; // 更新凭证字号 existingRow.cells[1].textContent = sourceRow.querySelector('td:nth-child(2) input').value; // 更新摘要 existingRow.cells[2].textContent = sourceRow.querySelector('td:nth-child(3) input').value; // 更新借方金额 existingRow.cells[4].textContent = sourceRow.querySelector('td:nth-child(4) input').value; // 更新贷方金额 existingRow.cells[5].textContent = sourceRow.querySelector('td:nth-child(5) input').value; // 重新计算方向和余额 const debit = parseFloat(existingRow.cells[4].textContent.replace(/[^0-9.-]/g, '')) || 0; const credit = parseFloat(existingRow.cells[5].textContent.replace(/[^0-9.-]/g, '')) || 0; const balance = debit - credit; existingRow.cells[6].textContent = balance > 0 ? '借' : '贷'; // 方向 existingRow.cells[7].textContent = Math.abs(balance).toFixed(2); // 余额 // 更新合计数据 updateTotals(existingRow.closest('table')); }
03-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值