Catching the results of tcode into a custom program

Hi Experts
I need to call the t-code IP19 (program name is RIMHIS00) with input values from a custom program and need to capture the results of IP19(structure : rimhis01) into a internal table in custom program for further processing.
Can anybody help  please -- <<Removed>>
Thanks
Satya
Edited by: Rob Burbank on Sep 1, 2010 11:47 AM

Hi, 
this is the Way you can  capture the other program output in this Report.
**** Subroutine to get the print parameters
  PERFORM get_print_parameters.
  CONCATENATE 'QU'
               sy-datum+4(4)
               sy-uzeit INTO
               wa_pri_params-plist.
*   Submit report in background and creating spool
  SUBMIT (w_rname) USING SELECTION-SET p_var
      TO SAP-SPOOL WITHOUT SPOOL DYNPRO
      SPOOL PARAMETERS wa_pri_params AND RETURN.
  COMMIT WORK AND WAIT.
*   To fetch the spool number from TSP01 table
  IF sy-subrc EQ 0.
    SELECT rqident
           FROM tsp01
           INTO p_spool
*             UP TO 1 ROWS
           WHERE rq2name = wa_pri_params-plist.
    ENDSELECT.
  ENDIF.
* Fetching Spool data into internal table
  CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
    EXPORTING
      rqident              = p_spool
    TABLES
      buffer               = t_mail_data.
"the spool data is nothing But the output data of the report
prabhudas

