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

Popup ALV Editable

Former Member
0 Likes
11,634

Hi,

I'm using FM REUSE_ALV_POPUP_TO_SELECT to display an ALV.

I want to make one column editable in this. Is it possible?

How to make editable column for the ALV pop-up. Please do help me.

Above Function Module displays in ALV List format. Is there any pop alv function module that displays in Grid Format?

Please do help.

Thanks & Regards,

Sowmya

1 ACCEPTED SOLUTION
Read only

ravi_lanjewar
Contributor
0 Likes
5,588

Yes, It is posible, Similar to REUSE_ALV_GRID_DISPLAY. You have define the fields as EDIT = 'X' while filling the field catlog.

10 REPLIES 10
Read only

Former Member
0 Likes
5,588

Hi Sowmya,

1st Requirment:

You can pass the field EDIT in the field catalog as X for the field that has to be editable and call the function module REUSE_ALV_POPUP_TO_SELECT.

2dn Requirment:

Try using the function module VIEW_MAINTENANCE_CALL to display the pop up in the GRID format.

But i am not sure about your requirment of displaying the POP UP. The VIEW_MAINTENANCE_CALL function module will displal the GRID as normal format, like standard transaction.

Regards

HM

Read only

0 Likes
5,588

Thanks for the reply Hareesh.

I tried by providing edit = 'X' in fieldcatalog, but it is not working

ls_fieldcat-row_pos   = '1'.
  ls_fieldcat-col_pos   = '8'.
  ls_fieldcat-fieldname = 'DAYS'.
  ls_fieldcat-tabname   = 'G_T_SIMULATED'.
  ls_fieldcat-seltext_m = '# of Days'.
  ls_fieldcat-outputlen = 10.
  ls_fieldcat-edit      = c_on.
  APPEND ls_fieldcat TO lt_fieldcat.
  CLEAR ls_fieldcat.

Please provide your inputs.

Thanks & Regards,

Sowmya

Read only

ravi_lanjewar
Contributor
0 Likes
5,589

Yes, It is posible, Similar to REUSE_ALV_GRID_DISPLAY. You have define the fields as EDIT = 'X' while filling the field catlog.

Read only

Former Member
0 Likes
5,588

I provided the values for:

I_SCREEN_START_COLUMN
I_SCREEN_START_LINE
I_SCREEN_END_COLUMN
I_SCREEN_END_LINE

in REUSE_ALV_GRID_DISPLAY.

Now, it is appearing in Grid Format, but Checkbox is not appearing.

Read only

0 Likes
5,588

Hi,

Add this code in Field catalog


ls_fieldcatlog-CHECKBOX = 'X'.
  ls_fieldcatlog-edit = 'X'.

refer the below link

www dot saptechnical dot com/Tutorials/ALV/Popup/demo dot htm

www dot kerum dot pl/infodepot/00008

Regards,

Dhina..

Edited by: Dhina DMD on Jun 14, 2011 9:35 AM

Read only

0 Likes
5,588

Hi Sowmya,

Can you pls give me your code snippet ?

So that i can get more details regarding the issue.

Regards

HM

Read only

Former Member
0 Likes
5,588

It is working with REUSE_ALV_GRID_DISPLAY after providing:

ls_fieldcat-checkbox  = c_on.
ls_fieldcat-edit      = c_on.


     i_screen_start_column         = 
     i_screen_start_line               = 
     i_screen_end_column           = 
     i_screen_end_line                 =

Thanks & Regards,

Sowmya

Read only

Former Member
0 Likes
5,588

Hi Sowmya,

You shouldn't say "pleas do help" or "please do help me" it's incorrect and wrong.

Read only

mustafacengizde62
Participant
0 Likes
5,588

hi,

just do that,

loop at lt_fieldcatalog into ls_fieldcatalog.

ls_fieldcatalog-edit = 'X'

ls_fieldcatalog-input = 'X' * When you don't do this, then your list is not editable!

modify lt_fieldcatalog from ls_fieldcatalog.

endloop.

That's it.

Read only

deepak_khani
Member
0 Likes
5,588

Hi ,

Hope this will help you.

DATA: kna1 TYPE kna1.

TYPES: BEGIN OF ty_kna1,
chk TYPE char1,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
land1 TYPE kna1-land1,
END OF ty_kna1.
DATA : selfield TYPE slis_selfield.
DATA : v_title TYPE char50 VALUE 'Pop to edit one column in the table',
lwa_fieldcat_pop TYPE slis_fieldcat_alv,
lt_fieldcat_pop TYPE STANDARD TABLE OF slis_fieldcat_alv,
lt_tab TYPE STANDARD TABLE OF ty_kna1.

SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.

START-OF-SELECTION.

SELECT kunnr,
name1,
land1 FROM
kna1 INTO CORRESPONDING FIELDS OF TABLE @lt_tab
WHERE kunnr IN @s_kunnr.


REFRESH lt_fieldcat_pop.
lwa_fieldcat_pop-fieldname = 'CHK'.
lwa_fieldcat_pop-tabname = 'LT_TAB'.
lwa_fieldcat_pop-seltext_l = 'Select'(028).
lwa_fieldcat_pop-col_pos = 1.
lwa_fieldcat_pop-outputlen = 13.
lwa_fieldcat_pop-edit = 'X'.
lwa_fieldcat_pop-input = 'X'.
lwa_fieldcat_pop-checkbox = 'X'.
APPEND lwa_fieldcat_pop TO lt_fieldcat_pop.
CLEAR lwa_fieldcat_pop.

lwa_fieldcat_pop-fieldname = 'KUNNR'.
lwa_fieldcat_pop-tabname = 'LT_TAB'.
lwa_fieldcat_pop-seltext_l = 'Disburse Status'(036).
lwa_fieldcat_pop-edit = 'X'.
lwa_fieldcat_pop-input = 'X'. "this is required to allow the input.
lwa_fieldcat_pop-col_pos = 2.
lwa_fieldcat_pop-outputlen = 13.
APPEND lwa_fieldcat_pop TO lt_fieldcat_pop.
CLEAR lwa_fieldcat_pop.


lwa_fieldcat_pop-fieldname = 'NAME1'.
lwa_fieldcat_pop-tabname = 'LT_TAB'.
lwa_fieldcat_pop-seltext_l = 'Status of capital amount'(037).
lwa_fieldcat_pop-col_pos = 3.
lwa_fieldcat_pop-outputlen = 13.
APPEND lwa_fieldcat_pop TO lt_fieldcat_pop.
CLEAR lwa_fieldcat_pop.

lwa_fieldcat_pop-fieldname = 'LAND1'.
lwa_fieldcat_pop-tabname = 'LT_TAB'.
lwa_fieldcat_pop-seltext_l = 'RFC number'(038).
lwa_fieldcat_pop-col_pos = 4.
lwa_fieldcat_pop-outputlen = 13.
APPEND lwa_fieldcat_pop TO lt_fieldcat_pop.
CLEAR lwa_fieldcat_pop.


CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_title = v_title
i_selection = 'X'
i_zebra = 'X'
i_scroll_to_sel_line = 'X'
i_tabname = 'LT_TAB'
it_fieldcat = lt_fieldcat_pop
i_callback_program = sy-repid
IMPORTING
es_selfield = selfield
TABLES
t_outtab = lt_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

*This is again printed in alv to check whether the input value is captured in the table.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = lt_fieldcat_pop
TABLES
t_outtab = lt_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.