cancel
Showing results for 
Search instead for 
Did you mean: 

Help On Selection Screen

Former Member
0 Kudos

Hi...Can any one send a sample code for a header selection screen calling a detail screen and edit the detail.

Sunil....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

*Selection Screen Code

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: r1 RADIOBUTTON GROUP rad1 MODIF ID sc7 USER-COMMAND cli

DEFAULT 'X',

r2 RADIOBUTTON GROUP rad1 MODIF ID sc6.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : s_werks TYPE ekpo-werks MODIF ID sc1, "Plant

s_lifnr TYPE ekko-lifnr MODIF ID sc2. "Vendor

SELECT-OPTIONS: s_matnr FOR mara-matnr MODIF ID sc3. "Material

SELECT-OPTIONS: s_date FOR sy-datum MODIF ID sc4

NO INTERVALS NO-EXTENSION. "Date

SELECT-OPTIONS: s_lifnr1 FOR ekko-lifnr MODIF ID sc8

NO INTERVALS NO-EXTENSION. "Delivery to

PARAMETERS: s_pri TYPE c MODIF ID sc5. "Priority

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

PARAMETERS: s_txt1 LIKE zmm_collection-txt01 MODIF ID sc9, "Plant

s_txt2 type zmm_collection-txt01 modif id s10, "Vendor

s_txt3 type zmm_collection-txt01 modif id s11. "Vendor

SELECTION-SCREEN END OF BLOCK b3.

*Code to print the data in Editable Mode

WRITE: /1 cbox AS CHECKBOX, 3 gt_disp-po_num,

17 gt_disp-po_item, 25 gt_disp-vend,

37 gt_disp-material, 60 t_qty INPUT ON,

88 gt_disp-ut_measure,

92 t_wt INPUT ON, 110 ' ',

pack INPUT ON.

*"Code to Handle Code Editing....

*Put this code on click of Save button

DO.

  • READ LINE VALUE INTO wa_gt_disp.

READ LINE sy-index FIELD VALUE cbox gt_disp-po_num

gt_disp-po_item t_qty

t_wt pack.

*Do the processing you want to do on the changed data

ENDDO.

Answers (2)

Answers (2)

varma_narayana
Active Contributor
0 Kudos

Hi Sunil..

This is the code:

&----


*& Report ZSELFILE1 *

*& CALLING SELECTION SCREEN AND F4 HELP *

&----


REPORT zselfile1 .

TABLES:sscrfields.

**Create the Additional Selection screen to input filename

SELECTION-SCREEN: BEGIN OF SCREEN 10.

PARAMETERS: p_file TYPE rlgrap-filename.

SELECTION-SCREEN: END OF SCREEN 10.

**Create Application Toolbar Button on the Standard selection Screen

SELECTION-SCREEN FUNCTION KEY 1. "Its fcode will be FC01

PARAMETERS : p_werks TYPE marc-werks.

INITIALIZATION.

sscrfields-functxt_01 = 'Enter File'. "Assign the Text to the Button

AT SELECTION-SCREEN.

CASE sscrfields-ucomm. "Check the Fcode

WHEN 'FC01'.

**Details Selection Screen

CALL SELECTION-SCREEN 10 STARTING AT 5 8 ENDING AT 85 20.

ENDCASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME' "Local file browser

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = 'P_FILE'

IMPORTING

file_name = p_file.

START-OF-SELECTION.

<b>reward if Helpful.</b>

Former Member
0 Kudos

Hi,

Check the program BCALV_GRID_EDIT which is calling a detail screen and has the option to edit the detail also.

Reward if useful.........