当前位置:网站首页>Batch BOM Bapi test
Batch BOM Bapi test
2022-06-24 16:16:00 【a handsome young man.】
First create a piece of data in the foreground to test , Then import some necessary data from the front desk into bapi Inside . stay se37 It tests whether the creation is successful , This bapi No call required BAPI_TRANSACTION_COMMIT. Once created , You can assign values to other fields . Test corresponding to the front desk .
DATA: lv_aennr LIKE csap_mbom-aennr. "Change Numbe
DATA: lv_matnr LIKE csap_mbom-matnr VALUE 'ML-TG13', "Bom material
lv_plant LIKE csap_mbom-werks VALUE '1710',
lv_usage LIKE csap_mbom-stlan VALUE '1', "BOM usage
lv_stlal LIKE csap_mbom-stlal VALUE '1'. "Alternative BOM
DATA: gs_stko LIKE stko_api01, "header data
lv_fl LIKE capiflag-flwarning,
lv_bom LIKE stko_api02,
bom_no LIKE stko_api02-bom_no,
lv_date LIKE csap_mbom-datuv.
lv_date = sy-datum. "System dates cannot be used directly
DATA: gs_item LIKE TABLE OF stpo_api01 WITH HEADER LINE.
DATA: lt_dep_data LIKE TABLE OF csdep_dat,
lt_dep_descr LIKE TABLE OF csdep_desc,
lt_dep_order LIKE TABLE OF csdep_ord,
lt_dep_source LIKE TABLE OF csdep_sorc,
lt_dep_doc LIKE TABLE OF csdep_doc,
lt_ltx_line LIKE TABLE OF csltx_line,
lt_stpu LIKE TABLE OF stpu_api01,
lt_fsh_bomd TYPE TABLE OF fsh_tt_bomvd_api,
lt_sgt_bomc TYPE TABLE OF sgt_comp_segment_t,
gt_item LIKE TABLE OF stpo_api03 WITH HEADER LINE.
*head data
gs_stko-base_quan = '1'.
gs_stko-base_unit = 'PC'.
gs_stko-bom_status = '01'.
*create bom item data
*gs_item-item_categ = 'L'.
*gs_item-item_no = '0010'.
*gs_item-component = 'TKW_1015'.
*gs_item-comp_qty = '1'.
*gs_item-comp_unit = 'EA'.
*APPEND gs_item.
*
*CALL FUNCTION 'CSAP_MAT_BOM_CREATE'
* EXPORTING
* material = lv_matn
* plant = lv_plant
* bom_usage = lv_usage
* valid_from = lv_date
* i_stko = gs_stko
* IMPORTING
* bom_no = bom_no
* TABLES
* t_stpo = gs_item
* EXCEPTIONS
* error = 1
* OTHERS = 2.
cl_demo_output=>display_data( bom_no ).
*maintain bom data
gt_item-item_categ = 'L'.
*gt_item-item_no = '0030'. "Maintenance may not be added
gt_item-component = 'MZ-PROC-MC-AD-3102'.
gt_item-comp_qty = '1'.
gt_item-comp_unit = 'EA'.
APPEND gt_item.
CALL FUNCTION 'CSAP_MAT_BOM_MAINTAIN'
EXPORTING
material = lv_matn
plant = lv_plant
bom_usage = lv_usage
alternative = lv_stlal
valid_from = lv_date
change_no = lv_aenn
i_stko = gs_stko
fl_commit_and_wait = 'X'
fl_bom_create = 'X'
fl_new_item = 'X'
fl_complete = 'X'
IMPORTING
fl_warning = lv_fl
o_stko = lv_bom
TABLES
t_stpo = gt_item
EXCEPTIONS
error = 1
OTHERS = 2.
边栏推荐
- Snowflake algorithm implemented in go language
- Where is the most formal and safe account opening for speculation futures? How to open a futures account?
- 日志记录真没你想的那么简单
- nifi从入门到实战(保姆级教程)——环境篇
- Using oasis to develop a hop by hop (I) -- Scene Building
- 60 个神级 VS Code 插件!!
- Several characteristics of pharmaceutical industry
- Rush for IPO, Hello, I'm in a hurry
- 存在安全隐患 路虎召回部分混动揽运
- [download attached] installation and simple use of Chinese version of awvs
猜你喜欢
![[C language questions -- leetcode 12 questions] take you off and fly into the garbage](/img/ca/a356a867f3b7ef2814080fb76b9bfb.png)
[C language questions -- leetcode 12 questions] take you off and fly into the garbage

几种常见的DoS攻击

SIGGRAPH 2022 | 真实还原手部肌肉,数字人双手这次有了骨骼、肌肉、皮肤

Several common DoS attacks

Nifi from introduction to practice (nanny level tutorial) - environment

打破内存墙的新利器成行业“热搜”!持久内存让打工人也能玩转海量数据+高维模型

C. K-th Not Divisible by n(数学+思维) Codeforces Round #640 (Div. 4)

存在安全隐患 部分冒险家混动版将召回

一文理解OpenStack网络

Still worried about missing measurements? Let's use Jacobo to calculate the code coverage
随机推荐
微信公众号调试与Natapp环境搭建
great! The novel website project is completely open source
Some adventurer hybrid versions with potential safety hazards will be recalled
ThinkPHP 漏洞利用工具
2021-04-24: handwriting Code: topology sorting.
The catch-up of domestic chips has scared Qualcomm, the leader of mobile phone chips in the United States, and made moves to cope with the competition
Some experiences of K project: global template highlights
I just came back from the Ali software test. I worked for Alibaba P7 in 3+1, with an annual salary of 28*15
日志记录真没你想的那么简单
Build go command line program tool chain
MySQL timestamp format conversion date format string
60 divine vs Code plug-ins!!
2021-04-29: given an array arr, it represents a row of balloons with scores. One for each blow
Istio FAQ: region awareness does not take effect
Global and Chinese markets of Leyte coin exchange 2022-2028: Research Report on technology, participants, trends, market size and share
Using alicloud RDS for SQL Server Performance insight to optimize database load - first understanding of performance insight
Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)
一文理解OpenStack网络
60 个神级 VS Code 插件!!
C. K-th Not Divisible by n(数学+思维) Codeforces Round #640 (Div. 4)