*----------------------------------------------------------------------*
* Batchinputdata of single transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
* Nodata-Character
DATA: nodata_character VALUE ''.
DATA: gv_string TYPE string.
*----------------------------------------------------------------------*
* create batchinput session *
*----------------------------------------------------------------------*
FORM open_group
USING p_group LIKE apqi-groupid
p_user LIKE apqi-userid
p_keep LIKE apqi-qerase
p_holddate LIKE apqi-startdate
p_ctu LIKE apqi-putactive.
IF p_ctu <> 'X'.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = p_group
user = p_user
keep = p_keep
holddate = p_holddate.
ENDIF.
ENDFORM.
*----------------------------------------------------------------------*
* end batchinput session *
*----------------------------------------------------------------------*
FORM close_group USING p_ctu LIKE apqi-putactive.
IF p_ctu <> 'X'.
* close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDIF.
ENDFORM.
*----------------------------------------------------------------------*
* Start new transaction according to parameters *
*----------------------------------------------------------------------*
FORM bdc_transaction TABLES p_messtab
USING p_tcode
p_ctu
p_mode
p_update.
DATA: l_subrc LIKE sy-subrc.
IF p_ctu <> 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = p_tcode
TABLES
dynprotab = bdcdata
EXCEPTIONS
OTHERS = 1.
ELSE.
CALL TRANSACTION p_tcode USING bdcdata
MODE p_mode
UPDATE p_update
MESSAGES INTO p_messtab.
ENDIF.
l_subrc = sy-subrc.
REFRESH bdcdata.
sy-subrc = l_subrc.
ENDFORM.
*----------------------------------------------------------------------*
* Start new screen *
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM.
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
* IF fval <> NODATA_CHARACTER.
CLEAR gv_string.
CLEAR bdcdata.
bdcdata-fnam = fnam.
gv_string = fval.
bdcdata-fval = gv_string.
APPEND bdcdata.
* ENDIF.
ENDFORM.
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM bdc_nodata USING p_nodata.
nodata_character = p_nodata.
ENDFORM.
相关文章
- 01-21【软件收集】四款免费录播录屏演示有关的软件
- 01-21转:三款免费好用的Gif录屏神器
- 01-21简易的Mac录屏软件
- 01-21ABAP-BDC录屏形成的INCLUDE
- 01-21【每日一具12】超级好用的录屏软件,赶紧收藏
- 01-21录制手机屏幕视频 好用的录屏软件推荐
- 01-21小心BDC录屏带有行项目输入的坑
- 01-21AForge.Video.FFMPEG.VideoFileWriter 录屏失败需要注意的一个坑
- 01-21javaCV开发详解之9补充篇:基于avfoundation的苹果Mac和ios获取屏幕画面及录屏/截屏以及摄像头画面和音频采样获取实现
- 01-21在Mac电脑上为iPhone或iPad录屏的方法