2005 Nov 07 3:49 AM
Hi,
When ever i edit the values in the basic list, then if i choose one dialog command, these modified values get populated into another screen. This is my requirement.
I have used read line coding for this. And iam using
usercommand routine in the alv grid display. But iam unalbe to get the modified values into the next screen.
How can i do this. This is the way or is there any other way to do this during use of alv_grid_display.
rgds.
p.kp
2005 Nov 07 3:57 AM
When ever you select the record or double click on the record, you will get the sy-tabix value of the final internal table. Read the final internal table by the sy-tabix value. then you can export the values to another list.
The final internal table will be th table which you displayed the basic list.the sy-tabix value will be RSSELFIED.
2005 Nov 07 3:50 AM
Kp,
Why don't you use the DATA_CHANGED event and capture all the changed data over there.
I am not clear how you are reading now "Read Line Coding" ???
Regards,
Ravi
2005 Nov 07 3:55 AM
HI ravi,
Can u give that code about data_changed event.
rgds
kp
2005 Nov 07 3:51 AM
Read line is a construct of normal list outputs. If you are using ALV grid and you have the USER COMMAND routine in your program, then that routine will get the row number and based on that you can read the record of the internal table and do whatever you need to do.
2005 Nov 07 3:54 AM
Hi Krishna,
There are lot of example ALV reports available in the SAP system, goto se38 and type BALV* and take F4, you will find lot of example. One of the report will meet your requirement.
Enjoy SAP,
Satya
2005 Nov 07 3:57 AM
When ever you select the record or double click on the record, you will get the sy-tabix value of the final internal table. Read the final internal table by the sy-tabix value. then you can export the values to another list.
The final internal table will be th table which you displayed the basic list.the sy-tabix value will be RSSELFIED.
2005 Nov 07 4:31 AM
HI,
this is my code
FORM usercommand USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'SAVE'.
DO 20 TIMES.
READ TABLE ITAB INTO ITAB1 INDEX SY-INDEX.
APPEND ITAB1.
ENDDO.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING.
LOOP AT ITAB1.
WRITE: / ITAB1-BANFN.
ENDLOOP.
ENDCASE.
But iam not unalbe to get the edited information into the itab1. How to do it.
rgds
kp
2005 Nov 07 4:39 AM
Why are you doing again list-processing from within ALV? If your intention is to just show the modified values, then just reset the ucomm to '&REFRESH'.
Also, why are you doing the DO loop for only 20 times? Why are you not checking sy-subrc after the READ statement? Why are you not clearing ITAB1 after APPEND? What do you see in debugging if you put a break-point here on the DO loop statement?
Srinivas
2005 Nov 07 4:56 AM
in the rs_selfield you have field called refresk. after writing you code just populate rs_selfield-refresh = 'x'.
This will get the edited values.
2005 Nov 07 4:56 AM
2005 Nov 07 4:57 AM
in the rs_selfield you have field called refresh. after writing you code just populate rs_selfield-refresh = 'x'.
This will get the edited values.
Pls try this.
2005 Nov 07 5:10 AM
2005 Nov 07 5:13 AM
FORM usercommand USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'SAVE'.
DO 20 TIMES.
READ TABLE ITAB INTO ITAB1 INDEX SELFIELD-TABINDEX.
APPEND ITAB1.
ENDDO.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING.
LOOP AT ITAB1.
WRITE: / ITAB1-BANFN.
ENDLOOP.
ENDCASE.
Ceck my edited code of yours.
2005 Nov 07 5:17 AM
hi MCG,
I checked it. But it is rs_field-index value always equal to 1. I edited first row. Even though it has not been edited.
rgds
p.kp
2005 Nov 07 5:27 AM
As I said, your write statements will not show up unless after you leave your ALV. But what are you seeing in debugging in ITAB and the index? You still did not answer my previous questions?
What is it that you want to achieve by this code?
Srinivas
2005 Nov 07 5:36 AM
Hi srinivas,
sy-subrc = 0.
index will be increased for every looping.
Srinivas coding is correct. But there may be another way to get the edited values from alv lists.
rgds
p.kp
2005 Nov 07 5:46 AM
hi,
check this event mostly it should help you solving the problem.
Slis_ev_list_modify TYPE slis_formname VALUE 'LIST_MODIFY'.
LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME
R_INDEX LIKE SY-TABIX
R_INDEX_ITEM LIKE SY-TABIX
R_INDEX_SUM LIKE SY-TABIX.
regards,
manohar
2005 Nov 08 4:04 AM
Hi,
Yesterday i posted this thread. Still i unable to get the modified list of alv into the another table. And i got two more doubts.
1. See this code
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = REP
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USERCOMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
In the above code the parameter i_background_id iam sending alv_background. Where this id's are available. HOw can i create my own id's into sap and what is the format.
2. And see this code
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = T_HEADER[]
I_LOGO = 'ENJOY'.
in the above fm, for the parameter i_logo i want to send my own pictures with tiff format. But it is not showing
the picturtes. How can i get it and how to create pictures
rgds
p.kp
2005 Nov 08 4:17 AM
Upload Logo for <b>REUSE_ALV_COMMENTARY_WRITE</b> For those who wish to upload and use a picture in your ALV abap reports.
<b>Steps for uploading Logo :-:</b>
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
or
Import Logo and Background Picture for Reporting
In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
From the SPRO:
HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
Activities
1. Enter the Name of your logo/background picture as an object key in the initial screen.
2. Make sure that the class name is PICTURES, and the class type is OT.
3. Choose Execute.
4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable.
2005 Nov 08 5:20 AM
Hi jessie,
I am successfully uploaded the logos and used in the alv. First time i have seen this business document server. Is there any use of this transaction oaer.
If there is any good use, please let me know. And let me know how to use this business documetn server.
rgds
p.kp
2005 Nov 08 5:26 AM
se78 or oaer transactions Used to store pictures which could be later viewed using screen in SAP.
Notes:
1) Logos & wallpapers can be found in table BDS_CONN05
with class = PICTURES
*
2) Transaction OAER can be used to create PICTURES.
Run transaction OAER with class name = PICTURES, Class type = OT,
and Object key with whatever name you want to create. In the
next screen, right clicking on screen and import
Kindly reward and close the thread if ur problem got solved.
2005 Nov 08 5:40 AM
Hi jessie,
i rewarded only 6 points. Because my problem of editing the alv grid dispaly has not been solved yet.
Iam able to edit the list values. But how can i save those values into another internal table after clicking the save button. I tried with user_command event, even though it is not coming. Can u help regarding this problem.
rgds.
p.kp
2005 Nov 08 5:41 AM
Hi.
I think that user-command value is '&ATA_SAVE'.
So, you have to codeed the folliwings in subroutine 'USERCOMMAND'
CASE r_ucomm.
WHEN '&ATA_SAVE'.
.........
ENDCASE.
Good Luck!
2005 Nov 08 5:51 AM
Hi,
In the form usercommand,
I_CALLBACK_USER_COMMAND = 'USERCOMMAND'
ex: U might be having a function code for the save button right?
If then do as below in the form usercommand.
CASE Sy-ucomm.
when 'SAVE'.(function code)
U will be having the final internal table name right?
eg: i_final. If it has a work area
APPEND wa_final to i_final_edit.
If no workarea then
APPEND i_final to i_final_edit.
ENDCASE.
Now the i_final_edit will be having all the changed values.
Try this logic.
2005 Nov 08 5:56 AM
Hi lee,
That will work with standard pf status. But i want to set my pf status. And i want to save by using my user command.
rgds
p.kp
2005 Nov 08 6:02 AM
S u can set ur PF-Status going to screen painter > application tool bar in that u will be specifying the fucntion code right?
Use that function code and do as mentioned above.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
<b>i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM</b>
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
*------------------------------------------------------------------*
* FORM SET_PF_STATUS *
*------------------------------------------------------------------*
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZNEWSTATUS'.
<b>(doubleclick on ZNEWSTATUS and create in application toolbar)</b>
ENDFORM.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
Message was edited by: Judith Jessie Selvi
2005 Nov 08 6:14 AM
Hi jessi,
Yesterday, i tried all these things. But i could not get it. There may be other way to save the edited values into another table by using events.
rgds
p.kp