Chinaunix首页 | 论坛 | 博客
  • 博客访问: 481521
  • 博文数量: 199
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1902
  • 用 户 组: 普通用户
  • 注册时间: 2020-05-14 13:25
个人简介

代码5S

文章分类

全部博文(199)

文章存档

2021年(5)

2020年(194)

我的朋友

分类: 其他平台

2020-05-29 15:25:07


点击(此处)折叠或打开

  1. *获取批次的属性
  2. FORM FRM_GET_BATCH_FB.
  3.   DATA:OBTAB TYPE TABELLE,
  4.        KLART TYPE KLASSENART,
  5.        CLASS TYPE KLASSE_D,
  6.        E_OBJEK TYPE CUOBN,
  7.        OBJECTKEY TYPE BAPI1003_KEY-OBJECT,
  8.        OBJELONG TYPE BAPI1003_KEY-OBJECT_LONG.

  9.   DATA:LS_NUM TYPE BAPI1003_ALLOC_VALUES_NUM,
  10.        LT_NUM TYPE TABLE OF BAPI1003_ALLOC_VALUES_NUM,
  11.        LS_CHAR TYPE BAPI1003_ALLOC_VALUES_CHAR,
  12.        LT_CHAR TYPE TABLE OF BAPI1003_ALLOC_VALUES_CHAR,
  13.        LS_CURR TYPE BAPI1003_ALLOC_VALUES_CURR,
  14.        LT_CURR TYPE TABLE OF BAPI1003_ALLOC_VALUES_CURR,
  15.        LS_RET TYPE BAPIRET2,
  16.        LT_RET TYPE TABLE OF BAPIRET2.

  17.   CALL FUNCTION 'VB_BATCH_2_CLASS_OBJECT'
  18.     EXPORTING
  19.       I_MATNR = GS_FB-MATNR
  20.       I_CHARG = GS_FB-CHARG
  21.       I_WERKS = GS_FB-WERKS
  22.     IMPORTING
  23.       E_OBTAB = OBTAB
  24.       E_KLART = KLART
  25.       E_CLASS = CLASS
  26.       E_OBJEK = E_OBJEK.

  27.   OBJECTKEY = E_OBJEK.
  28.   OBJELONG = E_OBJEK.

  29.   CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
  30.     EXPORTING
  31.       OBJECTTABLE = OBTAB
  32.       CLASSNUM = CLASS
  33.       CLASSTYPE = KLART
  34.       OBJECTKEY = OBJECTKEY
  35.       OBJECTKEY_LONG = OBJELONG
  36.     TABLES
  37.       ALLOCVALUESNUM = LT_NUM
  38.       ALLOCVALUESCHAR = LT_CHAR
  39.       ALLOCVALUESCURR = LT_CURR
  40.       RETURN = LT_RET.

  41.   CLEAR:LS_NUM.
  42.   READ TABLE LT_NUM INTO LS_NUM WITH KEY
  43.     CHARACT = 'Z_LENGHT'.
  44.   IF SY-SUBRC EQ 0.
  45.     GS_FB-ZJJCPLTH = LS_NUM-VALUE_FROM.
  46.   ENDIF.

  47.   CLEAR:LS_NUM.
  48.   READ TABLE LT_NUM INTO LS_NUM WITH KEY
  49.     CHARACT = 'Z_WITDH'.
  50.   IF SY-SUBRC EQ 0.
  51.     GS_FB-ZJJCPWTH = LS_NUM-VALUE_FROM.
  52.   ENDIF.

  53.   CLEAR:LS_NUM.
  54.   READ TABLE LT_NUM INTO LS_NUM WITH KEY
  55.     CHARACT = 'Z_HIGHT'.
  56.   IF SY-SUBRC EQ 0.
  57.     GS_FB-ZJJCPSTH = LS_NUM-VALUE_FROM.
  58.   ENDIF.

  59.   CLEAR:LS_CHAR.
  60.   READ TABLE LT_CHAR INTO LS_CHAR WITH KEY
  61.     CHARACT = 'Z_HLH'.
  62.   IF SY-SUBRC EQ 0.
  63.     GS_FB-Z_HLH = LS_CHAR-VALUE_CHAR.
  64.   ENDIF.

  65.   CLEAR:LS_CHAR.
  66.   READ TABLE LT_CHAR INTO LS_CHAR WITH KEY
  67.     CHARACT = 'Z_TH'.
  68.   IF SY-SUBRC EQ 0.
  69.     GS_FB-Z_TH = LS_CHAR-VALUE_CHAR.
  70.   ENDIF.
  71. ENDFORM.

阅读(1527) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~