Movilizer for SAP - 如何重复调用同一个 movelet 屏幕?
Posted
技术标签:
【中文标题】Movilizer for SAP - 如何重复调用同一个 movelet 屏幕?【英文标题】:Movilizer for SAP - How to call the same movelet screen repeatedly? 【发布时间】:2016-07-18 04:21:35 【问题描述】:我需要在 Movelet 中重复调用同一屏幕(问题)以填充并将其字段发送到 SAP。 屏幕调用次数将根据变量值动态设置。
有可能做到吗?我该怎么做?
提前致谢。
【问题讨论】:
【参考方案1】:这是可能的。创建一个生成屏幕的方法(例如)ADD_LOOP_SCR:
IV_SCREEN_KEY TYPE /MOVI/LZR_ANSWER_KEY Movilizer: Answer Key
IV_NEXT_SCR_KEY TYPE /MOVI/LZR_ANSWER_KEY Movilizer: Answer Key
CS_MOVELET TYPE /MOVI/MS_ST_BUSSTEP_STRUCTURE Movelet structure
实现(Epsilon 示例)
DATA:
lr_screen TYPE REF TO /movi/ms_st_screen_epsilon,
lr_answer TYPE REF TO /movi/ms_st_answer.
APPEND INITIAL LINE TO cs_movelet-epsilon_screens REFERENCE INTO lr_screen.
lr_screen->key = iv_screen_key.
APPEND INITIAL LINE TO lr_screen->answers REFERENCE INTO lr_answer.
CONCATENATE 'AK_' iv_screen_key INTO lr_answer->key.
CONCATENATE 'CK_' iv_screen_key INTO lr_answer->client_key.
lr_answer->next_screen_key = iv_next_scr_key.
lr_answer->followup_action = /movi/dsd_if_const=>movilizer-followup_action_none.
add_XXXXXX_mel(
EXPORTING
...... if needed
CHANGING
ct_mel_expressions = lr_screen->mel_expressions
ct_validations = lr_screen->validations
ct_restrictions = lr_screen->restrictions ).
然后主要在GENERATE方法中:
es_movelet-first_screen_key = 'SK_LOOPSCREEN_001'.
DATA:
lv_i TYPE numc3,
lv_sk TYPE /movi/lzr_answer_key,
lv_next_sk TYPE /movi/lzr_answer_key.
DO 5 TIMES.
lv_i = sy-index.
CONCATENATE 'SK_LOOPSCREEN_' lv_i INTO lv_sk.
ADD 1 TO lv_i.
IF lv_i > 5.
lv_next_sk = /movi/lzr_if_constants=>movilizer_movelet_exit_key.
ELSE.
CONCATENATE 'SK_LOOPSCREEN_' lv_i INTO lv_next_sk.
ENDIF.
add_generate_printout_data_scr( EXPORTING iv_screen_key = lv_sk
iv_next_scr_key = lv_next_sk
CHANGING cs_movelet = es_movelet ).
ENDDO.
祝你好运,干杯, 阿列克
【讨论】:
感谢您的帮助,Aleq!以上是关于Movilizer for SAP - 如何重复调用同一个 movelet 屏幕?的主要内容,如果未能解决你的问题,请参考以下文章
Movilizer - 通过 Web 服务调用以编程方式设置云用户的密码
SAP Cloud for Customer客户主数据的重复检查-Levenshtein算法
SAP录屏,在Excel里用for重复运行维护数据时,遇到SAP弹出异常提示对话框怎么办?