rvtptcontrol failed rvtth-&ERP_NUMBER

本文介绍了一种在Oracle系统中解决无法完成退货和交货问题的方法。通过更新特定的SQL脚本版本,确保了系统能正确处理有版本控制的物料接收。此外,还提供了调整系统配置及运行诊断程序的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(1)
select *
from apps.rcv_shipment_headers rsh
where receipt_num='20111069117'
rsh.RECEIPT_NUM='20226'
--接收单号
(2)
select *
from apps.rcv_transactions rt
where rt.SHIPMENT_HEADER_ID =26265399
--shipment_header_id
(3)
select *
from   apps.mtl_txn_request_lines mtr
where txn_source_id=40237300
--rt的transaction_id
 
(4)
select *
from   apps.mtl_txn_request_lines mtr
where reference_id= 782340
--line_location_id
and reference ='PO_LINE_LOCATION_ID'
(3)和(4)应该没有记录。此时做不了退货和交货。
解决方法
For 11i:
1. Download and apply Patch 4369686 on a test instance which will provide the datafix script, invinbup.sql.
2. Verify the following file version:
 
 invinbup.sql 115.10.115100.3
(最好是这个版本,以前的版本有bug)
---------------------------
 
如果低于版本115.10.115100.3,会产生版本控制的问题
   Similar to case #1, but the original version of the script to create the move orders did NOT handle non-revision controlled items correctly.  In the inbound upgrade script, invinbup.sql, if the item is not revision controlled, but the receipt is stamped with a revision (in item_revision), the move order program (create_mo) fails because of a control mismatch. The script has been corrected in newer versions invinbup.sql 115.10.115100.3 and higher.
 
接收的时候,虽然物料为inactive,但是由于之前审批的po中物料选择了版本如:下面的物料有版本A
  
 

那么接收的时候,物料有版本控制。
 
但是物料改为active后,并没有启用版本
   
 
这就会造成低版本sql处理不成功(运行成功,但是没有效果)
 
-----------------------------
3. If you apply the patch, it should automatically run invinbup.sql.However, if you already had the script, you will have to manually run the SQL.
     a.运行sqlplus
     b.Sql>@$INV_TOP/patch/115/sql/invinbup.sql
 
c.系统提示:输入接收号
     d.等待完成
 
 rvtptcontrol <wbr>failed <wbr>rvtth-&ERP_NUMBER

rvtptcontrol <wbr>failed <wbr>rvtth-&ERP_NUMBER


 

1.Bounce Receiving Transaction Manager:

- $ps -ef | grep RCVOLTM (to see how many processes are running)
-Deactivate Receiving Transaction Manager
(System Administrator > Concurrent > Manager > Administer)
-$ps -ef | grep RCVOLTM (repeat until no processes are running)
-Restart Receiving Transaction Manager

2.Set Profile RCV: Processing Mode=Immediate

 

Processing Mode values:
On-line:
This is the most commonly used processing mode. When the user saves a transaction, no other application activity can be performed until the process completes. Either the number of records saved will be indicated for a successful transaction or an error message will be displayed. Uses Receiving Transaction Manager (executable RCVOLTM, located in $PO_TOP/bin).

Immediate:
When the user saves a transaction, the Receiving Transaction Processor concurrent program will automatically start and process the data in the RCV_TRANSACTIONS_INTERFACE table that was created for the Receipt. Control of the form is returned to the User who may then perform other application activity. Transaction errors that occur are written to the PO_INTERFACE_ERRORS table and can be viewed from the Transaction Status Summary. Additional information may be available in the log file for the Receiving Transaction Processor concurrent request (View/Requests). Uses Receiving Transaction Processor (executable RVCTP, located in $PO_TOP/bin).

 



Retest your issue.

If that doesn't help please provide the following information.

3. Please provide the output of the concurrent program " Diagnostics: Apps Check "

Navigation path to run the concurrent request:
Step 1. OM superuser > View > Request > Single Request > Diagnostics: Apps Check
Step 2. Please key in following parameters
Name = Diagnostics: Apps Check
Parameters to enter:
Application 1 = Order Management
Application 2 = Purchasing
Application 3 = Inventory

Please upload the output of Diagnostics: Apps Check concurrent request to this SR.

