We found our user-exit. Now click display and pay attention to program name.
To create an alternative screen we need to copy screen 1212 from SAPLLMOB to SAPLXLRF with screen number 9212. Below you can see attributes and code of 9212.
*&---------------------------------------------------------------------*
*& Include ZXLRFTOP
*&---------------------------------------------------------------------*
INCLUDE llmobdat.
INCLUDE zzxlrf_9212.
DATA: gs_9212 TYPE ZWM_S_SCR_9212.
*&---------------------------------------------------------------------*
*& Include ZZXLRF_9212
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module STATUS_SCREEN_GROUP3 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE status_screen_group3 OUTPUT.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module TAP_DISPLAY OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE tap_display OUTPUT.
"Standard verification requires call of line below in sub screen.
PERFORM tap_display(sapllmob).
"Below lines are required for integration of batch verification
"and for enter behaviour.
"Standard enter behaviour does not know about added batch field GS_9212-CCHARG
"Therefore we need to create a mechanism to make sure it works as part
"Existing enter behaviour and verification
CONSTANTS: mem_9212(25) TYPE c VALUE 'GS_9212'.
FIELD-SYMBOLS: <scr9212> TYPE zwm_s_scr_9212.
ASSIGN (mem_9212) TO <scr9212>.
CONSTANTS: mem_R9212(25) TYPE c VALUE '(SAPLLMOB)GS_9212'.
FIELD-SYMBOLS: <gs_R9212> TYPE zwm_s_scr_9212.
ASSIGN (mem_R9212) TO <gs_R9212>.
IF <scr9212> IS ASSIGNED.
IF <scr9212>-tapos IS INITIAL.
<scr9212>-tapos = ltap-tapos.
ELSE.
"If screen is moved to next item
IF <scr9212>-tapos NE ltap-tapos.
CLEAR <scr9212>.
<scr9212>-tapos = ltap-tapos.
IF <gs_R9212> IS ASSIGNED.
CLEAR <gs_R9212>.
ENDIF.
ENDIF.
ENDIF.
LOOP AT SCREEN.
IF screen-name EQ 'GS_9212-CCHARG'.
IF ltap-charg IS INITIAL.
screen-invisible = '1'.
Screen-active = 0.
IF <scr9212> IS ASSIGNED.
CLEAR <scr9212>-mustverify.
ENDIF.
ELSE.
IF <scr9212> IS ASSIGNED.
<scr9212>-mustverify = abap_true.
ENDIF.
screen-invisible = '0'.
Screen-active = 1.
IF <scr9212> IS ASSIGNED AND ltap-charg EQ <scr9212>-ccharg.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
"This data is used in FIND_NEXT_KEY function
"Which is used in enter behaviour
IF <scr9212> IS ASSIGNED.
IF <gs_R9212> IS ASSIGNED.
<gs_R9212>-ccharg = <scr9212>-ccharg.
<gs_R9212>-tapos = <scr9212>-tapos.
<gs_R9212>-num_of_alq = <scr9212>-num_of_alq.
<gs_R9212>-mustverify = <scr9212>-mustverify.
<scr9212>-canverify = <gs_R9212>-canverify.
ENDIF.
ENDIF.
ENDIF.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module SPECIAL_FIELD_OUTPUT OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE special_field_output OUTPUT.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module SET_VALUES OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE set_values OUTPUT.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module SET_CURSOR OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE set_cursor OUTPUT.
"Required to set cursor order
PERFORM set_cursor_pos(sapllmob)
USING line_no_step_loop CHANGING screen_fcode current_field.
PERFORM set_scroll(sapllmob) USING tap_index tap_init_size tap_total_lines
CHANGING temporary_index.
* Not for HUM
PERFORM set_verify_fields_single(sapllmob).
IF current_field IS INITIAL.
LOOP AT SCREEN.
IF screen-invisible = option_off
AND screen-input = option_on
AND screen-group1 <> 1.
SET CURSOR FIELD screen-name.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module EXIT_COMMANDS INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE exit_commands INPUT.
PERFORM exit_commands_form(sapllmob)
CHANGING ok_code screen_fcode prev_screen int_table_name.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module MODIFY_TAP INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE modify_tap INPUT.
"Required to pass enhanced screen data to main program
CONSTANTS: lv_memory(25) TYPE c VALUE '(sapllmob)rlmob'.
FIELD-SYMBOLS: <rlmob> TYPE any.
ASSIGN (lv_memory) TO <rlmob>.
IF <rlmob> IS ASSIGNED.
<rlmob> = rlmob.
ENDIF.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module USER_COMMANDS INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_commands INPUT.
ENDMODULE.
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZLLMOBF01. "active version
"For Enhacement screen used in LM06
data: GS_9212 TYPE zwm_s_scr_9212.
ENDENHANCEMENT.
*&---------------------------------------------------------------------*
*& Include ZXLRFU12
*&---------------------------------------------------------------------*
"Screen exit for 9212 CMOD:ZWM -> Enhancement :MWMRF212 for RF Menu LM06
ltap = i_ltap.
ltak = i_ltak.
rlmob = i_rlmob.
rl02b = i_rl02b.
tap_init_size = i_tap_init_size.
tap_total_lines = i_tap_total_lines.
tap_index = i_tap_index.
temporary_index = i_temporary_index.
line_no_step_loop = i_line_no_step_loop.
screen_fcode = i_screen_fcode.
current_field = i_current_field.
*&---------------------------------------------------------------------*
*& Include ZXLRFU43
*&---------------------------------------------------------------------*
"Screen exit for 9212 CMOD:ZWM -> Enhancement :MWMRF212 for RF Menu LM06
"Verify batch
REFRESH o_verification_errors[].
IF gs_9212-canverify IS NOT INITIAL AND ltap-charg IS NOT INITIAL
AND ( gs_9212-ccharg IS INITIAL OR gs_9212-ccharg NE ltap-charg ).
CLEAR gs_9212-ccharg.
DATA(error) = VALUE sprot_u( var1 = 'Batch' ) .
APPEND error TO o_verification_errors.
ENDIF.
FUNCTION FIND_NEXT_KEY.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module FIND_NEXT_KEY, Start A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZWM_ENTER_KEY_ROUTES. "active version
"LM06 Screen has batch field and that field needs to be filled if TO has batch
"This code is added to integrate custom batch field to enter navigation behaviour
CONSTANTS: mem_R9212(25) TYPE c VALUE '(SAPLLMOB)GS_9212'.
FIELD-SYMBOLS: <gs_R9212> TYPE zwm_s_scr_9212.
ASSIGN (mem_R9212) TO <gs_R9212>.
IF <gs_R9212> IS ASSIGNED.
IF I_LAST_VERIF is NOT INITIAL or I_LAST_ITEM is NOT INITIAL.
<gs_R9212>-canverify = abap_true.
else.
<gs_R9212>-canverify = abap_false.
ENDIF.
IF <gs_R9212>-mustverify is NOT INITIAL and <gs_R9212>-ccharg is INITIAL.
clear : I_LAST_VERIF ,I_LAST_ITEM.
ENDIF.
ENDIF.
ENDENHANCEMENT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |