Table control data to databse table
Hi Experts,
I have created Table control on screen . After entering no of rows of data manually in Table control and after clicking on save button, entered data should be get saved into the corresponding table.
Please help me on this issue.
Thanks & Regards,
Nagaraju C.
program znmodpl2.
tables : zntable.
data : it_table type table of zntable with header line.
controls : tabcntrl type tableview using screen 100.
data : ok_code type sy-ucomm.
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
set pf-status '0100'.
set titlebar '100'.
move-corresponding it_table to zntable.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
case ok_code.
when 'INS'.
it_table-carrier = zntable-carrier .
it_table-personnelno = zntable-personnelno.
it_table-flightname = zntable-flightname.
it_table-flightdate = zntable-flightdate.
it_table-f_name = zntable-f_name.
it_table-l_name = zntable-l_name.
it_table-rol_emp = zntable-rol_emp.
it_table-telephone = zntable-telephone.
it_table-city_dept = zntable-city_dept.
it_table-city_arrv = zntable-city_arrv.
append it_table.
insert into zntable values it_table.
message 'SUCCESSFUL INSERTION OF DATA' type 'S' .
when 'EXIT'.
leave program.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
The Flow Logic will be :
process before output.
loop at it_table with control tabcntrl.
module status_0100.
endloop.
process after input.
loop at it_table .
module user_command_0100.
endloop.
thank & regards,
Nilay Sarkar.
Similar Messages
-
How to modify changes of table control data in PAI
I have a table control where the columns are brought by dict fields.I am able to bring data into table control through an itab.
Now what i want is whenever user edits data in table control and clicks on save button the corresponding changes should be made in database.
For this according to my understanding we need to (in PAI) modify the changes in itab from the table control and then in SY-UCOMM of SAVE button we need to update in database table using itab.
For this , I am not able to write code for modifying the changes in itab from table control. Here is my code below.Please tell me how to do this.
PROCESS BEFORE OUTPUT.
MODULE FILL_DATA.
LOOP AT ITAB INTO ZEMPLOYEE_MASTER WITH CONTROL EMPTABLE CURSOR
EMPTABLE-CURRENT_LINE.
ENDLOOP.
MODULE STATUS_0001.
PROCESS AFTER INPUT.
LOOP AT ITAB.
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001.
REPORT ZDATA_FORM1.
TABLES: ZEMPLOYEE_MASTER.
CONTROLS EMPTABLE TYPE TABLEVIEW USING SCREEN 0001.
data: begin of itab occurs 0,
emp_no like zemployee_master-emp_no,
name like zemployee_master-name,
city like zemployee_master-city,
end of itab,
rowno TYPE I VALUE 1.
*& Module STATUS_0001 OUTPUT
* text
MODULE STATUS_0001 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0001 OUTPUT
*& Module USER_COMMAND_0001 INPUT
* text
MODULE USER_COMMAND_0001 INPUT.
MESSAGE 'Inside INPUT' TYPE 'I'.
CASE SY-UCOMM.
WHEN 'SAVE'.
UPDATE zemployee_master.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUT
*& Module fill_data OUTPUT
* text
MODULE fill_data OUTPUT.
select emp_no name city from zemployee_master into TABLE itab ORDER BY emp_no.
Describe table itab lines EMPTABLE-LINES.
ENDMODULE. " fill_data OUTPUT
*& Module modify_itab INPUT
* text
MODULE modify_itab INPUT.
* MODIFY itab from zemployee_master index
* MESSAGE 'Inside modify_itab' TYPE 'I'.
ENDMODULE. " modify_itab INPUTHi
In the following module of your code
MODULE modify_itab INPUT.
MODIFY itab from zemployee_master index tc-current_line " Where TC is the name of the Table control on the Screen
ENDMODULE.
Table control data gets refreshed on *enter*
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2165e990-0201-0010-5cbb-b5c2ad436140
Cheerz
Ramchander Rao.K -
How to fetch the Table Control data to Customer Table(Z-Table) ?
How to fetch the Table Control data to Customer Table(Z-Table) ?
Hi Krishna,
Check this sample programs
http://www.planetsap.com/online_pgm_main_page.htm
http://sap.niraj.tripod.com/id29.html
http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
Have a look at below links. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
Thanks,
Reward If helpful. -
How is table control data handled in Session Method?
Hi Friends,
Can any1 plz tell me how is table control data handled in Session Method.
In Call tran we do it by count. But how in Session Method?
Thank you.
Regards,
Varun.Hi,
u can do it by both methods. u can check out this program. u need to comment the performs of table control fields and write ur own perform statements.And u have to declare the table control fields as separate internal tables.
report zcustomer_change_bict
no standard page heading line-size 255.
include bdcrecx1.
data: begin of it_record occurs 0,
kunnr like rf02d-kunnr,
d0360 like rf02d-d0360,
anred(30) type c,
name1(35) type c,
namev(35) type c,
telf1(35) type c,
abtnr(10) type c,
end of it_record.
data: begin of it_knvk1 occurs 0,
anred like knvk-anred,
end of it_knvk1.
data: begin of it_knvk2 occurs 0,
name1 like knvk-name1,
end of it_knvk2.
data: begin of it_knvk3 occurs 0,
namev like knvk-namev,
end of it_knvk3.
data: begin of it_knvk4 occurs 0,
telf1 like knvk-telf1,
end of it_knvk4.
data: begin of it_knvk5 occurs 0,
abtnr like knvk-abtnr,
end of it_knvk5.
data : fld(20) type c,
cnt(2) type n.
start-of-selection.
call function 'GUI_UPLOAD'
exporting
filename = 'C:\CUSTCH.TXT'
filetype = 'ASC'
has_field_separator = 'X'
tables
data_tab = it_record
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
perform open_group.
loop at it_record.
refresh bdcdata.
refresh: it_knvk1,it_knvk2,it_knvk3,it_knvk4,it_knvk5.
split it_record-anred at ',' into table it_knvk1.
split it_record-name1 at ',' into table it_knvk2.
split it_record-namev at ',' into table it_knvk3.
split it_record-telf1 at ',' into table it_knvk4.
split it_record-abtnr at ',' into table it_knvk5.
screen 101
perform bdc_dynpro using 'SAPMF02D' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-D0360'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
it_record-kunnr.
perform bdc_field using 'RF02D-D0360'
it_record-d0360.
screen 360
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-ABTNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'KNVK-ANRED(01)'
record-ANRED_01_003.
*perform bdc_field using 'KNVK-NAMEV(01)'
record-NAMEV_01_004.
*perform bdc_field using 'KNVK-NAME1(01)'
record-NAME1_01_005.
*perform bdc_field using 'KNVK-TELF1(01)'
record-TELF1_01_006.
*perform bdc_field using 'KNVK-ABTNR(01)'
record-ABTNR_01_007.
move 1 to cnt.
loop at it_knvk1 .
concatenate 'knvk-anred( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk1-anred.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk2 .
concatenate 'knvk-name1( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk2-name1.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk3 .
concatenate 'knvk-namev( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk3-namev.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk4 .
concatenate 'knvk-telf1( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk4-telf1.
cnt = cnt + 1.
endloop.
move 1 to cnt.
loop at it_knvk5 .
concatenate 'knvk-abtnr( ' cnt ' ) ' into fld.
perform bdc_field using fld it_knvk5-abtnr.
cnt = cnt + 1.
endloop.
screen 360
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XD02'.
endloop.
perform close_group. -
Downloading table control data in excel sheet
Hi experts,
I have written a module pool pgm which fetches the data from a table and filled in a table control. Now my requirement is to download this (table control data) in an excel sheet like we download the ALV report data in an excel sheet.
Can the same downloading option be provided in module pool pgm also?
Pls tell me how it is possible to download the table control data in an excel sheet in module pool?
Regards,
ShanthiHi Shanthi,
As you can display data in Table Control means data is available in Internal Table
Give Download Button
case ok_code.
when 'DOWN'.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = path1.
CALL FUNCTION 'GUI_DOWNLOAD' " Go through FM Documentatin for more Info
EXPORTING
filename = path1
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = ist_final
fieldnames = ist_fc_download " You can provide the Column Heading
EXCEPTIONS
OTHERS = 22.
endcase.
Cheerz
Ram
Edited by: Rob Burbank on Mar 20, 2010 5:04 PM -
Capture data changes to Control Data
Hi,
I want to replicate any data changes made to the config/control data of SPRO to a non-SAP system. Would there be user exits or change pointers for these transactions? How can I confirm this? If this is not possible then what options are available in SAP ECC?
Eagerly awaiting a response..
Thanks in advanceDear folk,
In SAP we have two tables CDPOS and CDHDR for the changed data to be maintained.
CDHDR-Header data
CDPOS-Item data.
Based on ur requirement , u can check these tables by giving the table name and field name.
to the appropriate fields in the CDHDRa nd CDPOS.
Revert if u need any help regarding this.
Regards
Abhilash. -
Set Profile in Control Data of Service Order as required
Hi gurus,
We need to set Dynamic Profile Field (FFPRF) in Service Order - Control Data Tab as mandatory.
As per usual procedure: SPRO - Plant Maintenance and Customer Service - Maintenance and Service processing - Maintenance and Service Orders --> Define Field Selection....We are not able to find field "Dynamic item Profile" in the list to set it as Required.
Any idea how to proceed?
Thanks!
VLHi Narasimhan,
Thanks for your quick response.
We already considered setting as default DIP per Service Order but this is would not work for us as we have for one Service Order multiple possible Dynamic Item Profiles.
Would be great if we could set it as a required data so order can not be saved without DIP filled in. Isn´t it possible to do it via standard?
In addition to that would be great if we could set as default the DIP per Company Code to which the Service Order is assigned to. (enhancement IWO10009?) but relation Company Code - DIP would need to be maintained in a Z table...
Thanks,
VL -
Legal Control data for a Material in Foreign Trade View.
Hi All
We are facing the problem for updating the Legal Control data for a Material in Foreign Trade View.
Is there any BAPI for doing that ?
Please guide me.
Thanks in Advance
Regards
Kiran K VadrevuWe figured this out. We used SM30 to find table / view V_T604F and add a value for country US.
Edited by: MacaryD on Feb 4, 2010 5:13 PM -
Config/Control data change capture
Hi,
I want to replicate any data changes made to the config/control data of SPRO to a non-SAP system. Would there be user exits or change pointers for these transactions? How can I confirm this? If this is not possible then what options are available SAP?
Eagerly awaiting a response..
Thanks in advanceChumkayz,
This can be achieved with the help of Oracle Change Data Capture at the following levels:
01 - Table Differentiation
02 - Value based or Time-stamped
03 - Cost propotionality
You can refer to the following documentations (depending on your DB version) for further understanding of CDC:
Oracle9i Data Warehousing Guide
http://download.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90237/cdc.htm#1013965
Oracle® Database Data Warehousing Guide 10g Release 1
http://download.oracle.com/docs/cd/B14117_01/server.101/b10736/cdc.htm#i1028295
Oracle® Database Data Warehousing Guide 11g Release 1
http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/cdc.htm#i1028295
Hope this helps.
Regards,
Naveed. -
Data Origin Types not filled in the tab "Control Data" of BP interface
Hello experts,
I have loaded the clients from ECC6.0 to CRM 4.0.
Before I have loaded the clients I have maintained the data origin type for the BP in spro -> cross application components -> SAP Business Partner -> Business partner -> Basic settings -> Data Origin -> Maintain Data Origin Type.
After I have done the load initial of clients, the field "Data Origin" is empty in the tab "Control Data" in BP interface. If I do F4 in the field appear the configuration that I did in spro appear.
For this field will appear filled I'll need to do more configurations in spro?
Best regards,
MaryHi Mary,
The middleware does not fill this field in BP master data. You can maintain data origin type in SPRO, however the mBdoc does not use this customizing in order to fill this field.
Please try to use the BADI CRM_DATAEXCHG_BADI in order to fill this field during master data download.
It hope it helps.
Regards,
Gabriel Santana -
Hi In ALE ,IDOC HOW CONTROL DATA IS TRANSFERRED
Hi Experts,
Hi In ALE ,IDOC HOW CONTROL DATA IS TRANSFERRED .
Thanks & Regards
Bhaskar Rao.MHi Bhaskar Rao,
Good Check out the following documentation.
/people/kevin.wilson2/blog/2006/11/13/ale-scenario-development-guide
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1230385,00.html
Some good links on ALE/IDOC
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
ALE/ IDOC/ XML
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
IDOC Convertion
/people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
Please check this online document for ALE and IDoc.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
Also check this links for additional information.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
Good Luck and thanks
AK -
Control data for storage type is missing Message no. L3006
Dear Mates
i am trying to create a transfer order from delivery. the moment i click on save in LT03 its giving me the error message as
Control data for storage type is missing
Message no. L3006
i have explored every thread regarding the same issue and also implemented some measures like
-> extending the material to particular warehouse and maintaining stock removal and stock placement strategies in it(i created new one from MM01 itself)
-> going to spro path SPRO->Logistics Execution->shipping->picking->Lean WM->Define storage type. and assigned storage type.
but still i am getting the same message in LT03
can you please help me out on this.Please take a look at the following links and see if they will help at all.
Error on creating a TO - Control data for storage type is missing
"control data for storage type is missing"
Kind Regards,
Jason -
"control data for storage type is missing"
Hi Guys
I am trying to create a goods receipt for an inbound delivery.
I created the inbound delivery VL31N - sucessfully
But when trying to create a putaway LT0F - error
control data for storage type is missing. msg no. L3006
Do i maiantain this control data for storage type in the Material master?
is there anything Im doing wrong?
Can someone help please.
Thanks in advance for the help.
Ahmad YahyaHi,
Check in SPRO > Logistics Execution > Warehouse Management > Master Data > Define storage type, here for your warehouse and storage type check stock placement and stcok removal control is configured.
Regards,
Prabu -
Control data in VENDOR MASTER..?
hi gurus
Can can anybody explain me about the how many views are there in vendor master like (material master-28 views).
In Control data , what is the use of --- GR based IV..?
Please explain me clearly
Thanks in advance
sap-mmHi,
We can do MIRO(Invoice before GR) by deselecting the GR based IV block.
We normally use it in case of Import process where we have to clear planned delivery cost(Customs duty,transportation charges) & then do the GR.
But in domestic procurement, if we do IV without GR, we will not be able to get proper PO history.
Hope this will solve your query.
Reward if useful.
Regards,
Piyush -
Price Control Date as GR Date in Purchase Order?
Hello Friends.
We have a requirement where we need to take the price at the time of GR. I have tried to set the Price control date as GR date (5) in Purchase order, Info Record and even in Vendor Master. Unfortunately, it is always taking the price as P.O. price and it is not taking the price which changes between P.O. Release and GR date.
I made several P.O.'s and did GR for the same with less quantity. Then i made changes in the Inforecords and again did GR for the same P.O. It took the price from the P.O. only. Albeit I set the Price determination date as GR Date in P.O., Inforecord and vendor master too. We have requirement of not changing the P.O. once it is created and we dont want to change the price in P.O. once we do one GR for a particular P.O.. We need to re-determine the price at the time of GR without changing the price in P.O. as it require several authorizations.
I need to know if I am missing any setting in P.O., Info-record, Vendor master or any changes required in customizing. Or I need to install any enhancement package for the same.
This is a very critical requirement and hence request MM consultants to provide their valuable inputs.
Regards
Gurcharanhow did you test? did you always create new POs after your changes in master data? Or did you just expect that the existing PO would automatically get to know about such changes?
Was the existing PO price found from the info record? Can you proof that from the analysis in the condition tab?
Maybe you are looking for
-
Hi, I have a Qosmio F10-103. One day ago the blue page with the writing ''Unmountable_ boot_ volume'' appeared! What can I do? I red on some forums that it (could) be a problem of the Hard disk and that I could repair the cpu using the windows xp boo
-
Organizer crash @ keyword save
why does organizer crash when i try to save keyword tags? Elements 9 Organizer, Mac OS 10.7.4
-
D6060 low ink light and no print.
The low ink warning light blinks, printer does not print, but all cartridges are between 50 and 100% full. No paper jams apparent. Have followed directions to reset printer (remove cartridges, turn off, wait 10 mins, turn on). Same result with blin
-
Open loop with nestedLineStyle
Hi, Could someone confirm, that InDesign will go into open loop if app.findTextPreferences.appliedCharacterStyle = charStyle; and in some story, some paragraph(s) has this charStyle set as a nestedLineStyle further then from 1st line (from 2nd and ne
-
Last year on 24 April 2012 I bought white colored i4S -64Gb apple I iphone because of voltage fluctuations it burnt the adapter of charger. I want to buy new charger . Please tell me the price of charger in India