# OpenListItem

### int OpenListItem(int lMsgId)

SECS 메시지 작성 중 새로운 List(L) 구조를 시작합니다. 이 함수를 호출한 후에는 해당 리스트 내부에 포함될 아이템들(데이터 혹은 하위 리스트)을 추가하게 되며, 모든 아이템 추가가 끝나면 반드시 \*\*`CloseListItem`\*\*을 호출하여 리스트 작성을 완료해야 합니다.

Parameters

<table data-header-hidden><thead><tr><th width="247"></th><th width="122"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>lMsgId</td><td>int</td><td>현재 작성 중인 메시지의 고유 ID</td></tr></tbody></table>

{% hint style="danger" %}
모든 아이템 추가가 끝나면 반드시 \*\*CloseListItem\*\*을 호출하여 리스트 작성을 완료해야 합니다.
{% endhint %}

<pre class="language-csharp"><code class="lang-csharp">// S6F11 같은 복잡한 메시지 구성 시
int msgId = m_gem.CreateMsg(6, 11, 1);

if (msgId > 0)
{
    // 리스트 시작
    m_gem.<a data-footnote-ref href="#user-content-fn-1">OpenListItem</a>(msgId); 
    {
        m_gem.AddU4Item(msgId, ref dataId);   // DATAID
        m_gem.AddU4Item(msgId, ref ceid);     // CEID
        
        // 하위 리스트 시작
        m_gem.OpenListItem(msgId); 
        {
            m_gem.AddU4Item(msgId, ref rptid); // RPTID
            // ... 데이터 아이템 추가
        }
        m_gem.CloseListItem(msgId); // 하위 리스트 닫기
    }
    m_gem.<a data-footnote-ref href="#user-content-fn-2">CloseListItem</a>(msgId); // 전체 리스트 닫기

    m_gem.SendMsg(msgId);
}
</code></pre>

[^1]: List열기

[^2]: List 닫기(필수)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/item/openlistitem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
