如何获取给定项目编号的空白字段?

How to obtain the blank fields for given item number?

对于 pt_mstr 中的给定商品代码,我想要所有为该商品代码记录留空的字段。

你能帮我写出上述问题的代码吗

类似于:

DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE VARIABLE i       AS INTEGER NO-UNDO.
DEFINE VARIABLE hField  AS HANDLE NO-UNDO.

ASSIGN hBuffer = BUFFER pt_mstr:HANDLE .

DO i = 1 TO hBuffer:NUM-FIELDS:

    ASSIGN hField = hBuffer:BUFFER-FIELD (i) .

    IF hField:DATA-TYPE = "CHARACTER" AND (hField:BUFFER-VALUE = "" OR hField:BUFFER-VALUE = ?) THEN 
        MESSAGE hField:NAME "is empty"
            VIEW-AS ALERT-BOX. 

END.

如果有数组,您必须根据 hField:EXTENT 迭代它们并使用 hField:BUFFER-VALUE[j] 访问字段值。