How to call applescript values?
Hi,
Now am working in indesign CS2 Scripting.. I need to call a applescript.. so that i used doScript..
i have 2 doubts...
1) If i choose a file in the javascript, the file path structure is like "~/Desktop/New/1.jpg". I need to get the full parent folder path of file.. is it possible???
2) If i set a value to a variable in applescript.. how do i call the value from the javascript??? using doScript???
Thanks in advance..
by
Subha
I know very little about JS, but these are fairly easy to accomplish in AS.
[1] get path to home folder
will return the equivalent of the "~" path.
Or in your specific example to get an image in the desktop folder you could also use something like:
set myPath to ("" & (path to desktop folder) & "New:1.jpg")
If you want it returned with slashes instead of colons in the path, add posix path of:
set myPath to posix path of ("" & (path to desktop folder) & "New:1.jpg")
[2] I think the last line of your AS should be something like "return myResult". Then whatever variable you assign the doScript to should get the results you return.
Similar Messages
-
How to call & pass values to custom page from seeded page table region
Hi All,
can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
it is urgent. plssss
Regards,
purnaHi,
Yes, we do this by extending controller, but you can also try this without extending controller.
1. Create Submit Button on TableRN using personalization.
2. Set "Destination URI" property to like below
OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
Give your custom page path instead of EmpDetailsPG.
EmployeeId and EmployeeName are VO attributes(Table Region)
If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
In this case, only personalization will do our job. Hope it helps.
Thanks,
Venkat Y. -
How to Call variable value in OLEDB Command SSIS
Hi ,
I am facing one issue in SSIS OLEDB Command.under OLEDB Command there is sql update query
UPDATE dbo.ArchiveBBxFbapp
SET LatestVersion = 0
WHERE BBxKey = ?
dbo.ArchiveBBxFbapp is the name of the table, which I want to change by dynamically on fly.
table name I am getting from variable .
I want to take same variable value instead of hard coded table name in update statement.
suggest me the correct command
thanks and regards,
Vipin jha
Thankx & regards, Vipin jha MCPFor that you've to first store the query itself inside a variable after setting EvaluateAsExpression as true.
Then use expression as below
"UPDATE dbo." + @[User::TableName] +
"SET LatestVersion = 0
WHERE BBxKey = " + @[User::ColumnValue]
Use option as SQL command from variable for data access mode property
Then map the variable containing query above inside this OLEDB command.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to call an applescript application from Office 2011 Excel VBA
All:
I have been pounding my head how to implement a working VBA application into the Mac environment. I have tried a number of approaches calling applescript from VBA. I would like to call my applescript application and pass one argument. My applescript application is as follows:
<code>
on run argv
set theURL to (item 1 of argv)
set p_path to do shell script "echo ~"
set m_path to POSIX file p_path
set theName to text -((offset of "/" in (reverse of characters of theURL) as text) - 1) thru -1 of theURL
set theFile to (p_path & "/Downloads/" & theName)
set macPath to (POSIX file theFile)
do shell script "/usr/bin/curl " & theURL & " -o " & quoted form of POSIX path of macPath
end run
</code>
My last attempt within VBA is:
<code>
Sub SaveMetaDataFile(URL As String, shortFileName As String)
Dim scriptToRun As String
Dim posixcmd As String
posixcmd = ThisWorkbook.Path
scriptToRun = "tell application " & posixcmd & ":MetaDataFileDownloadScript.app " & URL
MsgBox "[" & scriptToRun & "]"
MacScript (scriptToRun)
</code>
I first tried to call the script directly without the "tell application" and I still obtain an error. I also tried the following in VBA and I get the same error with the last lane of code:
<code>
scriptToRun = "set theURL to " & """" & URL & """" & Chr(13)
scriptToRun = scriptToRun & "set p_path to do shell script " & """" & "/bin/echo ~ " & """" & Chr(13)
scriptToRun = scriptToRun & "set m_path to " & """" & posixcmd & """" & Chr(13)
scriptToRun = scriptToRun & "set theName to " & """" & shortFileName & """" & Chr(13)
scriptToRun = scriptToRun & "set theFile to (p_path & " & """/Downloads/""" & " & theName)" & Chr(13)
scriptToRun = scriptToRun & "set macPath to (POSIX file theFile)" & Chr(13)
scriptToRun = scriptToRun & "do shell script " & """" & "/usr/bin/curl " & """" & " & " & " theURL " & " & " & """" & " -o " & """" & " & " & " quoted form of POSIX path of macPath"
MsgBox scriptToRun
'scriptToRun = scriptToRun & "do shell script " & """/usr/bin/curl """ & " & " & " theURL " & """ -o """ & " & " & " quoted form of POSIX path of macPath"
MacScript (scriptToRun)
</code>
The above code is from the applescript application. The applescript application works well using the terminal via osascript. For example:
xenas-imac:Census Work Xena$ osascript MetaDataFileDownloadScript.app http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls
xenas-imac:Census Work Xena$
The whole goal is to download a file into the Download directory from Excel to allow the next step to import the file into Excel for the user. Any help here would be great!
Thank you;
LoriUpdate:
Ok have the module almost working and matches the syntax within the test applescript I had created, but the VBA code via the MacScript() call is generating an invalid procedure or argument call. The following is the test applescript to compare the created string to be passed to VBA MacScript() function:
<code>
set appPath to quoted form of POSIX path of "Macintosh HD:Users:Xena:Desktop:Census Work:"
do shell script "/usr/bin/osascript " & appPath & "MetaDataFileDownloadScript.app " & "http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls"
</code>
The following is the VBA module that generates the above word for word as far as I can tell:
<code>
Sub SaveMetaDataFile(URL As String, shortFileName As String)
Dim scriptToRun As String
Dim posixcmd As String
posixcmd = ThisWorkbook.Path
posixcmd = posixcmd & ":"
scriptToRun = "set appPath to quoted form of POSIX path of " & Chr(34) & posixcmd & Chr(34) & Chr(13)
scriptToRun = scriptToRun & "do shell script " & Chr(34) & "/usr/bin/osascript " & Chr(34) & " & appPath & " & Chr(34) & "MetaDataFileDownloadScript.app " & Chr(34) & " & " & Chr(34) & URL & Chr(34)
MsgBox "[" & scriptToRun & "]"
MacScript (scriptToRun)
End Sub
</code>
The message box in the above VBA code matches my test applescript file and I have taken the output of the MsgBox and used it in a test applescript and it works great, but VBA is throwing "Run-time error '5': Invalid procedure call or argument".
Looking at Microsoft's definition it takes a string argument and I have made sure that scriptToRun is a string type, so at this point I suspect there is something wrong with the MacScript() funciton, or I am missing something above. Is there another way to call an applescript application from VBA outside the MacScript() function? Or is there something I am missing? Any help or suggestions is needed.
Thank you;
Lori (CodeXena) -
How to call a preference value in XSLT
Hi ALL,
how to call a preference value(which is defined in bpel already) in XSLT??
Can any one help me plz
Regards,
Venkat ChFunction to retrieve the preference :
http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
Create a new xsl mapping and let the 'first' parameter be some messageType variable (for example the inputVariable, or some other variable you use for your main input).
In the xslt add between the "<xsl:stylesheet>"-tag and the "<xsl:template match=".">"-tag something like "<xsl:param name="myPref" />"
Your xsl is ready to receive the extra input parameter.
Now in your bpel process do something like this
<copy>
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', ora:getPreference(myPref))"/>
<to variable="myresult"/>
</copy>
or first assign ora:getPreference(myPref) to myPrefVar (xsd:string) and then use
<copy>
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', $myPrefVar)"/>
<to variable="myresult"/>
</copy> -
How to call the form bean value on jsp withthe help of jstl tag
hi
all friends
i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
i now how to retrive the value through jsp:logic
eg. <logic:empty name="userListForm" property="users">
NO USER FOUND
</logic:empty>
see * userListForm mean formbaen name.
* users means collection object.
so how can i write above e.g in jstlYou use the jstl core:if or core:choose combined with the EL:
<c:if test="${empty users.userListForm}">
NO USERS FOUND
</c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful. -
How to Return a value to a 10g Oracle Form form a Web Service Call
I've read the demo available from Oracle, 'Calling a Web service from Oracle Forms', that shows how to invoke a call to a Web Service from a Form. The demo only shows how to do a call and how to display messages. I've done some searching, but can't seem to find any examples of how to return a value from the call into a field on the form. If any one could provide an example of that, I would greatly appreciate it.
We are in the process of modifing a form and we would like to use a webservice, which we have never done before. We have created a webservice which calculates a value based upon what is entered on the form and we want to pass that calculated value back to a field on the form.
This is the code provided by the demo to do a call.
DECLARE
jo ora_java.jobject;
xo ora_java.jobject;
rv varchar2(100);
ex ora_java.jobject;
BEGIN
JO := SendServiceSoapClient.new;
RV := SendServiceSoapClient.sendMessage(JO,:BLOCK3.PHONE_NUMBER, :BLOCK3.MESSAGE_BODY, xo, xo);
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message(Exception_.toString(ex));
END;In the future, please be sure to include the exact product versions you are using. In this case, also be sure to include the java versions you are using to build your java code.
http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
Regarding your question, take a look at this older white paper which discusses integrating Forms with SOA.
http://www.oracle.com/technetwork/developer-tools/forms/documentation/forms-soa-wp-1-129441.pdf -
How to call a AS/400 Stored Procedure with a BigDecimal Value?
Hi,
Could you pls tell me how to call a stored procedure on the AS/400 which request an input value of packed decimal(10P 4) value.
I have tried to convert it to a BigDecimal in Java and call the stored procedure as follows but it gave me a decimal point error on the AS/400.
Could you pls show me where I'm wrong in the following code.
Thanks
Jan
========Java program to call AS/400 Stored procedure with setBigDecimal()===========
//Assign the value to String
string sBDVal = "30"
//Convert the String value to BigDecimal
BigDecimal bdAmt = new BigDecimal(sBDVal);
//Call Stored Procedure with parameters,
CallableStatement callSP = conn.prepareCall("{call OSCUPDLENS(?,?,?)}");
// Set in parm values
callSP.setString(1,"Value 1");
callSP.setBigDecimal(2,bdAmt);
callSP.setString(3,"");
// Register out parameter
callSP.registerOutParameter(3, Types.CHAR);
// Execute call to stored procedure
callSP.execute();
// Retrieve out parameters
sErrFlag = callSP.getString(3).trim();
========================Create Stored Procedure on AS/400===========================
c/EXEC SQL
c+ CREATE PROCEDURE TESTSPROC
c+ (IN VAL1 CHAR ( 8),
c+ IN BDAMT DEC (10, 4),
C+ INOUT ERR CHAR ( 1))
C+ LANGUAGE RPGLE NOT
C+ DETERMINISTIC NO SQL EXTERNAL NAME TESTSPROC PARAMETER STYLE
C+ GENERAL
c/END-EXEC
======RPG program on AS/400 to accept the BigDecimal value to a Packed decimal======
* Initialize the i/p parameter
DP#VAL1 S 8A
DP#AMT S 10P 4
DP#ERR S 1A
C*Input parameters
C *ENTRY PLIST
C PARM P#VAL1
C PARM P#AMT
C PARM P#ERRCould you pls show me where I'm wrong in the following codeI don't know, you're doing a lot of things I have never tried. But "decimal data error" most likely means that the stored procedure is expecting packed data and the driver is giving it zoned data, or vice versa. You could confirm that by dumping your variables inside your RPG. If that is your problem, you could work around it by redefining your BDAMT parameter as integer or string and reformatting it in the RPG.
-
How to call a method defined in AM when I select any value in LOV
Lets say there is a LOV. The scenario is as soon as I select any value in LOV, a method needs to be called which I have written in the AM. And the output of the method is displayed in a output text box.
I am not able to understand how to call a method when the user selects any value in LOV.
This is wht I did. I had created the binding for the method. Changed the autosubmit property of the LOV to True, and in the properties of the output box, in the partial submit trigger property, passed the ID of the LOV. But I didnt get any place where I need to call the method. I am also not able to drop an action listener on the LOVHi,
+"its showing an error(underlined in orange)."+
Any reason you don't share this error with us? Anyway, here is how it goes
1. LOV, set autosubmit="true" and configure a value change listener
2. Expose the AM method as a method binding in the PageDef file
3. In the value change listener:
BindingContext bctx = BindingContxt().getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
OperationBinding method = (OperationBinding) bindings.get("name of method binding in PageDef");
method.getParamsMap().put("argument name1", value1);
method.getParamsMap().put("argument name2", value2);
Object retVal = method.execute();
if(!method.getErrors().isEmpty()){
//handle errors
else{
//write retVal to the managed bean variable that is referenced by the outputText value property
//PPR output text component
ADFFacesContext.getCurrentInstance().addPartialTarget(outputTextRef);
}Note that you may have to set clientComponent = "true" on the output text component
Frank -
RRI? How to call ITS URL and pass field value from Bex Query.
I am doing RRI from query to webaddress,
i have defined jump(report type: webaddress and reicver report as url) from shopping cart bex query(SRM ) to webaddres.
here url is SRM ITS base link for monitoring shoppingcart(http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN).
jump is working from portal(from bex query ivew).
but i want to pass value(shopping cart value) to above url and want to skip first screen.
i have maintained assignment detail by assigning field name against shopping cart infoobject with type url parameter, but its not directly call reciver url with given input field.
i tried the diffrent combination of url and field assignment as like below:
1: web address url:http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN
assigned field: GS_HEADER-OBJECT_ID
but when we call reciver url from portal bex ivew, only initial screen come with page url as below:
http://(hostname):(SRM port)/sap/bc/gui/sap/its/bbp_mon_sc?sap-client=200&sap-language=EN?GS_HEADER-OBJECT_ID='selected number value'
2: web address url:http://(hostname):(SRM port)/sap(cz1TSUQlM2FBTk9OJTNhc3JtZGV2X0lTRF8wMCUzYUdxdFNqdWdMS2xyTEFEelFTNFlWTnJXRjEzdy05UnhTWXl4TW03c3AtQVRU)/bc/gui/sap/its/bbp_mon_sc/~flNUQVRFPTgzMTcuMDAyLjAxLjAx====#jump_to_selected_sc
assigned field: flNUQVRFPTgzMTcuMDAyLjAxLjAx
but when we call reciver url from portal bex ivew, only initial screen come with page url as below:
http://(hostname):(SRM port)/sap(cz1TSUQlM2FBTk9OJTNhc3JtZGV2X0lTRF8wMCUzYUdxdFNqdWdMS2xyTEFEelFTNFlWTnJXRjEzdy05UnhTWXl4TW03c3AtQVRU)/bc/gui/sap/its/bbp_mon_sc/~flNUQVRFPTgzMTcuMDAyLjAxLjAx====#jump_to_selected_sc?flNUQVRFPTgzMTcuMDAyLjAxLjAx='selected number value'
I have seen the source code of that url(inital screen and after entring the value to that screen) too.
how to call webadress(SRM ITS base shopping cart URL) with passing the one of field value of that url screen?
Thanks and regards,
Dushyant.Declare the gv_orderid in modulepool program.
And Declare the parameter as import parameter in smartform.
CALL FUNCTION lv_form
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
i_input = gv_orderid
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5 -
How to call Instance Methods and set property values in BAPI?
In Project systems, for the three business objects viz.
Network, ProjectDefinition and WBS, there are two kinds of methods which are available : class methods and instance methods. We have tried calling some instance methods, for instance, BAPI_PROJECTDEF_GETDETAIL to get details pertaining to a project. While importing this BAPI, it shows two elements for mapping i.e. Current Internal Project(string) and Current External Project(string). We supplied these values for an existing project. Upon running this call through an XML client at our end, it
returned an error "Module Unknown Exception". This general message is present on every instance method thus far. Upon searching in BAPI Explorer for Project System->ProjectDefinition->GetDetail, we found that this BAPI didn't take any input parameter.
Following message was displayed in BAPI Exlorer for this BAPI:
"... Obligatory import parameters are the external and internal keys CURRENTEXTERNALPROJE and CURRENTINTERNALPROJE of the project definition.The system reads parameters contained in the structure
BAPI_PROJECT_DEFINITION_EX ..."
i) How to supply the values of Obligatory import parameters.
ii) What are the possible causes of this exception.
iii) How to call an instance method. We are using same mechanism for calling class as well as instance methods so far, we have been to call only class level methods successfully. Is there anything special that we
need to do to call instance methods.Hi,
what version is the SAP PS running? If WebAs or higher, create an inbound synch interface containing your two parameters in the request structure and as many as you require in your response structure. Generate an Inbound ABAP proxy, where you can plug in some code, i.e. create and instantiate an object of the required type and make the call to the BAPI.
If SAP PS on lower than WebAs, then create a wrapper function module and make it RFC enabled. Then plug your code in here and do the same thing.
Watch out for commits!
Cheers,
Mark -
How to call a procdure that will return me list of values(JSF,ADF BC)
hi all,
any one can help me how to call a procedure that will return me list of value with using adf and jsfI did this with a LoginModule that returned a list of user roles. Below is the Java call
stmt = conn.prepareCall(authquery);
stmt.registerOutParameter(1, OracleTypes.CURSOR);
stmt.setString(2,username);
stmt.setString(3,new String(password));
// realm is null if not set
stmt.setString(4,_application_realm);
stmt.execute();
rolesResultSet = (ResultSet)stmt.getObject(1);
stmt.close();authquery is the name of a procedure that returned a ref Cursor
CREATE OR REPLACE PACKAGE "DBPROCLM" IS
TYPE principal_ref IS REF CURSOR;
function get_user_authentication(p_username in varchar2, p_password in varchar2, p_realm varchar2) return principal_ref;
END;
CREATE OR REPLACE PACKAGE BODY "DBPROCLM" IS
FUNCTION get_user_authentication (p_username in varchar2, p_password in varchar2, p_realm varchar2)
RETURN principal_ref
AS
var_username varchar2(100);
var_userid number(10);
var_password varchar2(100);
role_cursor principal_ref;
FAILED_AUTHENTICATION exception;
BEGIN
select userid, username, password into var_userid, var_username, var_password from sec_users where username = p_username;
if (var_password = p_password) then
begin
if (p_realm is null) then
open role_cursor for
select rolename from user_roles_view where userid = var_userid;
else
open role_cursor for
select rolename from user_roles_view where userid = var_userid and realm=p_realm;
end if; -- p_realm check
end;
-- if password doesn't match, raise Excpetion for LM to
-- abort the authentication process
else raise FAILED_AUTHENTICATION;
end if;
RETURN role_cursor;
END get_user_authentication;
END;You only ned to expose the call to teh procedure in a method (e.g. on ADF BC Application Module) and create a method binding for it.
Frank -
How to call a Function that will return me boolean value
Hi all ,
I am try to call a function that is included in my ApplictionModule the following is my method code
public boolean callUpdateDepartmentNameFunction(int deptNo,String newName)
boolean result=false;
System.out.println("first");
CallableStatement plsqlBlock =null;
System.out.println("sec");
String statement="BEGIN :3 = update_dname_func(:1,:2); END;";
System.out.println("third");
plsqlBlock=getDBTransaction().createCallableStatement(statement,0);
try{
System.out.println("forth");
plsqlBlock.registerOutParameter(3,OracleTypes.BOOLEAN);
plsqlBlock.setInt(1,deptNo);
plsqlBlock.setString(2,newName);
plsqlBlock.execute();
result=plsqlBlock.getBoolean(0);
catch(SQLException sqlException)
throw new SQLStmtException(CSMessageBundle.class,CSMessageBundle.EXC_SQL_EXECUTE_COMMAND,statement,sqlException);
finally
try{
plsqlBlock.close();
catch(SQLException e)
e.printStackTrace();
} return result;
while am runing my page is am getting error like
Error
1. JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27121: SQL error during statement execution. Statement: BEGIN :3 = update_dname_func(:1,:2); END;
2. JBO-27121: SQL error during statement execution. Statement: BEGIN :3 = update_dname_func(:1,:2); END;
3. Invalid column type
callUpdateDepartmentNameFunction_deptNO
callUpdateDepartmentNameFunction_newName
callUpdateDepartmentNameFunction
regards,
Prabeethsoy PHi,
http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen005.htm#sm0297
has an example of how to call a stored procedure with out parameters. Please correct your code accordingly
Frank -
How to get the values from popup window to mainwindow
HI all,
I want to get the details from popup window.
i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
now i am able to display popup window with values.How to get the values from popup window now.
I can anybody explain me clearly.
Thanks&Regards
kranthiHi Kranthi,
Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
Regards,
Uday -
How to call a maintenance view from a program
Hello Abapers,
Can anybody explain with some examples. How to call a mainetenance view from a program.
Thanks
Ranjith.Use FM 'VIEW_MAINTENANCE_CALL'.
REPORT zmaintaintest.
VARIABLES / CONSTANTS
CONSTANTS:
c_action(1) TYPE c VALUE 'U', "Update
c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
c_field(6) TYPE c VALUE 'EMPNO'. "Field Name
INTERNAL TABLES
DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
v_empno TYPE zempno,
wa_rangetab TYPE vimsellist.
SELECTION SCREEN
PARAMETERS: p_empno TYPE zempno OBLIGATORY. "Emplyee ID
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
Chcking the existence of the user in EMPLOYEE table
PERFORM validate_employee.
START_OF_SELECTION
START-OF-SELECTION.
This will restrict the user view so that user can only view/change
Table data corresponding to his/her Employee ID
PERFORM define_limited_data_area.
Displaying table maintenance view for a particular employee ID
PERFORM call_view_maintenance.
*& Form validate_employee
Validate plant entered in the selection screen
FORM validate_employee.
SELECT SINGLE empno u201CEmployee ID
FROM zemp_example u201CEmployee Table
INTO v_empno
WHERE empno = p_empno.
IF sy-subrc <> 0.
MESSAGE 'Not an Valid User' TYPE 'I'.
ENDIF.
ENDFORM. "validate_employee
*& Form DEFINE_LIMITED_DATA_AREA
To restrict the user view so that user can see/change table data
corresponding to his employee ID. Here one internal table is
getting populated with field name as u201CEMPNOu201D (Key field of the table)
And value as given by user in Selection Screen and this is passed as
Parameter in function module 'VIEW_MAINTENANCE_CALL'
FORM define_limited_data_area.
CLEAR wa_rangetab.
wa_rangetab-viewfield = c_field.
wa_rangetab-operator = 'EQ'.
wa_rangetab-value = p_empno.
APPEND wa_rangetab TO itab_rangetab.
ENDFORM. "define_limited_data_area
*& Form CALL_VIEW_MAINTENANCE.
Displaying table maintenance view for a particular employee ID
FORM call_view_maintenance.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = c_action
view_name = c_viewname
TABLES
dba_sellist = itab_rangetab.
ENDFORM. "call_view_maintenance
Regards,
Joy.
Maybe you are looking for
-
Import and directory synchronize problem
I'm having a problem importing new pictures into an existing file directory which appears in my Lightroom catalog. The photos import normally but show up as a new directory entry off the root of the Lightroom catalog. When I attempt to move/drag them
-
Adobe Photoshop CS5 failed to install?
Every time I try to install PS CS5 on my laptop, it always fails. This is my error log: Exit Code: 6 -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 67 error(s), 59 warning(s) WARNING: DS013:
-
Optimising Performance with Firebox
I had a look over some of the discussions recently as I was having a few issues with the Presonus Firebox I bought last week. Thanks to helpful advice given to someone else, I was able to resolve the problems with digital crackling. I breathed a sigh
-
SOAP handler for outgoing message
Hello, I am implementing a order related webservice running under WebLogic 8.1. It sometime needs to send SOAP request to other external (outside my org) webservices. Is there a way to add a handler to intercept all outgoing SOAP message from my orde
-
I have the following problem. After updating Windows on three computer the printerspooler stopped and the printers disappeared. Restarting the printerspooler did not work. I deleted all the drivers and reinstalled my printer software (Samsung Laser a