Call program and return with data

Hi, Experts,
I have called a program from my main program using SUBMIT
and return.
I need to get data back from called program in table format.
Is there any way to fullfill such requirement.
Regards
Rajiv singh.

if the program is custom , then you can use import and export  option. you can export the data to memory in the submit program, and import from memory after submit call.
if it Standard program , in some standard programs also will export data to memory , so check in inside the program.

Similar Messages

  • Call program using submit with variant that changing value

    Hi All,
    I need to call a report with variant and abstract the data back to my current program.
    so far,
    i use following method
    SUBMIT RFITEMAR USING SELECTION-SET 'XXX'
           EXPORTING LIST TO MEMORY
           AND RETURN.
    DATA list_tab TYPE TABLE OF abaplist.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
      DATA: L_ABAPLIST LIKE ABAPLIST OCCURS 0.
      DATA: BEGIN OF L_ASCITAB OCCURS 0, 
                LINE(2048),
              END OF L_ASCITAB.
      CALL FUNCTION 'LIST_TO_ASCI'
           EXPORTING
                LIST_INDEX         = -1
           TABLES
                LISTASCI           = L_ASCITAB
                LISTOBJECT         = list_tab
           EXCEPTIONS
                EMPTY_LIST         = 1
                LIST_INDEX_INVALID = 2
                OTHERS             = 3.
    However, the problem is that i need to get some value from variant 'XXX' and keep changing it.
    I have try function module "RS_VARIANT_VALUES_TECH_DATA" to get the variant details.
    But, it just doesn't get me back all the details of the variants.
    Are there any way i could read the variants in detail? i even try to read LRAW data from table vari. but there are no function module to convert the LRAW to either char or STRING.
    Thanks.
    Edited by: simplekx on Jun 20, 2011 4:43 PM

    You can use the FM "RS_CHANGE_CREATED_VARIANT" to change the variant values for already created variant and the FM "RS_VARIANT_CONTENTS" to get the variant values. Instead of changing the variant values and then passing to the Submit, you can directly pass the values to the Submit through..WITH SELECTION-TABLE seltab or ... WITH p IN sel variant of the Submit.

  • Is it possible to run Go URL SQL and return raw data using Java?

    Hi All,
    I just got GO URL SQL working in HTML, when i type the following URL on to the address bar.
    https://odsau.oraclecorp.com/analytics/saw.dll?Go&SQL=select+"MFG Serial Number"."Job Name","MFG Serial Number".Item+from+"Supply Chain Management"
    It prints out a table with all the data that query from the database in a HTML page. However, I want to be able to manipulate these data in a JAVA script.
    Is there a similar function i can use in Java script and return raw data so i can store them into a variable for data manipulation?
    Or is there a work around that someone has already done ?
    Thanks
    John Lau

    You can excute SQL statemetns throught JDBC, but that doesn't have a facility to read those statements from a file. You'd have to write code to read the file and create and execute statements through JDBC. That should be pretty straightforward though.
    It's conceivable that there's a third party library out there that does it, if you know what to look for.
    If you're not familiar with JDBC, check out http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How can i call ajax and extract the data?

    Hi all,
    I don't know briefly about ajax..i want to learn ajax, so my question is how can i call ajax and extract the data. for ex, i have JSON file
        "mobile": [
                "Name": "Micromax",
                "Model": A310
                "Name": "samsung",
                "Model": grand 2
    for above example how can i call ajax..please anyone explain with small example because it'll help me a lot.
    Thanks & Regards,
    Palsaran

    Hi Palsaran,
    As i understood, your requirement is to POST data from UI to backend.
    The above code you given is not correct if you want to use model based implementation.
    In UI5 you don't need to do an explicit Ajax call, for which we can use Models like OData, JSON etc.
    For your JSON example, you can use like,
    var oModel = new sap.ui.model.json.JSONModel();
    var oData = "YOUR JSON DATA";
    oModel.setData(oData)
    oModel.loadData(yourURL/Entityset,"POST");
    For ref, you can use the below link
    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.json.JSONModel
    Thanks
    Naveenraj

  • Calling a package procedure with Date parameter only

    Hi All,
    Please help me to call a package procedure with Date parameter from sql prompt.
    Arif

    Check the below procedure.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure procdate (p_date_in date)
      2  is
      3  p_date_out date;
      4  begin
      5  p_date_out := add_months(p_date_in,6);
      6  dbms_output.put_line(p_date_out);
      7* end;
    SQL> /
    Procedure created.
    SQL> exec procdate('01-JAN-2010');
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate(to_date('01/01/2010','DD-MM-YYYY'));
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate('31-DEC-2010');
    30-JUN-11
    PL/SQL procedure successfully completed.

  • Round and Trunc with dates

    Can i get the examples for Round and Trunc with dates?

    Hi Rahul,
    Check out this workout by Tom Kyte on TRUNC and ROUND -
    http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52sql-1735910.html
    Dont skip even a single line of it. Really useful.
    My little workout :
    Ranit>> select
      2  round(123.444) r1,
      3  round(123.999) r2,
      4  trunc(123.444) t1,
      5  trunc(123.999) t2
      6  from
      7  dual;
            R1         R2         T1         T2                                                                                                                                                                                
           123        124        123        123                                                                                                                                                                                
    Ranit>> select
      2  round(123.444,2) r1,
      3  round(123.999,2) r2,
      4  trunc(123.444,2) t1,
      5  trunc(123.999,2) t2
      6  from dual;
            R1         R2         T1         T2                                                                                                                                                                                
        123.44        124     123.44     123.99                                                                                                                                                                                
    Ranit>> select
      2  round(123.1234,2) r1, -- "Rounds upto 2 Decimal places"
      3  round(123.1266,2) r2, -- "Rounds upto 2 Decimal places"
      4  trunc(123.1234,2) t1, -- "Keeps only 2 decimal places and Truncates the rest"
      5  trunc(123.1266,2) t2  -- "Keeps only 2 decimal places and Truncates the rest"
      6  from
      7  dual;
            R1         R2         T1         T2                                                                                                                                                                                
        123.12     123.13     123.12     123.12                                                                                                                                                                                
    --"Note the difference in R2 andT2 values : In R2 there's a data round-off done but in T2 it is simple cut-off of extra decimal part"HTH
    Edited by: ranit B on Jan 26, 2013 7:24 PM

  • ME293 is a good for programming and work with coreldraw and rhino ?

    ME293 is a good for programming and work with coreldraw and rhino ?

    No there is not. You are correct that Verizon will unlock it for international use, but they will not unlock it for domestic use. That is the way the US carriers work. Fortunately, the LTE enabled phones for Verizon are different. They are unlocked at the start on the GSM side, this was a requirement from the FCC for the allocation of additional LTE frequencies for Verizon. Not sure how long this will last, but your only choice is to use Verizon or to obtain a different phone. That 4S will not work with AT&T.

  • How to call an alv report from another program and return back

         Hello ,
    I am calling one abap program (Prgm B) from another program (Prgrm A).
    Here, Prgm B is an ALV report. I have fetch some data from Prgem B that gets stored in an internal table.
    Now, I am using below code in Prgrm A,
      SUBMIT Prgrm B VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          EXPORTING LIST TO MEMORY
                          AND RETURN.
    When Prgrm A executed, it lead me to selection screen of Prgrm B and when I click F8, it shows me the report output, In short, it doesnt return back to Prgrm A. It ends up showing me the alv report if Prgrm B even afetr using RETURN statement.
    I want to get back to Prgrm A by fetching some data from Prgrm B.
    Please let me know, if i am missing something.
    Regards,
    Seema

    Hi Seema,
    Refer below code.
    DATA: v_matnr LIKE mara-matnr.
    DATA: t_listobject TYPE abaplist OCCURS 0 WITH HEADER LINE.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_ascilist OCCURS 0,
             line(200).
    DATA: END OF t_ascilist.
    data var(3) type c.
    SELECT-OPTIONS: s_matnr FOR v_matnr.
    var = '  3'.
    START-OF-SELECTION.
       SUBMIT ztestaks1 WITH s_matnr IN s_matnr EXPORTING LIST TO MEMORY
       AND RETURN.
       CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
                 listobject = t_listobject
            EXCEPTIONS
                 not_found  = 1
                 OTHERS     = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ELSE.
         CALL FUNCTION 'LIST_TO_ASCI'
    *     EXPORTING
    *       LIST_INDEX               = -1
    *       WITH_LINE_BREAK          = ' '
           TABLES
             listasci                 = t_ascilist
             listobject               = t_listobject
           EXCEPTIONS
             empty_list               = 1
             list_index_invalid       = 2
             OTHERS                   = 3.
         IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ELSE.
           WRITE:/ 'Below are the lines from the submitted program.'.
           LOOP AT t_ascilist.
             WRITE:/ t_ascilist-line.
           ENDLOOP.
           SKIP 2.
         ENDIF.
       ENDIF.
       IMPORT t_mara FROM MEMORY ID 'T_MARA'.
       WRITE:/
    'Here is the output from the table exported from the submitted program.'
       LOOP AT t_mara.
         WRITE:/ t_mara-matnr.
       ENDLOOP.
    Submitted program
    REPORT  ZTESTAKS1.
    DATA: v_matnr LIKE mara-matnr,
           v_maktx LIKE makt-maktx.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_makt OCCURS 0,
             matnr LIKE makt-matnr.
    DATA: END OF t_makt.
    SELECT-OPTIONS: s_matnr FOR v_matnr,
                     s_maktx FOR v_maktx.
    START-OF-SELECTION.
       SELECT matnr INTO TABLE t_makt
                    FROM makt
                   WHERE matnr IN s_matnr
                     AND maktx IN s_maktx.
    if not t_makt[] is initial.
       SELECT * FROM mara
                INTO TABLE t_mara FOR ALL ENTRIES IN t_makt
               WHERE matnr = t_makt-matnr.
    endif.
       EXPORT t_mara TO MEMORY ID 'T_MARA'.
       WRITE:/ 'This list is from the submitted program'.
       SKIP 1.
       LOOP AT t_mara.
         WRITE:/ t_mara-mtart.
       ENDLOOP.
    Hopes this helps you.
    Thanks,
    Ashok.

  • How To call a Tcode From a Program and returning back ?

    Dear All,
    I have a requirement, i have to show all the open orders as in the the tcode va05  and return back to the my program. so how to display the tcode and getting back to my program. please help?

    Hi,
    Basic syntax to call the transaction is:
    SET PARAMETER ID <id name> FIELD <filedname>.
    CALL TRANSACTION <TCOde> AND SKIP FIRST SCREEN.
    If your are using ALV then snippet is :
    FORM user_command  USING okcode    LIKE sy-ucomm
                           lselfield TYPE slis_selfield.
      CASE okcode.
        WHEN '&IC1'. " SAP standard code for double-clicking
          CASE lselfield-sel_tab_field."check if double click is only on
            WHEN 'ITAB-AUFNR'."aufnr not on any other field
              SET PARAMETER ID 'ANR' FIELD lselfield-value.
              CALL TRANSACTION 'IW32' AND SKIP FIRST SCREEN.
          ENDCASE.
      ENDCASE.
    Endform.
    Pooja

  • How to get Spool Number after submtting the program and return

    Hi All,
    Could you please assist me on this issue. I have ABAP program which will create a spool number and this spool number is generated by submitting the same report. Now when try to retrive the spool number from sy-spono it is displaying as 000000 but it suppose to be the spool which is created during submit program. COuld you please assist me on this issue. I have added the part of code for your reference,
    DATA: l_params TYPE pri_params,
    l_valid TYPE string,
    w_spool_nr like sy-spono,
    p_m_werks like marc-werks.
    export p_werks to memory id 'P_WERKS'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
    out_parameters = l_params
    valid = l_valid
    IF sy-subrc <> 0.
    ENDIF.
    import p_werks from memory id 'P_WERKS'.
    p_m_werks = p_werks.
    SUBMIT zmmlist01 with p_werks eq p_m_werks
    to SAP-SPOOL
    spool parameters l_params
    without spool dynpro and return.
    write: sy-SPOno.
    Thanks & Regards,
    Nagaraj Kalbavi

    Hi,
    You can use the code snippet as below :
    SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
    FROM TSP01
    WHERE RQCLIENT = SY-MANDT AND
    RQOWNER = SY-UNAME.
    Also you can use the FM RSPO_FIND_SPOOL_REQUESTS' and pass the relevant parameters to this FM. This should get you the desired results.
    Hope this would be of some help!!
    Regards,
    Lalit Kabra

  • Submit Statement for calling smartform and using its data in another report

    Hello Everybody
    There is one report which display smartform as an output.  My requirement is to call that report and return back without showing its output and use its data for futher use in the report. i Hope i m clear with my query. Plzz reply its urgent.
    Currectly i m using this statement :
    SUBMIT  ZPOPRINT  WITH PO_NUM EQ IT_EKKO1-EBELN exporting list to memory and return.
    while executing the program, after this statement i m getting an output.  but i need to store it in memory, not to display the output.
    Waiting for ur reply..
    Thanks and Regards
    Virendra

    Hi.
    I have not done this kind of requirement. What i said was just an option which came to my mind. Also not sure whether it will work for you. While submitting ,instead of exporting list to memory do submit to SAP-SPOOL. Then later read the spool content to internal table.
    I am referring you two links for this.
    [Submit to SAP-SPOOL|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_LIST_OPTIONS.htm]
    [Spool to Internal table|spool file data to internal table].
    Also search for related topic in SCN.
    Regards
    Kesav

  • Strange issue - WD4A when called from EP returns wrong data

    Hi Experts,
    I am facing a very strange issue with WD4A. I have created one RFC. WD4A program calls this RFC. When I am executing the RFC using se37 it gives me 10 records. When I am executing the same RFC from WD4A program (Web Dynpro Application -- Right Click -
    test) the program is returning 10 records.
    I have created one iView in Portal. When I am calling the same program from portal, sometimes it returns 9 records and sometimes 10 records. I just refresh the iview and no of records getting displayed in screen changes.
    I have cheked the code many times. The code is perfectly fine.
    I have used clear and refresh command in the beginigng  of  RFC.
    What may be wrong? I have wasted my full dayfor resolving the issue. But I could not succeed.
    Is it due to some BASIS issue? Is it due to some server session issue?
    I have used business graphics in my application. Is it due to this? Whether IGS server and ECC contain different data?
    Please suggest
    Regards,
    Gary

    Hi Experts,
    The System configuration in the EP  is pointing to the right system and right client. I am using same setting for other Iviews. The other iViews are working fine.
    How we can apply break point in WDA. I beliveve I have to meet following requirement:
    1) Suppose EP user is 4755. The EP user 4755 is mapped to R/3 user 4755 and R/3 pernr 4755.
    2) Backend R/3 user 4755 should have se80
    3) Backend R/3 user should have debug access.
    The authorization will not provide such accesses for backend user 4755.
    Do we have any workaround?
    Please help.
    Regards,
    Gary

  • Issue calling program from transaction with selection criteria

    Hi Guys,
        I ve a issue regarding calling a program from transaction.
    There is a standard transaction calling a program  using selection criteria no (say for eq 10 fields, just look at the eg below)
    Submit  <table-proname> and return using selection-set <table-varia>
    With rbukrs  = i_bkorm-burks    “Comp Code
    with  Revent = i_bkorm-event  “ event
    with rbelnr  = ibkorm-belnr     “Doc no
    with rgjahr = ibkorm-gjahr   “fiscal year
    with ruzeit = ibkorm-ruzeit  “time
    with rusnam = ibkorm-rusnam “user name
    And so on
    Now, In my program selection screen  i  ve only three fields, (not all mentioned above)
    Parameter:
    Rbukrs  type bukrs, “comp code
    Rbelnr type belnr, “doc no
    Rghar type gjahr.  “fiscal year
    Now, i configure this transaction with this program i can able to run this program  from transaction.
    Is every thing go right, Pls give your sugg
    Points & help awarded.
    Thanks in advance.

    Hi,
    you can call the program using 3 selection screen fields even though it is having 10 fileds, but before calling make sure that there is no mandatory fields (in rest of the 7 fields), then it will runs you report.
    reward if needful.
    Thanks,
    Sreeram.

  • I have already paid the licence and I still get the notice "We can't verify your subscription" whenever I open the program, and the expiration date is tomorrow. What should I do?

    I have the following problem. Yesterday I paid the licence for Illustrator with my credit card and I correctly received in my e-mail, the payment confirmation. However, whenever I try to open the program I get the following message "We can't verify your subscription". You are offline or there's a problem with your invoicing account. Sign in to manage your account and verify invoicing data. If you have any further problem or question, contact the "Customer service". So, what should I do?

    maca,
    You may try to restart the Creative Cloud application by quitting and relaunching it.
    Failing that you may try Creative Cloud support (all Creative Cloud customer service issues),
    http://helpx.adobe.com/x-productkb/global/service-ccm.html
    or Adobe Support (phone),
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html

  • Executing Java CGI Program and Returning Result to Browser

    Hi all, I'm an experienced ASP/PHP/JS programmer but completely new to Java. I'm building a site where I need to execute the same piece of code in every language I can manage, and I'm onto Java. For the purpose of illustration, my goal is to replicate the following PHP code as Java code:
    <?php echo($_GET['message']); ?>I've written and compiled a "Hello World!" application and uploaded it to my server (Dreamhost shared hosting, Linux platform with JDK installed). Using this line form telnet, the application prints "Hello World!" to the screen:
    java -classpath . helloworld.classSo, following a very old tutorial I found online, I created a CGI script and CHMOD'd it to 755 containing the following:
    #!/usr/sh /usr/bin/java -classpath . regex.classBut this returns a 500 "Internal server error". After a few unsuccessful alterations I tried to emulate the CGI script in PHP like so:
    <?php exec('java -classpath . regex', $output); echo(join($output, '<br />')); ?>But all I get back from that is "Error occurred during initialization of VM. Could not reserve enough space for code cache".
    Any advice would be very much appreciated. I can learn the Java language - there's plenty of resources available for that, but I'm struggling to get started because I can't get the application to run as CGI.
    Many Thanks,
    -William

    wwarby wrote:
    Hi, and thanks for the responses.
    paulcw, my ultimate goal is obviously a little more ambitious than printing "Hello World!" to the browser but for simplicity's sake I thought I'd start there. I tried this in a .cgi file:
    #!/bin/sh
    /usr/local/dh/java -version...and I still get a 500 internal server error. I have uploaded the script in ASCII mode and CHMOD'd it to 755, and checked with my host that I have the Java path correct (I've also tried just "java" and "/usr/bin/java" which do the same thing).Well that's because you're confusing running Java generally vs running it as a CGI vs running ANYTHING as a CGI. The web server expects CGI scripts to send certain content to standard output, and in a certain format. Generally speaking it's headers, then a blank line, then other content.
    Furthermore, I think you might be confusing executing arbitrary code from PHP vs executing a CGI script. I'm not familiar with PHP but the way you called exec suggests to me that it can run arbitrary code and doesn't expect the output to necessarily be in CGI format.
    You've got to do things one step at a time here.
    spoon_, the #!/usr/sh" thing was a mistake on the forum post - in the script it is "#!/bin/sh" and it is on a line of it's own. The full .cgi file is now:
    {code}#!/bin/sh
    /usr/local/dh/java -classpath . hello{code}
    And the .java file is now:
    {code}class hello {
         public static void main(String args[]) {
              System.out.println("Content-type: text/html");
              System.out.println();
              System.out.println("Hello World!");
    }{code}
    as per your instructions. I compliled it on the server using javac, and when I run:
    {code}java -classpath . hello{code}
    in telnet, it returns:
    {code}Content-type: text/html
    Hello World!{code}
    to the telnet window. Unfortunately when run from the CGI script I still get the 500 Internal server error.Have you checked your web server logs?
    I'm going to guess here that your web server doesn't have permission to run the JVM executable.
    That's an interesting path: "/usr/local/dh". What does "dh" stand for?
    My server definitely supports Java (version 1.5.0_02) and CGI - it says so on their Wiki and specifically mentions Java as one of the languages that CGI scripts can use. What am I doing wrong?
    Edited by: wwarby on Dec 25, 2007 1:30 AMCheck your web server logs. There should be both an access log and an errors log. The errors log will probably contain more information.

Maybe you are looking for

  • Music only plays thru the speakers by inserting a plug in the headphone jack. pavilion dv6-6127cl

    HP Pavilion dv6-6127cl  (Notebook PC) I have spent over 6 hours on the phone with tech support, but I remain unable to have any sounds go directly to my built-in "Beats" speakers.   I can make the speakers work if I insert a plug into the headphone j

  • How to find out what code called the procedure

    Hi, I'm doing an error logging api, that will log errors when it's called. What I wasn't to know is if there's a way to find out what procedure/function called the api? One way is to pass the function as a text variable but it would be cool if the ap

  • WRT54G drops connection

    Hi everybody. I just got a WRT54G router and installed it right away. I use an iMac (wired) and an iBook G4 (wireless). At the beginning it was working well, but after about an hour using it the connection dropped. I restarted the router, after this

  • Set visible Tab in JTabbedPane?

    How to do this programatically? advTHANKSance

  • Installing Apps Via Nokia Suite Error !

    Whenever i Try To Download An Application From Nokia Ovi Store With Nokia Suite To My Phone Nokia N8 ,, I Get This Error ,,,,,   Plus ,, I've Checked  My Phone Date And The Pc Date ,, and nothing is wrong ,, and the memory is empty also .. !! Attachm