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.

Similar Messages

  • 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

  • How to keep f4 help for a particular field in module pool problem-urgent

    hi all,
    i am displaying output using alv list display. here i am showing my pf status here. in this status i have one button called position. when i click this button it is showing pop up inside this pop up  i am showing appln
    for this i need keep f4 help. anybody can tell me how to keep f4 help fo this field.
    thanks,
    maheedhar.t

    Hi Maheedhar,
    You need to use function module POPUP_GET_VALUES.
    If you want see sampl eprogram for this check the program RSSPO410.
    Execute this program and input Example2 = X in the selection screen.
    Code from the above Program:
    DATA: BEGIN OF FIELDS OCCURS 1.
            INCLUDE STRUCTURE SVAL.
    DATA: END OF FIELDS,
          RETURNCODE(1)       TYPE C,
          POPUP_TITLE(30)     TYPE C.
      POPUP_TITLE       = 'Nachrichten anzeigen'(200).
      CLEAR FIELDS.
      FIELDS-TABNAME    = 'T100'.
      FIELDS-FIELDNAME  = 'ARBGB'.
      FIELDS-FIELDTEXT  = 'Arbeitsgebiet'(202). "Text nicht aus DTEL
      APPEND FIELDS.
      CALL FUNCTION 'POPUP_GET_VALUES'
           EXPORTING POPUP_TITLE     = POPUP_TITLE
           IMPORTING RETURNCODE      = RETURNCODE
           TABLES    FIELDS          = FIELDS.
      IF RETURNCODE = 'A'.
        If Cancel is clicked
      ELSE.
        If OK is clicked.
        Table FIELDS congtains the input data.
      ENDIF.
    Thank you
    Ramakrishna

  • Data insert through module pool programming

    hi
    I want to insert the data  into the data base through module pool programming.I am taking the fields from different tables, I need sample code ,please help me

    Hi Dhanunjay,
    REPORT zpe_str_le .
    TABLES : zpe_str , zprd_mis1 , mseg , t001l.
    *DATA : STR TYPE C VALUE '50'.
    data : text(100) VALUE 'DELETED STORAGE LOCATION NO '.
    SELECTION-SCREEN : BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-005.
    SELECT-OPTIONS : S_ZSLOC FOR ZPE_STR-ZSLOC,
    S_ZMACD FOR ZPE_STR-ZMACD,
    S_ZPGRP FOR ZPE_STR-ZPGRP.
    SELECTION-SCREEN : END OF SCREEN 123.
    DATA : flag(1) TYPE c,
    flag1 TYPE c ,
    flag3 TYPE c VALUE '1'.
    DATA : etab LIKE t001l OCCURS 0 WITH HEADER LINE.
    SELECT * FROM T001L INTO TABLE ETAB.
    DATA : ihead LIKE thead.
    DATA : prevtab LIKE tline OCCURS 0 WITH HEADER LINE.
    data : Jtab like TLINE occurs 0 with header line.
    DATA : jtab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : itab LIKE zprd_mis1 OCCURS 0 WITH HEADER LINE.
    *SELECT * FROM zprd_mis1 INTO TABLE itab.
    DATA : BEGIN OF itab_sloc OCCURS 0,
    werks LIKE t001l-werks,
    lgort LIKE t001l-lgort,
    lgobe LIKE t001l-lgobe,
    END OF itab_sloc.
    *FLAG = 0.
    CALL SCREEN 100.
    MODULE user_command_0100 INPUT.
    CASE sy-ucomm.
    WHEN 'RET'.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 100.
    *PERFORM PREVIEW.
    LOOP AT prevtab.
    WRITE : / prevtab.
    ENDLOOP.
    LOOP AT JTAB[] INTO ZPRD_MIS1.
    WRITE : Jtab-TDFORMAT.
    WRITE : Jtab-TDLINE .
    *********ZPRD_MIS1-MANDT = Jtab-TDLINE .
    *********ZPRD_MIS1-SLOC = Jtab-TDLINE .
    *********ZPRD_MIS1-MCODE = Jtab-TDLINE .
    *********ZPRD_MIS1-GCODE = Jtab-TDLINE .
    *********ZPRD_MIS1-DESCR = Jtab-TDLINE .
    *********INSERT ZPRD_MIS1.
    ENDLOOP.
    WRITE : JTAB-ZSLOC.
    *********CALL TRANSACTION 'SO10'.
    SET CURSOR 2 2.
    WHEN 'DET'.
    SELECT * FROM ZPRD_MIS1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
    CALL SCREEN 123 STARTING AT 10 5.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    SKIP 2 .
    WRITE :/1(8) 'STR.LOC' ,10(15) 'MRP. CTLR',27(10) 'P.GRP' ,39(40) 'DESCRIPTION OF PRODUCT'.
    SELECT SLOC MCODE GCODE DESCR FROM zprd_mis1 INTO ZPRD_MIS1 WHERE SLOC IN S_ZSLOC AND
    MCODE IN S_ZMACD AND
    GCODE IN S_ZPGRP.
    WRITE :/1(8) zprd_mis1-SLOC ,10(15) zprd_mis1-MCODE ,27(10) zprd_mis1-GCODE ,39(40) zprd_mis1-DESCR .
    ENDSELECT.
    WHEN 'CLEAR'.
    flag = 4.
    IF zpe_str-zsloc NE ' '.
    CLEAR zpe_str.
    ELSE.
    MESSAGE 'ALREADY CLEARED' TYPE 'S'.
    ENDIF.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    WHEN 'SAVE'.
    IF zpe_str-zdesc NE ' '.
    IF zpe_str-zsloc NE ' '.
    LOOP AT itab.
    READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
    IF sy-subrc = 0 AND flag = 5.
    zprd_mis1-mandt = sy-mandt.
    zprd_mis1-sloc = zpe_str-zsloc .
    zprd_mis1-mcode = zpe_str-zmacd .
    zprd_mis1-gcode = zpe_str-zpgrp.
    zprd_mis1-descr = zpe_str-zdesc .
    MODIFY zprd_mis1.
    flag1 = 7.
    MESSAGE 'STORAGE LOCATION MODIFIED' TYPE 'S'.
    EXIT.
    ELSE.
    zprd_mis1-mandt = sy-mandt.
    zprd_mis1-sloc = zpe_str-zsloc .
    zprd_mis1-mcode = zpe_str-zmacd .
    zprd_mis1-gcode = zpe_str-zpgrp.
    zprd_mis1-descr = zpe_str-zdesc .
    INSERT zprd_mis1.
    APPEND itab.
    flag = 5.
    flag1 = 7.
    MESSAGE 'STORAGE LOCATION CREATED' TYPE 'S'.
    *MESSAGE 'DATA ALREADY SAVED' TYPE 'S'.
    EXIT.
    *ENDIF.
    ENDIF.
    ENDLOOP.
    ELSE.
    flag = 3.
    MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
    ENDIF.
    ELSE.
    LOOP AT itab.
    READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
    IF sy-subrc = 0.
    MESSAGE 'ALREADY SAVED' TYPE 'S'.
    ELSE.
    MESSAGE 'ENTRIES FOR OTHER FIELDS REQUIRED' TYPE 'S'.
    ENDIF.
    ENDLOOP.
    ENDIF.
    WHEN 'CHECK'.
    SELECT * FROM zprd_mis1 INTO TABLE itab.
    IF zpe_str-zsloc NE ' '.
    LOOP AT itab.
    READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
    IF sy-subrc = 0.
    zpe_str-zmandt = itab-mandt.
    zpe_str-zsloc = itab-sloc.
    zpe_str-zmacd = itab-mcode.
    zpe_str-zpgrp = itab-gcode.
    zpe_str-zdesc = itab-descr.
    flag = 7.
    flag1 = 7.
    ELSE.
    MESSAGE 'NO SUCH STORAGE LOCATION AVAILABLE' TYPE 'S'.
    EXIT.
    ENDIF.
    ENDLOOP.
    ELSE.
    flag = 3.
    MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
    EXIT.
    ENDIF.
    WHEN 'DELETE'.
    IF zpe_str-zsloc EQ ' '.
    flag = 3.
    MESSAGE 'NOSUCH LOCATION AVAILABLE' TYPE 'S'.
    ELSE.
    READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
    IF sy-subrc = 0.
    zpe_str-zmandt = itab-mandt.
    zpe_str-zsloc = itab-sloc.
    zpe_str-zmacd = itab-mcode.
    zpe_str-zpgrp = itab-gcode.
    zpe_str-zdesc = itab-descr.
    IF zpe_str-zsloc NE ' '.
    CALL FUNCTION 'G_CHECK_PASSWORD'
    EXPORTING
    password = 'PLANT1'
    EXCEPTIONS
    not_authorized = 1
    canceled = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    PERFORM PREVIEW.
    DELETE FROM zprd_mis1 WHERE SLOC = zpe_str-zSLOC.
    UPDATE zprd_mis1.
    APPEND itab.
    MESSAGE 'STORAGE LOCATION DELETED' TYPE 'S'.
    ELSEIF SY-SUBRC = 2.
    MESSAGE 'OPRATION CANCELLED' TYPE 'E'.
    ELSEIF SY-SUBRC = 3.
    MESSAGE 'UNAUTHORIZED' TYPE 'E'.
    ENDIF.
    ELSE.
    MESSAGE 'STORAGE LOCATION CONTAINS NO DATA' TYPE 'S'.
    ENDIF.
    ELSE.
    MESSAGE 'STORAGE LOCATION CONTAINS NO DATA' TYPE 'S'.
    ENDIF.
    ENDIF.
    WHEN 'CREATE'.
    FLAG3 = 12.
    IF zpe_str-zsloc EQ ' '.
    MESSAGE 'ENTER THE STORAGE LOCATION' TYPE 'S'.
    EXIT.
    ELSE.
    LOOP AT etab.
    READ TABLE etab WITH KEY lgort = zpe_str-zsloc .
    IF sy-subrc = 0.
    read table itab with key sloc = zpe_str-zsloc .
    if sy-subrc = 0.
    zpe_str-zmandt = itab-mandt.
    zpe_str-zsloc = itab-sloc.
    zpe_str-zmacd = itab-mcode.
    zpe_str-zpgrp = itab-gcode.
    zpe_str-zdesc = itab-descr.
    flag = 7.
    flag1 = 7.
    clear flag .
    clear flag1.
    message 'storage location alredy exist' type 'S'.
    ELSE.
    FLAG = 2.
    MESSAGE 'STORAGE LOCATION ENTIRES DOESNOT EXIST' TYPE 'S'.
    ENDIF.
    else.
    message 'no such storage location exist' type 'S'.
    endif.
    endloop.
    FLAG = 2.
    exit.
    endif.
    WHEN 'CHANGE'.
    SELECT * FROM zprd_mis1 INTO TABLE itab.
    IF zpe_str-zsloc NE ' '.
    LOOP AT itab.
    READ TABLE itab WITH KEY sloc = zpe_str-zsloc .
    IF sy-subrc = 0.
    flag = 5.
    flag1 = 6.
    zpe_str-zmandt = itab-mandt.
    zpe_str-zsloc = itab-sloc.
    zpe_str-zmacd = itab-mcode.
    zpe_str-zpgrp = itab-gcode.
    zpe_str-zdesc = itab-descr.
    ELSE.
    MESSAGE 'NO STORAGE LOCATION AVAILABLE' TYPE 'S'.
    ENDIF.
    ENDLOOP.
    ELSE.
    flag = 3.
    MESSAGE 'PLEASE ENTER THE STORAGE LOCATION' TYPE 'S'.
    ENDIF.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'AAA'.
    SET TITLEBAR 'aaa'.
    IF flag3 = '1'.
    CALL FUNCTION 'G_CHECK_PASSWORD'
    EXPORTING
    password = 'PLANT1'
    EXCEPTIONS
    not_authorized = 1
    canceled = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE 'un authorized' TYPE 'S'(001).
    LEAVE TO SCREEN 0.
    ELSEIF SY-SUBRC = 2.
    MESSAGE ' OPERATION CANCELLED' TYPE 'S'(001).
    LEAVE TO SCREEN 0.
    ELSEIF SY-SUBRC = 3.
    LEAVE TO SCREEN 0.
    MESSAGE 'RESTRICTED' TYPE 'S'(001).
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR flag3.
    ENDIF.
    SELECT * FROM zprd_mis1 INTO TABLE itab.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    IF flag = 5 AND flag1 EQ 6.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 1.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    EXIT.
    ENDIF.
    IF flag = 2.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 1.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    EXIT.
    ENDIF.
    IF flag3 = 12.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 1.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'RET' OR screen-name = 'CHECK'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    EXIT.
    CLEAR FLAG3.
    ENDIF.
    IF flag = 4.
    IF screen-name CP 'ZPE_*'.
    screen-input = 1.
    ENDIF.
    ENDIF.
    IF flag1 = 7 AND flag = 5.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'DELETE' OR screen-name = 'CHECK' OR screen-name = 'SAVE'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF flag1 = 7 AND flag = 7.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'CHECK' OR screen-name = 'SAVE'." OR screen-name = 'DELETE'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF flag1 = 4 AND flag = 3.
    LOOP AT SCREEN.
    IF screen-name = 'ZPE_STR-ZDESC' OR screen-name = 'ZPE_STR-ZSLOC' OR screen-name = 'ZPE_STR-ZPGRP' OR screen-name = 'ZPE_STR-ZMACD'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    IF screen-name = 'CREATE' OR screen-name = 'SAVE' OR screen-name = 'DELETE' OR screen-name = 'CHANGE' OR screen-name = 'CHECK'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    DATA: BEGIN OF r1 OCCURS 1.
    INCLUDE STRUCTURE ddshretval.
    DATA: END OF r1.
    *& Module VALUE_SLOC INPUT
    text
    MODULE value_sloc INPUT.
    SELECT lgort werks lgobe FROM t001l INTO CORRESPONDING FIELDS OF TABLE itab_sloc.
    DELETE ADJACENT DUPLICATES FROM itab_sloc COMPARING lgort.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'LGORT'
    value_org = 'S'
    TABLES
    value_tab = itab_sloc
    return_tab = r1
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    IF r1-fieldval IS NOT INITIAL.
    zpe_str-zsloc = r1-fieldval.
    ENDIF.
    ENDIF.
    EXIT.
    *ENDSELECT.
    ENDMODULE. " VALUE_SLOC INPUT
    FORM PREVIEW.
    *TABLES : ZPE_STR , ZPRD_MIS1 , MSEG.
    data : ihead like thead.
    DATA : prevtab like TLINE occurs 0 with header line.
    data : Jtab like TLINE occurs 0 with header line.
    *data : Jtab like thead occurs 0 with header line.
    *data : text(100).
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    ID = 'ST'
    LANGUAGE = sy-langu
    NAME = 'ZSLDEL'
    OBJECT = 'TEXT'
    ARCHIVE_HANDLE = 0
    LOCAL_CAT = ' '
    IMPORTING
    HEADER =
    TABLES
    LINES = prevtab[]
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if not prevtab[] is initial.
    append lines of prevtab to jtab.
    endif.
    *IHEAD-TDFDATE = SY-DATUM.
    *IHEAD-TDFTIME = SY-UZEIT.
    ihead-TDOBJECT = 'TEXT'.
    ihead-TDNAME = 'ZSLDEL'.
    ihead-TDID = 'ST'.
    ihead-TDSPRAS = sy-langu.
    type-pools : slis.
    Jtab-TDFORMAT = ''.
    *Jtab-TDLINE = 'SLOCATION'.
    *append Jtab.
    *Jtab-TDFORMAT = ''.
    Jtab-TDFORMAT = '*'.
    Jtab-TDLINE = ZPE_STR-ZSLOC.
    append Jtab.
    Jtab-TDFORMAT = ''.
    *Jtab-TDLINE = 'DATE'.
    *append Jtab.
    Jtab-TDFORMAT = ''.
    *Jtab-TDLINE = SY-DATUM.
    *append Jtab.
    Jtab-TDFORMAT = ''.
    *Jtab-TDLINE = 'TIME'.
    *append Jtab.
    Jtab-TDFORMAT = ''.
    *Jtab-TDLINE = SY-UZEIT.
    *Jtab-TDFORMAT = ''.
    *append Jtab.
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    HEADER = ihead
    INSERT = 'X'
    SAVEMODE_DIRECT = ' '
    OWNER_SPECIFIED = ' '
    LOCAL_CAT = ' '
    IMPORTING
    FUNCTION =
    NEWHEADER =
    TABLES
    LINES = Jtab
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5
    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 'COMMIT_TEXT'
    EXPORTING
    OBJECT = '*'
    NAME = '*'
    ID = '*'
    LANGUAGE = '*'
    SAVEMODE_DIRECT = ' '
    KEEP = ' '
    LOCAL_CAT = ' '
    IMPORTING
    COMMIT_COUNT =
    TABLES
    T_OBJECT =
    T_NAME =
    T_ID =
    T_LANGUAGE =
    ENDFORM.
    *&spwizard: declaration of tablecontrol 'TBLECTL' itself
    controls: TBLECTL type tableview using screen 0100.
    *&spwizard: lines of tablecontrol 'TBLECTL'
    data: g_TBLECTL_lines like sy-loopc.
    data: OK_CODE like sy-ucomm.
    *&spwizard: output module for tc 'TBLECTL'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    module TBLECTL_change_tc_attr output.
    describe table ITAB lines TBLECTL-lines.
    endmodule.
    *&spwizard: output module for tc 'TBLECTL'. do not change this line!
    *&spwizard: get lines of tablecontrol
    module TBLECTL_get_lines output.
    g_TBLECTL_lines = sy-loopc.
    endmodule.
    *&spwizard: input module for tc 'TBLECTL'. do not change this line!
    *&spwizard: process user command
    module TBLECTL_user_command input.
    OK_CODE = sy-ucomm.
    perform user_ok_tc using 'TBLECTL'
    'ITAB'
    changing OK_CODE.
    sy-ucomm = OK_CODE.
    endmodule.
    INCLUDE TABLECONTROL_FORMS *
    *& Form USER_OK_TC *
    FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME
    CHANGING P_OK LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA: L_OK TYPE SY-UCOMM,
    L_OFFSET TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations *
    *&SPWIZARD: evaluate TC name and operations *
    SEARCH P_OK FOR P_TC_NAME.
    IF SY-SUBRC 0.
    EXIT.
    ENDIF.
    L_OFFSET = STRLEN( P_TC_NAME ) + 1.
    L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations *
    CASE L_OK.
    WHEN 'INSR'. "insert row
    PERFORM FCODE_INSERT_ROW USING P_TC_NAME
    P_TABLE_NAME.
    CLEAR P_OK.
    WHEN 'DELE'. "delete row
    PERFORM FCODE_DELETE_ROW USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    CLEAR P_OK.
    WHEN 'P--' OR "top of list
    'P-' OR "previous page
    'P+' OR "next page
    'P++'. "bottom of list
    PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    L_OK.
    CLEAR P_OK.
    WHEN 'L--'. "total left
    PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    WHEN 'L-'. "column left
    PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    WHEN 'R+'. "column right
    PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    WHEN 'R++'. "total right
    PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
    WHEN 'MARK'. "mark all filled lines
    PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'DMRK'. "demark all filled lines
    PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'SASCEND' OR
    'SDESCEND'. "sort column
    PERFORM FCODE_SORT_TC USING P_TC_NAME
    l_ok.
    ENDCASE.
    ENDFORM. " USER_OK_TC
    *& Form FCODE_INSERT_ROW *
    FORM fcode_insert_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_LINES_NAME LIKE FELD-NAME.
    DATA L_SELLINE LIKE SY-STEPL.
    DATA L_LASTLINE TYPE I.
    DATA L_LINE TYPE I.
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
    ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line *
    GET CURSOR LINE L_SELLINE.
    if sy-subrc 0. " append line to table
    l_selline = <tc>-lines + 1.
    *&SPWIZARD: set top line *
    if l_selline > <lines>.
    <tc>-top_line = l_selline - <lines> + 1 .
    else.
    <tc>-top_line = 1.
    endif.
    else. " insert line into table
    l_selline = <tc>-top_line + l_selline - 1.
    l_lastline = <tc>-top_line + <lines> - 1.
    endif.
    *&SPWIZARD: set new cursor line *
    l_line = l_selline - <tc>-top_line + 1.
    *&SPWIZARD: insert initial line *
    INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
    <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor *
    SET CURSOR LINE L_LINE.
    ENDFORM. " FCODE_INSERT_ROW
    *& Form FCODE_DELETE_ROW *
    FORM fcode_delete_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: delete marked lines *
    DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    IF <MARK_FIELD> = 'X'.
    DELETE <TABLE> INDEX SYST-TABIX.
    IF SY-SUBRC = 0.
    <TC>-LINES = <TC>-LINES - 1.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM. " FCODE_DELETE_ROW
    *& Form COMPUTE_SCROLLING_IN_TC
    text
    -->P_TC_NAME name of tablecontrol
    -->P_OK ok code
    FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TC_NEW_TOP_LINE TYPE I.
    DATA L_TC_NAME LIKE FELD-NAME.
    DATA L_TC_LINES_NAME LIKE FELD-NAME.
    DATA L_TC_FIELD_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
    ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled? *
    IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ... *
    L_TC_NEW_TOP_LINE = 1.
    ELSE.
    *&SPWIZARD: no, ... *
    CALL FUNCTION 'SCROLLING_IN_TABLE'
    EXPORTING
    ENTRY_ACT = <TC>-TOP_LINE
    ENTRY_FROM = 1
    ENTRY_TO = <TC>-LINES
    LAST_PAGE_FULL = 'X'
    LOOPS = <LINES>
    OK_CODE = P_OK
    OVERLAPPING = 'X'
    IMPORTING
    ENTRY_NEW = L_TC_NEW_TOP_LINE
    EXCEPTIONS
    NO_ENTRY_OR_PAGE_ACT = 01
    NO_ENTRY_TO = 02
    NO_OK_CODE_OR_PAGE_GO = 03
    OTHERS = 0.
    ENDIF.
    *&SPWIZARD: get actual tc and column *
    GET CURSOR FIELD L_TC_FIELD_NAME
    AREA L_TC_NAME.
    IF SYST-SUBRC = 0.
    IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column *
    SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
    ENDIF.
    ENDIF.
    *&SPWIZARD: set the new top line *
    <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM. " COMPUTE_SCROLLING_IN_TC
    *& Form FCODE_TC_MARK_LINES
    marks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: mark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = 'X'.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    *& Form FCODE_TC_DEMARK_LINES
    demarks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: demark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = SPACE.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    Source : https://forums.sdn.sap.com/click.jspa?searchID=15092700&messageID=5654151
    Have A Good Day
    Chaitanya.

  • F4 help for PO date field in VA01 transaction during upgrade

    Hi All,
    We are working on upgrade project 4.6c to ECC 6.
    We came across one scenario.
    F4 help for PO date field is not coming in newer version in VA01 transaction but i checked in older version it is coming F4 help for PO date(calender).
    May i know the reason regarding this.
    Any clues
    Regards
    Jai
    Edited by: Jayanth16 on Nov 12, 2009 6:14 PM
    Edited by: Jayanth16 on Nov 12, 2009 6:22 PM

    Hi,
    User did some changes in include LSDSDF05 due to that F4 help is not coming.
    So i correct that one.
    Regards
    Jai

  • Providing F4 help for the same field on selection screen

    Hello Experts,
    My requirement is :
    There are 2 radio buttons and a parameter "p_file" on my selection scree.
    1. rb_appl
    2. rb_pres
    If the radio button rb_appl = 'X', I need to place the logic of F4 help of application server for the field p_file. Else if the rb_pres = 'X', then I need to place the logic of F4 help of presentation server for the same field p_file.
    I have written the code in the below manner
    PARAMETERS: rb_appl RADIOBUTTON GROUP rad DEFAULT 'X',
                             rb_pres RADIOBUTTON GROUP rad ,
                             p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
          PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    But I am getting the F4 help for only the radio button for which i have placed the default value in the parameters.
    So please let me know how to define the F4 help for the same field based on the radio buttons.

    Hi,
    You can acheive the same by the addition of [USER-COMMAND fcode].
    RADIOBUTTON GROUP group [USER-COMMAND fcode] - The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    So you code should be altered as
    PARAMETERS: rb_appl  RADIOBUTTON GROUP rad
                         USER-COMMAND radclick    "Addition which you have to make.
                         DEFAULT 'X',
                rb_pres  RADIOBUTTON GROUP rad ,
                p_file   TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      IF rb_appl = 'X'.
        PERFORM f_applictn_server_filenm.
      ELSEIF rb_pres = 'X'.
        PERFORM f_presentation_filenm.
      ENDIF.
    Thanks & Regards,
    Harish

  • 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

  • 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.

  • 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.

  • Is it possible to print the current screen in Module pool program(Dynpro)?

    Is it possible to print the current screen in Module pool program(Dynpro)?
    I create a Module pool program , and customer hope can print the screen when they click print button, Is it possible?

    Does the customer want a screen shot or what? Please elaborate on your requirement.
    Maybe you should create a smartform first, which is called when one clicks on print button. But in fact, we need a bit more info than this.

  • F4 help for the batch field in VL02N transaction

    We have upgraded our system from 4.6 to ecc 6.0 .In 4.6 the f4 help for the batch had " Batch selection via plant/Material/Storage location/Batch " which is not there in ECC 6.0.
    Please tell us the procedure to add in the existing  search help H_MCHA in ECC 6.0
    Thanks
    Aruna

    Hi Aruna.
      Create ur own search help using se11 tcode for required fields.
      Thanks & Regards,
    Kiran.
    Plz give rewards if and only if it is helpfull.

  • Strange error in online Adobe form for the date field

    Hi Experts,
    I am facing strange problem with online Adobe forms. I could able to save data when i click save button on the form.
    But some times in the form the date field is throwing error message 'MMDDYYYY field is invalid' when i click on save button.
    Is this the problem with versions of Adobe liveCycle designer, Adobe reader or GUI?
    Thanks in advance,
    Ram

    Hi
    Check the format (in the object pallete) of the date field in Adobe liveCycle Designer, If it is not set already set it according to your requirement. then see if it works
    Hope this helps
    Regards
    Amita

  • Automatic population of search help value to another field in module pool

    Hello there,
    I am developing a module pool screen, in which i have a table control field with fields PERNR and ARBPL along with other fields.
    I have to give a search help for Pernr first field for which i have given a search help with the use of PM02 search help, given in the screen field level, in the same search help there is another field ARBPL, when the pernr is selected i have to get the corresponding Arbpl field value in the search help hit list and pass it to my field arbpl in my table control.
    I tried with POV event as well with FM f4if_field_value_request but the return structure always filling one value only PERNR.
    Is there any chance to get the both field values from the search help.
    Thank you in advance.
    Regards,
    Kumar.

    Try the following logic in your table control, in table control you have get the selected index using function DYNP_GET_STEPL.
    TYPE-POOLS: shlp.
    PARAMETERS:p_matnr TYPE marc-matnr,
               p_werks TYPE marc-werks,
               p_ekgrp type marc-ekgrp.
    TYPES:BEGIN OF ty_marc,
          matnr TYPE marc-matnr,
          werks TYPE marc-werks,
          ekgrp TYPE marc-ekgrp,
          END OF ty_marc.
    DATA:i_marc TYPE TABLE OF ty_marc,
         i_val TYPE TABLE OF ddshretval,
         wa_val TYPE ddshretval.
    DATA:wa_dynpfields TYPE dynpread,
        i_dynpfields LIKE STANDARD TABLE OF dynpread.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
      SELECT matnr werks ekgrp FROM marc INTO TABLE i_marc UP TO 100 ROWS.
      CHECK i_marc[] IS NOT INITIAL.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield         = 'MATNR'
          value_org        = 'S'
          callback_program = sy-repid
          callback_form    = 'CALLBACK_ROUTINE'
          dynpnr           = sy-dynnr
        TABLES
          value_tab        = i_marc
          return_tab       = i_val
        EXCEPTIONS
          parameter_error  = 1
          no_values_found  = 2
          OTHERS           = 3.
      IF sy-subrc  <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT i_val INTO wa_val.
        IF sy-tabix = 1.
          wa_dynpfields-fieldname    = 'P_MATNR'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ELSEIF sy-tabix = 2.
          wa_dynpfields-fieldname    = 'P_WERKS'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ELSEIF sy-tabix = 3.
          wa_dynpfields-fieldname    = 'P_EKGRP'.
          wa_dynpfields-fieldvalue   = wa_val-fieldval.
        ENDIF.
        APPEND wa_dynpfields TO i_dynpfields.
      ENDLOOP.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = i_dynpfields.
    FORM callback_routine TABLES i_val TYPE ddshreslts
                CHANGING wa_shlp TYPE shlp_descr
                         wa_callcontrol LIKE ddshf4ctrl.
      DATA:
        wa_intf     LIKE LINE OF wa_shlp-interface.
      wa_intf-shlpfield = 'F0002'.
      wa_intf-valfield  = 'X'.
      wa_intf-f4field = 'X'.
      wa_intf-value = '~'.
      APPEND wa_intf TO wa_shlp-interface.
      wa_intf-shlpfield = 'F0003'.
      wa_intf-valfield  = 'X'.
      wa_intf-f4field = 'X'.
      wa_intf-value = '~'.
      APPEND wa_intf TO wa_shlp-interface.
    ENDFORM.                    " CALLBACK_F4

  • How to create the select option for the Plant in screen (Module pool)

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Steps to get SELECT-OPTIONS in module pool programs.
    1.Start one dialog program with SAPMZ_001.
    Place the below code in the TOP include of the dialog program.
    TABLES marc.
    SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
    SELECT-OPTIONS: werks FOR marc-werks.
    SELECTION-SCREEN END OF SCREEN 3200. 
    2 .Create one screen 3000.
    Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
    Place the below code in the Flow logic of the screen.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN l_subscreen.
    Activate all.
    Create Transaction code for the dialog program .
    Execute the transaction code. You will see the select-option for werks how we see on Selection-screen.

  • 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.

Maybe you are looking for

  • Iphone 5 doesn't work with philips DS9000 dock station

    The dock station Philips DS9000 doesn't work with the Iphone 5. I have tried several lightening adaptator but the problem is the same. Anyone have the same ??

  • How to code in SE54 transaction in Event 01

    Hello All, I have a requirement to create a functionality of maintainance view (like SM30), but there are validations for Event 01. I know that this will create a new include program, but i have no idea on how to code the validations, for example if

  • Suggestions for backing up captured video digitally

    Hi all, My church is using an Imac (2.4ghz/1gb ram) to capture video of our church sermons. We use a Panasonic GS-320 which runs through a WD MyBook 500 gb external HD then into the Imac. We capture in Imovie directly then let the video file sit. Our

  • Scribus 1.4.4 ICC profiles

    Hi, Today, I noticed Scribus doesn't have all the CMJN profiles, and doesn't seem to be able to export to PDF-X/3 anymore... I used it to produce professional printings some time ago and it worked perfectly... If I try to open a document with Fogra 3

  • Project Link Question

    If I have copies of an iMovie project on more than one disk drive, each with the same name, is there a simple way to know to which the iDVD project folder (usually on still another drive) of the same name points for its source? There are some files I