A mobile ZigBee module in a traffic control system Time is of the essence when ambulances are utilized to save people’s lives, but when an ambulance needs to pass through a junction, its speed o...
heizer managementFull description
Program of Multiyear Training in Weightlifting
Calculation sheet for swimming poolFull description
Defining a Range in Module Pool Program By Kishor Kumar, Oxient Technologies Introduction: This article will discuss in detail how to create a Range in Module Pool Program. Requirement and scenario: Before breaking the ice, I would like to describe kernel of the topic. When we create a range, at the same time create an internal table then it have four components …
Sign
Option
Low
High These all four component have the corresponding value. Steps to be followed: Step 1 : Create a program in SE38 and program type should be Module pool (M type) after that save & activate the program .
Step2: Go to transaction SE51 and write the same program name which you have created in SE38 and then create screen for program.
Step3: Select Screen type as Normal Screen, after that click Layout button
Step4: Choose one text field, two input/output field and box for background.
And give the input field name similar to MLOW and MHIGH.
Step 5: Now go to SE11 and create search help for input/output field .
Step 6 : Create search help .
Step7: Now go to SE51->Layout-> and fill this search help name on both input/output attribute windows.
Step8: Now go Flow Logic and double click on module User_command_9000.
Step 9 : Define user_command_9000 in main program .
Step10 : Write the following code………….. *&---------------------------------------------------------------------* *& Module Pool ZSAPMZ_RANGE_IN_MPP *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* PROGRAM ZSAPMZ_RANGE_IN_MPP. TYPE-POOLS:SLIS.
TABLES : MARA . DATA :MLOW(18),MHIGH(18). DATA :MLOW1(18),MHIGH1(18). DATA: BEGIN OF T_MARA OCCURS 1, MATNR TYPE MARA-MATNR, ERSDA TYPE MARA-ERSDA, ERNAM TYPE MARA-ERNAM, PSTAT TYPE MARA-PSTAT, MBRSH TYPE MARA-MBRSH, END OF T_MARA. DATA : BEGIN OF RANGE OCCURS 0 , SIGN(1), OPTION(2), LOW(18), HIGH(18), END OF RANGE . DATA : T_FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV , W_FCAT TYPE SLIS_FIELDCAT_ALV , W_LAYO TYPE SLIS_LAYOUT_ALV . *&---------------------------------------------------------------------* *& Module USER_COMMAND_9000 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE USER_COMMAND_9000 INPUT. CASE SY-UCOMM. WHEN ''."FC-CODE OF ENTER BUTTON CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT' "CONVERSION ROUTINE FOR MLOW EXPORTING INPUT = MLOW IMPORTING OUTPUT = MLOW1 EXCEPTIONS LENGTH_ERROR = 1 OTHERS = 2 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'"CONVERSION ROUTINE FOR MHIGH EXPORTING INPUT = MHIGH IMPORTING OUTPUT = MHIGH1 EXCEPTIONS LENGTH_ERROR = 1 OTHERS = 2 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ****************************************************************** * LOGICALLY BUILD A INTERNAL TABLE (RANGE) ****************************************************************** RANGE-SIGN = 'I'. " I OR E
RANGE-OPTION = 'BT'. RANGE-LOW = MLOW1 . RANGE-HIGH = MHIGH1 . APPEND RANGE ."APPEND DATA IN INTERNAL TABLE ****************************************************************** PERFORM FETCH_DATA . PERFORM DISPLAY_DATA . ENDCASE. ENDMODULE. " USER_COMMAND_9000 INPUT *&---------------------------------------------------------------------* *& Form FETCH_DATA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM FETCH_DATA . SELECT MATNR ERNAM ERSDA PSTAT MBRSH FROM MARA INTO CORRESPONDING FIELDS OF TABLE T_MARA WHERE MATNR IN RANGE . ENDFORM. " FETCH_DATA *&---------------------------------------------------------------------* *& Form DISPLAY_DATA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM DISPLAY_DATA . LEAVE TO LIST-PROCESSING . W_FCAT-TABNAME = 'MARA'. W_FCAT-FIELDNAME = 'MATNR'. W_FCAT-SELTEXT_M = 'Material No'. APPEND w_fcat to t_Fcat . W_FCAT-TABNAME = 'MARA'. W_FCAT-FIELDNAME = 'ERSDA'. W_FCAT-SELTEXT_M = 'Created On'. APPEND w_fcat to t_Fcat . W_FCAT-TABNAME = 'MARA'. W_FCAT-FIELDNAME = 'ERNAM'. W_FCAT-SELTEXT_M = 'Name of Person'. APPEND w_fcat to t_Fcat . W_FCAT-TABNAME = 'MARA'. W_FCAT-FIELDNAME = 'PSTAT'. W_FCAT-SELTEXT_M = 'Maintenance status'. APPEND w_fcat to t_Fcat . W_FCAT-TABNAME = 'MARA'. W_FCAT-FIELDNAME = 'MBRSH'. W_FCAT-SELTEXT_M = 'Industry sector'. APPEND w_fcat to T_FCAT.