Populate Safari Table Fields
Could someone assist me with writing an AppleScript that fills in five table fields on a webpage?
dev_sleidy is correct. Without the url it's difficult to help but here's a start.
property site_url : "https://www.somewhere.com"
tell application "Safari"
activate
delay 4 -- Note: Increase or decrease the delay
open location site_url
tell application "System Events"
tell process "Safari"
keystroke (ASCII character 9) -- Note: This equals tab - you may need more than one
keystroke (ASCII character 9) -- Note: Another tab
delay 2
keystroke "MAYBE YOUR NAME GOES HERE"
keystroke (ASCII character 9)
delay 0.2
keystroke "MAYBE YOUR EMAIL ADDRESS GOES HERE"
keystroke (ASCII character 9)
delay 0.2
keystroke "MORE INFO HERE"
keystroke (ASCII character 9)
delay 0.2
keystroke "MORE INFO HERE"
keystroke (ASCII character 9)
delay 0.2
keystroke "MORE INFO HERE"
delay 0.2
keystroke (ASCII character 9)
keystroke (ASCII character 13) -- Note: This equals Return - if the submit button isn't javascript this should work
end tell
end tell
end tell
to wait4page() -- Note: Everything below will help Safari from timing out
delay 2
repeat
delay 0.1
tell application "Safari" to set winName to the name of window 1
if winName does not contain "Untitled" then exit repeat
end repeat
repeat
delay 0.1
tell application "Safari" to set winName to the name of window 1
if winName does not contain "Loading" then exit repeat
end repeat
repeat
delay 0.1
tell application "Safari"
do JavaScript "document.readyState" in document 1
if result is "Complete" then exit repeat
end tell
end repeat
end wait4page
Tom
Message was edited by: Tom
Similar Messages
-
How to populate custom table field value into standard DFF
Hi Gurus
I am newbie to the OAF
I have a requirement to populate the custom table field value into standard DFF. we enabled the DFF in ReqDistDFFOnAcct(po_req_distributions_all). On the requisition tab as soon as i click on the checkout button, the custom field value has to be shown in the requisition distributions DFF field along with the standard Columns like charge account, percent, qty and when we click on the next button, it has to hit the base table ie., po_req_distributions_all.
the standard columns data is showing the screen. how to acheive this requirement programatically
There is a EO for the req distributions table. please help me how to achevie this requirement.
Any help woud be greatly appreciated.
Thank You!
KrishnaThanks Aj. Finally i made some progress....but i am getting an error in the inst_top OPMN folder 10/10/08 15:37:14 Error: <connector name="OracleASjms" path="OracleASjms.rar" /> will not be bootstrapped since corresponding module declaration was not found in application.xml. I cleared the cache, bounced the webserver. Could not able to understand what is this error
Following is the code that i have written. I am not able to find out what is the error. please help me how to fix this error. there is no changes in the page and the value is not auto populating. the page is having the normal behaviour as the standard one.
Thanks in Advance for your help...
public class xxCheckoutDistsCO extends CheckoutDistsCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String UnitId="";
//First get the Application Module
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
String Reqlineid="";
String Linenum="";
String DeliverLoc="";
if(vo.first() !=null)
Reqlineid= vo.first().getAttribute("RequisitionLineId").toString();
Linenum = vo.first().getAttribute("LineNum").toString();
DeliverLoc = vo.first().getAttribute("DeliverToLocationId").toString();
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", Reqlineid,1);
// pageContext.writeDiagnostics("TEST >", Linenum,2);
// pageContext.writeDiagnostics("TEST >", DeliverLoc,3);
UnitId=null;
String Querry="select amli_icx_oaf_utils.get_blding_unit_id (?,?,?) from dual";
try
PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(Querry);
ps.setInt(1,Integer.parseInt(Reqlineid));
ps.setInt(2,Integer.parseInt(Linenum));
ps.setInt(3,Integer.parseInt(DeliverLoc));
ResultSet rs=ps.executeQuery();
// ps.execute();
// am.getOADBTransaction().commit();
while (rs.next())
System.out.println(" Query Results ");
UnitId= rs.getString(1);
System.out.println(" first > ");
rs.close();
ps.close();
catch(SQLException a)
System.out.println(" Error "+a);
System.out.println(" Second > ");
System.out.println(" Third > "); ----the program is executing upto here...it is not setting the value after this.
OAViewObject povo = (OAViewObject)am.findViewObject("PoReqDistributionsVO");
if(povo.getCurrentRow()!=null ) --------If i remove this condition i am getting the nullpointer exception in page.....
System.out.println(" Fourth > ");
povo.getCurrentRow().setAttribute("Attribute12",UnitId);
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", UnitId, 1);
Thanks
krishna -
How to populate internal table field with text data?
Hello Experts,
I was able to load text file to a internal table but data is not populating each field. Can someone help me how to populate each field of internal table from text file?
Here is the text file:
io_name, io_type, io_txsht, io_txlng, io_datatype, io_length
ZEA_IO1, CHA, IO Test, IO Test 1, CHAR, 20
ZEA_IO2, CHA, IO Test, IO Test 2, CHAR, 20
Here is the Code:
*& Report ZAS_BAPI_TEST *
*& InfoObject Creation through BAPI.
*& Read the Text file, call a BAPI to create InfoObjects. *
*& Text file will hold the Info Object Structure. Text file will be *
*& located either work station or local PC.
*& Step 1. Create internal table to hold InfoObject structure *
*& Step 2. Retrieve/Load text file into Internal Table structure *
*& Step 3. Call BAPI Function to Create IO *
*& Step 4. Call BAPI Function to Activate IO *
REPORT ZAS_BAPI_TEST .
Make data separator a comma
CONSTANTS: gc_tab TYPE c VALUE ','.
Declaring Internal table for creating InfoObject
DATA: p_file TYPE string.
DATA: BEGIN OF itab-bapi OCCURS 0,
io_name like BAPI6108-infoobject,
io_type like BAPI6108-type,
io_txsht like BAPI6108-textshort,
io_txlng like BAPI6108-textlong,
io_datatype like BAPI6108-datatp,
io_length like BAPI6108-intlen,
END OF itab-bapi.
DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
PUT THE TEXT FILE PATH TO P_FILE
p_file = sel_file.
Copy the file from the workstation to the server ****
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_file
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = SPACE
HEADER_LENGTH = 0
DAT_MODE = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = itab-bapi[]
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
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
&1 &2 issued return code &3
ELSE.
pit_data[] = lit_data[].
ENDIF.
ENDIF.
loop at itab-bapi.
write: /5 itab-bapi-io_name,
20 itab-bapi-io_type,
30 itab-bapi-io_txsht,
50 itab-bapi-io_txlng,
75 itab-bapi-io_datatype,
85 itab-bapi-io_length.
endloop.
SELECT THE LOCATION FOR TEXT FILE
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ''
def_path = 'C:\'
mask = ',Documentos de texto (*.txt), *.txt.'
mode = ''
IMPORTING
filename = p_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
find '.txt' IN p_file.
if sy-subrc <> 0.
concatenate p_file '.txt' into sel_file.
else.
sel_file = p_file.
endif.
Create InfoObject through BAPI Function
*CALL FUNCTION 'BAPI_IOBJ_CREATE'.
*IMPORTING
VALUE(DETAILS) LIKE BAPI6108 STRUCTURE BAPI6108
*EXPORTING
VALUE(INFOOBJECT) LIKE BAPI6108-INFOOBJECT
VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
TABLES
COMPOUNDS STRUCTURE BAPI6108CM OPTIONAL
ATTRIBUTES STRUCTURE BAPI6108AT OPTIONAL
NAVIGATIONATTRIBUTES STRUCTURE BAPI6108AN OPTIONAL
ATRNAVINFOPROVIDER STRUCTURE BAPI6108NP OPTIONAL
HIERARCHYCHARACTERISTICS STRUCTURE BAPI6108HC OPTIONAL
ELIMINATION STRUCTURE BAPI6108IE OPTIONAL
RETURNTABLE STRUCTURE BAPIRET2 OPTIONAL
Activate InfoObject through BAPI Function
CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
*ENDFORM. " RETRIEVE_DATASET
I appreciate your help.
Regards,
MauI have used tab delimited file.
Here are file contents
io_name io_type io_txsht io_txlng io_datatype io_length
ZEA_IO1 CHA IO Test IO Test 1 CHAR 20
ZEA_IO2 CHA IO Test IO Test 2 CHAR 20
And here is program used
*& Report ZAS_BAPI_TEST *
*& InfoObject Creation through BAPI.
*& Read the Text file, call a BAPI to create InfoObjects. *
*& Text file will hold the Info Object Structure. Text file will be *
*& located either work station or local PC.
*& Step 1. Create internal table to hold InfoObject structure *
*& Step 2. Retrieve/Load text file into Internal Table structure *
*& Step 3. Call BAPI Function to Create IO *
*& Step 4. Call BAPI Function to Activate IO *
REPORT ZAS_BAPI_TEST .
Make data separator a comma
CONSTANTS: gc_tab TYPE c VALUE ','.
Declaring Internal table for creating InfoObject
DATA: p_file TYPE string.
DATA: BEGIN OF itab-bapi OCCURS 0,
io_name like BAPI6108-infoobject,
io_type like BAPI6108-type,
io_txsht like BAPI6108-textshort,
io_txlng like BAPI6108-textlong,
io_datatype like BAPI6108-datatp,
io_length like BAPI6108-intlen,
END OF itab-bapi.
DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
PUT THE TEXT FILE PATH TO P_FILE
p_file = sel_file.
Copy the file from the workstation to the server ****
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_file
<b>FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'</b>
TABLES
data_tab = itab-bapi[]
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
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
&1 &2 issued return code &3
ELSE.
pit_data[] = lit_data[].
ENDIF.
ENDIF.
loop at itab-bapi.
write: /5 itab-bapi-io_name,
20 itab-bapi-io_type,
30 itab-bapi-io_txsht,
50 itab-bapi-io_txlng,
75 itab-bapi-io_datatype,
85 itab-bapi-io_length.
endloop.
SELECT THE LOCATION FOR TEXT FILE
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ''
def_path = 'C:\'
mask = ',Documentos de texto (*.txt), *.txt.'
mode = ''
IMPORTING
filename = p_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
find '.txt' IN p_file.
if sy-subrc <> 0.
concatenate p_file '.txt' into sel_file.
else.
sel_file = p_file.
endif.
Create InfoObject through BAPI Function
*CALL FUNCTION 'BAPI_IOBJ_CREATE'.
*IMPORTING
VALUE(DETAILS) LIKE BAPI6108 STRUCTURE BAPI6108
*EXPORTING
VALUE(INFOOBJECT) LIKE BAPI6108-INFOOBJECT
VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
TABLES
COMPOUNDS STRUCTURE BAPI6108CM OPTIONAL
ATTRIBUTES STRUCTURE BAPI6108AT OPTIONAL
NAVIGATIONATTRIBUTES STRUCTURE BAPI6108AN OPTIONAL
ATRNAVINFOPROVIDER STRUCTURE BAPI6108NP OPTIONAL
HIERARCHYCHARACTERISTICS STRUCTURE BAPI6108HC OPTIONAL
ELIMINATION STRUCTURE BAPI6108IE OPTIONAL
RETURNTABLE STRUCTURE BAPIRET2 OPTIONAL
Activate InfoObject through BAPI Function
CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
*ENDFORM. " RETRIEVE_DATASET
This program is working fine. You can test it.
Only problem is as the column headings are big for some columns, they are getting truncated which you can always change by changing the column width in declaration
Please let me know if this helps.
ashish -
Populate a table field based on another field in the same table
Hi,
I have a table with fields collection profile and collection prfile text. When maintaining this table, the collection profile name should appear automatically ( from table UDM_COLL_GRPT) based on the collection profile entered.. In UDM_COLL_GRPT, collection profilr name is not a primary key. Please let me know how to do this.
Thanks in advance,
JissaGuess you could make use of the event 05 from the TMG events to make the appropriate selections and populate the field.
Vikranth -
Populate dynamic table fields from internal table
Hi,
Im trying to populate an dynamic table , but it's giving me a few errors witch i can't solve ...
Basically i have an internal table with te following types :
DATA: BEGIN OF tab_docs41 OCCURS 0,
conta TYPE bsis-hkont,
banco TYPE t012t-text1,
ano_3 TYPE i,
ano_2 TYPE i,
ano_1 TYPE i,
jan TYPE i,
fev TYPE i,
mar TYPE i,
abr TYPE i,
mai TYPE i,
jun TYPE i,
jul TYPE i,
ago TYPE i,
set TYPE i,
out TYPE i,
nov TYPE i,
dez TYPE i,
total TYPE i,
montante TYPE betrag11,
END OF tab_docs41.
and the following fieldcatalog , for the dynamic table :
DATA : ls_fieldcat TYPE lvc_s_fcat.
DATA: lv_period TYPE i.
DATA str_period TYPE string.
SUBTRACT 3 FROM ano.
MOVE ano TO str_period.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'CONTA'.
ls_fieldcat-seltext = 'Conta do Razão'.
ls_fieldcat-datatype = 'HKONT'.
* ls_fieldcat-intlen = '10'.
APPEND ls_fieldcat TO p_fieldcat.
Since the internal table, tab_docs41 it's allready filled how can i pass the tab_docs41 values to the corresponding fields of the dynamic table (the move-corresponding it's not working..)
ASSIGN fs_data->* TO <fs_1>.
CREATE DATA new_line LIKE LINE OF <fs_1>.
* ASSIGN new_line->* TO <fs_2>.
*** Next step is to create a work area for our dynamic internal table.
LOOP AT tab_docs41.
ASSIGN COMPONENT 'CONTA' OF STRUCTURE tab_docs41 TO <fs2>.
But this last step it's not working ...
Can anyone help me please ?
Point's will be rewarded
Best Regards
Thanks in advance
João MartinsLooks like you have used the method CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE to create the dynamic internal table.
You have to change the last part of the code:
FIELD-SYMBOLS:
<itab> TYPE STANDARD TABLE,
<wa> TYPE ANY,
<val> TYPE ANY .
ASSIGN fs_data->* TO <itab>.
CREATE DATA new_line LIKE LINE OF <itab>.
ASSIGN new_line->* TO <wa>.
LOOP AT tab_docs41.
ASSIGN COMPONENT 'CONTA' OF STRUCTURE <wa> TO <val>.
<val> = tab_docs41-conta.
ASSIGN COMPONENT 'BANCO' OF STRUCTURE <wa> TO <val>.
<val> = tab_docs41-banco.
APPEND <wa> to <itab>.
ENDLOOP.
BR,
Suhas -
Populate a table field from selection made from drop down menu
Hello all,
I'm having a bit of head scratching problem that i just can't get my head around. I'm using Dreamweaver CS4
and phpmyadmin for my site.
I have a form that inputs a record into a table in my database.
The form is a user picking a fantasy sports team. A user selects a player from a drop down menu.
The players name is got from a recordset that accesses the player database, with the values coming
from the id field and the values from the name, so a user selects a player by there name and not
there unique id value. The code for this is as follows:
<tr valign="baseline">
<td nowrap="nowrap" align="right">GoalKeeper:</td>
<td><select name="gkid_team">
<?php
do {
?>
<option value="<?php echo $row_rs_pt_gk['gkid_gk']?>" ><?php echo $row_rs_pt_gk['gkname_gk']?></option>
<?php
} while ($row_rs_pt_gk = mysql_fetch_assoc($rs_pt_gk));
?>
</select></td>
What i'm trying to achieve is that when a user selects a player from the drop down menu, their price is displayed in the table cell next to the menu. The value is held in the same table of database as the names and id values. I need to do it so the page doesn't need to be refreshed so i assume i need to use some sort of javascript, php and/or maybe ajax. However with java and ajax i have very little or no experience so i'm not really sure what i'm doing. I've been on numerous forums, looked in text books and have been searching the net for hours but i can't seem to solve this problem.
Any help or advice would really be appreciated as i just can't seem to get my head around it,
Thanks,
pb1ukcan this be done??? thanks in advance annieYes.
One way of doing it is submitting the form on change of the selected value and fetch back the query results. Have a servlet invoke the method and set the results in the request.
Another way (not recommended) is to fetch the results corresponding to all the values in the dropdown and have it in the session. The latter solution would obviously be slow. -
How to populate the logical_group field in V_LTDX (table for layouts)?
Hi,
Scenario:
I have implemented the ALV using CL_SALV_TABLE. In the grid we have a 'Choose Layout' button where we have the options of choose, change, manage etc. the layouts. If we create a layout, the layout is saved in the table LTDX(view: V_LTDX).
Issue:
How do we populate the 'Logical_group' field in the table while creating/changing the layouts?
Please suggest..
Regards
s@kSolved..:)
Solution:
While creating the ALV grid, use the method 'get_layout' of the class CL_SALV_TABLE and get the reference of the layout in a reference variable.
Data:
gw_key TYPE salv_s_layout_key.
gr_layout = gr_grid->get_layout( ).
gw_key-report = sy-cprog.
gw_key-logical_group = gc_log_grp." Pass the logical group here say logical group: 0001, 0002, etc. for each ALV
So, whenever you create/ change a layout on the ALV grid, the system automatically passes this logical group and saves it in the table LTDX.
Regards
s@k -
AUTO Populate a Form's Field with MySQL Table Field(s) Data
Hi,
I can easily make forms that add, edit/update, delete.
But I want to be able to populate a form field (usually a popup field) with a selection of records from a specific table.
Say I have a table: CARS
That has fields: MODEL, MANUFACTURER, PRICE
I want to populate the form field named Model with all the CARS:MODEL values in the table.
...and some times...
I want to populate the form field named Model with all the CARS:MODEL values in the table where CARS:PRICE < 20,000
Now, I am fine with the whole HTML, MySQL, PHP programming and can do this all by long-hand coding.
But I'd like to speed it all up and use Dreamweaver! :-)
AND I'd like the edit/update forms to also selected the current records value and make it SELECTED whilst also holding all the other values..., using Dreamweaver.
I can do this all by long-hand coding, but I'd like to speed up my development (and colleagues) and use Dreamweaver! :-)
I hope all we need is a pointer to which menu items to use for this way of working within Dreamweaver...
Thank you,Take a look at DW's Dynamic Form Elements server behaviors.
-
Populate One table by a field from other
Hi Guys,
Just started working on OAF, need a some help.
I want to populate a table (RegionStyle - tableLayout) with data based on the value of a field in another table(RegionStyle - tableLayout) after user clicks on the field both regions are on the same page. I was unable to find any examples in Developers Guide.
Any help appreciated.
Regards,
Shoaib.Shoiab,
Sorry, I lost track of your issue.
For assigning the value to each link, use SPEL. Check Dev guide for its usage if you are not sure. And to redirect to same page, use method forwardImmediatelyToCurrentPage or setForwardURLToCurrentPage based on whether you want to continue the code processing for all the nested bean or not.
--Sihv -
How to populate dynamic internal table fields with data??
Hi Folks,
How to assign a particular internal table field to a dynamically assigned internal table?
I have an excel sheet, and i upload the excel sheet data into an internal IT_EXLOAD table using FM ALSM_EXCEL_TO_INTERNAL_TABLE
Now i created a dynamic internal table which has the same column as in my DB table.
I have to fill the dynamically created Internal table with the IT_EXLOAD data dynamically.
Suppose in future if i add some field in DB table and for that field if i add some column in excel sheet there is no need to change in the program.
Looking for reply...
Best Regards,
Sayakhi,
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_path
i_begin_col = '1'
i_begin_row = '2'
i_end_col = '2'
i_end_row = '1000'
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
*declare intern_tmp as internal table tb_data in wich you want the data
*and declare a field symbol <fs_123>
LOOP AT intern.
ASSIGN COMPONENT intern-col OF STRUCTURE
intern_tmp TO <fs_123>.
IF NOT <fs_123> IS ASSIGNED.
CLEAR intern.
CLEAR intern_tmp.
CONTINUE.
ENDIF.
<fs_123> = intern-value.
AT END OF row.
CLEAR tb_data.
MOVE-CORRESPONDING: intern_tmp TO tb_data.
APPEND tb_data.
CLEAR intern_tmp.
ENDAT.
CLEAR intern.
ENDLOOP.
**paste this code and you can see the data in ur tables dynamically.
Thanks
Nitin Sachdeva -
How to populate the new field of R/3 in BW
Hi,
There was a requirement to modify the sap screen in the R/3.
For the same a new field is created which populate the data via a table in R/3.
Now I have to populate the same field in BW. I am working on 3.5 Version.
In R/3 I have a data source and I am not able to see the same available in the data source
The field is available in the extract structure but I am unable to populate the same in the data source.
Kindly help.The Data Source is picked from the FM.
Also,my requirement is to display the text values for the new field
I am going to create a Generic Master Data which will fetch the data from the table which has fields (Code, Langu and the text) and replicate the same to BW.
Now to populate the code in BW, I need to have the field in the data source and from there I can add the same code field in the bw comm/tran/etc...
The code is available in the Extraction and not in the data source.
At the reporting level I will extract the report based on key and text.
I tried using ROOSFIELD to populate the field in the datasource, but I am not able to do the same. -
Update routine to populate value for field ZDOCCATG(Document category)
Hi Experts,
I need to populate data for field ZDOCCATG(Document Category) based on the value of the below two fields,
1. 0deb_cre_lc(Debit / credit Amount)
2. 0ac_doc_typ(Belegart)
The logic is as follows:
if 0deb_cre_lc > '0'.
if 0ac_doc_typ == 'dz'.
ZDOCCATG = Disputes.
else
ZDOCCATG = Invoices.
end If.
else
if 0ac_doc_typ < '0'.
ZDOCCATG = Credits.
end if.
I need to write the update routine to get the values assigned for Document category based on these two fields. When i open the routine for the field ZDOCCATG, i can see the below screen:
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
RESULT = .
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Please let me know the code to be inserted (based on the logic mentioned above) in the above screen . Thanks
Regards,
Kavitha JagannathHi Kavitha,
Supposing the technical name of fields is /bic/0deb_cre_lc and /bic/0ac_doc_typ use the code below at the marked position.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS80FIAR_O03 - (Communication structure)
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZOARFSCM00-/BIC/ZDOCCATG
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
<----- Paste the code below as shown here --->
if comm_structure-/bic/0deb_cre_lc > 0.
if comm_structure-/bic/0ac_doc_typ == 'DZ'.
result = 'DISPUTES'.
else
result = 'INVOICES'.
endIf.
elseif comm_structure-/bic/0deb_cre_lc < 0.
result = 'CREDITS'.
end if.
<----
>
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
Regards:
Jitendra
Edited by: Jitendra Gupta on Oct 15, 2009 3:05 PM -
Start Routine to Populate Account Group Field from Master data of 0Customer
Hello Friends. Please help me edit this ABAP code to make it work. I am putting this code in start routine in between two DSO. where I am using the
Start Routine to Populate Account Group Field from Master data of 0Customer. I do not want to use read from master data functionality since that field 0customer is not there in dso but similar field 0debitor is there. so i want to put this code
during the load from source DSO to Target DSO.
Error Explicit length specifications are necessary with types C, P, X, N und
DATA: L_S_DP_LINE TYPE DATA_PACKAGE_sTRUCTURE.
types: begin of comp,
CUSTOMER type /BI0/OICUSTOMER,
ACCNT_GRP type /BI0/OIACCNT_GRP,
end of comp.
DATA: l_S_comp type comp.
DATA: L_th_COMP TYPE HASHED TABLE OF COMP WITH UNIQUE KEY customer INITIAL SIZE 0.
IF L_th_COMP[] IS INITIAL.
SELECT CUSTOMER ACCNT_GRP FROM /BI0/PCUSTOMER APPENDING CORRESPONDING FIELDS OF TABLE L_th_COMP.
ENDIF.
LOOP AT SOURCE_PACKAGE INTO L_S_DP_LINE.
READ TABLE L_TH_COMP INTO L_S_COMP WITH TABLE KEY CUSTOMER = L_s_DP_LINE-CUSTOMER
IF SY-SUBRC = 0.
L_S_DP_LINE-/BIC/ACCNT_GRP = L_S_COMP-/BIC/ACCNT_GRP.
MODIFY SOURCE_PACKAGE FROM L_S_DP_LINE.
ENDIF.
ENDLOOP.
soniya kapoor
Message was edited by:
soniya kapoorHello Wond Thanks for Good Answer and good option, But Client does not like this option and does not like Nav Attribute so he does not want to turn on any Nav Attribute, In general also We hav requirement to read a third table while uploading 1 dso table to 2 dso table,
so Please help me edit this ABAP code to make it work. I am putting this code in start routine in between two DSO. where I am using the
Start Routine to Populate Account Group Field from Master data of 0Customer.
No syntax Error But during the load it is updating the source table and not the target table. how to define now target table.
***SOURCE DSO Table
types: begin of typ_tgl1.
include type /BIC/AZDAFIAR000.
types: end of typ_tgl1.
types: begin of comp,
CUSTOMER type /BI0/OICUSTOMER,
ACCNT_GRP type /BI0/OIACCNT_GRP,
end of comp.
DATA: L_th_COMP TYPE HASHED TABLE OF COMP WITH UNIQUE KEY customer
INITIAL SIZE 0.
data: wa_itab type COMP.
data: wa_zdtg type typ_tgl1.
IF L_th_COMP[] IS INITIAL.
***Master Data Table
SELECT CUSTOMER ACCNT_GRP FROM /BI0/PCUSTOMER APPENDING CORRESPONDING
FIELDS OF TABLE L_th_COMP.
sort L_th_COMP by CUSTOMER.
ENDIF.
LOOP AT L_th_COMP into wa_itab.
select * from /BIC/AZDAFIAR000 into wa_zdtg
where DEBITOR eq wa_itab-CUSTOMER. *** SOURCE DSO Table
IF SY-SUBRC = 0.
wa_zdtg-ACCNT_GRP = wa_itab-ACCNT_GRP.
MODIFY /BIC/AZDAFIAR000 from wa_zdtg. *** modify SOURCE DSO Table
ENDIF.
endselect.
endloop.
soniya kapoor -
End Routine to populate custom AFS field for Billing Item extractor
I have the following scenario for Billing 2LIS_13_VDITM datasource
Doc_No Item Material Item_Categ AFS_field
2000 11 XYZ 123
2000 12 XYZ 123 US1
3000 11 PQR 456
3000 12 PQR 456 CA1
I need to populate the AFS_field in the first row also for all Doc Nos for certain Item categories (eg 123 & 456). I need to do this on the first transformation from PSA to DSO. I was planning to write a SELECT statement in the Start Routine with the PSA table as the reference as seen below and then write an End Routine calling this reference table. But the PSA table name is different in Dev, QA and Prod so I cannot use this.
TYPES: BEGIN OF S_AFS,
VBELN TYPE C LENGTH 10,
PSTYV TYPE C LENGTH 4,
MATNR TYPE C LENGTH 18,
J_4KRCAT TYPE C LENGTH 16,
J_4KSCAT TYPE C LENGTH 16,
END OF S_AFS.
DATA: LT_AFS TYPE STANDARD TABLE OF S_AFS,
LS_AFS TYPE S_AFS.
DATA: LT_DATA TYPE tyt_SC_1.
LT_DATA[] = SOURCE_PACKAGE[].
SORT LT_DATA DESCENDING BY VBELN MATNR J_4KRCAT.
DELETE ADJACENT DUPLICATES FROM LT_DATA COMPARING VBELN MATNR.
SELECT VBELN MATNR J_4KRCAT J_4KSCAT
INTO CORRESPONDING FIELDS OF TABLE LT_AFS
FROM /BIC/B0000777001
FOR ALL ENTRIES IN LT_DATA WHERE VBELN = LT_DATA-VBELN AND MATNR =
LT_DATA-MATNR.
SORT LT_AFS BY VBELN MATNR.
I am not an expert in writing ABAP code. Any suggestions are greatly appreciated and points will be assigned. Thank you.Hi
why do want to select the data from PSA table ?Already your trying to load data from PSA to DSO.
you want to populate the AFS field value in DSO right?
1. First you have to add AFS field in ur DSO
2. Write the Start routine based on ur scenario(select the data based on ur scenario and put into internal table).
3. wirte AFS field leval transfer routine(Read the corresponding record based on docu num,item num) pass into RESULT.
Regards,
GR -
Help with writing and retrieving data from a table field with type "LCHR"
Hi Experts,
I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
Thanks in advance,
C
SAVING THE LIST DATA TO DB
DATA: L_WA(800).
LOOP AT T_TAB into L_WA.
ZDBTAB-DATALEN = STRLEN( L_WA ).
MOVE: L_WA to ZDBTAB-RAWDATA.
ZDBTAB-LINENUM = SY-TABIX.
INSERT ZDBTAB.
READING THE DATA FROM DB
DATA: BEGIN OF T_DATA,
SEQNR type ZDBTAB-LINENUM,
DATA type ZDBTAB-RAWDATA,
END OF T_TAB.
Select the data.
SELECT linenum rawdata from ZDBTAB into table T_DATA
WHERE repid = w_repname
AND rundate = w_rundate
ORDER BY linenum.
Populate calling Internal Table.
LOOP AT T-DATA.
APPEND T_DATA to T_TAB.
ENDLOOP.Hi Anuj,
The unicode flag is active.
When I run our report and then to try and save the list data a dump is happening at the following point
LOOP AT T_TAB into L_WA.
As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
When I try to load a saved list the dump is happening at the following point
APPEND T_DATA-RAWDATA to T_TAB.
T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
Regards
C
Maybe you are looking for
-
One old problem causing 2 new ones
Before you get into the meat of this post let me say that part of my job involves some pretty high security and I also am always on call. I have skype accounts with just 1 contact in them specifically for when I do not want to be found in my off time
-
Ipod Shuffle 512MB doesn't show in Windows
My problem is that I was given an 512MB iPod Shuffle that does not seem to play anything while only blinking green and orange when you push the play button. I've been attempting to search a means of fixing this problem throughout the internet, but no
-
I've figured out the individual art boards are the "new tiling". We set catalog pages up on Tabloid so that we can duplex them on our digital press. We also need to print them as indivdual letter size pages for our automtated PDF approval system.
-
How to modify a code of a RFC Server Program
Hello, In order to connect a BI System to a new ECC System, I need to modify a RFC Server Program. Please can you tell how can I modify this program? Thanks
-
I'm trying to create an admin user without having the account showing on the login screen. I came across this article: How to hide a user account in OS X - Apple Support Which says to enter the following into the Terminal (when using Yosemite): sudo