DATA: LV_STR_VALUE TYPE BDC_FVAL.
对金额进行单独处理,不然一直报错
例子:VK11
PERFORM BDC_DYNPRO1 USING ‘SAPMV13A’ ‘0100’.
PERFORM BDC_FIELD1 USING ‘BDC_CURSOR’
‘RV13A-KSCHL’.
PERFORM BDC_FIELD1 USING ‘BDC_OKCODE’
‘/00’.
PERFORM BDC_FIELD1 USING ‘RV13A-KSCHL’
<FS_FIELD>-KSCHL.
PERFORM BDC_DYNPRO1 USING ‘SAPLV14A’ ‘0100’.
PERFORM BDC_FIELD1 USING ‘BDC_CURSOR’
‘RV130-SELKZ(01)’.
PERFORM BDC_FIELD1 USING ‘BDC_OKCODE’
‘=WEIT’.
PERFORM BDC_DYNPRO1 USING ‘SAPMV13A’ ‘1030’.
PERFORM BDC_FIELD1 USING ‘BDC_CURSOR’
‘RV13A-DATBI(01)’.
PERFORM BDC_FIELD1 USING ‘BDC_OKCODE’
‘/00’.
PERFORM BDC_FIELD1 USING ‘KOMG-VKORG’
<FS_FIELD>-VKORG.
PERFORM BDC_FIELD1 USING ‘KOMG-VTWEG’
<FS_FIELD>-VTWEG.
PERFORM BDC_FIELD1 USING ‘KOMG-KUNNR’
<FS_FIELD>-KUNNR.
PERFORM BDC_FIELD1 USING ‘KOMG-KONDM(01)’
<FS_FIELD>-MATKL.
IF NOT <FS_FIELD>-KBETR IS INITIAL.
CLEAR LV_STR_VALUE.
WRITE <FS_FIELD>-KBETR TO LV_STR_VALUE.
CONDENSE LV_STR_VALUE.
PERFORM BDC_FIELD1 USING ‘KONP-KBETR(01)’
LV_STR_VALUE.
-
PERFORM BDC_FIELD1 TABLES BDC: -
ENDIF.USING 'KONP-KBETR(01)' LV_STR_VALUE. "价格
PERFORM BDC_FIELD1 USING ‘KONP-KONWA(01)’
‘RMB’.
PERFORM BDC_FIELD1 USING ‘RV13A-DATAB(01)’
<FS_FIELD>-DATAB.
PERFORM BDC_FIELD1 USING ‘RV13A-DATBI(01)’
<FS_FIELD>-DATBI.
PERFORM BDC_DYNPRO1 USING ‘SAPMV13A’ ‘1030’.
PERFORM BDC_FIELD1 USING ‘BDC_CURSOR’
‘KOMG-KONDM(01)’.
PERFORM BDC_FIELD1 USING ‘BDC_OKCODE’
‘=SICH’.
CALL TRANSACTION ‘VK11’ USING BDCDATA MODE ‘N’
UPDATE ‘S’
MESSAGES INTO GT_MESSTAB…

这篇博客详细介绍了如何在SAP程序中使用BDC(Batch Data Communication)处理金额字段KBETR。通过一系列的PERFORM语句,展示了动态调用屏幕和设置字段值的过程,包括金额的输入、确认和更新操作。内容涉及到交易代码VK11的相关处理。

588

被折叠的 条评论
为什么被折叠?



