26 Kasım 2011 Cumartesi

SAP/ABAP: VC_I_GET_CONFIGURATION FM (Malzemenin Karakteristiği)

FORM VC_I_GET_CONFIGURATION  USING    P_VBAPC_CUOBJ
CHANGING P_VBAPC STRUCTURE VBAPC.

CHECK P_VBAPC_CUOBJ IS NOT INITIAL.

DATA: LT_CONFIGURATION  LIKE TABLE OF CONF_OUT WITH HEADER LINE.

CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE                    = P_VBAPC_CUOBJ
LANGUAGE                    = SY-LANGU
IV_MAX_MASSPROCESSING       = 0
IV_NO_VALUE_CHECK           = 'X'

TABLES
CONFIGURATION               = LT_CONFIGURATION
*   CONFIGURATION_IDOC          =
EXCEPTIONS
INSTANCE_NOT_FOUND          = 1
INTERNAL_ERROR              = 2
NO_CLASS_ALLOCATION         = 3
INSTANCE_NOT_VALID          = 4
OTHERS                      = 5.

LOOP AT LT_ZSDT_KARAKTERIST INTO LS_ZSDT_KARAKTERIST.

CASE LS_ZSDT_KARAKTERIST-FIELD.
WHEN 'ATINN1'.

CLEAR: LT_CONFIGURATION.
READ TABLE LT_CONFIGURATION
WITH KEY ATINN = LS_ZSDT_KARAKTERIST-ATINN.
IF SY-SUBRC EQ 0.
P_VBAPC-ATNAM1 = LT_CONFIGURATION-ATWTB.
ENDIF.

WHEN 'ATINN2'.

CLEAR: LT_CONFIGURATION.
READ TABLE LT_CONFIGURATION
WITH KEY ATINN = LS_ZSDT_KARAKTERIST-ATINN.
IF SY-SUBRC EQ 0.
P_VBAPC-ATNAM2 = LT_CONFIGURATION-ATWTB.
ENDIF.

WHEN 'ATINN3'.

CLEAR: LT_CONFIGURATION.
READ TABLE LT_CONFIGURATION
WITH KEY ATINN = LS_ZSDT_KARAKTERIST-ATINN.
IF SY-SUBRC EQ 0.
P_VBAPC-ATNAM3 = LT_CONFIGURATION-ATWTB.
ENDIF.

WHEN 'ATINN4'.

CLEAR: LT_CONFIGURATION.
READ TABLE LT_CONFIGURATION
WITH KEY ATINN = LS_ZSDT_KARAKTERIST-ATINN.
IF SY-SUBRC EQ 0.
P_VBAPC-ATNAM4 = LT_CONFIGURATION-ATWTB.
ENDIF.

ENDCASE.

ENDLOOP.

ENDFORM.                    " VC_I_GET_CONFIGURATION

Hiç yorum yok:

Yorum Gönder

İnsdroid

Sabahtan beri çatada çutada çatada çutada… Bitmedi yine de… Neyse, yolumuz uzun, toparlıyorum çantamı, adaptörü falan tıkıştırıyorum bir şe...