SMW0上传图片
然后主要是通过设置SSM_CUST这张表来控制的,
主要通过行 START_IMAGE 图片的对象名称
例如:
效果
通过程序控制该行值,在SM36设置后台作业,就可以做到每天更换背景图了。
附代码:

REPORT ZIT0004. INCLUDE zit0004_head. INCLUDE zit0004_screen. INCLUDE zit0004_form. START-OF-SELECTION. PERFORM frm_get_data.
包含文件ZIT0004_HEAD:

*&---------------------------------------------------------------------* *& 包含 ZIT0004_HEAD *&---------------------------------------------------------------------* DATA: gt_wwwparams LIKE TABLE OF wwwparams, gt_ssm_cust LIKE TABLE OF ssm_cust.
包含文件ZIT0004_SCREEN:

*&---------------------------------------------------------------------* *& 包含 ZIT0004_SCREEN *&---------------------------------------------------------------------* PARAMETERS: p_objid TYPE wwwparams-objid DEFAULT 'ZTYH001'.
包含文件ZIT0004_FORM:

*&---------------------------------------------------------------------* *& 包含 ZIT0004_FORM *&---------------------------------------------------------------------* *&---------------------------------------------------------------------* *& Form FRM_GET_DATA *&---------------------------------------------------------------------* *& text *&---------------------------------------------------------------------* *& --> p1 text *& <-- p2 text *&---------------------------------------------------------------------* FORM frm_get_data . *BREAK-POINT. DATA: lv_lines TYPE sy-tabix, lv_lines2 TYPE sy-tabix, lv_lens TYPE sy-tabix, lt_ssm_cust LIKE TABLE OF ssm_cust, lt_ssm_cust2 LIKE TABLE OF ssm_cust. SELECT * INTO TABLE gt_wwwparams FROM wwwparams WHERE objid LIKE 'ZTYH%' AND name EQ 'mimetype' AND value IN ('jpg','JPG','png','PNG'). SELECT * INTO TABLE gt_ssm_cust FROM ssm_cust WHERE id EQ 'START_IMAGE'. DESCRIBE TABLE gt_wwwparams LINES lv_lines2. READ TABLE gt_ssm_cust INTO DATA(ls_ssm_cust) INDEX 1. IF sy-subrc EQ 0. lv_lens = strlen( ls_ssm_cust-path ). lv_lens = lv_lens - 4. lv_lines = ls_ssm_cust-path+4(lv_lens). ADD 1 TO lv_lines. ENDIF. IF lv_lines > lv_lines2. lv_lines = 1. ENDIF. SORT gt_wwwparams[] BY objid. READ TABLE gt_wwwparams INTO DATA(ls_wwwparams) INDEX lv_lines. IF sy-subrc EQ 0. ls_ssm_cust-id = 'START_IMAGE'. ls_ssm_cust-path = ls_wwwparams-objid. APPEND ls_ssm_cust TO lt_ssm_cust. ENDIF. IF NOT p_objid IS INITIAL. SELECT * INTO TABLE @DATA(lt_wwwparams2) FROM wwwparams WHERE objid EQ @p_objid AND name EQ 'mimetype' AND value IN ('jpg','JPG','png','PNG'). IF NOT lt_wwwparams2 IS INITIAL. ls_ssm_cust-id = 'START_IMAGE'. ls_ssm_cust-path = p_objid. APPEND ls_ssm_cust TO lt_ssm_cust2. ENDIF. ENDIF. IF NOT lt_ssm_cust2[] IS INITIAL. MODIFY ssm_cust FROM TABLE lt_ssm_cust. IF sy-subrc EQ 0. COMMIT WORK AND WAIT. ELSE. ROLLBACK WORK. ENDIF. ELSEIF NOT lt_ssm_cust[] IS INITIAL. MODIFY ssm_cust FROM TABLE lt_ssm_cust. IF sy-subrc EQ 0. COMMIT WORK AND WAIT. ELSE. ROLLBACK WORK. ENDIF. ENDIF. * BREAK-POINT. ENDFORM.