Using Field symbol to fetch data from another program

I have a requirement where i need to fetch value  of a field from one of the function pool so i have written a sample progam to check the logic but its doest seems to work its giving dump.
Basically i want to know how to use <programname><fieldname> with fieldsymbol.
REPORT ztest1.
DATA test(25) VALUE 'ggg'.
submit ztest.
report ztest.
constants: lv_memory(25) type c value '(ZTEST1)TEST'.
field-symbols: <fs2> type char25 .
assign (lv_memory) to <fs2>.
write : <fs2>.
I am getting same field symbol assignment dump

Hi Rahul,
You can use this concept in between the FUNCTION MODULES where both are
under same FUNCTION GROUP ( as both the FM's have same global memory area ).
And also if you are calling an FM or method from your program  ,you can have the data of the calling program in that called FM or METHOD.
Hope this may help you.
Regards,
Smart Varghese

Similar Messages

  • Fetch data from another mirosoft sql server to sap

    Dear all,
                   I want to fetch data from another mirosoft sql server
                    to SAP(my sap server IN unix, oracle 10g).
    Thanks
    Shashi
    Moderator Message: Try to do you own research before posting your question. Get back to the forums in case you are stuck with any issue
    Edited by: Suhas Saha on Jul 26, 2011 3:21 PM

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • Recieve data from another program

    hi, i'm trying to recieve some kind of data from another program i know where is the output of the program the problem is that i don't know how to get these datas. for example my program is writing the output in a temporary file but i'd like to recieve these datas without a temp file. the question is: Is possible to make a class that be listening to the meddle and when any program send any data to its it recieves??? if yes how can i do it?
    i'm working with girds and is easy to descover where my output will arrive the only problem is how to recieve.
    Thanks

    Or a pipe. In unix you can create a named pipe with mkfifo, which can hadilly do this kind of transfer.

  • FIELD SYMBOL  : - Get Data from Another program

    Hi Gurus,
    I have a Z program - ZPROG1.
    I need to get the value of a variable V_VAR1 from program RV63A712 which is a routine.
    How can i get the value of V_VAR1 from RV63A712 into my program ZPROG1. using field symbol .
    The main program of RV63A712 is SAPLV61A.
    For example .
    The program RV63A712 is as below.
    *&      Form  FRM_KOND_BASIS_712
          Copper Price Participation
          John May  09/01/2009
    FORM frm_kond_basis_712.
    V_VAR1 = B_KBETR + G_KWERT .
    ENDFORM.
    Avi

    hello ,
    try this sample code...
    data: c_progvar(30) type c value '(RV63A712)V_VAL1'.
    data: v_val1 type wrbtr.
    field-sybmol: <fs> type any.
    assign (c_progvar) to <fs>.
    if <fs> is assigned.
      v_val1 =  <fs>.
    endif.
    regards
    Prabhu

  • Fetch data from another URL

    Hi all,
    i need the code that can fetch the data from another URL like i need the new from different site and put into my database and then website useing the jsp or u tell me in which and how.
    thanks in advance.. URGENT
    Waiting................................................ UR rpely..................

    Hi,
    People generally ignore "URGENT" pleas on this forum... it's only urgent to you.
    You probably want to do a search for "web scraping"... basically parsing HTML pages as XML, and extracting the results.
    Recently dcminter posted a link to a very good article from the IBM website, which you should read.
    http://www-128.ibm.com/developerworks/java/library/j-jtp03225.html
    regards,
    Owen

  • Fetching Data from Another Entity (Lookup) - Done in 4.0 and needs to be done in 2013

    We have a situation where we need to grab associated fields from a filtered lookup.  We're willing to use javascript in conjunction with with either odata, soap or fetchxml.  The goal is to bring in numbers from a custom entity and then fill in
    fields to do mathematical calculations.
    Basically on change of a lookup, you grab data, put it on the form, then perform the calculations.
    Here is how the code used to work.  How would you achieve the objective in 2013?
    function Literature1_onchange()
    if (crmForm.all.ftgbase_literature1id.DataValue != null)
       crmForm.all.ftgbase_quantity1.DataValue = 11;
       crmForm.all.ftgbase_total1.DataValue = null;
       var idToFetch = crmForm.all.ftgbase_literature1id.DataValue[0].id+
       //Create AJAX request
       var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       xmlhttp.onreadystatechange = function() {
           //A value of 4 indicates that the response has been returned
    successfully
           if (xmlhttp.readyState == 4) {
               strXML = xmlhttp.responseText;
               var bundleQty = ReturnValueFromXML
    (strXML,'BundleQuantity');
               var maxQty = ReturnValueFromXML(strXML,'MaxOrderQty');
               if (maxQty != null && maxQty != "null"){
                   crmForm.all.ftgbase_litmax1.DataValue = parseInt
    (maxQty) ;
               }else{
                   crmForm.all.ftgbase_litmax1.DataValue = null;
               if (bundleQty != null && bundleQty != "null"){
                   crmForm.all.ftgbase_bundlequantity1.DataValue =
    parseInt(bundleQty) ;
               }else{
                   crmForm.all.ftgbase_bundlequantity1.DataValue = null;
       GetRecordXML(xmlhttp, UserInfo._orgId, 'GetLiterature', idToFetch,
    'GetLiterature', idToFetch );
    else
       crmForm.all.ftgbase_bundlequantity1.DataValue = null;
       crmForm.all.ftgbase_total1.DataValue = null;
       crmForm.all.ftgbase_quantity1.DataValue = 11;
    We're willing to either get a method working similar to this or go another route, but not a fetchxml grid, we need to preserve historical data.

    Hi,
    To Retrieve from other entity and populate the fields, for example on entering the account name in opportunity form the fields from account form like Sector, Region can be retrieved and can be auto populated in opportunity form using Odata as follows.
    Call the function getAccountDetails in onchange event of Companyname. Do not forget to add Jquery
    and Json in libraries.
    function getAccountDetails() {
        var companyName = Xrm.Page.getAttribute("customerid").getValue();
        if ((companyName != null)) {
            var companyNameValue = companyName[0].name;
            var companyNameID = companyName[0].id;
            var serverUrl = Xrm.Page.context.getServerUrl();
            //The XRM OData end-point
            var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
            var odataSetName = "AccountSet";
            var odataSelect = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "(guid'" + companyNameID + "')";
            //alert(odataSelect);
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                datatype: "json",
                url: odataSelect,
                beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
                success: function (data, textStatus, XmlHttpRequest) {
                    var result_account = data.d;
                    var name;
                    var Id;
                    var entityType;
                    //replace the fields with the fields on your entity
                    Xrm.Page.getAttribute("new_sector").setValue(result_account.new_Sector.Value);
                    Xrm.Page.getAttribute("new_region").setValue(result_account.new_Region.Value);                     
                error: function (XmlHttpRequest, textStatus, errorThrown) { alert('OData Select Failed: ' + odataSelect); }
    Also as another option if you donot wat the java script then you can go for a workflow to poplate, please refer this link:  https://www.powerobjects.com/blog/2013/11/25/retrieving-data-from-a-related-entity-crm-2013/
    Reference: link
    Regards, Rekha.J

  • Using Java to Log Data from another program

    I have a program that I want to log data from while the program is running. The program has a textarea that gets updated with data from the internet. I want to be able to read this textarea and store the data so it can be analyzed later.
    I don't know what the program was written in, only that it is running on Windows.
    Can Java "watch and read" another program?

    i think that easyest way would be to listen for network traffic and then parse relevant information from there...
    you could make a java app to act as proxy for that programm (maybe) and then log everything that goes through socket, or if you don't want to do that, then you could also use some other software that can listen network and look from there information that intrests you...
    of other softwares id recommend somekind of Iris soft that i used 3-4 years ago... realy easy to use nd runs on windows as well... even better would be ngrep, but i don't know if it has any windows versions...

  • Using import script to read data from another location

    Hi,
    I need to find a way to import, in one location, the data of all other locations (with some additional transformations) using an integration script.
    I think I should be able to read from the recordset returned by farsTable, but I need to know how to find the table name that contains the data from my other locations.
    Thanks in advance,
    Julien

    First you will need to read the tpovlocation table to get the location key and segment key for each location to be read. You can then either read the relevent tdataseg(index) table where the index is the segment key from the location table, or alternatively you could try to access the data from the View (which i think is Vdata) in which case you you will not need the segment key.

  • Using a paramter to fetch data from database

    Hello SAP,
    Is there a way to use a parameter that takes in the employee ID and have it fetch from the database the employee name.  Just to note, the tables that I am using in this report do not link to the employee table that contains the employee name. I just want to be able to use a parameter that can fetch me the name from the database dynamically so that it prints in the report header. 
    Is this possible?
    Thanks in advance,
    Z

    Thanks for your responses all.
    I tried what you've recommended. I tried but it didn't seem to work.  Perhaps I misunderstood so please let me know if I did.  I'll elaborate a bit more of what I'm looking to achieve.
    I have a report that gives information that pertains to an employee.  The three tables in the report have no reference to the employee table (meaning I cannot link the Emp ID field to any field of the three tables).  We as the firm know based on coding within the three tables which employee the records within the report beloing to.
    So basically, I want to be able to display the employee's full name in the Report Header by using a parameter.  I want to enter the employee ID in the parameter field and have it display the employee name in the report header.
    I tried to insert the Employee table in my report as the only "unlinked" table in my report.  I tried to create a formula as:
    @Employee Name
    if {?Emp ID} = {Employee table. Emp ID} then
    {Employee Name}
    This resulted in as a null value when I inserted it into the report header.
    I also tried creating a formula as such:
    @Employee Name (2nd)
    BeforeReadingRecords;
    Global StringVar FullName;
    if {?Emp ID} = {Employee table. Emp ID} then
    FullName:={Employee Name};
    This did not work either as the error message stated the field {Employee table.Emp ID} must be evaluated later.
    If I'm heading in the wrong direction can someone steer me back into the right direction? 
    Sastry, if I need to use the Add Command feature to fetch the data, is there a way to dynamically insert the parameter value in the SQL so that only the record that you want to be brought back into your report comes back?
    Thanks again to all!
    Z
    Edited by: Zack H on Jan 19, 2009 8:34 PM

  • Fetching record from another program

    hi all,
             is it possible to fetch a record from SAP database,
    using .NET program.....
    thanks in advance.

    Hi Bharanidaran,
    I am talking about reading (!!!) the database. SAP will (probably) not support that, since they don't know what you are exactly doing. But it is possible. There are no build-in restrictions or something like that. You should have an eye on the performance of your statements. Moreover you must make sure that there are no blockings or other negative effects on the database disturbing SAP operations.
    But, if you mean any legal restrictions... I don't know.
    Regards,
    Sven

  • How to populate one internal table from another using field symbols

    Hi Gurus,
      I have a problem. I have to populate one internal table (sructure t_otput) from another internal table (sructure t_from) using field symbol.
    Structure for from table.
    types: begin of t_from,
             year(4) type c,
             ww(2) type c,
             site type marc-werks,
             demand type i,
           end of t_from.
    Structure for output table.
    types: begin of t_display,
             title(30),
             WW1(10),
             WW2(10),
             WW3(10),
           end of t_display.
    The from table looks like this:
    Year | WW | Site | Demand
    2005 | 1  | OR1  | 12.00
    2005 | 2  | OR1  | 13.00
    2005 | 3  | OR1  | 14.00
    The display table which has to be populated should look like this:
    Title  | WW1   | WW2   | WW3
    OR1    |       |       |
    Demand | 12.00 | 13.00 | 14.00
    How to populate display table using field symbol?
    Please give code snippets
    Thanks,
    Gopal

    Gopal,
    Here is the code, however I am not vary clear about the ORG1 and Demand display that you have shown in the display. I am sure with this code it should not be a big deal to tweak in whatever manner you want.
    TABLES : marc.
    TYPES: BEGIN OF type_display,
    title(30),
    ww1(10),
    ww2(10),
    ww3(10),
    END OF type_display.
    TYPES: BEGIN OF type_from,
    year(4) TYPE c,
    ww(2) TYPE c,
    site TYPE marc-werks,
    demand TYPE i,
    END OF type_from.
    data : t_from type table of type_from,
           t_display type table of type_display.
    field-symbols : <fs_from> type type_from,
                    <fs_display> type type_display.
    data : wa_from type type_From,
           wa_display type type_display.
    wa_from-year = '2005'.
    wa_from-ww   = '1'.
    wa_from-site = 'OR1'.
    wa_from-demand = '12.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '2'.
    wa_from-site = 'OR1'.
    wa_from-demand = '13.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '3'.
    wa_from-site = 'OR1'.
    wa_from-demand = '14.00'.
    insert wa_from  into table t_from.
    data : variable(3) type c.
    field-symbols : <fs_any> type any.
    break-point.
    Loop at t_from assigning <fs_from>.
    variable = 'WW'.
    wa_display-title = <fs_from>-site.
    concatenate variable <fs_from>-ww into variable.
    assign component variable of structure wa_display to <fs_any>.
    <fs_any> = <fs_from>-demand.
    endloop.
    append wa_display to t_display.
    clear wa_display.
    loop at t_display assigning <Fs_display>.
      write :/ <fs_display>.
    endloop.
    Note : Please award points if this helps you.
    Regards,
    Ravi

  • Receive POST data from another URL and process using Struts

    Hi there
    We have a website and as of now we are receiving some data from another URL which is received as an appended part of the URL. My application uses Struts and we process the received data and send back a response.
    Now my question is, I have been asked to change this behavior because there are more parameters now which cannot be passed through the URL. I am supposed to get the data from the other URL as POST data (as a form) and I have to create a new Struts action to receive this data, process it and send the response back to the requesting URL.
    Please explain me how to do this using some example code snippets.
    Thanks a lot

    Lookup in XI is used to call the target data storage system and get data from there to your mapping programme.
    In XI you can do Lookup in Message Mapping, Java Mapping and in XSLT Mapping. Previously Lookup in XI was system dependent. But now what ever the system are i.e. SAP system or non-sap system(Oracle,MS SQL etc) lookup API are same.
    Overview of Lookup
    - Lookups are used to identify/request the data from mapping program.
    - It interrupt the process and looking for data which was stored in target system.
    - It get that data and comeback to process and continue with that data.
    Types of Lookups in XI
    - JDBC Lookup: JDBC lookup is used for accessing data from database (non SAP).
    - RFC Lookup: RFC lookup is used for accessing the SAP Data.
    - SOAP Lookup: SOAP lookup is used for accessing data from Webservice
    Steps to perform Lookup in Mapping
    Import package com.sap.aii.mapping.lookup.*;
    Create connection to the target Database system.
    // Determine communication channel created in ID
    Channel channel = null;
    channel = LookupService.getChannel("DB-SYSTEM-NAME","DB-CHANNEL-NAME");
    // Get system accessor for the channel.
    DataBaseAccessor accessor = null;
    accessor = LookupService.getDataBaseAccessor(channel);
    Build the Query String.
    Getting Result
    // Execute Query and get the values.
    DataBaseResult resultSet = null;
    resultSet = accessor.execute(Query);

  • Select query taking too much time to fetch data from pool table a005

    Dear all,
    I am using 2 pool table a005 and a006 in my program. I am using select query to fetch data from these table. i.e. example is mentioned below.
    select * from a005 into table t_a005 for all entries in it_itab
                       where vkorg in s_vkorg
                       and     matnr in  s_matnr
                       and     aplp   in  s_aplp
                       and     kmunh = it_itab-kmunh.
    here i can't create index also as tables are pool table...If there is any solutions , than please help me for same..
    Thanks ,

    it would be helpful to know what other fields are in the internal table you are using for the FOR ALL ENTRIES.
    In general, you should code the order of your fields in the select in the same order as they appear in the database.  If you do not have the top key field, then the entire database is read. If it's large then it's going to take a lot of time.  The more key fields from the beginning of the structure that you can supply at faster the retrieval.
    Regards,
    Brent

  • Sessions opening\closing in oracle while fetching data from XI

    Hi Friends,
    I used JDBC adaptor to fetch data from Oracle. I set the poll interval 86400 seconds because we need to run it on daily basis.
    Now when XI fetch data from Oracle, It will open session in oracle, but it is not closed automatically. So, I have nearly 100 channels, and all channels are activated. So, for each channel 1 session is opened in oracle. By this way, the oracle server performance goes down. It is not working properly at that time.
    How can I close these sessions in oracle.
    Regards,
    Narendra

    Did u try this paramter in JDBC sender adapter...
    Disconnect from Database After Processing Each Message
    Set this indicator if the database connection is to be released and reestablished before every poll interval.
    -Siva Maranani

  • Data Maintain in a table form another table....using field symbols.

    Hi,
    I am using dynamic table concepts.I am using field symbols.I need to maintain two tables of similar structure.
    when i append data it will enter into both tables.when i unassign first table and reassign it ,i am getting back that data again into first table ..how to slve this problem.i need to start first table as fresh table and second table contain copy of the first table.

    Hi,
    maybe you should clarify your problem a bit more by pasting some code and try to explain it a bit more in detail.
    Roy

Maybe you are looking for

  • INR should come on the top , not in every row...

    Dear Experts, I am facing an onother issue. The issue seems very simple but a m nt able to solve it. In service report ,                   Net Income                   540,000.00 INR                  243,000.00 INR But in Sales Report,               

  • AE isn't working with new Actiontec c1000a

    I've seen a few other posts regarding this issue of connecting an AE to a Actiontec c1000a from CenturyLink, and I've been having similar issues.  Hoping someone can assist in getting this figured out. I have an existing ZyXEL Q1000Z from CL, but it'

  • PO rate based on Purity of material

    Specialist, Scenario: Raised a PO for 100 kg of raw materials at Rs. 10.00 per kg      Done Goods receipt for 100 kg Quality analysis results are Purity----      Rate > 95 % - Rs.10.00 / kg (as per PO rate) 90 – 95 % - Rs.8.00 / kg 80 – 90 %     -  

  • Organisational Structure changes

    Hi I have to create new BU's, new departments, move people from old BU's or Deps to new below is my Financial and SCM plan,can you please advice if there is anything i need to add or remove, R11 Finance Changes Plan Update Cross validation rules Upda

  • Need help regarding HR

    Hi All,   Am working on HR-ABAP and am planning to learn the HR(Functional side) . could any one help me by sending useful materials ? My id is [email protected] Thanks & Regards Anil