FI--Foreign trade data incomplete for domestic business

本文介绍了解决因错误输入国际贸易数据导致国内业务发票无法正常转移的问题。通过修改数据传输例程或使用特定程序来清除错误的出口标志及编号,确保发票能够顺利完成会计流程。
Symptom

A billing document cannot be transferred into accounting because the foreign trade data is incomplete.
However, the underlying business process is a domestic business!

Additional key words

VF01, VF02, EIPO, EIKP, foreign trade, incompleteness, domestic, delivery, billing document, EXNUM, EXPKZ,export indicator, export number

Cause and prerequisites

In the respective delivery or in the billing document, for domestic business you by mistake go to the foreign trade data into a field. Since the incompletion log requires at least one entry for foreign trade, you must fill one fieldin order to be able to leave the foreign trade data again without canceling document processing.
Here, an export indicator and an export number is assigned which cause the incompleteness of the whole document due to missing export data.

Solution

A solution in the standard system is currently not planned since because of various customer requests the foreign trade data in the delivery should be accessed and maintained for domestic business too. An example is the inbound delivery in a bonded warehouse where the forwarding agent should get information already in advance.

To avoid incorrect billing documents, proceed as follows:
Copy data transport routine 001 to a routine 601 and enhance the new routine according to the attached correction instruction (RV60C601). Store this new data transport routine in Customizing for the copying control for billing documents for the processes you use, for example
- F2 - LF, item category TAN. (delivery-related)

If you already use an own data transport routine, in this data transport routine include the attached source code.

You must cancel existing billing documents and then create them again.
If you do not want to cancel existing documents, implement the attached correction (program RV60AFZZ) and release the documents either individually (VF02, default transaction) or via the list of blocked billing documents (VFX3).
After you completed the correction, you should cancel this solution (RV60AFZZ) again.
Also refer to the attached Note 170183.

代码修改:
方案一:

R3TR PROG RV60C601

FORM DATEN_KOPIEREN_601
Delta 001
Context Block
FORM DATEN_KOPIEREN_601.<script type="text/javascript">document.write('/r/n');</script><script type="text/javascript">document.write('/r/n');</script>
* Kopfdaten<script type="text/javascript">document.write('/r/n');</script>
* VBRK-xxxxx = ............<script type="text/javascript">document.write('/r/n');</script><script type="text/javascript">document.write('/r/n');</script>

Delete Block

Insert Block
* Prüfen Exportvorgang<script type="text/javascript">document.write('/r/n');</script>
  IF VBRK-LANDTX = VBRK-LAND1.<script type="text/javascript">document.write('/r/n');</script>
    CLEAR: VBRK-EXPKZ,<script type="text/javascript">document.write('/r/n');</script>
           VBRK-EXNUM.<script type="text/javascript">document.write('/r/n');</script>
  ENDIF.<script type="text/javascript">document.write('/r/n');</script><script type="text/javascript">document.write('/r/n');</script>

方法二

R3TR PROG RV60AFZZ

FORM USEREXIT_PRICING_PREPARE_TKOMK

Delta 001

Context Block
FORM USEREXIT_PRICING_PREPARE_TKOMK.<script type="text/javascript">document.write('/r/n');</script><script type="text/javascript">document.write('/r/n');</script>

Delete Block

            

Insert Block
* Prüfen Exportvorgang<script type="text/javascript">document.write('/r/n');</script>
  IF XVBRK-LANDTX = XVBRK-LAND1.<script type="text/javascript">document.write('/r/n');</script>
    CLEAR: XVBRK-EXPKZ,<script type="text/javascript">document.write('/r/n');</script>
           XVBRK-EXNUM.<script type="text/javascript">document.write('/r/n');</script>
  ENDIF.<script type="text/javascript">document.write('/r/n');</script><script type="text/javascript">document.write('/r/n');</script>
### 解决 `zlib.error: Error -5 while decompressing data: incomplete or truncated stream` 的方法 该错误通常出现在使用 `zlib` 或 `pip` 安装 Python 包、解压数据流或网络传输过程中,表示数据在解压时被截断或不完整,可能是由于文件损坏、网络中断或缓存污染等原因引起。 #### 1. 清除 pip 缓存并重试安装 当使用 `pip` 安装包时出现该错误,可能是因为 pip 缓存中存在损坏的文件。可以尝试清除缓存并重新安装包: ```bash pip cache purge pip install --no-cache-dir <package-name> ``` 这种方式可以避免因缓存中的损坏文件导致的解压失败问题[^2]。 #### 2. 使用 `--no-cache-dir` 参数安装包 在安装过程中跳过缓存机制,强制 pip 从远程下载新的包文件: ```bash pip install --no-cache-dir tensorflow-gpu ``` 此方法可有效避免因本地缓存文件损坏而导致的 zlib 解压错误。 #### 3. 检查网络连接并使用镜像源 如果问题出现在下载过程中,可能是由于网络不稳定导致下载的数据不完整。可以尝试更换 pip 源,例如使用国内镜像: ```bash pip install <package-name> -i https://pypi.tuna.tsinghua.edu.cn/simple ``` 这有助于提高下载稳定性和成功率,避免数据流中断[^1]。 #### 4. 验证文件完整性 当手动解压 `.tar.gz` 或 `.zip` 文件时出现该错误,应检查文件是否完整。可以通过校验文件哈希值(如 MD5、SHA256)确认是否损坏: ```bash sha256sum package.tar.gz ``` 将输出值与官方提供的哈希值进行比对,若不一致,则说明文件已损坏,需重新下载[^1]。 #### 5. 使用 `try-except` 捕获异常并重试 在代码中处理压缩数据流时,建议加入异常处理逻辑,以应对网络波动或临时性错误: ```python import zlib try: decompressed_data = zlib.decompress(compressed_data) except zlib.error as e: print(f"解压失败: {e}") # 可加入重试逻辑或记录日志 ``` 这种做法可以提高程序的健壮性,防止因数据流异常导致程序崩溃[^3]。 #### 6. 检查数据源或传输协议 在涉及网络传输或远程服务器获取数据的场景中,应检查数据是否在发送端被截断或压缩方式不一致。例如,在使用 `requests` 获取压缩数据时,确保响应头中包含 `Content-Encoding: gzip`,并在客户端正确处理: ```python import requests import gzip import io response = requests.get("http://example.com/data.gz") if response.headers.get("Content-Encoding") == "gzip": with gzip.GzipFile(fileobj=io.BytesIO(response.content)) as f: data = f.read() ``` 确保数据流在传输过程中未被截断或压缩格式不匹配[^4]。 --- ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值