FM execution through xi

Hi Everbody,
Am using the FM "BAPI_DOCUMENT_CHECKIN2" to checkin the file in to DMS system.
Backend Systen ERP is configured with DMS system , When FM of above is executed from backendsystem file gets attached.
But Scenario gets different when i use this FM in  external system (Ex. XI system).The FM is executed b y specifying the destination  but file is not getting attached even though there is no error.
Here in FM i found a parameter : Hostname  -- which describes :::: Computer name of the frontend computer used to call BAPI. Only necessary if the call of the function module is executed from an external system. The frontend type is deteremined using the computer name from DMS customizing.
Did anyone get of any kind prob ??
kindly advice .. i need to execute this FM using XI (Receiver RFC Adapter) ;;; Adapter status is green saying no error ::: but n ofile is getting attached.

Hi I use the
as advice and still see no File checked in to the DMS
Below is the CODE
*& Report  YTEST
REPORT  ytest.
DATA: lf_doctype(003),    "LIKE bapi_doc_draw-documenttype,
      lf_docnumber(025),  "LIKE bapi_doc_draw-documentnumber,
      lf_docpart(003),    "LIKE bapi_doc_draw-documenttype,
      lf_docversion(002), "LIKE bapi_doc_draw-documentversion,
      lf_status(002).     "LIKE bapi_doc_draw-statusextern.
*//DATA STRUCTURE FOR BAPI RETURN
DATA: BEGIN OF  ls_return,
type(001),
id(002),
number(003),
message(220),
log_no(020),
log_msg_no(006),
message_v1(050),
message_v2(050),
message_v3(050),
message_v4(050),
parameter(032),
row(010),
field(030),
system(010),
END OF ls_return.
*//DATA STRUCTURE FOR DOCUMENT ORGINALS
DATA:BEGIN OF lt_files,
deletevalue(001),
documenttype(003),
documentnumber(025),
documentpart(003),
documentversion(002),
originaltype(005),
sourcedatacarrier(010),
storagecategory(010),
wsapplication(003),
docpath(255),
docfile(255),
statusintern(002),
statusextern(002),
statuslog(020),
application_id(032),
file_id(032),
description(040),
language(001),
checkedin(001),
active_version(001),
created_at(014),
changed_at(014),
created_by(012),
changed_by(012),
content_description(050),
END OF lt_files.
**.... Bapi-Return structure
DATA : pr_ls_return LIKE ls_return .
**.... Originals
DATA: pr_lt_files LIKE lt_files OCCURS 0 WITH HEADER LINE.
lf_doctype    = 'STD'.
lf_docnumber  = '296501'.
lf_docversion = '00'.
lf_docpart    = '000'.
lf_status     = 'CT'.
Check in original 1 into SAP Database
REFRESH pr_lt_files.
CLEAR pr_lt_files.
PR_lt_files-storagecategory = 'Z_BHEL_HYD'.    " Storage = SAP-DB
PR_lt_files-docfile = '
10.x.x.xxx\sapmnt\trans\abcd1.txt'.           ".SRM System
APPEND PR_lt_files.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input                    = lf_docnumber
  IMPORTING
    output                   = lf_docnumber.
break-point.
    call function 'BAPI_DOCUMENT_CHECKIN2' DESTINATION 'SNDCLNT100' EXPORTING: documentnumber            = lf_docnumber
                                                                                documenttype             = lf_doctype
                                                                                documentpart             = lf_docpart
                                                                                documentversion          = lf_docversion
                                                                               hostname                 = 'SNDCLNT100'
                                                                                statusintern             = ''
                                                                                statusextern             = lf_status
                                                                                PF_HTTP_DEST             = 'SAPHTTP'
                                                                               PF_FTP_DEST              = 'SAPFTP'
                                                                                statuslog                = ''
                                                                     IMPORTING: return                = pr_ls_return
                                                                     TABLES:    documentfiles         = pr_lt_files.
