How to save edited ALV List.
hi all,
i have created a program which displays two ALV LISTS and i made some of the fileds editable by using input key. Now when i press the SAVE button ,i couldnt capture the edited fileds contents .
have a look at the code below .
call function 'REUSE_ALV_BLOCK_LIST_INIT'
exporting
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'.
*---------------------for top of page----------------*
xs_event-name = slis_ev_top_of_page.
xs_event-form = 'TOP_OF_PAGE'.
append xs_event to IT_events.
xs_event-name = slis_ev_top_of_page.
xs_event-form = 'TOP_OF_PAGE1'.
append xs_event to IT_events1.
*---------------------appending 1st alv---------------*
if not it_DATA is initial.
call function 'REUSE_ALV_BLOCK_LIST_APPEND'
exporting
is_layout = gd_layout
it_fieldcat = it_fieldcat
i_tabname = 'IT_DATA'
it_events = IT_events
tables
t_outtab = it_DATA.
endif.
*---------------------appending 2nd alv---------------*
call function 'REUSE_ALV_BLOCK_LIST_APPEND'
exporting
is_layout = gd_layout1
it_fieldcat = it_fieldcat1
i_tabname = 'IT_PEND'
it_events = IT_events1
tables
t_outtab = IT_PEND.
*---------------------ALV Display------------------------------*
gt_print-reserve_lines = 2.
call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
exporting
is_print = gt_print.
endform. " report_output
regards,
Venkat
i was able to get the changed data in ALV grid by this code
data: gd_repid like sy-repid,
ref_grid type ref to cl_gui_alv_grid.
if ref_grid is initial.
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = ref_grid.
endif.
if not ref_grid is initial.
call method ref_grid->check_changed_data .
endif.
is there any equivalent code for ALV LIST like the above code??
Similar Messages
-
How to create editable ALV grid/list
Hi,
I want to create editable ALV grid/list so that user can modify the data in the ALV.
And when user presses save button data will get saved in Z table.
I dont know how to create editable ALV so could anybody please help me regarding this?
Thanks & regards,
Sameer DhukeHI
check the demo programs BCALV_FULLSCREEN_GRID_EDIT
BCALV_GRID_EDIT
BCALV_TEST_GRID_EDIT_01
BCALV_TEST_GRID_EDITABLE
REUSE_ALV_GRID EDITABLE
ALV Grid editable fields
Just to make things a bit easy
In the layout,there is a property called edit, make it 'X' for the particular field whichever you want to make editable.
Hope this helps,
Suruchi
Message was edited by:
Suruchi Mahajan -
Add(Copy)/Change/Delete in editable ALV list
I want to add a column to my ALV list where the user can enter an 'A' to Copy, 'C' to Change or 'D' to Delete. If the user enters an 'A', the code needs to insert a new line into the ALV list. After the user makes the changes on the screen and selects Save, I need the program to perform different functions depending on whether the user entered an 'A', 'C' or 'D' in the column. I have never used an editable ALV list and would like to have some sample code to get started. Does anyone have any code similar to what I am trying to do?
Thanks.
SandyHi,
check this code... if you trying with ALV FM, and editable grid then check this code.
REPORT ZTESTDFALV1 .
*Data Declaration
DATA: BEGIN OF T_EKKO,
EBELN TYPE EKPO-EBELN,
EBELP TYPE EKPO-EBELP,
* FLAG TYPE C,
* HANDLE_STYLE TYPE LVC_T_STYL,
END OF T_EKKO.
DATA: GD_REPID LIKE SY-REPID, "Exists
REF_GRID TYPE REF TO CL_GUI_ALV_GRID. "new
DATA: BEGIN OF IT_EKKO OCCURS 0.
INCLUDE STRUCTURE T_EKKO.
DATA: END OF IT_EKKO.
DATA: BEGIN OF IT_BACKUP OCCURS 0.
INCLUDE STRUCTURE T_EKKO.
DATA: END OF IT_BACKUP.
*ALV data declarations
TYPE-POOLS: SLIS. "ALV Declarations
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
*Start-of-selection.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_FIELDCATALOG.
PERFORM BUILD_LAYOUT.
IT_BACKUP[] = IT_EKKO[].
PERFORM DISPLAY_ALV_REPORT.
*& Form build_fieldcatalog
* text
FORM BUILD_FIELDCATALOG.
REFRESH FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'EBELN'.
FIELDCATALOG-SELTEXT_M = 'Purchase Order'.
FIELDCATALOG-INPUT = 'X'.
FIELDCATALOG-EDIT = 'X'.
FIELDCATALOG-COL_POS = 2.
APPEND FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'EBELP'.
FIELDCATALOG-SELTEXT_M = 'PO Item'.
FIELDCATALOG-COL_POS = 3.
APPEND FIELDCATALOG.
CLEAR FIELDCATALOG.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM BUILD_LAYOUT.
"Permet d'ajuster les colonnes au text
* gd_layout-colwidth_optimize = 'X'.
* GD_LAYOUT-TOTALS_TEXT = 'Totals'(201).
* gd_layout-box_fieldname = 'SELECT'.
* gd_layout-box_tabname = 'IT_EKKO'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM DISPLAY_ALV_REPORT .
GD_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = GD_REPID
* i_callback_top_of_page = 'TOP-OF-PAGE'
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* i_grid_title = 'My Title'
IS_LAYOUT = GD_LAYOUT
IT_FIELDCAT = FIELDCATALOG[]
TABLES
T_OUTTAB = IT_EKKO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE:/ SY-SUBRC.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM DATA_RETRIEVAL.
SELECT EBELN EBELP
UP TO 10 ROWS
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE IT_EKKO.
ENDFORM. " DATA_RETRIEVAL
* FORM SET_PF_STATUS *
FORM SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD_FULLSCREEN1' EXCLUDING RT_EXTAB.
ENDFORM. "set_pf_status
*& Form user_command
* text
* -->R_UCOMM text
* -->RS_SELFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
<b>
*then insert the following code in your USER_COMMAND routine...
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID->CHECK_CHANGED_DATA
ENDIF.</b>*modify
CASE R_UCOMM.
WHEN '&IC1'.
CHECK RS_SELFIELD-TABINDEX > 0.
IF RS_SELFIELD-VALUE EQ '6000000001'.
CALL TRANSACTION 'ZDF2'.
ENDIF.
WHEN 'REFRESH'.
READ TABLE IT_EKKO INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
READ TABLE IT_BACKUP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
IF IT_EKKO <> IT_BACKUP.
* then do your check
ENDIF.
ENDIF.
ENDIF.
PERFORM DATA_RETRIEVAL.
RS_SELFIELD-REFRESH = 'X'.
ENDCASE.
ENDFORM. "user_command
regards
vijay -
How can I edit reading list on safari?
How can I edit reading list on safari?
Thanks. It looks so simple and elegant now! There was no info about it in any apple guide!
-
All,
In release 4.7 there is a possibility to create an editable ALV list (see programs BCALV_EDIT_xx).
Now I want to use this functionality also in release 4.6B but I don't find these programs.
Is this not possible in this release?
Has someone already programmed an editable ALV list in this release?
Regards,
KrisHello Kris,
I must make myself clearer. There is a chance that these programs have got a slightly different name in 4.6B. So, just try and see if there's something in the development class SLIS through SE80.
If you have already done that, then you just have to copy the code from 4.7 and paste it in the 4.6B system. hopefully, there will not be any syntax errors.
Even if there are, When you have seen the program in 4.7, I don't see what the problem is in trying to write a similar program in 4.6B. It is the concept that matters, right ?
Regards,
Anand Mandalika. -
How can we edit alv report output.
hi all,
how can we edit alv report output\[removed by moderator as it was just a copy and paste answer of someone else's work without giving a source\]
Edited by: Jan Stallkamp on Aug 25, 2008 4:35 PM -
How can I fixed alv list?
how can I fixed alv list?
alv list always change size(scaled) I mean cannot fixed
I did using some parameters following .I want to fixed the length of ALV column but still not work.
fieldcat_ln-intlen = 13
fieldcat_ln-outputlen = 13.
becuase I need to know print size and so on etc..
What I have to do? anything wrong?Hi Yi,
1. If u are talking about fixing
the size of the column,
then u are right.
outputlen is the right property.
2. Along with that we need to do one more thing.
This is regarding the column heading
which appears either LONG, SHORt, MEDIUM,
from the data element defition.
set ddictxt = M
or L, S (short)
Regards,
Amit M. -
Scrolling-problem in an editable ALV-list
Hi,
I have built an <b>ALV-list</b> with one of the fields <b>open for input</b>. The user wants to use the arrow to scroll <u>down</u> through the table and update that particular field in every row. I have <b>2</b> questions about this:
- First of all, the cursor moves in a strange way. The first number of rows it stays in the right column, but then, out of the blue, it jumps back and forth to other columns after scrolling.
- Secondly, the field I want to edit is always in Insert-mode. Is there any way I can get it into Overwrite-mode? I cannot use the Tab-key, because of the lead-selection.
Thanks in advance for your help.
Kind regards,
Andre MoniharaponHi Vijay,
please don't get me wrong, I really appreciate your attempts to help me, but my problem is that when I press the Down-arrow it <u>doesn't</u> always go to the next cell in the <i>same</i> column. It sometimes goes to the next cell in <i>another</i> column. And if I can't force it to stay in the same column in some way, than my problem cannot be solved and I must think of another solution. So, I don't want the cursor to stay in the same field, I want it to go to the next cell in the same column. You got that right. Again, I really appreciate your help, but it looks more and more that there's no solution to my problem.
Kind regards,
Andre -
How to skip the alv list when submit a report by SUBMIT statement?
Dear Experts,
I have to submit a report(RMVKON00) for a special request in my add-on program, I use the following statment:
SUBMIT RMVKON00
AND RETURN EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = ABAPLIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_ASCI'
* EXPORTING
* LIST_INDEX = -1
* WITH_LINE_BREAK = ' '
TABLES
LISTASCI = LISTASCI_TAB[]
LISTOBJECT = ABAPLIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3
But it still display the alv list , and I must click button 'BACK' ,then it return my add on program.
I hope to skip the alv list (does not display the alv list ) .
Would you like to help me?
Thanks and Best Regards,
Colin.
Edited by: Colin on Jan 8, 2010 10:09 AMHi Colin,
I dont think you would be able to skip the ALV output using SUBMIT. However try changing the value of sy-lsind after the submit statement.
SUBMIT RMVKON00
AND RETURN EXPORTING LIST TO MEMORY.
sy-lsind = sy-lsind - 1.
If that doesnt work then try using JOB_START JOB_SUBMIT, JOB_CLOSE...
Thanks,
Best regards,
Prashant -
How to send the alv list display to spool
Hi all,
I am executing a program in foreground. My requirement is sending alv list output to spool. When i execute the smae program in background mode the SAP is handling the spool output in hierarchial list display. How to get the same output in foreground also.
Thanks and Regards,
Vijay.Hi max,
I think my question is not clear.
when I execute my report in background mode, I can able to see the output in the spool.
But when I execute the same report in foreground no spool output is getting generated.
To handle this I am calling some function modules like RSPO_OPEN_SPOOLREQUEST , RSPO_WRITE_SPOOLREQUEST, RSPO_WRITE_SPOOLREQUEST. But by using this i cannot able to get the desired output in alv list display format. what to do to get my desired output.
Thanks and Regards,
Vijay. -
How to convert the alv list data into pdf format
Hi Expersts,
Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
thanks in advance,
Regards,
Samadhii samad,
you can go through these link.i hope it ll solve your purpose
How to convert list output to PDF
Display ALV list output in PDF format
regards,
Shweta -
How to print two alv lists in one spool request
Hello,
I have made a report which has one alv list based on CL_SALV_TABLE and a message box displayed in a splitter container based on SBAL. In dialog mode everything is fine.
If I run the report in batch mode, I have put the alv table to
list_display = abap_true.
For printing the messages I am using FM BAL_DSP_LOG_PRINT. It has this nice parameter
i_s_list_append = abap_true.
Unfortunatly the messages are not appended to the alv list, nor are they in the same spool request.
I think the system will put it only into the first spool request, when the name, the printer, the number of prints and the format are the same and of couse, if the spool request is still open for appenfing (which it is).
The name and the format are not the same in my case. So I tried to set the name to TEST using the print options of the FM
ls_print_options-print_ctrl-pri_params-plist = 'TEST'.
But unfortunately it is not working. No changes to the name, when I run the report in batch mode.
Who has experiance with that? Why are both lists not in the same spool request? Are my findings right? Why isn't the name changed?
Thank you for your help,
Peterdo 2 times
perform write_form.
end do.
for header u can give condtion in form.
use if condition in the editor...
this will help u...
Reward IF....... <= IF what? Points removed... read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]!
Regards
Anbu
Edited by: Julius Bussche on Jul 17, 2008 7:01 PM -
How do I edit reading list in ios7
How to edit reading list in ios7
swipe your finger leftwards on the actual item you wish to delete and that action should "uncover" the red delete button
-
How to save Created confarence list
Whenever my ipvc 3545 rebooted the confarence list removed how can save this list permanently
In the Conference Bridge Configuration window, select Cisco IOS Enhanced Conference Bridge in the Conference Bridge Type drop-down list box. Configure the Conference Bridge Name, Description, Device Pool, Common Device Configuration, and Location settings . In the Device Security Mode field, select Encrypted Conference Bridge.C ick Save.
http://www.cisco.com/en/US/docs/voice_ip_comm/cucmbe/security/6_0_1/secugd/secuconf.html -
I shoot .nef with a D800e and am learning to edit these in Photoshop Camera Raw. What is the best way to save for viewing and printing and sending to friends on a DVD? (TV viewing) If I save edits as a tiff or jpeg does Photoshop remember the edits if I open the .nef picture again? Do i really need three versions of each picture? jpg, nef and photoshop raw, or what?? I have several thousand .nef and to convert to a photoshop raw format would take much disk space and yes I have three external drives of 1 - 3 TB.
What is my best practice?For that Nikon model you need ACR 8.3 that means CS6 or CC. Or you can download the DNG converter convert your Nikon RAW files to Adobe RAW files. And then process the Adobe RAW files with CS5 ACR version 6.7
Camera Raw plug-in | Supported cameras
Maybe you are looking for
-
ITunes will not start on MBP OS 10.6.8
This problem has persisted for well over a week now. I have uninstalled and reinstalled iTunes three times, restarted my computer multiple times, and deleted the Genius file. When I attempt to open iTunes, a pop up appears for about three seconds ask
-
Hello All, My client has implemented fund management so i need to ask , when i do advance payment to vender against Purchase order then will it affect the find budget. suggest
-
Yes, searched, RTFM, and googled, but can't find the right answer. I have made a 'window' with a cross in the middle (see pic). I can make text follow a path, but only in 2D. I want it to come out of one window frame and go through another several ti
-
Hi! I installed ARCH again. I didn't configure Xorg7 yet because I play with udev and my network cards. I have one integrated on the motherboard (3Com) which I use for Internet and I have D-Link card which I did use with my wifes computer and I live
-
The touch screen is not working
I was using my phone and it just blocked I couldn't use anything. Then it started to ask me to double. Lick the icons to open them and I can't scroll down or go anywhere without double clicking after the phone instruction.