Generate an Upload the current table to a comma seperated file
Hi Freaks,
i want to generate a comma seperated file from the current table (which was modified in the current Apex Window) and also upload the file to a file server.
What is the best practice?
Thanks a lot
Wolle
Hello Wolle,
In the APEX SQL Workshop -> Object browser, when you select a table, and select the Data tab. There's a link at the bottom of the table, "Download". This will automatically generate a csv file for you.
Alternatively you can use a client like toad or sql developer to generate a csv.
Greetings,
Rutger
http://rutgerderuiter.blogspot.com/
===============================================================================
You can reward this reply by marking it as either Helpful or Correct ;-)
Similar Messages
-
Is it possible to reference the name of the current table in a formula?
Hi,
I am wanting to be able to reference the name of the same table that I am entering a formula into, i.e.:
=SUMIFS(Net,Event,"CURRENT TABLE NAME HERE",Category,"Publicity")
Is this possible?
Thanks,
NickAppleScript can access the current table name, so it if you are doing a lot of formula entry in different tables you could click once in a table and have a short script insert the formula for you. Here's a simple example:
Say you have a data table like this:
Event
Category
Net
Event 1
Publicity
10
Event 2
Celebration
20
Event 1
Supplies
5
Event 1
Salaries
20
Event 3
Celebration
25
Event 1
Publicity
20
Event 2
Publicity
11
Event 1
Accounting
20
And (important) you have 'Use Header Names as Labels' turned on in Numbers > Preferences.
You caninsert this formula:
=SUMIFS(Net,Event,"Event 1",Category,"Publicity")
... into a table named Event 1 that looks like this:
Cat
Amount
Publicity
30
...with a script like this:
-- NB: the \ "escape" the quotation marks so AppleScript takes them literally
tell application "Numbers"
set t to document 1's active sheet's first table whose selection range's class is range
set c to t's selection range's first cell
set c's value to "=SUMIFS(Net,Event," & "\"" & t's name & "\"" & ",Category,\"Publicity\")"
end tell
The script automatically inserts the name of the table you have clicked in.
(To use the script just copy and paste into Script Editor, click once in the cell where you want the formula (B2 in the example) and click the 'Run' triangle button in Script Editor.)
SG -
FM to upload the Internal table data into application server.
Hi,
Could you please give me Function module to Upload the Internal table data into Application server ie., in Tcode AL11.
I know for downloading the Application server file into itab is "SUBST_GET_FILE_LIST" FM and using open dtaa set we get the data.
Regards,
deepthi.Hi Deepthi
Incase you are looking to upload data in the AL11 through a program , then you can make use of OPEN DATASET...CLOSE DATASET statements.
Here's the code snippet:
IF tb_alvdisplay[] IS INITIAL.
MESSAGE e999(/dcsea/zais_msg) WITH text-e01.
ELSE.
IF NOT cb_ufile IS INITIAL "Download to file
AND sy-pagno = 0. "Only down page headers for first page
PERFORM fm_concatenate_path_name USING p_path
p_file
CHANGING v_file.
*Open file for download.
PERFORM fm_open_file USING v_file .
ENDIF.
LOOP AT tb_alvdisplay.
IF NOT cb_ufile IS INITIAL.
*Passing the values of the respective headings to the structure.
ws_rec-vend_no = tb_alvdisplay-vendno.
ws_rec-vend_nm = tb_alvdisplay-vendnm.
ws_rec-title = tb_alvdisplay-vendtl.
ws_rec-add = tb_alvdisplay-add.
ws_rec-city1 = tb_alvdisplay-city1.
ws_rec-region = tb_alvdisplay-region.
ws_rec-country = tb_alvdisplay-country.
ws_rec-pobox = tb_alvdisplay-po.
ws_rec-phone = tb_alvdisplay-telf1.
ws_rec-extn = tb_alvdisplay-extn.
ws_rec-fax = tb_alvdisplay-telfx.
ws_rec-zterm = tb_alvdisplay-zterm.
ws_rec-remark = tb_alvdisplay-remark.
ws_rec-email = tb_alvdisplay-email.
*Passing the separator 'PIPE' to the structure.
ws_rec-sep01 = co_sep.
ws_rec-sep02 = co_sep.
ws_rec-sep03 = co_sep.
ws_rec-sep04 = co_sep.
ws_rec-sep05 = co_sep.
ws_rec-sep06 = co_sep.
ws_rec-sep07 = co_sep.
ws_rec-sep08 = co_sep.
ws_rec-sep09 = co_sep.
ws_rec-sep10 = co_sep.
ws_rec-sep11 = co_sep.
ws_rec-sep12 = co_sep.
ws_rec-sep13 = co_sep.
TRANSFER ws_rec TO v_file.
ENDIF.
AT LAST.
IF NOT cb_ufile IS INITIAL.
*Closing the DATASET file.
CLOSE DATASET v_file.
IF sy-subrc <> 0.
*Failure Message.
MESSAGE e999(/dcsea/zais_msg) WITH text-t04 text-t06.
ELSE.
*Success message.
MESSAGE s999(/dcsea/zais_msg) WITH text-t05.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDIF.
Also as Gautham suggested you can use tcode CG3Z or CG3Y incase you are looking to upload the data directly.
FInally, you can search SCN using the keywords, "Upload to AL11" and you'll get loads of results.
Hope this helps.
Harsh -
Deleting the current table instance
Hi
I am replicating table dynamically using
this.resolveNode('form1.#subform._subForm2').addInstance(1);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
When I try to delete the current table instance using
this.resolveNode('form1.#subform._subForm2').removeInstance(this.parent.index);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
results in always deleteting the first instance ( table )
Any help ?
I have a table with a button "Duplicate Table" and "Delete Table"
If user clicks on "Duplicate Table" it creates/replicates/duplicates the entire table with all the fields and the buttons.
Now from the user perspective suppose I have created/duplicated 5 tables with all the data fields and buttons ( please note each of the newly created table will also have their individual "Delete Table" option). Now I want to delete the third table using the "Delete Table" from the third table ( want to delete the same instance from which the button is clicked deleted .Recheck your line:
this.resolveNode('form1.#subform._subForm2').removeInstance(this.paren t.index);
Replace this.parent.index with the name of the subform you are deleting. (ex: myParentTable.index);
or
Find how far down your delete button is in the hierarchy. For example if my delete button is wrapped in Subform1 and Subform1 is inside of TableToRemove then your syntax would have to be removeInstance(this.parent.parent.index) because the subform you want to remove is 2 parents up.
Kyle -
How to know whether the current database is using a password file or not?
How to know whether the current database is using a password file or not?
The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
~ Madrid -
Can I recover the database to the current time using a backup control file?
Can I recover the database to the current time using a backup control file? How far can I recover this database?
I have an Oracle 10g(10.2.3) database on RHEL4.3 system.
I have lost all the current control files and all the online redo logs, archived redo logs and all other files are OK.
Now I have to recovery this database using a backup control file.
Can I recover the database without any data lost?If
a) it was a Shutdown Abort or an Instance Crash (i.e. backgrounds died on detecting loss of redo logs),
b) redo logs are lost
c) data files are intact
You'd have to
a) Restore datafiles
b) Do an Incomplete Recovery to the last available ArchiveLog
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Comma seperated file uploading
Hi ,
i want to upload comma seperated file into sap.
iam using 'GUI_UPLOAD' fm.
problem is flat file currency field it is also contains comma.
i can't change file type comma to tab.
How can i upload currency fields with comma.
Regards,
Suresh.You can upload your file into a string table. Now split it:
split uploadtab at ',' into table items.
if you have
a,b,c,11,d,e,f
your tables items contains 7 elements now.
if you have
a,b,c,11,22,d,e,f
your table contains 8 elements now. In that case you now that you have splitted a number with a comma and need to do some actions, e.g. merge elements 4 and 5 together to get 11,22 again and shift the 6th to 5th, the 7th to 5th and the 8th to 7th element.
After that you number is again in item 4.
An easier way is to enforce you customer to put values into apostrophes or quotes. If this is not possible, you have to check if an unwanted split was taken in place and act as shown above.
But: this will work only if one item with a comma in between. If oyu have more components you can not evaulate where the unwanted split is in effect. -
Update & upload the database table
Hi
I have a small issue. In which i have to Upload the data from a flat file based on primary key its a customised table in which there are 4 primary keys. Based on this the customer numbers should be updated and on emore thing is the data should not be repeated. In the selection screen i'll provide a path based on this path it will upload all the data in the flat file
Regards
NandaHi,
Below is the sample code :
*& Report ZCUSTOMER_MASTER_UPLOAD
REPORT ZCUSTOMER_MASTER_UPLOAD
no standard page heading line-size 255.
*include bdcrecx1.
TABLES : T100. "Company Codes
* Internal table declaration *
DATA : begin of it_customer occurs 0, "Internal table for creating customer
INDEX(4), "Index
KUNNR(16), "Customer No
BUKRS(4), "Company code
VKORG(4), "Sales Organization
VTWEG(2), "Distribution Channel
SPART(2), "Division
KTOKD(4), "Account group
ANRED(30), "Title
NAME1(35), "Name1
SORTL(10), "Search field
NAME2(35), "Name2
NAME3(35), "Name3
NAME4(35), "Name4
STRAS(35), "House and street
STREET2(35),
PFACH(10), "PO box
ORT01(35), "City
PSTLZ(10), "Postal code
ORT02(35), "District
PFORT(35), "PO Box city
PSTL2(10), "Postal code
LAND1(3), "Country Key
REGIO(3), "Region
SPRAS(2), "Language key
TELX1(30), "Telex number
TELF1(16), "First telephone number
TELFX(30), "Fax number
TELF2(16), "Second telephone number
TELTX(30), "Second telex number
KNURL(132), "URL
STCEG(20), "VAT Registration number
AKONT(10), "Recon Account
ZUAWA(4), "Sort key
ZTERM(4), "Terms of payment key
ZWELS(10), "List of payment methods to be considered
BZIRK(6), "Sales district
* AWAHR(3), "Order probability
VKBUR(4), "Sales office
VKGRP(3), "Sales group
KDGRP(2), "Customer group
WAERS(5), "Currency
KALKS(1), "Pricing procedure assigned to this customer
VERSG(1), "Customer statistics group
LPRIO(2), "Delivery Priority
VWERK(4), "Delivering Plant
* ANTLF(1) VALUE 9, "Maximum partial deliveries allowed
INCO1(3), "Inco terms1
INCO2(28), "Inco terms2
ZTERM_01(4), "Terms of payment key
KTGRD(2), "Account assignment group
TAXKD_01(1), "Tax classification1
TAXKD_02(1), "Tax classification2
er_message(100),
end of it_customer.
data : begin of it_customer_ext occurs 0, "Internal table for extending customer
KUNNR(16), "Customer No
VKORG(4), "Sales Organization
VTWEG(2), "Distribution channel
SPART(2), "Division
KTOKD(4), "Account group
BZIRK(6), "Sales district
VKBUR(4), "Sales office
VKGRP(3), "Sales group
KDGRP(2), "Customer group
WAERS(5), "Currency
KALKS(1), "Pricing procedure assigned to this customer
VERSG(1), "Customer statistics group
LPRIO(2), "Delivery priority
VWERK(4), "Delivery plant
INCO1(3), "Incoterms (part 1)
INCO2(28), "Incoterms (part 2)
ZTERM(4), "Terms of payment key
KTGRD(2), "Account assignment group for this customer
TAXKD_01(1), "Tax classification1
TAXKD_02(1), "Tax classification2
end of it_customer_ext.
* Internal table to get the error data *
DATA : it_error like it_customer occurs 0 with header line.
DATA : BDCDATA like BDCDATA occurs 0 with header line.
DATA : i_msgtab like bdcmsgcoll occurs 0 with header line.
* Internal table to find the error from the legacy data *
DATA : begin of it_erfind occurs 0,
INDEX(10), "Index for error file
kunnr(16),
er_message(100), "For Error Message
end of it_erfind.
* Variables declaration *
DATA : g_message(200),
time(10),
date(10) ,
v_error_filename like RLGRAP-FILENAME.
date = sy-datum.
time = sy-uzeit.
* Initialization
initialization.
* Generating Error file name with date and time.
perform make_file_name.
* Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
parameter: p_file like IBIPPARMS-PATH obligatory.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE text-005.
parameters : pm_crt radiobutton group g1 default 'X',
pm_ext radiobutton group g1.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-003.
SELECTION-SCREEN COMMENT 33(79) text-004.
SELECTION-SCREEN end OF LINE.
SELECTION-SCREEN:END OF BLOCK B1.
at selection-screen ON VALUE-REQUEST FOR p_file .
perform get_filename.
* Start of selection
start-of-selection.
perform upload_data.
if pm_crt = 'X'. "If Customer creation is selected
perform fill_data_create.
elseif pm_ext = 'X'. "If Customer extension is selected
perform fill_data_extension.
endif.
end-of-selection.
FORM fill_data_create.
loop at it_customer.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
it_customer-KUNNR.
perform bdc_field using 'RF02D-BUKRS'
it_customer-BUKRS.
perform bdc_field using 'RF02D-VKORG'
it_customer-VKORG.
perform bdc_field using 'RF02D-VTWEG'
it_customer-VTWEG.
perform bdc_field using 'RF02D-SPART'
it_customer-SPART.
perform bdc_field using 'RF02D-KTOKD'
it_customer-KTOKD.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KNURL'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-ANRED'
it_customer-ANRED.
perform bdc_field using 'KNA1-NAME1'
it_customer-NAME1.
perform bdc_field using 'KNA1-SORTL'
it_customer-SORTL.
perform bdc_field using 'KNA1-NAME2'
it_customer-NAME2.
perform bdc_field using 'KNA1-NAME3'
it_customer-NAME3.
perform bdc_field using 'KNA1-NAME4'
it_customer-NAME4.
perform bdc_field using 'KNA1-STRAS'
it_customer-STRAS.
perform bdc_field using 'KNA1-STREET2'
it_customer-STREET2.
perform bdc_field using 'KNA1-PFACH'
it_customer-PFACH.
perform bdc_field using 'KNA1-ORT01'
it_customer-ORT01.
perform bdc_field using 'KNA1-PSTLZ'
it_customer-PSTLZ.
perform bdc_field using 'KNA1-ORT02'
it_customer-ORT02.
perform bdc_field using 'KNA1-PFORT'
it_customer-PFORT.
perform bdc_field using 'KNA1-PSTL2'
it_customer-PSTL2.
perform bdc_field using 'KNA1-LAND1'
it_customer-LAND1.
perform bdc_field using 'KNA1-REGIO'
it_customer-REGIO.
perform bdc_field using 'KNA1-SPRAS'
it_customer-SPRAS.
perform bdc_field using 'KNA1-TELX1'
it_customer-TELX1.
perform bdc_field using 'KNA1-TELF1'
it_customer-TELF1.
perform bdc_field using 'KNA1-TELFX'
it_customer-TELFX.
perform bdc_field using 'KNA1-TELF2'
it_customer-TELF2.
perform bdc_field using 'KNA1-TELTX'
it_customer-TELTX.
perform bdc_field using 'KNA1-KNURL'
it_customer-KNURL.
if it_customer-KTOKD = 'Z002' or
it_customer-KTOKD = 'Z003' or
it_customer-KTOKD = 'Z004' or
it_customer-KTOKD = 'Z005' or
it_customer-KTOKD = 'Z006' or
it_customer-KTOKD = 'Z007'.
perform customer_001.
elseif it_customer-KTOKD = 'Z011'.
perform customer_002.
else.
perform customer_003.
endif.
perform bdc_transaction tables i_msgtab using 'XD01' 'A' 'L' .
* To fetch the error message from the standard error table
select single * from T100 where SPRSL = 'E'
and ARBGB = SY-MSGID
and MSGNR = SY-MSGNO.
G_MESSAGE = T100-TEXT.
* subroutine to change the error message for every document number
perform REPLACE_PARAMETERS using SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
changing G_MESSAGE.
write: / 'System variables:'.
skip.
write: / ' Sy-msgty:', SY-MSGTY.
write: / ' Sy-msgid:', SY-MSGID.
write: / ' Sy-msgno:', SY-MSGNO.
write: / ' Sy-msgv1:', SY-MSGV1.
write: / ' Sy-msgv2:', SY-MSGV2.
write: / ' Sy-msgv3:', SY-MSGV3.
write: / ' Sy-msgv4:', SY-MSGV4.
skip.
write: / 'Message:'.
skip.
write: / SY-MSGTY, G_MESSAGE.
* To find out the error in the legacy data if there is anything and pass
* the document no with error message to the seperate internal table
* called it_erfind
if sy-msgty = 'E'.
it_erfind-index = it_customer-index.
it_erfind-er_message = G_MESSAGE.
append it_erfind.
endif.
* Finally we are segregating the error and downloading the error data.
at last.
* To segregate the error
perform segregate_error.
* To download the error from it_error internal table with err mesg
perform error_download.
perform display_message.
endat.
endloop.
clear it_customer.
ENDFORM.
FORM fill_data_extension.
loop at it_customer_ext.
perform bdc_dynpro using 'SAPMF02D' '0107'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
it_customer_ext-KUNNR.
perform bdc_field using 'RF02D-VKORG'
it_customer_ext-VKORG.
perform bdc_field using 'RF02D-VTWEG'
it_customer_ext-VTWEG.
perform bdc_field using 'RF02D-SPART'
it_customer_ext-SPART.
perform bdc_field using 'RF02D-KTOKD'
it_customer_ext-KTOKD.
if it_customer_ext-KTOKD = 'Z002' or
it_customer_ext-KTOKD = 'Z003' or
it_customer_ext-KTOKD = 'Z004' or
it_customer_ext-KTOKD = 'Z005' or
it_customer_ext-KTOKD = 'Z006' or
it_customer_ext-KTOKD = 'Z007' or
it_customer_ext-KTOKD = 'Z011'.
perform customer_extension_001.
else.
perform customer_extension_002.
endif.
perform bdc_transaction tables i_msgtab using 'VD01' 'N' 'L' .
* To fetch the error message from the standard error table
select single * from T100 where SPRSL = 'E'
and ARBGB = SY-MSGID
and MSGNR = SY-MSGNO.
G_MESSAGE = T100-TEXT.
* subroutine to change the error message for every document number
perform REPLACE_PARAMETERS using SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
changing G_MESSAGE.
write: / 'System variables:'.
skip.
write: / ' Sy-msgty:', SY-MSGTY.
write: / ' Sy-msgid:', SY-MSGID.
write: / ' Sy-msgno:', SY-MSGNO.
write: / ' Sy-msgv1:', SY-MSGV1.
write: / ' Sy-msgv2:', SY-MSGV2.
write: / ' Sy-msgv3:', SY-MSGV3.
write: / ' Sy-msgv4:', SY-MSGV4.
skip.
write: / 'Message:'.
skip.
write: / SY-MSGTY, G_MESSAGE.
* To find out the error in the legacy data if there is anything and pass
* the document no with error message to the seperate internal table
* called it_erfind
if sy-msgty = 'E'.
it_erfind-kunnr = it_customer_ext-kunnr.
it_erfind-er_message = G_MESSAGE.
append it_erfind.
endif.
* Finally we are segregating the error and downloading the error data.
at last.
* To segregate the error
perform segregate_error.
* To download the error from it_error internal table with err mesg
perform error_download.
perform display_message.
endat.
endloop.
clear it_customer_ext.
ENDFORM.
*This subroutine is used to fill the data for the Account groups
*Z002,Z003,Z004,Z005,Z006 AND Z007
FORM customer_001.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-TXJCD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BZIRK'
it_customer-BZIRK.
perform bdc_field using 'KNVV-VKBUR'
it_customer-VKBUR.
perform bdc_field using 'KNVV-VKGRP'
it_customer-VKGRP.
perform bdc_field using 'KNVV-VERSG'
it_customer-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
* perform bdc_transaction using 'XD01'.
ENDFORM.
*This subroutine is used to fill the data for the Account group Z011
FORM customer_002.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-NIELS'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0370'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-CIVVE'
'X'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BZIRK'
it_customer-BZIRK.
perform bdc_field using 'KNVV-VERSG'
it_customer-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
ENDFORM.
*This subroutine is used to fill the data for the Account groups
*Z020,Z021,Z022,Z023,Z200,Z201.
FORM customer_003.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-STCEG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-STCEG'
it_customer-STCEG.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-NIELS'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0370'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-CIVVE'
'X'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-KNRZE'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-AKONT'
it_customer-AKONT.
perform bdc_field using 'KNB1-ZUAWA'
it_customer-ZUAWA.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZWELS'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-ZTERM'
it_customer-ZTERM.
perform bdc_field using 'KNB1-ZWELS'
it_customer-ZWELS.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0610'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BZIRK'
it_customer-BZIRK.
* perform bdc_field using 'KNVV-AWAHR'
* it_customer-AWAHR.
perform bdc_field using 'KNVV-VKBUR'
it_customer-VKBUR.
perform bdc_field using 'KNVV-VKGRP'
it_customer-VKGRP.
perform bdc_field using 'KNVV-KDGRP'
it_customer-KDGRP.
perform bdc_field using 'KNVV-WAERS'
it_customer-WAERS.
perform bdc_field using 'KNVV-KALKS'
it_customer-KALKS.
perform bdc_field using 'KNVV-VERSG'
it_customer-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VWERK'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-LPRIO'
it_customer-LPRIO.
* perform bdc_field using 'KNVV-KZAZU'
* 'X'.
perform bdc_field using 'KNVV-VWERK'
it_customer-VWERK.
* perform bdc_field using 'KNVV-ANTLF'
* it_customer-ANTLF.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-KTGRD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-INCO1'
it_customer-INCO1.
perform bdc_field using 'KNVV-INCO2'
it_customer-INCO2.
perform bdc_field using 'KNVV-ZTERM'
it_customer-ZTERM_01.
perform bdc_field using 'KNVV-KTGRD'
it_customer-KTGRD.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(02)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVI-TAXKD(01)'
it_customer-TAXKD_01.
perform bdc_field using 'KNVI-TAXKD(02)'
it_customer-TAXKD_02.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
* perform bdc_transaction using 'XD01'.
ENDFORM.
FORM customer_extension_001.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BZIRK'
it_customer_ext-BZIRK.
if not it_customer_ext-KTOKD = 'Z011'.
perform bdc_field using 'KNVV-VKBUR'
it_customer_ext-VKBUR.
perform bdc_field using 'KNVV-VKGRP'
it_customer_ext-VKGRP.
endif.
perform bdc_field using 'KNVV-VERSG'
it_customer_ext-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
ENDFORM.
FORM customer_extension_002.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BZIRK'
it_customer_ext-BZIRK.
* perform bdc_field using 'KNVV-AWAHR'
* '100'.
perform bdc_field using 'KNVV-VKBUR'
it_customer_ext-VKBUR.
perform bdc_field using 'KNVV-VKGRP'
it_customer_ext-VKGRP.
perform bdc_field using 'KNVV-KDGRP'
it_customer_ext-KDGRP.
perform bdc_field using 'KNVV-WAERS'
it_customer_ext-WAERS.
perform bdc_field using 'KNVV-KALKS'
it_customer_ext-KALKS.
perform bdc_field using 'KNVV-VERSG'
it_customer_ext-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VWERK'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-LPRIO'
it_customer_ext-LPRIO.
* perform bdc_field using 'KNVV-KZAZU'
* 'X'.
perform bdc_field using 'KNVV-VWERK'
it_customer_ext-VWERK.
* perform bdc_field using 'KNVV-ANTLF'
* '9'.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-KTGRD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-INCO1'
it_customer_ext-INCO1.
perform bdc_field using 'KNVV-INCO2'
it_customer_ext-INCO2.
perform bdc_field using 'KNVV-ZTERM'
it_customer_ext-ZTERM.
perform bdc_field using 'KNVV-KTGRD'
it_customer_ext-KTGRD.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
ENDFORM.
*Subrotine to replace the parameters
FORM REPLACE_PARAMETERS USING P_PAR_1 P_PAR_2 P_PAR_3
P_PAR_4 CHANGING P_MESSAGE.
* erst mal pruefen, ob numerierte Parameter verwendet wurden
DO.
REPLACE '&1' WITH P_PAR_1 INTO P_MESSAGE.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&2' WITH P_PAR_2 INTO P_MESSAGE.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&3' WITH P_PAR_3 INTO P_MESSAGE.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&4' WITH P_PAR_4 INTO P_MESSAGE.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
* falls keine numerierten Parameter vorh., ersetzen wie gehabt
REPLACE '&' WITH P_PAR_1 INTO P_MESSAGE.
CONDENSE P_MESSAGE.
IF SY-SUBRC EQ 0.
REPLACE '&' WITH P_PAR_2 INTO P_MESSAGE.
CONDENSE P_MESSAGE.
IF SY-SUBRC EQ 0.
REPLACE '&' WITH P_PAR_3 INTO P_MESSAGE.
CONDENSE P_MESSAGE.
IF SY-SUBRC EQ 0.
REPLACE '&' WITH P_PAR_4 INTO P_MESSAGE.
CONDENSE P_MESSAGE.
ENDIF.
ENDIF.
ENDIF.
ENDFORM.
*Subroutine to segregate the error data from the legacy data
FORM segregate_error.
loop at it_erfind.
if pm_crt = 'X'.
loop at it_customer where index = it_erfind-index.
move-corresponding it_customer to it_error.
it_error-er_message = it_erfind-er_message.
append it_error.
endloop.
elseif pm_ext = 'X'.
loop at it_customer_ext where kunnr = it_erfind-kunnr.
move-corresponding it_customer_ext to it_error.
it_error-er_message = it_erfind-er_message.
append it_error.
endloop.
endif.
endloop.
ENDFORM.
*Subroutine to download the error data from the it_error table.
FORM error_download.
if it_error[] is not initial.
call function 'WS_DOWNLOAD'
exporting
CODEPAGE = 'IBM'
FILENAME = v_error_filename
FILETYPE = 'DAT'
tables
DATA_TAB = IT_ERROR.
endif.
ENDFORM.
* Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
* Insert field *
FORM BDC_FIELD USING FNAM FVAL.
* IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
* ENDIF.
ENDFORM.
FORM bdc_transaction tables MESSTAB USING TCODE CTUMODE CUPDATE .
CALL TRANSACTION TCODE USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO MESSTAB.
REFRESH BDCDATA.
clear BDCDATA.
ENDFORM. " bdc_transaction
* Uploading data file to internal table. *
FORM upload_data.
if pm_crt = 'X'.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = p_file
* CODEPAGE = 'IBM '
FILETYPE = 'DAT'
TABLES
DATA_TAB = it_customer
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 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.
elseif pm_ext = 'X'.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = p_file
* CODEPAGE = 'IBM '
FILETYPE = 'DAT'
TABLES
DATA_TAB = it_customer_ext
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 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.
endif.
{size:13}Here you can use sort and delete statement to delete the duplicate entries.{size}
ENDFORM.
*& Form display_message
FORM display_message .
if it_error[] is initial.
message i019(zmsg). "Success
else.
message e020(zmsg). "Failed
endif.
ENDFORM. " display_message
*& Form get_filename
* text
* --> p1 text
* <-- p2 text
FORM get_filename .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = p_file
IMPORTING
FILE_NAME = p_file .
if sy-subrc NE 0 .
write : / 'Enter File Name'.
endif.
ENDFORM. " get_filename
*& Form make_file_name
FORM make_file_name .
write sy-datum to date MM/DD/YYYY.
write sy-uzeit to time USING EDIT MASK ' __ __ __'.
concatenate Text-002 date time '.txt'
into v_error_filename.
ENDFORM. " make_file_name
Thanks,
Sriram Ponna. -
Need to upload the z table whenever vendor is created
Hi all
I have one scenario in which I need to populat one ztable whenever a new vendor is created.
similarly whenver the vendor data is changed I need to downoad the changes in XL sheet.Can
you pls let me know how to proceed. Thanks in advance.
Cheers,
sami.try this...
Transaction Code - SE11 ABAP Dictionary Maintenance
Enhancement/ Business Add-in Description
Enhancement
SEDD0001 Customer exits in ABAP/4 Dictionary
No.of Exits: 1
No.of BADis: 0
here you have to attach your code that whenever the lfa1 table is get updated then also the data will go into your customized table.. -
What is the current version of Acrobat.exe (Pro) file?
What is the latest version of acrobat.exe file? I use CS3 and about 10 days ago updated Acrobat Pro to 8.1.4. The acrobat.exe file itself shows as 8.1.0.137, while Secunia PSI sees it as 8.1.3.187. PSI claims the latter is not current and thus is insecure. Before I go claiming on PSI's forum that it's mislabeling acobat.exe as insecure - and it wouldn't be the first time - I wanted to verify what the current file version should be. Thanks,
Well yes, the parts/versions was the point of my post. I explicitly referred to them and to the fact that I had installed 8.1.4.
The issue has turned moot for now. PSI has admitted an error on their end, which will be fixed soon. "The problem is the updated file does not include the .exe file on which we normally use to detect the file version." -
Count the number of elements in comma seperated list of values
Hello Friends,
I have a string with comma seperated list of values say
String v = 34343,erere,ererere,sdfsdfsdfs,4454,5454,dsfsdfsfsd,fsdfsdfsdfs,dfdsfsdfsdfs,sdsfdsf,ererdsdsd45454,fsdfsdfs
Want to count how many elements are existing in this string .
Thanks/KumarHi, Kumar,
REGEXP_COUNT, which Hoek used, is handy, but it only works in Oracle 11. Which version of Oracle are you using?
In any version of Oracle, you can count the commas by seeing how much the string shrinks when you remove them.
LENGTH (str) + 1 - LENGTH (REPLACE (str, ',')) Can str have multiple commas in a row? What if there's nothing between consecutive commas, or nothing by whitespace? Can str begin or end with a comma? Can str consist of nothing but commas? Depending on your answers, you may have to change things. You might want
REGEXP_COUNT ( str
, '[^,]+'
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using.
See the forum FAQ {message:id=9360002} -
Problem with inserting a row in the current table
I am working on Html editor using swings.
actually i am trying to insert a row using
private void insertTableRow(int cols)
StringBuffer sRow = new StringBuffer();
sRow.append("<TR>");
for(int i = 0; i < cols; i++)
sRow.append("<TD></TD>");
sRow.append("</TR>");
//System.out.println(sRow);
int caretPos = jtpMain.getCaretPosition();
System.out.println(caretPos);
ActionEvent actionEvent = new ActionEvent(jtpMain, 0, "insertTableRow");
//System.out.println("raju" +sRow.toString());
new HTMLEditorKit.InsertHTMLTextAction("insertTableRow", sRow.toString(), HTML.Tag.TABLE, HTML.Tag.TR).actionPerformed(actionEvent);
refreshOnUpdate(); // optional refresh code
}this is performing well when the cursor is at the last cell
of the row.But now working ,when the cursor in the remaining cells it gives in correct table.
pls any one can helpYou probably have to first search your text for a <TR> tag to insert rows above, (place your new row text infront of the tag), or search for a </TR> tag to insert rows below, (place new row text after the tag). Otherwise you will be inserting the row in the middle of a cell.
Jerome. -
How can I create checkbox as many as the current table column?
I have an table that binds from emploeyeeView,.. I want to create some checkbox as many as the number of the column that is shown,..how can i do that?
thanks,
Amir,,..You are going to want a <af:selectManyCheckbox>. Try this:
<af:selectManyCheckbox label="Label 1" value="#{myBackingBean.selectedAttributes}>
<af:forEach items="#{bindings.EmpView1Iterator.attributeDefs}"
var="item">
<af:selectItem value="#{item.name}" label="#{item.name}"/>
</af:forEach>
</af:selectManyCheckbox>In the backing bean named "myBackingBean" there will be a "String[] selectedAttributes" with getter and setter methods. When the form is submitted, this will contain the names of the attributes that the user selected. -
How to upload the web query result to CSV/Text file
Hi,
Kindly help me on the following.
1) I have info-provider (IP), which has info-objects "company code" and "supplier".
2) I built a query by putting company-code with a variable in free-charateristics and supplier-code in row.
3) When I run this query, it will ask company-code as input and the result will be filtered using company-code.
4) For this query, I created a web-template and assigned data-provider to display the data on the web.
5) The user wants to enter input company-code='1000' and write the data in a CSV file in a specific directory. i.e, by clicking the execute button (after entering company code) , the result should go to the CSV or text file. i.e. the application should automatically generate the file with query results.
Note: The user should not use context menu to EXPORT TO CSV OR EXCEL file.
Please let me know, if there is any tutorial. Thanks a lot advance help.
Regards
Kandasamy1. SELECT INTO
Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.
Use AdventureWorks2008R2;
Go
---Insert data using SELECT INTO
SELECT AddressLine1, City
INTO BothellAddresses
FROM Person.Address
where City = 'Bothell';
GO
---VERIFY DATA
Select AddressLine1, City
FROM BothellAddresses
---DROP TABLE
DROP TABLE BothellAddresses
GO
2. INSERT INTO SELECT
Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from
another table.
Use AdventureWorks2008R2;
Go
---Create Table
CREATE TABLE BothellAddresses (AddressLine1 NVARCHAR(60), City NVARCHAR(30))
---Insert into above table using SELECT
INSERT INTO BothellAddresses(AddressLine1, City)
SELECT AddressLine1, City
FROM Person.Address
where City = 'Bothell';
---VERIFY DATA
Select AddressLine1, City
FROM BothellAddresses
---DROP TABLE
DROP TABLE BothellAddresses
GO
Regards,
Vishal Patel
Blog: http://vspatel.co.uk
Site: http://lehrity.com -
How can I make an applet look to the current directory to read a txt file in?
I am using a File class passing only the file name as the contructor but forte still looks in "C:\forte_jdk\forte4j\bin\Events.txt" which is not my current directory for the project.
If leave it and ftp this applet to my web site I get an IOException.I always find visual aids helpful. See below for screenshots & discriptions.
01. The Basics
When you create a new site & go into design view (in the example below it's the Home page), you'll see the following.
The white box is your page.
The grey box outside of that is your browser area.
The black & white checkered area is the Adobe Muse CC application chrome.
02. Add Box
Draw / Add your rectangle or text frame (text tool). I drew a rectangle, gave it a fill color of blue & turned the stroke from 1 to 0.
03. Extend & Snap to Browser Edge (Left)
Click, hold and drag your mouse on the center adorner (adorner is the little squares that you can grab to resize your rectangle) until you resize your rectangle to the browser edge (the dark grey area) until you see a red line. This means you've 'snapped' one of the rectangle's edge to the browser edge.
04. Extend & Snap to Browser Edge (Right)
Repeat the process except do this for the right edge. In truth, it doesn't matter in which order you resize your rectangle to snap to the browser edges. The key thing is to be sure to do this for both sides of the rectangle & snap it to the browser edge (see the red line).
05. You're done! Preview.
06. Bonus!
Once again, you can make rectangles or text frames 100% width, BUT you can't do this with placed images.
However, you can do this with a rectangle or text frame. Then set the Fill of either the rectangle & text frame to be an Image & set the Fitting to 'Scale to Fill.'
(see below for example - I used a rectangle & changed it's Fill property)
Now when I preview, the image is 100% width. In truth, it's a 100% width rectangle with a fill of an image.
Maybe you are looking for
-
Convert LaserJet 5200 220v to 110v power
Is it possible to purchase the proper parts to convert a LaserJet 5200 from 220v to 110v? I know about power converters, but just thought it would be better to convert the thing if possible. thanks.
-
How to change jumper settings on Toshiba hard drive?
Hello, I have a 1.33 ghz 12 inch Powerbook model. Recently, I had been experiencing occassional failure on the internal 60GB hard drive, and I decided to have the drive replaced altogether before the whole thing died. I've got a new drive in the comp
-
File-File.....fetching the record on a field value
Hi, I am woking on a file-XI-file scenario. I am sending 4 records from the sender file. now on the basis of one field condition, i want that particular record to be appended at my target file and the rest of the records to be appended to the other f
-
Namespace deletion error for ghost objects
Hi people. I need to remove a namespace in ESR. I have first deleted all objects and activated it and then I tried to remove the namespace from the Namespace Definition List. After removed the namespace item and saving the change, I receive the follo
-
http://support.apple.com/kb/TS3642 tells me that this is not possible because garageband format songs are saved as folders. I just want to transfer songs from one iPad to another. Why does Apple make things so hard?