Similar Messages

  • How to save the results of patindex into a variable?

    I would like to save the results of a patindex into a variable. The commented out line below is the line with the problem.
    CREATE TABLE #LocalTempTable(
    UserID int,
    UserName varchar(50),
    UserAddress varchar(150))
    insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 West 9999 East|$75|this one')
    declare @var1 int
    set @var1 = -99
    select patindex('%West%', UserAddress) from #LocalTempTable
    --select patindex('%West%', UserAddress) into @var1 from #LocalTempTable
    select @var1
    -- The desired result would be a number 6 in the variable @var1

    Assume you will have a where condition as well:
    CREATE TABLE #LocalTempTable(
    UserID int,
    UserName varchar(50),
    UserAddress varchar(150))
    insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 West 9999 East|$75|this one')
    --insert #LocalTempTable (UserID,UserName,UserAddress) values (0,'user1','1209 East 9999 East|$75|this one')
    declare @var1 int
    set @var1 = -99
    select @var1=patindex('%West%', UserAddress) from #LocalTempTable --where UserID=0
    --select patindex('%West%', UserAddress) into @var1 from #LocalTempTable
    select @var1
    Drop table #LocalTempTable

  • Creating support desk ticket based on the result in TCode : STWB_WORK

    Hi All,
    I am now under the process of TEST Management.
    I had done creating and assigning Test Packages to the tester.
    When tester tries to test their respective package in STWB_WORK, the result will be success or failure (with errors or warnings)
    Now I want to create a support desk message automatically when the result is not success.
    I had developed program for creating support message but I am unaware of where to incorporate the program and how to retrieve the values of the error message.
    Earlier I planned to have workflow so that when the user executes the test, we can automatically perform support desk message creation.
    But the error message is initially shown in the ECC Server and then only updated in SOLMAN.
    Please help me to create support ticket automatically.
    Thanks in advance
    Saman

    Hi,
    please check function module STAT_OBJECT_EDIT_TW.
    It is called when a test case is edited.
    You can enhance it at the end. There you have the old status value and the new status value. If the new status value is an error status and not the same as the old status, you can create a support message with your program.
    Regards,
    Christoph

  • Can I catch the resulting TopLink query in the JSF backing bean?

    Hello!
    I'm using a JSF in my application. In my case, data on the JSF Pages is based on a TopLink queries, which usually have some parameters. Such a construction works fine except one moment.
    For export data purposes, I need to catch the generated text of query evidently, suppose, in a Page's backing bean.
    Is it possible to perform this action and how to?
    Thanks.

    generally speaking, you can just throw one exception a time. you can throw your own application but you can't throw both SQLException and your own.

  • [JCOP Shell] how to get the result of a script into a variable ?

    Hello all,
    I have a jcsh script that swaps the Two nibbles of an hexadecimal number.
    #swap.jcsh
    X= 0xAB
    R= $(/expr $(/expr ${X} << 4 ) + $(/expr ${X} >> 4 )  )
    /echo 0x${R;h2} the value echoed is 0xBA, right.
    now, I want to replace the X varibale by an argument variable ( ${1} ) and , instead of echoing the result, storing it into another varibale; example :
    Y= swap 0x23this is not working. ;-(
    Does anyone knows how to do it ? is there a "return" equivalent to put at the end of my "swap" script ?
    mkdata are you there ? :)
    Kartagos

    Thank you very much mkdata
    I solve it temporarely by using a global Variable TEMP that will be used by scripts to store the result, then the caller script will simply read the value of this variable (old old school global variable method :) )
    now I'm considering re-writing my libraries
    I knew that there something "DEFUN" but i didn't find any help (when typing "help /error" it talks about something called "defun")
    I think I should write to the JCOP Team to update their docs.
    Regards
    Khaled

  • Overuse of Exceptions? (and the resulting performance)

    I seem to have developed the bad habit of putting way too many exceptions. I've read somewhere that, especially on Mobile, misuse of exceptions can cause significant performance decrease. Is this true?
    Basically, I have a certain hierarchy of functions and when in the lower functions I may be doing a try-catch , the result of which throws the exception upward. Like this:
    void topFunction(){
        try{middleFunction();}
        catch(Exception e){System.out.println("Error " + e);}
    void middleFunction() throws Exception{
       lowerFunction();
    void lowerFunction () throws Exception{
        try{ //something }
        catch(Exception e){throw new Exception("in lowerFunction:"+ e);}
    }Is this horribly wrong? I'm trying to create a kind of custom stack trace, I guess, but I suppose if this is a bad idea I can remove it. I've noticed that a large majority of my functions use "throws Exception" and I'd very much like to know how more experience developers implement graceful error handling otherwise.
    Thanks in advance for any advice.

    Not a very timely answer, however I had a similar problem and found this solution in case anyone else needs to do this.
    Set the system property: sun.awt.exception.handler to the full name of
    your own class defines as follows:
    public class MyAWTExceptionHandler {
       public MyAWTExceptionHandler() {}
       public void handle(Throwable t) {
          // do whatever you like with the exception here...
          t.printStackTrace();

  • Urgent help needed in inserting data into a custom table in oracle WorkFlow

    Hi
    I am trying to get data from the WF and insert into a custom table..
    I read that workflow procedures WONT allow commits...
    Oracle Workflow will not support autonomous commits in any procedure it calls directly. If you need to perform commits, then embed your SQL in a subprocedure and declare it as an autonomous block. This subprocedure must be capable of being rerun. Additionally, note that Oracle Workflow handles errors by rolling back the entire procedure and setting its status to ERROR. Database updates performed by autonomous commits cannot be rolled back, so you will need to write your own compensatory logic for error handling
    Have anyone did this..
    Please give me some idea ...It is urgent
    I am getting data using getitemattribute..and try to insert it into a custom table
    thanks
    kp

    Pl do not post duplicate threads - insert dont work in Workflow
    Srini

  • How to get the result set in batches

    I have a query which results into large data. This data i want to display in a group of 20. After every 20 records i want to add header and footer to it.
    Is it possible to get the result set data into batch of 20 ? means can i specify start and end index of query ?
    regards
    Manisha

    What I am saying is that a big query with lots of
    joins will probably be slow, and as such would be a
    ripe candidate for batching the responses, if it were
    not possible to speed/optimize it. Batching is nice
    to look at for the user, but is not a solution for
    performance problems. In essence it is irrelevant
    that it adds a little performance deficit, as it
    appears to be running a lot quicker, and gives more
    feedback to the user.Then let me say it again....
    - "Join" is a term that applies to a method of doing queries in the database....
    - Query 1 which uses a join and returns 15 rows
    - Query 2 which does not use a join and returns 1500 rows.
    Given the above then Query 1 will provide better overall performance for the system than Query 2 in a properly configured database.
    If it doesn't then the database is not set up correctly.
    And again this will be irrespective of whether the query is scrollable or not.

  • Getting the internal table of standard program to my custom program

    Hi All,
    I have a requirement in which i have to get the data from internal table ALV_ITAB from program HKBRO20. As this is the standard program, i have copied this program into Z custom program and using export parameter i am getting the data from internal table ALV_ITAB to my custom program (Using submit of the Z of the standard program). Can any one pls tell me whether the process i am following is correct if not pls tell me how to get the internal table from standard program to our custom program.
    the process i am following
    submit ZHBRO20 and return. IMPORT ALV_ITAB  FROM MEMORY ID 'ABC'.
    copied HBRO20 to ZHBRO20.
    Thanks,
    Raju

    Hi,
    you could also try
    FIELD-SYMBOLS: <fc> .
    CONSTANTS: c_table(21)  VALUE '(PROGRAM_NAME)INTERNAL_TABLENAME[]'.
    ASSIIGN (c_table) TO <fc>.
    Depends on the process, of course.
    Cheers,
    Stefan.

  • How can we use the standard LDB in custom program.

    Dear all,
    can you please tell me the way , how can we use the standard LDB in custom program.
    Thanks & Regards,
    Jyothi.

    Hi
    You can use the Function module LDB_PROCESS to use the Standard LDB in your Z custome program for further details about using the Standard LDB and accessing the LDB in to the program search SDN
    http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/97/b3edb8163111d2953c0000e8353423/frameset.htm

  • Portugal Payment medium format - PS2 - configuration and custom program

    Hello,
    this is my first post here, so first of all "hi!" and second, sorry if this thread isn't in the right forum.
    I need to do a custom copy of the PS2 payment medium format, which is used in Portugal. It would be a short development, I just need that the line starting with ":08:" only appears when using a pre-defined payment method.
    I've seen that in the FBZP tcode, in the "Pmnt method in company code" customizing point, at the bottom there is this section, "Payment medium", where you can inform the Format (which it should be PS2) or the payment medium program (i think that for Portugal it's RFFOM100). You can only inform one option. Which one do you recommend? (I'm more used to work with purchase orders, so this are my first steps in the payment program)
    So my question is, in order to do this custom code, should it be a copy of the PS2 format (ZPS2?) or a copy of the RFFOM100 program? In any case, where can i look for the code section where to replace the standard SAP code for our custom program?
    Thank you very much!
    Warm regards,
    Gustavo

    Hi Gustavo,
    If you take a look in FBZP - Payment Method Country, you will see a "Payment Mathod" section. There you will have 2 payments programs type: Paymt Medium Workbench (PMW) and Classical.
    PS2 payment medium format is only used for PMW type and RFF* for Classical PM. These work to print and execute payments through F110.
    In my understading you should use PS2 because is the original need on your question.
    I hope I help you. Reply me if you have more questions.

  • I am automating the process of sending appointment reminders to my clients. I started with an alert with an email in calendar using the clients email address as a custom entry in my me card in my contacts. this was resulting in three emails being sent wit

    I am automating the process of sending appointment reminders to my clients. I started with an alert with an email in calendar using the clients email address as a custom entry in my me card in my contacts. this was resulting in three emails being sent with slightly different versions of the same address (see my previous post). Heating someone else's suggestion I created a workflow file to send an email and calling that file from an alert on my calendar. This is working and sends only one email to the client.
    My calendar is on I cloud and I access it from three different computers so I can keep my appointment calendar current. The files that send the email only exist on one computer. My other computers show error messages when those emails get sent. It seems that each computer wants to send the email. It's a small problem but is there a way that I could not get those alerts.
    But appreciate any thoughts about this. It seems like both problems might be related to the iCloud system.
    Thank you in advance,
    Michael

    Good work, catch so far Michael, does seem to be a "feature" of iCloud syncing, not sure what you could do to disable it.

  • Customer  exit to get the result in between two fiscal periods

    Hi Guys,
    I have a requirement  to write customer exit, in which i have to get the result for a range of fiscal periods,
    that is in Between   fiscal period1 and fiscal period3,
    and i am getting this Fiscal period from other variable called version in which it consists of combination of fiscalperiod and text
    and now i have filtered the fiscal period and stored in Final_val ( this is an interger), but  how can i use dynamically this Final_val to get the results in between Final_val1 and Final_val3 ( that means if the Final_val is 2008010 then i have to get the results in between 2008011 and 2009001).
    Please provide me the solution, with the possible piece of code

    Hi Diogo,
    Here is the code
    WHEN 'ZC_PVR'.
        DATA: FIN_YEAR(4) TYPE C,
              FIN_DATE(3) TYPE C,
              FIN_VAL(7) TYPE C.
        IF I_STEP = 2.
          READ TABLE I_T_VAR_RANGE INTO LT_VAR_RANGE WITH KEY VNAM = 'ZC_VCS'.
          IF SY-SUBRC EQ 0.
            CONCATENATE '20' LT_VAR_RANGE-LOW+2(2) INTO FIN_YEAR.
            CONCATENATE '0' LT_VAR_RANGE-LOW+4(2) INTO FIN_DATE.
            CONCATENATE FIN_YEAR FIN_DATE INTO FIN_VAL.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW =  FIN_VAL.
            L_S_RANGE-HIGH =  ''.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDIF.
        ENDIF.
    which i am using for Filter the fiscal period, after this when i tried to restrict on this "ZC_PVR" vairable and  set the offset like
    zc_pvr 1 to zc-pvr3 under value of ranges, but i am facing an error saying the " variable may be deleted or used incorreclty",
    could u plz suggest

  • Storing the output of a function module into a custom table

    Hi Gurus,
    Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?

    hi,
    After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
    data :wa type ITAB_RESULT.
    call FM and get result it ITAB_RESULT
    loop at itab_result.
    move-corresponding itab_result to wa.
    insert wa to ZRESULT.
    endloop.
    Regards,
    Mansi.

  • How the ORG_ID pass into OM Customer Search

    Hi all,
    I need some help for understanding how the ORG_ID pass into OM Customer Search (navigation OM Supper User >> Customers >> Summary).   We currently have MOAC settup with that responsibility.
    1. In R12 how the ORG_ID passing into each session, is it through FND_GLOBAL.APPS_INITIALIZE or MO_GLOBAL or?
    2. How can I see the runtime ORG_ID inside HTML or Forms.
    3. What is the function and package MO_GLOBAL.ORG_SECURITY in dba_policies for object_name like 'HZ_CUST%' mean?
    The result of searching is so inconsistent, sometime able to search customer but sometime are not, event it is the same address?
    Thank you.

    I have reviewed those note before.  I performed tested in sqlplus and it work as I expected but within HTML page through multiple responsibilities.  the search sometime work sometime not work.  I really want to know.
    1. How the ORG_ID passing through each session.  As far as I know the "FND_GLOBAL.APPS_INITIALIZE" no longer setting the operation unit in MOAC but rather than the MO: Default Operating Unit at the user level or responsibility level.  Is that mean when I switch responsibility it will perform a) cal FND_GLOBAL.APPS_INITIALIZE b) lookup profile value for MO: Default Operating Unit?
    2. What is the function and package MO_GLOBAL.ORG_SECURITY does?  Should I see that execute when I switch the responsibility every time?
    3. How can I validate the ORG_ID that passing into each session HTML page?
    I am confused because it is inconsistent.
    Thank you.

Maybe you are looking for

  • How do I copy the style from one control to another?

    I need to programmatically copy the style from one graph to another. I'm currently using the importstyle and export style functions but I'd like to avoid that since: 1) I'm creating >100 of the same graphs in a scrolling window and execution time is

  • How do I recreate my iCloud mail account on my iPad Air.

    Took my iPad Air to Genius Bar at Apple store bekse of frequent system crashes/freezes.  Tech removed all apps and system, then reloaded iOS.  Result was like having a new device with no Settings/ apps.  Tried to recreate settings, including mail acc

  • Not detected by windows or itunes

    My ipod is detected by my laptop because it makes the sound that tells me I have connected something in the USB port and I can also safely remove the ipod through the little icon in the bottom right of my screen (not in itunes or windows explorer). I

  • Substring and instring

    Dear all, I am very new to oracle. I am learning oracle now. I have small doubt could any one can help me. I have a string like 'robert alias: 09-047 position now:     CLARK' now i need to store the word '09-047' in to a variable x and clark in to a

  • IPhone 4S now in recovery mode after minor update os 8.1.3

    This morning I updated my iPad and iPhone to iOS8.1.3. The iPad update went fine, but the iPhone update has put my phone into recovery mode (showing a red iTunes logo). I've tried holding down the power button and home button until it reboots, then h