Files
sap-cli-skill/log/adt-set-source-500.md
T

61 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "ADT set_source 500 — 传输请求无对象导致写入失败"
created: 2026-08-05
updated: 2026-08-05
type: error
tags: [adt, sap, error, transport, nw740]
adt_endpoint: /sap/bc/adt/programs/programs/<name>/source/main
adt_method: PUT
---
# ADT set_source 500: 传输请求无对象导致写入失败
## 症状
```
✓ 锁定成功(传输请求: DEVK901326
✓ 解锁成功
✗ set_source → HTTP 500 Server Error
```
- Lock 返回成功
- 写入源码时 500
- `transport objects --corr_nr DEVK901326` 返回「传输请求中无对象」
## 根因
ADT 的 lock API 会创建锁句柄(返回 lockHandle),但**不一定将对象真正绑定到传输请求**。
NW 7.40 系统上,对象写入前必须先通过 SE09/SE10 手动将对象(如 `R3TR PROG ZIDTR_AI_ASSISTANT`)加入传输请求任务列表。
Lock 成功 ≠ 传输绑定成功。
## 解决方案
1. **SE09 手动操作**:打开传输请求 DEVK901326 → 添加对象 `R3TR PROG <program_name>`
2. 重新执行 `sync``upload + activate`
## 验证
```bash
python main.py transport objects --corr_nr DEVK901326
# 应显示包含目标对象
```
## 代码示例
```
# 错误流程(会 500
python main.py sync --name ZXXX --type report --path ./xxx.abap --corr_nr DEVK901326
# → lock OK, write 500
# 正确流程
# 1. SE09 → 手动添加 R3TR PROG ZXXX 到 DEVK901326
# 2. 重新 sync
python main.py sync --name ZXXX --type report --path ./xxx.abap --corr_nr DEVK901326
# → lock OK, write OK, syntax-check OK, activate OK
```
## 相关错误
- [[adt-nw740-open-sql-consistency]] — NW 7.40 @ 转义一致性错误