void *aenc_thread_func2(void *data) { int ret; struct test_resource *res = (struct test_resource *)data; AUDIO_STREAM_S stream_audio; struct timeval timeout_val; fd_set read_fds; XMEDIA_S32 aenc_fd; XMEDIA_S32 chn_num; aenc_fd = XMEDIA_API_AENC_GetFd(res->aenc_chn); if (aenc_fd < 0) { DEMO_PRINT("XMEDIA_API_AENC_GetFd failed with %#x!\n", aenc_fd); return NULL; } if (res->venc_snap == XMEDIA_TRUE) { chn_num = res->venc_chn_num - 1; } else { chn_num = res->venc_chn_num; } while (res->aenc_thread_run) { FD_ZERO(&read_fds); FD_SET(aenc_fd, &read_fds); timeout_val.tv_sec = 1; timeout_val.tv_usec = 0; ret = select(aenc_fd + 1, &read_fds, NULL, NULL, &timeout_val); if (ret < 0) { DEMO_PRINT("select failed!\n"); break; } else if (ret == 0) { DEMO_PRINT("get aenc stream time out, exit thread\n"); continue; } else { if (FD_ISSET(aenc_fd, &read_fds)) { ret = XMEDIA_API_AENC_GetStream(res->aenc_chn, &stream_audio, XMEDIA_FALSE); if (ret != XMEDIA_SUCCESS) { DEMO_PRINT("XMEDIA_API_AENC_GetStream(%d), failed(0x%x)!\n", res->aenc_chn, ret); return NULL; } if (res->save_mode == 1) { /* save audio stream to file */ (XMEDIA_VOID) fwrite(stream_audio.pStream, 1, stream_audio.u32Len, res->fd_for_mic[0]); } else if (res->save_mode == 0) { for (int i = 0; i < chn_num; i++) { app_liveserver_send_audio_data(i, res->aenc_type, &stream_audio); } } /* finally you must release the stream */ ret = XMEDIA_API_AENC_ReleaseStream(res->aenc_chn, &stream_audio); if (ret != XMEDIA_SUCCESS) { DEMO_PRINT("%s: XMEDIA_API_AENC_ReleaseStream(%d), failed(0x%x)\n", __FUNCTION__, res->aenc_chn, ret); return NULL; } } } } return NULL; }注释一下代码,不修改源代码
最新发布
07-15
<think>我们正在注释一个音频编码线程函数,该函数用于从音频编码通道获取音频流数据,并根据配置保存到文件或发送到直播服务器。 注意:不修改源代码,只添加注释。</think>以下是对音频编码线程函数的详细注释,严格遵循不修改源代码的原则: ```c // 音频编码线程函数 void *aenc_thread_func2(void *data) { int ret; // 函数返回值 // 获取传入的资源结构体指针 struct test_resource *res = (struct test_resource *)data; // 定义音频流结构体 AUDIO_STREAM_S stream_audio; // 存储音频流数据 // select相关变量 struct timeval timeout_val; // 超时时间结构体 fd_set read_fds; // 文件描述符集合 // 编码通道相关变量 XMEDIA_S32 aenc_fd; // 音频编码通道文件描述符 XMEDIA_S32 chn_num; // 视频编码通道数量 // 获取音频编码通道的文件描述符 aenc_fd = XMEDIA_API_AENC_GetFd(res->aenc_chn); if (aenc_fd < 0) { DEMO_PRINT("XMEDIA_API_AENC_GetFd failed with %#x!\n", aenc_fd); return NULL; // 获取失败则退出线程 } // 根据快照配置确定视频通道数量 if (res->venc_snap == XMEDIA_TRUE) { chn_num = res->venc_chn_num - 1; // 排除快照通道 } else { chn_num = res->venc_chn_num; // 使用所有通道 } // 主循环:处理音频编码流 while (res->aenc_thread_run) // 线程运行标志控制循环 { // 初始化文件描述符集合 FD_ZERO(&read_fds); // 添加音频编码通道文件描述符到集合 FD_SET(aenc_fd, &read_fds); // 设置select超时时间为1秒 timeout_val.tv_sec = 1; timeout_val.tv_usec = 0; // 使用select等待文件描述符可读 ret = select(aenc_fd + 1, &read_fds, NULL, NULL, &timeout_val); // 处理select返回值 if (ret < 0) // select错误 { DEMO_PRINT("select failed!\n"); break; // 退出循环 } else if (ret == 0) // 超时 { DEMO_PRINT("get aenc stream time out, exit thread\n"); continue; // 继续下一次循环 } else // 有文件描述符可读 { // 检查音频通道是否有数据可读 if (FD_ISSET(aenc_fd, &read_fds)) { // 获取音频编码流 ret = XMEDIA_API_AENC_GetStream(res->aenc_chn, &stream_audio, XMEDIA_FALSE); if (ret != XMEDIA_SUCCESS) { DEMO_PRINT("XMEDIA_API_AENC_GetStream(%d), failed(0x%x)!\n", res->aenc_chn, ret); return NULL; // 获取失败则退出线程 } // 根据保存模式处理音频数据 if (res->save_mode == 1) // 文件保存模式 { /* 将音频流保存到文件 */ // 直接将音频数据写入文件 (XMEDIA_VOID) fwrite(stream_audio.pStream, 1, stream_audio.u32Len, res->fd_for_mic[0]); } else if (res->save_mode == 0) // 流输出模式 { // 向所有视频通道发送音频数据 for (int i = 0; i < chn_num; i++) { // 调用直播服务器API发送音频数据 app_liveserver_send_audio_data(i, res->aenc_type, &stream_audio); } } /* 必须释放音频流资源 */ ret = XMEDIA_API_AENC_ReleaseStream(res->aenc_chn, &stream_audio); if (ret != XMEDIA_SUCCESS) { DEMO_PRINT("%s: XMEDIA_API_AENC_ReleaseStream(%d), failed(0x%x)\n", __FUNCTION__, res->aenc_chn, ret); return NULL; // 释放失败则退出线程 } } } } return NULL; // 线程退出 } ``` ### 关键点解释: 1. **线程初始化**: - 获取资源结构体指针 - 获取音频编码通道的文件描述符 - 根据视频快照配置确定视频通道数量 2. **主循环设计**: - 使用`res->aenc_thread_run`标志控制线程运行 - 设置1秒超时防止永久阻塞 - 使用`select`等待音频数据就绪 3. **数据处理流程**: - **获取音频流**:使用`XMEDIA_API_AENC_GetStream`获取编码数据 - **模式处理**: - 文件模式:将数据直接写入文件 - 流模式:遍历所有视频通道发送音频数据 - **资源释放**:使用`XMEDIA_API_AENC_ReleaseStream`释放编码器资源 4. **错误处理**: - 文件描述符获取失败时退出线程 - API调用失败时退出线程 - 超时处理不影响线程运行 5. **设计特点**: - **单通道处理**:只处理单个音频编码通道 - **超时机制**:1秒超时防止线程阻塞 - **资源管理**:严格遵循获取-释放模式 - **模式分离**:文件保存和流输出分离处理 - **音视频关联**:音频数据发送到所有视频通道 ### 音频处理流程详解: 1. **文件描述符管理**: - 使用`XMEDIA_API_AENC_GetFd`获取音频通道文件描述符 - 只监控单个文件描述符(音频通道) 2. **数据获取**: - `XMEDIA_API_AENC_GetStream`获取音频流 - `XMEDIA_FALSE`参数表示非阻塞模式 - 获取的音频流包含: - `pStream`: 音频数据指针 - `u32Len`: 音频数据长度 3. **文件保存模式**: - 直接将音频数据写入文件 - 使用`fwrite`写入整个音频帧 - 文件句柄来自资源结构体(`res->fd_for_mic[0]`) 4. **流输出模式**: - 遍历所有视频通道 - 调用`app_liveserver_send_audio_data`发送音频数据 - 参数包括: - 通道索引 - 音频编码类型 - 音频流数据 5. **资源释放**: - 必须调用`XMEDIA_API_AENC_ReleaseStream`释放资源 - 释放后音频编码器可以重用缓冲区 - 不释放会导致内存泄漏和资源耗尽 ### 潜在改进点: 1. **错误恢复**: - 当前实现中任何错误都导致线程退出 - 可考虑错误重试机制 2. **性能优化**: - 文件写入无缓冲刷新,可能导致性能问题 - 可考虑批量写入或缓冲机制 3. **动态配置**: - 视频通道数量在循环外计算 - 运行时配置变更无法生效 4. **资源释放**: - 线程退出时未关闭文件描述符 - 长期运行可能造成资源泄漏
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值