I want to go back from mandatory field in module pool program

Hi
i am doing tab strip control in module pool program.i want to go back from the selection field, which is a mandatory, to the main program by pressing f3.but i am nt able to get the output.can anybody pls help me.
Amayika

Hi
1. For your BACK or CANCEL button on menu bar, give Button
Ftype "E".
2. In PAI : Write below Modules.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE BACK AT EXIT-COMMAND.
double click on it.Inside of modules write below code.
MODULE CANCEL INPUT.
IF OK_CODE = 'CANCEL'.
CLEAR OK_CODE.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
MODULE BACK INPUT.
IF OK_CODE = 'BACK'.
CLEAR: OK_CODE, INPUT1, INPUT2.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE.

Similar Messages

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • F4 help for the screen fields in module pool program

    Hi All,
      I have a requirement that, i want to provide F4 help for the 2 fields in module pool program. the fields are document number and fiscal year from rbkp table.
    i could provide search help for two fields.
    but how to select matching fiscal year for that document number.
    problem: i am getting fiscal year as first four digits of document number.
    please help me to solve this problem.
    Thanks & Regards,
    Namratha.V

    Hi,
       If your requirement is after selecting the document no from f4 help then the corresponding year should be updated in the document year field then use FM --> DYNP_VALUES_UPDATE
    In  this function module pass the screen no program & field for which u want to update value

  • F1 help on a field in module pool programming

    I want to create f1 help on a field in module pool programming. How to use POH event. where should i write the help documentation. Before using this f1 help on a field i have to set some properties on GUI interface Editor. Please clearly mention the steps i have to follow.

    PROCESS ON HELP-REQUEST.
    FIELD P_LFA1 MODULE HELP_F1_LIFNR.
    MODULE HELP_F1_LIFNR INPUT.
    PERFORM SHOW_HELP_F1 USING 'ZFAG_DOC1'.
    ENDMODULE. " help_f1_lifnr INPUT
    FORM SHOW_HELP_F1 USING P_OBJECT.
    Dati testo help
    DATA: T_LINE LIKE TLINE OCCURS 0,
    XHEAD LIKE THEAD,
    HELP_INFO LIKE HELP_INFO,
    TEXC LIKE SY-UCOMM OCCURS 0,
    V_OBJECT LIKE DOKHL-OBJECT.
    Costante
    DATA: PREF_SIMG(4) VALUE 'SIMG',
    DOCID_HY LIKE DOKHL-ID VALUE 'HY'.
    Testo
    CONCATENATE PREF_SIMG P_OBJECT INTO V_OBJECT.
    Estrazione testo
    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
    EXPORTING
    ID = DOCID_HY
    LANGU = SY-LANGU
    OBJECT = V_OBJECT
    IMPORTING
    HEAD = XHEAD
    TABLES
    LINE = T_LINE
    EXCEPTIONS
    RET_CODE = 1
    OTHERS = 2.
    CASE SY-SUBRC .
    WHEN 0.
    Visualizzazione testo
    GET CURSOR FIELD HELP_INFO-DYNPROFLD.
    HELP_INFO-DOCUID = DOCID_HY.
    HELP_INFO-DOCUOBJECT = V_OBJECT.
    HELP_INFO-SPRAS = SY-LANGU.
    HELP_INFO-PROGRAM = SY-REPID.
    HELP_INFO-DYNPRO = SY-DYNNR.
    HELP_INFO-DYNPPROG = SY-REPID.
    HELP_INFO-PFKEY = SY-PFKEY.
    HELP_INFO-FIELDNAME = HELP_INFO-DYNPROFLD.
    CALL FUNCTION 'HELP_DOCULINES_SHOW'
    EXPORTING
    HELP_INFOS = HELP_INFO
    OVERLAY_HEADER = XHEAD
    TABLES
    EXCLUDEFUN = TEXC
    HELPLINES = T_LINE.
    WHEN OTHERS. MESSAGE S720(SH).
    ENDCASE.
    ENDFORM. " SHOW_HELP_F1

  • Search Help For a Field in Module Pool Programming

    Hi,
    I have a field called status in Module Pool for which i need to write a search help.
    This is the piece of code i have written.
    TYPES: BEGIN OF ty_status,
             stat type i,
             status type string,
        END OF ty_status.
      DATA: lt_emp_status TYPE STANDARD TABLE OF ty_status,
            lw_emp_status TYPE ty_status.
      REFRESH lt_emp_status.
      lw_emp_status-stat = '1'.
      lw_emp_status-status = 'Draft'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      lw_emp_status-stat = '2'.
      lw_emp_status-status = 'Employee Review'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      REFRESH lt_emp_status.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'STATUS'
          value_org       = 'S'
        TABLES
          value_tab       = lt_emp_status
          return_tab      = t_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
        READ TABLE t_return INDEX 1.
        MOVE t_return-fieldval TO LV_EMP_status.
      ENDIF.
    But i am getting the following error.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_ASSIGN_CAST_ILLEGAL_CAST', was
      not caught in
    procedure "F4IF_INT_TABLE_VALUE_REQUEST" "(FUNCTION)", nor was it propagated by
      a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The error occurred at a statement of the form
       ASSIGN f TO <fs> CASTING.
       ASSIGN f TO <fs> CASTING TYPE t.
    or
       ASSIGN f TO <fs> CASTING LIKE f1.
    or
       at table statements with the addition
       ASSIGNING <fs> CASTING.
    The following error causes are possible:
    1. The type of field f or the target type determined by <fs>, t or f1
    contains data references, object references, strings or internal tables
    as components.
    Could some one help me how to resolve this issue.
    Thanks in advance.

    Hi,
    Please see this sample code below:
    *To fetch the classification data on the sel screen
    DATA: BEGIN OF IT_KLAH OCCURS 0,
          CLINT TYPE CLINT,
          CLASS TYPE KLASSE_D,
          END OF IT_KLAH.
      SELECT CLINT CLASS FROM KLAH UP TO 500 ROWS
      INTO TABLE IT_KLAH.
      IF SY-SUBRC <> 0 .
        MESSAGE TEXT-006 TYPE 'E'.
      ELSE.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    DDIC_STRUCTURE = ' '
        RETFIELD = 'CLASS'
    PVALKEY = ' '
        DYNPPROG = SY-REPID
        DYNPNR = SY-DYNNR
        DYNPROFIELD = 'p_s_clascn_low'      "i had to put the f4 help on the selection screen's select option low value,
                                                                     "here basically you have to give the internal table name inside quotes in which
                                                                     "you want to retrieve your data
        VALUE_ORG = 'S'
        DISPLAY = ' '
        TABLES
        VALUE_TAB = IT_KLAH.
      ENDIF.
    Hope it helps,
    Regards,
    Mansi

  • Want to know the screens associated with a module pool program ??

    Hi,
    I have an M type program (module pool), say SAPMF05M. I want to
    1) see which transaction code initiated it ??
    2) see the screens associated with it ??
    how do i achieve this ?? I know just the program name !!
    thanks

    Go to SE80, make sure "program" is in the object list box, enter the program name in the field underneath the object listbox and hit enter.  You will see a bunch of folders in  the tree structre.  There will be one for screens and one for transactions.
    Please remember to award points for helpful answers.  Thanks.
    Regards,
    Rich HEilman

  • How to assign FCT code to a field in module pool programming?

    Hi All,
    I have two fields on the screen. One is I/O field other is text field.
    suppose i enter country code in I/O field i should get the name of country in  text field. I want to assign fct code to I/O field.
    But in attribute popup it's not allowing to assign fct to the field.
    Please Help.
    Regards,
    Mohammed Quddus.

    Hi, as far as I know R/3 screen I/O fields does not have onkeyup event. So you can not achieve this without hitting enter. When you have to hit enter then no need for function code. You can not assign FCT for I/O fields. You can write required logic in your PAI after entering country code.
    Thanks,
    Siva

  • Dynamic change of fields in Module Pool program?

    Dear Friends,
    I defined a check list with values ABC and 123.
    If I select ABC, there are 4 fields will be displayed these all are char fields.
    If I select 123, there are 4 fields are replacing the above mentioned 4 fields at runtime. In that, one  Date field is there, but it is replacing with char value.
    How can I change dynamically from char to date vise versa at runtime?
    PLease help me out.
    thank you
    sekahr

    FM for converting char to numc : CHAR_NUMC_CONVERSION
    for numc to char CALL FUNCTION 'MOVE_CHAR_TO_NUM'

  • F4 help for the Date field in Module-Pool program

    Hi,
    I have a requirement wherein the user shud be allowed to choose a date on the calendar using F4 help and after choosing, it shud get displayed as dd.mm.yyyy format in the field. Is there any functional module to implement this.
    Thanks in Advance,
    Saranya.

    Hi,
    Please try the below code in your prgm.
    You have to write the below code in the POV of the required field.
    ***INCLUDE MZDATE_POV_DATEI01 .
    *&      Module  pov_date  INPUT
          text
    module pov_date input.
    DATA: li_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = ' '
    fieldname = ' '
    searchhelp = 'BU_DATE_CHAR'
    TABLES
    return_tab = li_ret_tab
    EXCEPTIONS
    field_not_found = 1
    no_help_for_field = 2
    inconsistent_help = 3
    no_values_found = 4
    OTHERS = 5.
    IF sy-subrc IS INITIAL.
    READ TABLE li_ret_tab INDEX 1.
    IF sy-subrc IS INITIAL.
    wrk_date = li_ret_tab-fieldval. "The required field
    ENDIF.
    ENDIF.
    endmodule.                 " pov_date  INPUT
    Hope it suits ur requirement.
    Reward points if useful.
    Thanks and regards,
    Litta.

  • How to make the field as mandatory in module pool program.

    Hi Experts,
    Could you please advice me in making a screen field as mandatory input field in module pool programming.
    Thanks in advance.

    Or you could add a check in a PAI module to check if there is some value, if not give error message.
    module check_value.
      if lv_value is initial.
        message e001(00) with 'Enter a value'.
      endif.
    endmodule
    In the PAI screen flow logic...
    Process after input.
    field lv_value module check_value.
    Regards,
    Rich Heilman

  • Hi guys, I hope you help me.. I have no wifi and want to go back from mavericks to lion but erase disc and now can't access disc utility because internet recovery is poping out? what shall i do?

    Hi guys, I hope you help me.. I have no wifi and want to go back from mavericks to lion but erase disc and now can't access disc utility because internet recovery is poping out? what shall i do?

    Problem is that my wifi does not work.. im using usb dongle.. My screen was broken and i replace it with 2010 model which suppose to be compatibile with my 2011. Is there a way I can access utility disc and not going itno internet recovery mode?
    Thanks!

  • How to make a fld mandatory in module pool program?

    I need help on following 2 things
    I have module pool program created, in that many screen subscreens created.
    1.I want to make a field mandatory
    second one  is, I have a general tab and  data tab.
    General tab screen - 2101
    Data tab = 2102
    In general tab, I have edited the values (change mode), when change the values and try to save it,
    It is holding old value.but If i exucute the transaction once again, it is showing the changed value(new value)
    For ex: there is a date field  value is 03/08/2009
    If I change this to 03/09/2009 and press on Save button from the standard menu, still it is showing the  value 03/08/2009. but I execute this transaction once again it is showing the value as 03/09/2009
    I will be thankful if someone helps me here

    Hi Chitra,
    Go to the properties of the filed select program tab and say input required.
    then you will get the problem solved.
    For second one actually its saving but not displaying the saved value at the same time ,
    for this you write the select statement after saving , so that once save is execute m, select statement also will execute  and it will display the newly saved value.
    so after saving imdeatly u write the select statement.
    like case sy-ucomm.
    when 'SAVE'.
    insert ztable.
    select filed from z table.
    endcase.
    let me know if ur problem solved.
    Regards
    Rajendra

  • How to validate the field values in module pool program?

    Hi Guys
         I am working with module pool programming.
         Here I want to validate the fields like below.
         with out filling all the fields if I click SAVE option it has to show a message that all fields has to be filled.  This can be done by checking all the fields individually.
         I think it can be done through <b>LOOP AT SCREEN ......ENDLOOP</b>. sequence.
         If it is possible, can anyone help me?

    You need to write the Module in between the CHAIN and ENDCHAIN statment in SE51
    If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1>.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2>.
    ENDCHAIN.
    all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.
    Look at the DEMO program DEMO_DYNPRO_FIELD_CHAIN.
    ashish

  • How to access screen field value in a module pool programming?

    Hi Experts,
       I have create a module pool program SAPMYDLG. It contains two screens 100 and 200.
       The first screen contains Employee_ID field. This field is not a dictionary field.
       In the second screen 200, I want to access the value of Employee_ID field from first screen.
       For this I created a global variable v_empid in TOP include.
       Then in the PAI of the screen 100 I have assigned the screen field value to global variable.
       v_empid = Employee_ID.
       But this gives an error saying " Field  Employee_ID not defined".
       What am I doing wrong? How can I access the screen field value?
    Thanks
    Gopal

    Hi,
    Employee_ID field also must u define in the top include when u define that 100 screen and 200 screen will access.
    regards,
    muralii

  • Date field in module pool

    hi all,
    i want to have date field in module pool with F4 help. m keeping format as DATS. but still its not taking F4 help for taking date from calender...how shud i do it.

    Call this FM -
    CALL FUNCTION 'F4_DATE'
           EXPORTING
                DATE_FOR_FIRST_MONTH = DATE
                DISPLAY              = HELPDISP
           IMPORTING
                SELECT_DATE          = DATE
           EXCEPTIONS
                OTHERS               = 4.
    Regards,
    Amit
    Reward all helpful replies.

Maybe you are looking for