Transfer data from ALV to Z table
Hi,
I need to confirm the exact procedure to transfer data from ALV into z table.I am entering few values at runtime in the ALV & need to populate the z table with the same.
I created a z table,it has been assigned a internal table & work area.A loop is there on the internal table passed to fieldcatalog.
LOOP AT GIT_EKPO INTO GS_EKPO.
LS_ZPS005-EBELN = GS_EKPO-EBELN.
LS_ZPS005-EBELP = GS_EKPO-EBELP.
LS_ZPS005-ERECDAT = GS_EKPO-ERDAT. "this field is not passing value into z table
LS_ZPS005-LINEID = SY-TABIX.
LS_ZPS005-POQTY = GS_EKPO-POQTY.
LS_ZPS005-EREQTY = GS_EKPO-EREQTY. "this field is not passing value into z table
ENDLOOP.
INSERT INTO ZPS005 VALUES LS_ZPS005.
When I assign the values from Internal table into internal table of z table,the values in fields populated at runtime does not come.
Please help me with your suggestions on the same.
Thanks.
Hi,
I tried the procedure,but do I need to include this before method set_table_for_first_display?
You can have a look at the whole code.Please let me know of a possible solution.Looking forward to an early reply.
Thanks.
TABLES: EKKO,
EKPO,
ZPS005.
INITIALIZATION.
PERFORM CREATE_FIELD_CATLOG.
Types Declaration *
*Structure for EKPO table
TYPES: BEGIN OF TYPE_EKPO,
EBELN TYPE EKPO-EBELN, "PURCHSE ORDER NUMBER
EBELP TYPE EKPO-EBELP, "Item Number of Purchasing Document
POQTY TYPE EKPO-MENGE, "Purchase Order Quantity
ERDAT TYPE SY-DATUM, "Date on Which Record Was Created
LINEID TYPE ZPS005-LINEID, "Unique identification of document line
EREQTY TYPE ZPS005-EREQTY, "Erection Quantity
END OF TYPE_EKPO.
Data *
Data Declaration for Internal Table & Work Area *
*INTERNAL TABLE FOR EKPO TABLE
DATA:LIT_EKPO TYPE TABLE OF EKPO,
LS_EKPO TYPE EKPO.
*SECOND INTERNAL TABLE FOR EKPO TABLE
DATA: GIT_EKPO TYPE TABLE OF TYPE_EKPO.
DATA: GS_EKPO TYPE TYPE_EKPO.
*INTERNAL TABLE FOR FIELD CATALOG
DATA: LIT_FIELDCAT TYPE lvc_t_fcat,
LS_FIELDCAT LIKE LINE OF LIT_FIELDCAT. "WORK AREA FOR FIELD CATALOG
*INTERNAL TABLE FOR Z TABLE ZPS005
DATA: LIT_ZPS005 TYPE TABLE OF ZPS005,
LS_ZPS005 TYPE ZPS005.
ALV GRID Data Declaration *
DATA: V_CONTAINER TYPE REF TO cl_gui_custom_CONTAINER.
data: grid TYPE REF TO cl_gui_alv_grid.
data: ok_code type sy-ucomm.
DATA: V_LAYOUT TYPE lvc_s_layo. " FOR LAYOUT
DATA: V_LINE TYPE I,
LINEID TYPE I.
DATA: V_INDEX TYPE SY-TABIX.
PARAMETER *
parameter : p_ebeln like ekko-ebeln.
START OF SELECTION *
START-OF-SELECTION.
SELECTION OF DATA *
CALL FUNCTION 'ME_PURCHASE_DOCUMENT_DATA_READ'
EXPORTING
I_EBELN = P_EBELN
I_TCODE = 'ME23'
I_NO_COMMIT = ' '
I_TRTYP = 'A'
I_NO_MESSAGING =
I_NO_MESSAGE_REQ =
I_NO_AUTHORITY_CHECK =
I_VORGA =
IMPORTING
E_EKKO =
TABLES
T_EKPO = LIT_EKPO
T_EKET =
T_EKKN =
T_KOMV =
EXCEPTIONS
NO_EBLNR = 1
EBLNR_NOT_FOUND = 2
NO_TCODE = 3
TCODE_NOT_ALLOWED = 4
NO_TRTYP = 5
INVALID_CALL_OF_FB = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT LIT_EKPO INTO LS_EKPO.
MOVE : LS_EKPO-EBELN TO GS_EKPO-EBELN,
LS_EKPO-EBELP TO GS_EKPO-EBELP,
LS_EKPO-MENGE TO GS_EKPO-POQTY.
APPEND GS_EKPO TO GIT_EKPO.
ENDLOOP.
End-of-selection.
perform field_catalog.
call screen 100.
END-OF-SELECTION *
MODULES FOR ALV DISPLAY *
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'PF-STAT'.
SET TITLEBAR 'TITLE'.
ENDMODULE. " STATUS_0100 OUTPUT
**& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN 'SAVE'.
PERFORM FILL_TABLE.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
**& Module layout_0100 OUTPUT
text
MODULE layout_0100 OUTPUT.
V_LAYOUT-grid_title = 'Purchase Order Erection Details'.
ENDMODULE. " layout_0100 OUTPUT
**& Module data_retrivaL OUTPUT
text
MODULE data_retrivaL OUTPUT.
IF V_CONTAINER IS INITIAL.
CREATE OBJECT V_CONTAINER
EXPORTING container_name = 'GRID'.
CREATE OBJECT grid
EXPORTING i_parent = V_CONTAINER.
ENDIF.
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = V_LAYOUT
CHANGING
IT_OUTTAB = GIT_EKPO
IT_FIELDCATALOG = LIT_FIELDCAT
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " data_retrivaL OUTPUT
*& Module field_catalog OUTPUT
text
FORM field_catalog.
CLEAR LS_fieldcat.
LS_fieldcat-fieldname = 'EBELN'.
LS_fieldcat-ref_table = 'GIT_EKPO'.
LS_FIELDCAT-coltext = 'PURCHSE ORDER NUMBER'.
LS_FIELDCAT-col_pos = 0.
LS_FIELDCAT-EDIT = ' '.
ls_FIELDCAT-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT LS_FIELDCAT INTO TABLE LIT_FIELDCAT.
APPEND LS_fieldcat TO LIT_fieldcat.
CLEAR LS_fieldcat.
LS_fieldcat-fieldname = 'EBELP'.
LS_fieldcat-ref_table = 'GIT_EKPO'.
LS_FIELDCAT-coltext = 'ITEM NUMBER'.
LS_FIELDCAT-col_pos = 1.
LS_FIELDCAT-EDIT = ' '.
ls_FIELDCAT-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT LS_FIELDCAT INTO TABLE LIT_FIELDCAT.
APPEND LS_fieldcat TO LIT_fieldcat.
CLEAR LS_fieldcat.
LS_fieldcat-fieldname = 'POQTY'.
LS_fieldcat-ref_table = 'GIT_EKPO'.
LS_FIELDCAT-coltext = 'PURCHASE ORDER QUANTITY'.
LS_FIELDCAT-col_pos = 2.
LS_FIELDCAT-EDIT = ' '.
ls_FIELDCAT-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT LS_FIELDCAT INTO TABLE LIT_FIELDCAT.
APPEND LS_fieldcat TO LIT_fieldcat.
CLEAR LS_fieldcat.
LS_fieldcat-fieldname = 'ERDAT'.
LS_fieldcat-ref_table = 'GIT_EKPO'.
LS_FIELDCAT-coltext = 'DATE OF ERECTION'.
LS_FIELDCAT-col_pos = 3.
LS_FIELDCAT-EDIT = 'X'.
ls_fieldcat-style = cl_gui_alv_grid=>mc_style_enabled.
INSERT LS_FIELDCAT INTO TABLE LIT_FIELDCAT.
APPEND LS_fieldcat TO LIT_fieldcat.
CLEAR LS_fieldcat.
LS_fieldcat-fieldname = 'EREQTY'.
LS_fieldcat-ref_table = 'GIT_EKPO'.
LS_FIELDCAT-coltext = 'ERECTION QUANTITY'.
LS_FIELDCAT-col_pos = 4.
LS_FIELDCAT-EDIT = 'X'.
ls_fieldcat-style = cl_gui_alv_grid=>mc_style_enabled.
INSERT LS_FIELDCAT INTO TABLE LIT_FIELDCAT.
APPEND LS_fieldcat TO LIT_fieldcat.
ENDFORM. " field_catalog OUTPUT
*& Form SWITCH_EDIT_MODE
text
--> p1 text
<-- p2 text
*FORM switch_edit_mode.
IF GRID->is_ready_for_input( ) eq 0.
set edit enabled cells ready for input
CALL METHOD GRID->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
lock edit enabled cells against input
CALL METHOD GRID->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
*ENDFORM. " SWITCH_EDIT_MODE
*& Form FILL_TABLE
text
--> p1 text
<-- p2 text
FORM FILL_TABLE .
LOOP AT GIT_EKPO INTO GS_EKPO.
LS_ZPS005-EBELN = GS_EKPO-EBELN.
LS_ZPS005-EBELP = GS_EKPO-EBELP.
LS_ZPS005-POQTY = GS_EKPO-POQTY.
LS_ZPS005-ERECDAT = GS_EKPO-ERDAT.
LS_ZPS005-EREQTY = GS_EKPO-EREQTY.
ENDLOOP.
MODIFY ZPS005 FROM LS_ZPS005.
ENDFORM. " FILL_TABLE
Similar Messages
-
How to transfer data from a dynamic internal table
Hi All
I want to transfer data from a dynamic internal table<dyn_table>
to a non dynamic internal table itab which should have the same structure as <dyn_table>.
How can this be done?
Regards,
Harshit RungtaAs stated earlier this can be done only through field symbols...
You cannot create an non dynamic internal table with ANY structure...using DATA statement
If the strucutre is defined well and good...you can create an non-dynamic internal table...
If you do not know the structure then the internal table has to be dynamic...and to be generated using field symbols
DATA: lv_ref TYPE REF TO data.
FIELD-SYMBOLS: <fs_dyn_table> TYPE STANDARD TABLE.
* You create a dynamic internal table...
CREATE DATA lv_ref LIKE (your_dynamic_internal_table).
ASSIGN lv_ref->* TO <fs_dyn_table>.
Now...do the transfer.
<fs_dyn_table> = "your_dynamic_internal_Table
Hope it helps! -
Transfer data from one type of table to another
Can some kind soul put me out of my misery and explain how I can get the data from Table1 to Table2
I'm really struggling!
Table1
MerchID
MatchesSKU
1
BR34
1
BD16
2
DE11
3
HB12
3
DX15
3
DR19
Table2
MerchID
MatchesSKU1
MatchesSKU2
MatchesSKU3
1
BR34
BD16
2
DE11
3
HB12
DX15
DR19I've got a page which shows a piece of merchandise in detail. Below that is a section called "you may also like..." and it shows 3 matching items to the main merchandise.
I currently hold the matching data in a table like Table1 but I've been getting some performance issues and have narrowed it down to the query that gets the 3 matches.
I was thinking if I place the 3 matching merchID's into the corresponding row of the main merchandise being shown, it saves hitting the database for the 3 matching items?
Here's the SQL used to find the matching items
SELECT *
FROM merchandise
INNER JOIN matches_with
ON merchandise.supplier_code = matches_with.matches_with_supplier_code
WHERE matches_with.merchandise_ID = '#URL.ProductID#'
I limit the CFQUERY to MAXROWS=3 -
Question,Get data from ALV to internal table
Hi, friends
I currently need to get the data displayed on ALV.
But the original internal table is local.
It means it has already been deleted.
Do you know which method I shoud use?
After that, I will move the records to other internal
table.
3Q
MinghanHi,
are you using ALV list/GRID FM,
Check this..,
1. why can't you declare the internal table as Global.
2. you can call the FM
REUSE_ALV_LIST_LAYOUT_INFO_GET
here you get the table data using the table parameter <b>ET_OUTTAB</b>
try this...
where you will try?( when ever you want , please let me know where exactly you need this)
Regards
vijay -
How to Transfer Data from editable ALV grid control to internal table?
Hi,
Can anyone give me a simple example by which I can transfer data from editable alv grid control back to the internal table. The ALV has been created by OO approach.
I would appreciate if the solution is provided without handling any events.
Regards,
AuroHello Auro
You simply need to call method <b>go_grid->check_changed_data</b> at PAI of the dynpro displaying the ALV grid. If data have been changed on the editable ALV grid then this method will raise event DATA_CHANGED. If you do not want or need to handle this event (e.g. for validating the edited values) then you do not define any event handler method.
Regards
Uwe -
HOW TO TRANSFER DATA FROM ONE INTERNAL TABLE TO ANOTHER
FOR PERTICULAR OBJECT ID ONE INT TABLE JTAB CONTAINS ONE RECORD(ROW) AND ANOTHER INT TABLE KTAB CONTAINS 3 RECORDS(ROWS). THEN HOW I SHOULD TRANSFER DATA FROM KTAB TO JTAB? WHAT R THE VARIOUS WAYS TO DO THAT. PLS HELP ME OUT. THANKS IN ADVANCE
Try something like
If you want one record per ktab :
LOOP AT jtab.
MOVE-CORRESPONDING jtab TO itab.
LOOP AT ktab WHERE id = jtab-id.
MOVE-CORRESPONDING ktab TO itab.
APPEND itab.
ENDLOOP.
ENDLOOP.
or
LOOP AT ktab.
READ TABLE jtab WITH KEY id = ktab-id. " binary implicit if sorted type
MOVE-CORRESPONDING jtab TO itab.
MOVE-CORRESPONDING ktab TO itab.
APPEND itab.
ENDLOOP.
If you want to sum ktab ratio into itab for each jtab
LOOP AT jtab.
MOVE-CORRESPONDING jtab TO itab.
LOOP AT ktab WHERE id = jtab-id.
ADD-CORRESPONDING ktab TO itab.
APPEND itab.
ENDLOOP.
ENDLOOP.
Use sorted type table when LOOP AT WHERE, else SORT table is enough.
Regards -
Transfer data from a table to another table
Hello
I want to transfer data from a table in one server to another table in a different server, I want to do this on a nightly job, what will be the best way, please advise, thank you.Multiple options
1. Create linked server and use INSERT..SELECT * FROM [Server].[DB].dbo.Table
2. Use OPENROWSET
http://searchsqlserver.techtarget.com/tip/Using-the-OPENROWSET-function-in-SQL-Server
3. Use export import wizard
http://www.leniel.net/2011/07/import-export-data-sql-server-database.html#sthash.l4fgNNdV.dpbs
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Transfer data from SAP TABLES to a SQL table
Hi,
I need to transfer data from SAP tables to a SQL table. Please suggest the best way as well as the steps please.
Regards,
KamleshHi
Step 1: Create an entry for the External database in DBCON table using Trxn: DBCA.
Field Name Description Value (For: E.g.:)
CON_NAME Logical name
for database con RAJ
DBMS Database system MSS
USER_NAME Database user <username>
PASSWORD Password for setting up
the connection
to the database <pwd>/<pwd>
CON_ENV Database-specific MSSQL_SERVER=depotserver MSSQL_DBNAME=HOF_INDORE
DB_RECO Availability type for an open database connect
Then, you can define internal table and code the following way:
DATA: BEGIN OF wa,
c_locid(3),
c_locname(50),
c_locstate(5),
END OF wa.
EXEC SQL.
CONNECT TO 'RAJ' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
< Populate SAP data into an internal table >
Loop on itab.
EXEC SQL.
< code here for populating data into MS-SQL Server table>
ENDEXEC.
Endloop.
Regards,
Raj -
Transfer data from MS Excel to Oracle table
Hello,
hope someone can help: What is the easiest way to transfer data from Excel sheet to a Oracle table and how ?
An example of a row to transfer is given below
Date Time Value 1 Value 2
2004-02-02 03:47:39 9,62 3,62
Thanks in advance
Regards
RoarFrom Microsoft access , import data from Excel to an Access table.
Format that Access Table properly in Design mode.
Create a table as per your specification in oracle Database.
Then export to oracle from access using approppriate ODBC driver.
--Sayan -
To transfer data from one db table to anotherdb's table
I have to transfer data from one db table A to another db table B.
Both the tables have data which is common.
I want to transfer data from table A to table B.
Data transfer needed is only the excess data in table AYes it works from one database to another by means of db links, but you should be aware that there it has been reported a bug with this environment:
Bug 4311273 - ORA-2064 using MERGE statement over a database link
Doc ID: Note:4311273.8
Executing a MERGE statement over database link can
fail with ORA-2064
There are patches for this, but I suggest you to verify at metalink patch availability according to your Oracle version and OS platform.
~ Madrid -
How do i transfer data from one internal tabe to another.
Hi All,
How do i transfer data from one internal tabe to another.
Can i do it ebven if he tables are different in structure.
Please Advice.
Thanks in advance.Hi Saket Tiwari,
I hope the earlier post by kashyap is good enough an answer. anywas in addition to it let me give a detailed
explanation of how you can populate an internal table.
1) Append data line by line.
Syntax : APPEND [<wa> TO / INITIAL LINE TO] <itab>.
this appends new line to internal table <itab>.
2) Using COLLECT statement.
COLLECT is another form of statement used for populating the internal tables. Generally COLLECT is used while inserting lines into an internal table with unique standard key. The syntax for COLLECT statement is as shown
Syntax : COLLECT [<wa> INTO] <itab>.
3) Using INSERT statement
Syntax INSERT [<wa> INTO / INITIAL LINE INTO] <itab> [index <idx>].
INSERT statement adds a line/work area to the internal table. You can specify the position at which the new line is to be added by using the INDEX clause with the INSERT statement.
Now coming to your request..
To append part or all of an internal table
Syntax
APPEND LINES OF <itab1> [FROM <n1>] [TO <n2>] TO <itab2>.
* Note:
Without the FROM and TO options, this statement appends the entire table <itab1> to <itab2>.*
b) To insert part or all of an internal table into another internal table
Syntax
INSERT LINES OF <itab1> [FROM <n1>] [TO <n2>]
INTO <itab2> [INDEX <idx>].
c) Using Move statement.
To copy entire contents of one table into another in one execution
Syntax MOVE <itab1> To <itab2>.
OR
<itab1> = <itab2>.
but u hav to be careful because he contents of itab2 will eb overwritten on the execution of this statement.
These copy the contents of ITAB1 to ITAB2. Incase of internal tables with header line we have to use [] inorder to distinguish from work area. So, to copy contents of internal tables with header line the syntax becomes,
ITAB1[] = ITAB2[].
Coming to the letter part of your question, Yes, we can copy values between tables having different structures.
for this we use
MOVE-CORRESPONDING <itab1> TO <itab2>
this executes the statement for their header lines. Searches for the sub-fields which occur both in itab1 and itab2 and then generates, for all relevant field pairs which correspond to the
sub-fields ni , statements of the form MOVE itab1-ni TO itab2-ni. The other fields remain unchanged.
I hope the information provided has been of your help.
Reward if useful.
Regards,
Jose -
Hi,
I need to transfer data from one database to another database (both are identical databases).
1. Not transferring identity columns (primary keys). the destination table might have the same key.
2. keep the PK's and FK's relation b/w parent and child table
3. I have 4 levels
Example: tableA (col1 int identity(1,1) , col2, col3)
tableB (col1 int identity(1,1) ,
col2 , col3) -- col2 has the foreign key relation with tableA.col1
tableC (col1 int identity(1,1) ,
col2, col3) -- col2 has the foreign key relation with tableB.col1
tableD (col1 int identity(1,1) , col2, col3) -- col2 has the foreign key relation with tableC.col1
please advise me.
Thanks in advanceTry the below:
/********************************SAMPLE TARGET***************************************************************/
Use MSDNSamples
create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
Insert into TableA(name) Select 'R1'
Insert into TableA(name) Select 'R2'
create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
Insert into TableB(name,LevelValueID) Select 'Childname1',1
/********************************SAMPLE TARGET***************************************************************/
/********************************SAMPLE SOURCE***************************************************************/
Use Sample
create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
Insert into TableA(name) Select 'C1'
Insert into TableA(name) Select 'C2'
create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
Insert into TableB(name,LevelValueID) Select 'Kidname1',1
/********************************SAMPLE SOURCE***************************************************************/
USe MSDNSamples
/********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
--Migration table
Create table Mg_TableA(LevelValueId int, NewValueId int)
/********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
/********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
MERGE INTO TableA
USING sample.dbo.TableA AS tv
ON 1 = 0
WHEN NOT MATCHED THEN
INSERT(name) Values(tv.name)
Output tv.levelValueId ,inserted.LevelValueid INTO
Mg_TableA;
/********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
/********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
Insert into TableB (name,LevelValueID)
Select A.name,B.NewValueId From sample.dbo.TableB A
Inner join Mg_TableA B on A.LevelValueID = B.LevelValueId
/********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
/********************************TEST THE VALUES***************************************************************/
Select * From TableA
Select * From Mg_TableA
Select * From TableB
/********************************TEST THE VALUES***************************************************************/
Drop table TableB,Tablea,Mg_TableA
Use Sample
Drop Table TableB,Tablea -
Dear experts.
Can anyone help me to capture data from ALV grid to pass to a BAPI FM.
My ALV grid has the check box as first column and I want to capture only the rows in the grid with these checkboxes checked. I would prefer to do it without OO.
Regards
SatharLoop at the table used for ALV data where <checkbox-field> = 'X'.
Best,
Jim -
hi all.
I have an issue regarding saving data from alv to data base table.
The problem is like this. I have an internal table consist of 10 column from three diferent tables.one primary key is there.
now i have displayed it in alv grid. there is a column of quantity. i made some changes in quantity of some rows. now i want to save it into the database table from which that quantity field fetched.
i used first check_changed_data method. if the flag is set it means data is changed.
wat shud i do to save that quantity column into data base.
Thanks In advance.
varuHi,
<b>To modify database or ztable from the ALV grid,you need to do the following:</b>
---You have to modify the field Catalog fields (fields that you want to make editable).Set the field <b>EDIT as 'X'</b>.For example if you want to make the field below editable:
ls_fcat-fieldname = 'CARRID'.
ls_fcat-edit = 'X'.
APPEND ls_fcat TO pt_fieldcat.
---Call the method below before you call the set_table_for_first_display.
CALL METHOD ALV_GRID_INSTANCE-><b>set_ready_for_input</b>
EXPORTING
i_ready_for_input = 0. ( For Display ) and ('1' for Edit )
After this put the set_table_for_first_display.
<b>Now if the ALV data has changed,and you want to change the database or ztable,then in your pf status give a function code for SAVE button in the GUI.
In the PAI of the screen,in user command module write the following:</b>
WHEN 'SAVE'.
<b>call method gr_alvgrid->check_changed_data</b>
importing e_valid = l_valid.
if l_valid = 'X'.
<b>MODIFY spfli FROM TABLE itab_spfli.</b>
endif.
<b>(l_valid is a flag.</b>
DATA:l_valid type c.
If you want to check if the user has entered any value on the grid, use the Method : CALL METHOD gr_alvgrid->check_changed_data.
This method returns a flag l_valid which can be checked to see if the data on the ALV grid has been changed or not.)
Regards,
Beejal
**Reward if this helps -
How to transfer data from legacy system to SAP
Hi Friends,
I would like to know the process and the steps followed to transfer data from my legacy system to SAP.
Suppose if i have all the data in the form of Excel sheet or doc type. How can i transfer this data into SAP.
Please explain the steps followed.
Appreciate your help
AnilHi ,
Conversion of legacy data into SAP can be uploaded using a standard SAP Tool called LSMW ( TCode:LSMW).
the below link gives a brief explanation of the LSMW tool
http://tutorialsap.com/abap/sap-lsmw-tutorial-with-steps-to-create.html
There are various methods to upload data within LSMW. If the number of records are very high like Article Master or Conditions for Retail the IDOC method must be used.
Standard IDocs
1. Article Master - ARTMAS
2. Conditions - COND_A
3. Source list - SRCLST
4. Customer Master or WRF3/WRF6 tables - DEBMAS
5. Vendor master- CREMAS
Etc. Use transaction code WE60 to see the structure of each of the idocs. New enhancements can be done for the idocs if the required field is not available.
Regards
Prabhu
Maybe you are looking for
-
I am new to using an Ipod and am confused with syncing. Is it possible to set Itunes so that it will not automatically sync? I do not necessarily want Itunes to be the same as my Ipod. For example, if I delete an album from my itunes to save space on
-
AD services not appearing in Windows 2012 menu
Hi there I'm building a virtual 2012 environment with separate machines for AD and WSUS. I've then built another machine called Management. Using the Windows 2012 menu, I've added the 2 machines above as machines to manage however there is a problem
-
Poster Frame QT Movie linked to standard QT Movie loads in Firefox not I.E.
Ok, this may be a rare question here. Here's what I've done following a small blurb of directions in iMovie6/iDVD the Missing Manual by David Pogue. (awesome book) I've created a "poster frame movie" in QT. This is a one -frame movie I use as the pic
-
Hello experts, I have an issue with the output of a report. If I run the program on line, the output is okay. If run in background, the output is sent to the spool file. The problem is when view the report in spool file, the report column wrap aro
-
Inability to restore apps to new iphone 5s from encrypted backup
Hi, thanks for any advice. I recently upgraded to iphone 5s following significant slowown of iphone 4 which until the ios 7 update was a perfectly usable device. I am now simply unable to fully restore a brand new iphone 5s from a full encrypted ipho