Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Some problem in selection-screen

Former Member
0 Likes
870

Hi Expert,



I have problem in selection-screen . I have a change screen. when i give vendor name and then click on display then it show all value for that vendor. Now user want to edit form 38 no (more than one field at a time) change and click on change button. But problem is that form 38 field is not editable..so please guide me what should i do for that. Should we need to design a new screen for that or we continue with the same screen as given below.


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
819

Poblem solved adding by this code.

data : fcat like line of gt_fieldcat .

  data wa_fcat like line of gt_fieldcat.

loop at gt_fieldcat[] into wa_fcat.

if  wa_fcat-fieldname  = 'FORM38' "name of the field containing form38  in ZFORM38NO  table

    WA_FCat-INPUT = 'X' .

    wa_fcat-edit = 'X' .

modify  gt_fieldcat[] from wa_fcat transporting input  edit .

endif .

endloop.

7 REPLIES 7
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
819

Hi  Raj

Is it a standard transaction or custom one. Please provide all the necessary details

Nabheet

Read only

0 Likes
819

Hi Nabheet sir,

Its a custom. Aqly i am making a zscreen for form-38.

Read only

0 Likes
819

Hi Raj

If its a custom screen then you can make your field as editable/display etc what is the issue  you are facing..?

Nabheet

Read only

0 Likes
819

Nabheet sir,

Actually i made it as display but i have no idea how to make it as editable. please tell me how to do it ?

Read only

0 Likes
819

How did you made it as display? Please provide complete details of what all you hacve done technically

Nabheet

Read only

0 Likes
819

Nabheet sir ,

Actually i am making a zscreen for form-38. In my first screen there is 3 option.CREATE, CHANGE,DISPLAY. CREATE and DISPLAY is ok. IN change screen as i already posted with print screen. When i give vendor code it show all value for that vendor( which is created in ztable.). So if user want to change any thing then they can change. currently in my screen value display but not editable. Given is the code for change screen.

SELECTION-SCREEN : BEGIN OF SCREEN 202, " Change screen.

                   begin of block b4 with frame title text-003.

SELECT-options : form38 for ZFORM38NO-FORM38 matchcode object ZFORM38_FORM,

                 VENCode1 for ZFORM38NO-VENCODE matchcode object zform38 obligatory, " OBLIGATORY,

                 DATEISS1 for ZFORM38NO-DATEISS no intervals no-extension matchcode object ZFORM38_DATE,

                 PLANT1 for ZFORM38NO-PLANT.

Selection-screen : skip 2,

PUSHBUTTON 5(10) a2 user-command CHANGE,

pushbutton 17(10) a11 user-command DISP1.

SELECTION-SCREEN : end of block b4,

                   end of screen 202.

Initialization.

 

  A2 = 'Change'.

  A11 = 'Display'.

When 'CHA'.

      call selection-screen 202.

      WHEN 'DISP1'.

     PERFORM get_data1.

      When 'CHANGE'.

      Wa_itab-FORM38 = FORM38.

      Wa_itab-VENCode = VENCode1.

      Wa_itab-DATEISS = DATEISS1.

      Wa_itab-PLANT = PLANT1.

      Update ZFORM38NO from wa_itab.

      if sy-subrc = 0.

        MESSAGE 'Data Changed Successfully' TYPE 'I'.

      endif.

FORM GET_DATA1 .

  CLEAR: GS_SELFIELD, GT_OUTTAB[], GT_FIELDCAT[].

SELECT * FROM zform38no INTO TABLE GT_OUTTAB WHERE vencode in vencode.

  call function 'REUSE_ALV_FIELDCATALOG_MERGE'

       EXPORTING

            I_STRUCTURE_NAME       = 'ZFORM38NO'

       changing

            ct_fieldcat            =  gt_fieldcat[].

read table gt_fieldcat with key fieldname = 'REMARKS'.

  if sy-subrc = 0.

    gt_fieldcat-no_out = 'X'.

    modify gt_fieldcat index sy-tabix.

  endif.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

       EXPORTING

            I_TITLE                 = vencode1-low

*           I_SELECTION             = 'X'

*           I_ZEBRA                 = ' '

*           I_SCREEN_START_COLUMN   = 0

*           I_SCREEN_START_LINE     = 0

*           I_SCREEN_END_COLUMN     = 0

*           I_SCREEN_END_LINE       = 0

*           I_CHECKBOX_FIELDNAME    =

*           I_LINEMARK_FIELDNAME    =

*           I_SCROLL_TO_SEL_LINE    = 'X'

            i_tabname               = '1'

            IT_FIELDCAT             = gt_fieldcat[]

*           IT_EXCLUDING            =

*           I_CALLBACK_PROGRAM      =

*           I_CALLBACK_USER_COMMAND =

            IS_PRIVATE              = GS_PRIVATE

     IMPORTING

            ES_SELFIELD             = GS_SELFIELD

            E_EXIT                  = G_EXIT

       TABLES

            T_OUTTAB                = GT_OUTTAB

       EXCEPTIONS

            PROGRAM_ERROR           = 1

            OTHERS                  = 2.

  IF SY-SUBRC <> 0.

    MESSAGE I000(0K) WITH SY-SUBRC.

    ENDIF.

endform.

Read only

Former Member
0 Likes
820

Poblem solved adding by this code.

data : fcat like line of gt_fieldcat .

  data wa_fcat like line of gt_fieldcat.

loop at gt_fieldcat[] into wa_fcat.

if  wa_fcat-fieldname  = 'FORM38' "name of the field containing form38  in ZFORM38NO  table

    WA_FCat-INPUT = 'X' .

    wa_fcat-edit = 'X' .

modify  gt_fieldcat[] from wa_fcat transporting input  edit .

endif .

endloop.