作者心声:文章内容无序、无分类、无逻辑,仅是实战过程中的点滴记录,有些功能长时间没有重复接触,忘记时在回顾... ...
重新进入,选择【附加】->【调整模板】。
方式1:BCALV_TEST_FULLSCREEN
方式2:SAPLKKBL STANDARD_FULLSCREEN
→ 【转到】-【对象条目条目】-【锁定概览】
→ 【实用程序】-【版本管理】 → 【版本比较】
SET PARAMETER ID 'AUN' FIELD LS_PLAN-FLYNO.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
REPORT ZPM_RP0010 NO STANDARD PAGE HEADING.
→ 转到→ 对象目录条目→ 概览
用自己的账号,调试其他人写的程序
在程序编辑界面 --> 选择 【实用程序】→【设置】→如下截图
MODIFY ztest_marc FROM TABLE lt_marc.
INTO CORRESPONDING FIELDS OF TABLE gt_results
APPENDING CORRESPONDING FIELDS OF TABLE gt_results
" 根据 交货单号码 相等从 自建表 中取得现有的数据并赋值到 内表itab
SELECT *
FROM ztsd_dn_to_wms
INNER JOIN likp ON likp~vbeln = ztsd_dn_to_wms~vbeln
INNER JOIN lips ON lips~vbeln = ztsd_dn_to_wms~vbeln
AND lips~posnr = ztsd_dn_to_wms~posnr
INTO CORRESPONDING FIELDS OF TABLE gt_tab
WHERE ztsd_dn_to_wms~vbeln IN iv_vbeln
AND ztsd_dn_to_wms~zwms_flag IN iv_zwmsf
AND likp~lifsk = ''
AND likp~zbusiness = 'X'.
SELECT *
FROM ztsd_dn_to_wms
APPENDING CORRESPONDING FIELDS OF TABLE gt_tab
WHERE ztsd_dn_to_wms~vbeln IN iv_vbeln
AND ztsd_dn_to_wms~zwms_flag IN iv_zwmsf
AND ztsd_dn_to_wms~updkz = 'D'.
IF gt_tab IS INITIAL.
MESSAGE TEXT-002 TYPE 'S' DISPLAY LIKE 'E'.
LEAVE TO LIST-PROCESSING. " 直接退出主程序。
ELSE.
" 按照 VBELN 和 POSNR 进行排序。去重
SORT gt_tab BY vbeln posnr.
DELETE ADJACENT DUPLICATES FROM gt_tab COMPARING vbeln posnr.
PERFORM get_dn_data.
ENDIF.
MESSAGE s001(zme_material_alv) DISPLAY LIKE 'E'.
MESSAGE '没有获取到数据,请重新检索!' TYPE 'E'.
S001
W001
E001
进入切换路径:
C:\Windows\System32\drivers\etc
环境与IP的对应关系表
172.16.1.10 s4dev01.torch.cn s4dev01
172.16.1.11 s4qas01.torch.cn s4qas01
172.16.3.10 hanadev01.torch.cn hanadev01
172.16.1.20 s4prd01.torch.cn s4prd01
172.16.1.21 s4prd02.torch.cn s4prd02
172.16.1.22 s4prdascs.torch.cn s4prdascs
172.16.1.23 s4prders.torch.cn s4prders
Host 环境:
172.16.1.10 s4dev01.torch.cn
172.16.1.11 s4qas01.torch.cn
172.16.3.10 hanadev01.torch.cn
172.16.1.20 s4prd01.torch.cn
172.16.1.21 s4prd02.torch.cn
172.16.1.22 s4prdascs.torch.cn
172.16.1.23 s4prders.torch.cn
CALL SCREEN 9001 STARTING AT 10 5 ENDING AT 85 16.
DD07T 的数据表结构
SELECT SINGLE DDTEXT INTO IZGROUP FROM DD07T WHERE DOMNAME = 'RFBSK'
AND VALPOS = 'A'.
DATA: gr_date TYPE RANGE OF sy-datum,
gw_date LIKE LINE OF gr_date.
gw_date-sign = 'I'.
gw_date-option = 'BT'. " EQ
gw_date-low = '20201023'
gw_date-high = ''
APPEND gw_date TO gr_date.
RANGES: "lr_hkont FOR faglflext-racct,
lr_hkont = VALUE #( sign = 'I' option = 'CP'
( low = '1001*' )
( low = '1002*' )
)
Scene1 :用于SM30表维护的权限处理
Step1:SE93
VIEWNAME ZTFI_XJLLM
UPDATE X
,
Step1: sap系统需要实现的功能演示
S4系统 ,需要双击进去
REPORT yrtext.
DATA:gs_header TYPE thead .
DATA:gt_ltxts TYPE STANDARD TABLE OF tline .
DATA:lw_ltxt TYPE tline .
START-OF-SELECTION .
CLEAR gt_ltxts[].
CLEAR lw_ltxt.
lw_ltxt-tdformat = '1' .
lw_ltxt-tdline = 'this is create by save_text.'.
APPEND lw_ltxt TO gt_ltxts.
CLEAR gs_header .
gs_header-tdobject = 'EKPO' .
gs_header-tdid = 'F01'.
gs_header-tdspras = '1'.
gs_header-tdname = '0080000001'.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = gs_header
* INSERT = ' '
* SAVEMODE_DIRECT = ' '
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
lines = gt_ltxts.
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* OBJECT = 4
* OTHERS = 5
sy-subrc = 0.
CREATENO ERDAT 记录的创建日期
CREATEBY ERNAM 创建对象的人员名称
PERFORM zfi_preform_auth_by_bukrs_list TABLES s_bukrs[].
FORM zfi_preform_auth_by_bukrs_list TABLES lt_auth_rbukrs STRUCTURE zsfi_bukrs.
IF lt_auth_rbukrs[] IS NOT INITIAL.
LOOP AT lt_auth_rbukrs.
IF lt_auth_rbukrs-sign = 'I' AND lt_auth_rbukrs-option = 'EQ'.
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'BUKRS' FIELD lt_auth_rbukrs-low
ID 'ACTVT' FIELD '03'.
IF sy-subrc <> 0.
MESSAGE '你没' && lt_auth_rbukrs-low && '公司代码的权限' TYPE 'E'.
ENDIF.
ELSE.
MESSAGE '公司代码输入数据有误' TYPE 'E'.
ENDIF.
ENDLOOP.
ELSE.
ENDIF.
ENDFORM.
搜索帮助 联动查询如何开发
由三步完成:
1.创建参数标识、
2.将创建的标识ZCD ,填入到搜索帮助中,完成一次GET VALUE 的过程。
3.在程序中绑定参数标识。完成一次 SET VALUE的过程。
具体步骤如下:
1.创建参数标识:
2.将创建的标识ZCD ,填入到搜索帮助中
3.在程序中绑定参数标识
函数处理异常处理:
raise no_data
1,调用函数
call function
2,调用屏幕 (diolog)
call screen
3,调用事务码
call transaction
4,调用字程序
PERFORM prm_name.
5,调用 smartform
调用类方法。
LOOP AT gt_alv2 ASSIGNING FIELD-SYMBOL(
PERFORM do6z2 USING
lv_mwsbp_sum = lv_mwsbp_sum +
AT END OF vbeln+0(10).
READ TABLE lt_mwsbp INTO ls_mwsbp WITH KEY vbeln =
IF sy-subrc = 0.
CLEAR:lv_mwsbp_sum.
ENDIF.
ENDAT.
ENDLOOP.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'ZDT_SD014'
LOOP AT gt_data.
CHAIN.
FIELD gs_data-matnr MODULE get_matnr ON REQUEST.
FIELD gs_data-entry_qnt.
FIELD gs_data-labst.
FIELD gs_data-meins.
FIELD gs_data-brand.
9 FIELD gs_data-maktx.
FIELD gs_data-mfrpn.
MODULE zdt_sd014_modify ON CHAIN-REQUEST.
ENDCHAIN.
FIELD gs_data-check
MODULE zdt_sd014_mark ON REQUEST.
ENDLOOP.
MODULE zdt_sd014_user_command.
ON INPUT 初始值改变触发
DATA(lt_pr_tmp) = gt_pr.
DELETE lt_pr_tmp WHERE check <> 'X'.
DATA(lv_lines) = lines( lt_pr_tmp ).
IF lv_lines > 1.
MESSAGE '只能勾选一行查询' TYPE 'E'.
ELSE.
TRY .
DATA(ls_pr) = lt_pr_tmp[ 1 ].
SET PARAMETER ID 'BAN' FIELD ls_pr-banfn.
CALL TRANSACTION 'ME53N'.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDIF.