How to read the sales order line item characteristic value -VC_I_GET_CONFIGURATION

1. foreground operation

The property values ​​can be read on the sales order line items by function VC_I_GET_CONFIGURATION.

Future operations, tcode VA03, double-click into the line item

Double-click the Characteristics button

You can see the characteristics Actual Lead Time-total has a value, 16.0 days, double-click the exclamation mark button on the right.

You can see properties ID

2. Sample Code

The code can take the following order 300 to the upper row item characteristic value of WIF_9000_ACLTT_A

REPORT ztest_read_so_characteristic.

DATA: lit_confi TYPE STANDARD TABLE OF conf_out,
      lwa_confi TYPE conf_out.
DATA:l_cuobj TYPE vbap-cuobj.

SELECT SINGLE cuobj
  FROM vbap
  INTO l_cuobj
 WHERE vbeln = '0640001056'
   AND posnr = '000300'.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
  EXPORTING
    instance            = l_cuobj
    language            = sy-langu
  TABLES
    configuration       = lit_confi
  EXCEPTIONS
    instance_not_found  = 1
    internal_error      = 2
    no_class_allocation = 3
    instance_not_valid  = 4
    OTHERS              = 5.

READ TABLE lit_confi INTO lwa_confi WITH KEY atnam = 'WIF_9000_ACLTT_A'.
IF sy-subrc = 0.
  WRITE: lwa_confi-atwrt.
ENDIF.

运行结果:

以上。

Guess you like

Origin www.cnblogs.com/datie/p/11433595.html