break-point.
*if sy-subrc eq 0.
**commit work.
*else.
*message 'error' type 'E'.
*endif.

Similar Messages

  • Reports failing during execution through CMC

    Currently we have the following configuration in our development and QA environments
    Crystal Reports Server XI R2
    Windows 2003 Server
    Data used to generate reports is kept in Oracle 10G running on Red Hat
    Both servers are virtual environment - they run on VMWare
    We have a particular report that basically bails out 1/2 way through execution for a particular schema. The report uses a SQL command - the SQL query itself can take sometime when executed through SQL Developer - depending of the size of the data set in the schema can take between 5 to 10 min to execute.  When running the report itt fails with the following message:
    A Request was canceled. The necessary security privileges could not be verified. This indicates a problem with the security server.
    In the windows event viewer we can see the following entries
    Security policies were propagated with warning. 0x4b8. An extended error has occurred
    A failure occurred while the Page Server was processing report .... (Event 42452)
    A Page Server subprocess in the processing server was forced to terminate (Event 42445)
    Your request cannot be processed due to low system resources. Please contact your system administrator (Event ID 42443)
    A Page Server subprocess was forced to terminate (Event 42451)
    There is nothing unusual in the logging folder.
    We already look through the knowledge base and the only article that sort of resembles the situation is article 1407795. We confirmed that the report has no printers associated to it.
    The report work with a smaller data set in a different schema.
    We are at a lost - we have changed the JVM parameter to allocate more memory to Tomcat but it does not seem to address the issue.
    Any insight would be appreciated

    When CRS is installed, it defaults to run under the Local System account on the server where it's installed.  This account is local to the server and does not have access to anything on the network.  It sounds like this may be part of your problem. 
    In the CCM, stop each of the "servers", including TomCat, go to its properties and change the login in at the bottom of the first tab to an account that has network access, save and restart the server.  Best Practice is to have a special "services account" on the network where the password doesn't expire to use for this purpose.
    If that's not the issue, I would verify the login being used for the report and also that there's nothing on the database end that would be causing this.  There is no "Security Server" in CRS, so this is a problem that is occuring outside of CRS but is affecting how CRS runs.
    -Dell

  • "Variable applied"display  after query execution  through WAD incorrect

    Hi ,
    In my queries i provide varible entries for  0FISCPER, 0FISCVARNT along with other variables.In the query i dispplay the values for the variables applied.When i run these queries through 2004s WAD  if i were to select 0FISCPER = 01/08/2007 and 0FISCVARNT = AK after query execution the variable applied displays - 
    <b>0FISCPER = AK/01/08/2007
    0FISCVARNT = #</b>.
    It works fine on 3.5 templates.We are on SP9.We have a sandbox also and i tested it out in sandbox  and have no problem there.
    Is anyone facing the same issue?
    Regards,
    Shiva

    Not much experience in WAD but I think there should be a query in BEx Query Designer.
    There you can choose that characteristics which takes time. Select "Advanced" tab from right hand side.
    Under "Filter Value Selection During Query Execution"  you will get 4 options.
    BTW if you have a query on DSO then creating index ( secondary) on the affected characteristics would also resolve your problem
    Regards
    Anindya

  • Stored Proc Execution through OS command using shell script

    Hi All,
    I have a requirement of executing one stored procedure before putting data in Table through JDBC adaptor and two stored procedures after that.
    I was thinking to write a shell script and execute it before and after message processing in adaptor.
    Can anybody please tell me how should i write a shell script for it?
    I have identified that exec <Stored_Proc_Name> is the syntax for it.
    Will i need to write something more in this script?
    Thanks,
    Atul

    Hi Atul,
    Stored procedures are written on the Database server for which you are going to write JDBC adapter.
    you will just call the storedprocedure in to your adapter.
    as per your requirement you shd run one stored procedure (let us say SP1) and then you have to push data into tables and then run SP2 and SP3...
    so for this write three stored procedures and call them into another SP. in this SP you call SP1 first then insert statement to insert data into tables and then SP2 and SP3.
    finally call SP into your JDBC adapter.
    you can call SP1 in SP as below
    Var_SQL :='call SP1 (''' || Var_1 || ''',''' || Var_2 ||''')' ;
    EXECUTE IMMEDIATE Var_SQL;
    i think for this shell script is not required.. correct me if i am wrong...
    Regards,
    Sukarna.

  • Execution through "sudo"

    Hello,
    In our enviornment (GC 10.2.0.3/Solaris), acces to the oracle user on the database servers are restricted and DBAs have to login as themselves
    and sudo into oracle using their own password
    example:'sudo su - oracle'
    we can't login/ssh into these servers as 'oracle'.
    Most of the functionalities, including Agent Installation, Upgrade, Listener shutdown/startup need such kind of access
    what are the steps need to be done for easy execution of tasks from Grid control GUI?
    Thank you.

    This is supported 10204. please refer the RN
    http://download.oracle.com/docs/cd/B16240_01/doc/doc.102/e12165/toc.htm

  • Problem in Mat view execution through dblinks

    HI Experts,
    I am refreshing MAT_VIEW's via dblinks. But during refresh i am getting below error.
    I tried both with Complete and Fast. Both are getting errors.
    Seems i missed some privilages.
    Please assist me here..
    With Fast option
    *===========*
    SQL> exec dbms_mview.refresh('CDS_BANK_BRANCH_NLD',*'F'*);
    BEGIN dbms_mview.refresh('CDS_BANK_BRANCH_NLD','F'); END;
    ERROR at line 1:
    ORA-12018: following error encountered during code generation for
    "ACCOUNTINFO"."CDS_BANK_BRANCH_NLD"
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
    ORA-06512: at line 1
    With Complete Option
    SQL> exec dbms_mview.refresh('CDS_BANK_BRANCH_NLD',*'C'*);
    BEGIN dbms_mview.refresh('CDS_BANK_BRANCH_NLD','C'); END;
    ERROR at line 1:
    ORA-12018: following error encountered during code generation for "ACCOUNTINFO"."CDS_BANK_BRANCH_NLD"
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
    ORA-06512: at line 1

    Fran wrote:
    You are calling materialized view at local DB where the m_view doesn't exists. To refer another database through dblink you must use m_view@remote_databaseyou are right , i just notice this :)

  • Exception in query execution through JDBC code

    Hi all,
    I am getting the following error when I am trying to use JDBC in a web dynpro application. I need to execute select query on table XI_AF_MSG.
    java.sql.SQLException: Invalid object name 'BC_DDDBTABLERT'
    When I tried to debug the code, I came to know that connection is getting done successfully but error comes when I try to execute the query.
    Can anyone help me to solve the problem?
    Regards,
    Bhargav

    Sure I can show my code.
    try {
         //        Get the database connection
              InitialContext dbInitContext = new InitialContext();
              String dbName = "jdbc/SAP***DB";  //datasourcename
              DataSource dataSource = (DataSource) dbInitContext.lookup(dbName);
              Connection conn = dataSource.getConnection();
              str=str" Connection is done successfully. "dataSource.toString();
              messageMgr.reportSuccess(str);
              String SelectStmt = "Select * from XI_AF_MSG";
         //        Prepare the SQL statements
         str=str+" before preparing statement";
                   messageMgr.reportSuccess(str);
              Statement stmt = conn.createStatement();
              str=str+" statement is prepared.";
                        messageMgr.reportSuccess(str);
         //        Execute the Query
              ResultSet resultSet = stmt.executeQuery(SelectStmt);
              str=str+"query is executed.";
                        messageMgr.reportSuccess(str);
    catch(Exception e)
    As you can see in the code, I have created messages at several points. When I execute the application, i can see message "statement is prepared" before exception is thrown. It means, connection is getting established and statement is also getting created but query is not getting executed.
    Regards,
    Bhargav

  • Execution of Coded UI scripts with least possible test execution time in Windows7 Operating system using Visual Studio Test Agent 2010 without VS2010 installed

    Hi All,
    We are trying to execute coded UI scripts without Visual Studio installed. We are using “Visual Studio Test Agent 2010” for executing coded UI scripts without VS2010 in Windows 7, it is working fine. Also we verified executing the same script with VS2010
    Premium, it works fine as well.
    Here the challenge we are facing is with the Test execution time.
    When we run the coded UI script with IE11-Windows 7 OS-Visual Studio 2010 Premium it takes
    3min 36sec to complete the execution whereas with IE11-Windows 7 OS-Visual Studio Test Agent 2010  it takes
    6min 40sec for the same script to execute (which is almost double the time it takes while executing using VS2010).
    My question is what may be the reason for this difference? and how we can reduce the test execution time when running from Test Agent 2010?
    Kindly let us know what is the best practice to execute the coded UI scripts with least test execution time in Windows 7 Operating system using Visual Studio Test Agent 2010 without VS2010
    installed.
    Looking forward for your positive response.
    Thanks in advance..!!

    Tina-Shi, Thanks for the information.
    As you mentioned, we tried to execute the coded UI test using Mstest.exe in command on VS2010 Premium and checked on the execution
    time, there was a slight difference.
    Please find below execution time.
    Using Mstest.exe in command on VS2010 Premium/Win7 – 3.47 minutes
    Using VS2010 Premium/Win7 – 3.53 minutes
    Using Test Agent/Win7 – 7.3 minutes
    Also, I closed all the other processes in Task manager before starting up the execution.
    Still , I am facing the same Issue. Could you please suggest any other way to reduce the scripting time of coded UI script execution
    through Test agent 2010.
    Looking forward for your earliest response.

  • Debugging a report on execution

    How do i debug a report a  during execution?
    1) I know we can do  this by putting a breakpoint in a Program before execution through se38.
    2) Or it can be done by putting a /h before execution.
    But what  if i forget to  put break point and also forget  /h. Now during the execution,the program takes a long time in processing , so i want to know at which statement or loop is the processing going on.Is there any transaction or way how i can find this out and then put a break point there .

    Hi Dilip
    As per my understanding,implementing the Watch Points mechanism is the best solution for your case.
    Using the watch points, we can came to know where exactly the problem is occuring if the execution is taking long hours.
    For example I have 1- 10000 employee numbers and for each employee,I am handling some mechanism.
    In this case suppose let assume EMP# 1024 is giving some problem.
    By putting the Watching point as EMPNo = 00001024, directly we can go to that EMP# part and can observe the problematic statements.
    Hope you got some idea if not please let me know so that I can provide more stuff with live examples.
    Regards,
    Sreeram Kumar.Madisetty

  • Getting Report File Path location at execution in TestStand 2012 and later

    I need to include PNG pictures into my TestStand Report (HTML, XML, ATML).
    When report generation was made through plugins (before TestStand 2012), it was easy to get report file location during execution through variable RunState.Root.Locals.ReportFilePath in order to save PNG files near the report file (in same directory).
    I didn't find yet an easy an simple way to do the same in TestStand 2012 with Result Processing Plugins.
    Any idea ?
    Remarks :
    Since this functionnality has to be included within MESULOG TS+ last version which is a TestStand Add-on, I cannot modify Report Options, Process Model or include a callback (like GetReportFilePath.
    In need ReportFilePath within a Custom Step Type which cannot wait for PostUUT or ReportGeneration to save its PNG files.
    Jean-Louis SCHRICKE
    ├ CTA - Certified TestStand Architect (2008 & 2010 & 2014)
    ├ CTD - Certified TestStand Developer (2004 & 2007)
    └ CLD - Certified LabVIEW Developer (2003 & 2005)

    jiggawax,
    Thank you for you quick answer.
    RunState.Root.Locals.ModelPluginConfiguration.Plug​ins[<plugin index>].PluginSpecific.Options.Directory is valid only if  
    RunState.Root.Locals.ModelPluginConfiguration.Plug​ins[<plugin index>].PluginSpecific.Options.DirectoryType is set to "SpecificDirectory".
    It seems that I cannot get the complete ReportFilePath before "UUT Done" plugin entry which is after MainSequence execution.
    Jean-Louis SCHRICKE
    ├ CTA - Certified TestStand Architect (2008 & 2010 & 2014)
    ├ CTD - Certified TestStand Developer (2004 & 2007)
    └ CLD - Certified LabVIEW Developer (2003 & 2005)

  • Help 'Exiting' after Automator Shell Script Execution

    Hello,
    I've recently installed and got running GCalDaemon (http://gcaldaemon.sourceforge.net/) which allows me to Synch Rainlendar <-> Google Calendar through iCal (You can also synch iCal <-> Google Calendar). I needed to start up a shell script/applescript after each startup/login in order for GCalDaemon to start the synching process each time and continue to do so at the timed intervals. I would do so by the following terminal code:
    cd /usr/local/sbin/GCALDaemon/bin
    ./standalone-start.sh
    I then tried automating this process and came across shell script execution through Automator. I did so and created a .app with the above mentioned code. This works and it starts up the necessary .sh file I need and the snyching works under StartUp. My concern is however, how do I exit terminal once the code has executed the necessary file? All I have in my .app is the above mentioned code for now. I just need it to exit terminal because on startup or after starting the program, I get this issue (See Attachment)
    This continues to run, so my guess is that I need to add code to exit terminal and allow the .app to close itself properly after doing so.
    Please guide me in the right direction.
    Picture Belows shows what happens when I run the Automator App. It continues to run until I quit out of the app manually (TheGCal programs works fine though). I feel I need to have app quit Terminal or fully end the process and quit out on it's own.
    Thanks
    <table style="width:auto;"><tr><td></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From GCalDaemon</td></tr></table>

    i redirected the command output to /dev/null which is unix equivalent of a black hole and I also redirected error output to standard output in case the script produces any errors.
    also & at the end tells it to continue without waiting for the script to finish.
    Message was edited by: V.K.

  • Shortcut through terminal

    Hi
    I want to run a shortcut execution through terminal.
    For example, W+v = Vim.
    <keybind key="W-v">
    <action name="Execute">
    <command>(what do i put here??)</command>
    </action>
    </keybind>
    I've got this far, but don't know what ill type in <command>, what do i type here?
    Thanks

    xterm -e vim
    urxvt -e vim
    and so on, depending on your terminal.
    ** Also, please do read the manpages.
    Last edited by Peasantoid (2010-03-10 21:32:15)

  • Executing java class through servlet

    Hi,
    I am facing one problem and would be glad if I could get an input.
    I'm working on admin module and want to execute some java program which may take 10mins. for execution through either JSP or Servlet. DO any of you know how this could be done ?
    thanks
    Amit.

    Do you mean that you want to run a Java class from a servlet and wait till that class finishes off?

  • Calling java from csh scripts

    I have recently come across certain projects where Java has being used as an alternative for scripting purposes. What I am trying to say here is that making calls to java programs from csh scripts and these Java programs are merely doing trivial/sql tasks which could have very well been carried out in a scripting language itself. and then Java calling some scripts so ending up with a chain of Java calling scripts which call Java and so on.
    It has been my understanding all along that such a design would not be something recommended, and there should be a separation of concerns and a clear demarcation between Java and the scripting code. What however I am struggling with is finding some articles or papers supporting this thought and I would greatly appreciate if some you have something you would like to share preferably an article, supporting or negating such a design.
    Edited by: kilyas on Mar 25, 2010 2:52 PM

    >
    Actually my original post was a reply to Saish. But thanks for the input. It's good to know that you extend TDD to scripting as well, but most of the scenarios I have come across thats not been the case. Whether thats the lack of test tools/libraries like JUnit or JMock for csh scripting or the user's frame of mind of getting things done, I am not sure.There's no need for such tools. Even in Java et al, test harnesses can be hand-whittled. JUnit is just Java code, after all. Test harnesses for scripts are no different. As an extremely basic example, you might a file that picks up everything from one directory, run a sed application against it, and dump the results in another directory. Writing tests for that is pretty easy; start with a couple of sample input files, and expected outs, apply your script, do a diff on the resut against the expected outs. Granted there isn't a nice UI to give you a green bar with shell scripts, but you can still get a list of pass/fail stats. Groovy scripts, of course, can be run in an actual JUnit runner.
    If you're finding it too hard to test scripts, like perhaps there are too many different flows of execution through the script, it's worth considering whether the task-at-hand is really a scripting job at all. The sweet spot for scripts is gluing together the stuff that performs all the complex logic.
    What are the best practices recommendations for such a scenario, I am sure there much be something about it or some pattern or anti pattern dealing with it and some review of such an implementation. Don't you think so?I hope so! I've been tasked with documenting a scripting standard written by another developer, finding references to cite and such-like. There do exist coding standards on the web for scripting, shouldn't be too hard to find something useful. As for reviews, I expect simple peer review by someone else who knows scripting is about as good as it's going to get.
    I'd add that logging plays an important part in scripting, just as it does in your "real" code

  • Support about using PL with Adapter (WebService)

    Hi,
    My Name is Antonio Cejudo, i have a problem with PL execution through an adapter because when a test run, the adapter try to do commit and PL too. The adapter send the next message:
    The selected operation execute could not be invoked
    An Exception ocurred while invoking the webservice opration. Please see logs for more details
    Hide Additional Trace Information
    Java.lang.Exception:
    oracle.sysman.emSDK.webservices.wsdlapi.SOAPTestException:Se ha producido
    una excepcion al llamar al enlace de JCA: ""JCA Binding execute of Reference
    operation 'PLTaar08Individualiza' failed due to :Error  de llamada al procedimiento
    almacenado. Error al intentar preparar y ejecutar el API
    DBO.PKG_TRASP_INDIVRECEPTORA.PRC_PROCESA. Se ha producido un error al preparar y ejecutar la API
    DBO.PKG_TRASP_INDIVRECEPTORA.PRC_PROCESA. Causa: java.sqlException: ORA-04068: se ha anulado el estado
    existente de los paquetes ORA-04061: el estado existente del package body
    *"DBO.PKG_TRASP_INDIVRECEPTORA" ha sido invalidado ORA-04065: package body*
    *"DBO.PKG_TRASP_INDIVRECEPTORA" no se ha ejecutado por que se ha modificado o borrado ORA-06508: PL/SQL:*
    no se ha encontrado la unidad de programa llamada: "DBO.PKG_TRASP_INDIVRECEPTORA" ORA-06512: en linea
    *1 Asegurese de que la API esta definida e la base de datos y que los parametros coinciden la firma de*
    la API. Esta excepcion se considera no recuperable debido a un error de modelado. Para clasificarlo
    como recuperable en su lugar ,agregue la propíedad nonRetriableErrorCodes con el valor "-4068"
    al descriptor de despliegue (es decir, weblogic -ra.xml)
    I found that if i use next instruction in the PL, the message stop showing, but the execution of the PL is not stable (Sometimes ok sometimes not ok):
    PRAGMA AUTONOMOUS_TRANSACTION
    The Question is, Are there some way to setup the adapter to avoid the execution of the adapter’s commit ??
    Thank for your help

    I suggest you look at the error code to see what is the problem. Ex
    http://oraclequirks.blogspot.com/2007/03/ora-04061-existing-state-of-package-has.html
    If you do not sant commit, throwing an exception can help.

Maybe you are looking for