How to access sap data which in our program

Hello
I am using a custom program in which i am calling sap standrad includes. in one of the sap standrad include ,one internal table is getting filledup.now i have to display a message in my program based on that internal table.how to access the data in my program?

Hello Raj
Please go through the sample code bellow, which may solve your problem
DATA: profile TYPE TABLE OF user04 .
CALL FUNCTION 'SUSR_GET_PROFILES_OF_USER_RFC'
  EXPORTING
    user_name       = sy-uname
  TABLES
    profile         = profile
  EXCEPTIONS
    user_not_exists = 1
    no_authority    = 2
    OTHERS          = 3.
IF sy-subrc .
WRITE : /  l_r_usr02-ustyp.

Similar Messages

  • How to download the data which is in the table?

    how to download the data which is in the table?
    every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
    can any one help me in this.
    Phani.
    Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AM

    One way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
    There u can downlaad the data .
    The ither way is to use the code
    The Following Code will be helpfull to You
    Data :ITAB  TYPE TRUXS_T_TEXT_DATA,
            FILE  TYPE STRING.
             C_ASC     TYPE CHAR10   VALUE 'ASC',
    DATA: L_STATUS TYPE C,
           L_MESSAGE TYPE PMST_RAW_MESSAGE,
           L_SUBJECT TYPE SO_OBJ_DES.
    DATA: L_FILELENGTH TYPE I.
      PERFORM download_to_pc
                  TABLES
                     itab
                  USING
                     filename
                     c_asc
                     c_x
                  CHANGING
                     l_status
                     l_message
                     l_filelength.
    FORM DOWNLOAD_TO_PC TABLES   DOWNLOADTAB
                        USING    FILENAME
                                 FILETYPE TYPE CHAR10
                                 DELIMITED
                        CHANGING STATUS
                                 MESSAGE TYPE PMST_RAW_MESSAGE
                                 FILELENGTH TYPE I.
      DATA: L_FILE TYPE STRING,
            L_SEP.
      L_FILE = FILENAME.
      IF NOT DELIMITED IS INITIAL.
        L_SEP = 'X'.
      ENDIF.
      STATUS = 'S'.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = L_FILE
          FILETYPE                = FILETYPE
          WRITE_FIELD_SEPARATOR   = L_SEP
        IMPORTING
          FILELENGTH              = FILELENGTH
        TABLES
          DATA_TAB                = DOWNLOADTAB
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
        STATUS = 'E'.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE = 'gui_download::file write error'.
          WHEN 2.
            MESSAGE = 'gui_download::no batch'.
          WHEN 3.
            MESSAGE = 'gui_download::gui refuse file transfer'.
          WHEN 4.
            MESSAGE = 'gui_download::invalid type'.
          WHEN 5.
            MESSAGE = 'gui_download::no authority'.
          WHEN 6.
            MESSAGE = 'gui_download::unknown error'.
          WHEN 7.
            MESSAGE = 'gui_download::header not allowed'.
          WHEN 8.
            MESSAGE = 'gui_download::separator not allowed'.
          WHEN 9.
            MESSAGE = 'gui_download::filesize not allowed'.
          WHEN 10.
            MESSAGE = 'gui_download::header too long'.
          WHEN 11.
            MESSAGE = 'gui_download::dp error create'.
          WHEN 12.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 13.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 14.
            MESSAGE = 'gui_download::ubknown dp error'.
          WHEN 15.
            MESSAGE = 'gui_download::access denied'.
          WHEN 16.
            MESSAGE = 'gui_download::dp out of memory'.
          WHEN 17.
            MESSAGE = 'gui_download::disk full'.
          WHEN 18.
            MESSAGE = 'gui_download::dp timeout'.
          WHEN 19.
            MESSAGE = 'gui_download::file not found'.
          WHEN 20.
            MESSAGE = 'gui_download::dataprovider exception'.
          WHEN 21.
            MESSAGE = 'gui_download::control flush error'.
          WHEN 22.
            MESSAGE = 'gui_download::Error'.
        ENDCASE.
      ENDIF.
    ENDFORM.             "download_to_pc
    At The End Reward points.
    Please it's Required.
    Thanks ,
    Rahul

  • How to access reference data in BPS Exit Function

    Hi Experts,
    Can any please tell me how to access reference data in BPS Exit function. I am creating a copy function using ABAP Exit Function (Std copy and fox formula doesn't work for my requirement).
    Please suggest,
    Thanks in advance,
    Shiwesh

    Hi Deepti,
    Thanks a lot for your reply. xth_data contains all the data based on package filteration. Let me explain you,
    Say, I have a characteristic char and whose value is 'A', I want to change it to 'B' in my copy function, while keeping the original record with 'A' as well. So now I want my xth_data to contain two records, one with A and other with 'B'. I mean to say from value is 'A' and to value is 'B'. Now my package contains 'B' (the to value) as the allowed value, but not A because in the package I am setting this using a BPS variable. There are two types of variables, one is to variables other is from variable. There could be two scenarios,
    1. If I set from varibale in the package: if I do so, I will have the data in xth_data containing 'A' as char value. But in this case when I change it to 'B' and try to save both the records, package won't recognize the record with value 'B' and reject it.
    2. If I set to variable in the package: In this case the xth_data itself will not contain anything and I can not loop over xth_data because there is no record with 'B'. Only record available in the system is with 'A' values.
    That is why I am thinking about having reference daya somewhere. I could loop over reference data and then pass it to xth_data. Package will contain to variable so it will allow all my modifications to get saved.
    Thanks and regards,
    Shiwesh

  • How to call SAP Webservice in standalone java program

    Hi,
    In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
    Thanks,
    Mohan

    Hi Mohan,
    You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
    But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?

  • How to access Sap portal login user in ejb web service

    Hi,
    I wnt to access SAP Portal login user in my ejb application which resides on the same server.
    I am using following code
    try {
         IUser user =null;                         IWDClientUser wdUser = WDClientUser.getCurrentUser();
                                  user = wdUser.getSAPUser();
                             } catch (WDUMException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
    Some additional jar files are required for this?
    The same code works fine with webDynpro but not with ejb.
    Thanks in advance     
    Best regards,
    Nilesh

    Thanks for reply.
    I have already added com.sap.security.api in my EJB module project classpath. How to add the same in EJB application Project (application-j2ee-engine.xml)?
    Best regards,
    Nilesh

  • Access SAP Data Archival file from outside SAP

    Hello Everyone,
    I have a requirement to archive the SAP data, dump that outside SAP in some other system like ILM or BI and build a reporting tool on top of that data.
    So, basically customer want to shutdown the SAP and want to retain data for legal and audit pourpose.
    I was doing some RnD and done archiving of MM_EKKO using SARA. the file got generated with extention .ARCHIVE. I donwnloaded teh file but it is encoded file with all special character in it.
    My question is:
    1. How can I read the archieved SAP data from outside SAP system.
    2. Can we decode the .ARCHIVE file to get it in .DAT format?
    3. Or Is there any other way to access the SAP data outside SAP in a report format.
    Thanks,
    Chintan SOni.

    Hi Chintan,
    1. How can I read the archieved SAP data from outside SAP system.
    For this you could refer SAP Note   460620 - Migrating archive files
    2. Can we decode the .ARCHIVE file to get it in .DAT format?
    As per my knowledge,it's not possible to decode or move to .DAT format.
    3. Or Is there any other way to access the SAP data outside SAP in a report format.
    Refer my first response & the SAP note.
    Hope this will help you.
    Good luck !!
    Gaurav

  • How to access .dmp data with the Instant Client?

    I'm a total beginner, and am trying to access a .Dmp database. I have installed (on Linux i386):
    Instant Client Basic 11.2 + SDK + SQLPlus
    I'm aware that I have to further set the environment variables ORACLE_HOME and LD_LIBRARY_PATH, and think I know how it should be done.
    The files installed in the oracle directory are as follows:
    $ ls /usr/lib/oracle/11.2/client/lib
    glogin.sql libocci.so libsqlplusic.so ottclasses.zip
    libclntsh.so libocci.so.11.1 libsqlplus.so xstreams.jar
    libclntsh.so.11.1 libociei.so ojdbc5.jar
    libnnz11.so libocijdbc11.so ojdbc6.jar
    $ ls /usr/lib/oracle/11.2/client/bin
    adrci genezi sqlplus
    But this is where I hit the wall. Just a couple of questions:
    How do I make the Client to access the data? I've read a bit about name resolution such as tnsnames.ora and EZConnect, but have no idea what these are, even conceptually.
    How do I actually start/configure the Oracle client? Is there an executable somewhere?
    Can the .dmp file be even read by the client or do I have to use the SQLPlus to make queries (as I've read somewhere)?
    As you see I'm clueless. What are the next steps, or could you point me to a practical tutorial that would show what I need to do.
    Thanks a lot for any help..

    user9020180 wrote:
    Right,
    I browsed the manual, but I didn't understand whether the import utility part of the oracle database software?
    Are there any freely downloadable tools by which I can import the data (and then read with a client?).Everything in the Utilities manual is part of the database software set. If you have a database, you have all of those utilities. If you don't have a database, no third party equivalent to those utilities (if such existed) would be of any value.
    Depending on your database version, the .dmp file could have been created with either 'exp' (export) or 'expdp' (datapump). Unfortunately, by default both utilities produce a file with the .dmp extension, but they are different formats and not interchangeable. You will need to find out exactly how the .dmp file was created. Actually, you need to find out the entire command used to create it, not just which utility, because the options used at export time will affect what options are available and desirable at import time.

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • How to access/add data in windows registry[regedit]

    Sir,
    We are making a trial version software. How can we register this software with our own specified data eg product name, duration, duration left, account no.etc in windows or any other os registry.

    jdk 1.4 preferences

  • W510: How to access my data from a functional hard drive after motherboard failure

    I made a mistake and paid the major price .
    That mistake being spilling a sugary drink on my laptop. I know, I know, my keyboard can and protect against damage from spills, but it was an entire glass. Anyway, I panicked and shut the system down and turned it upside down and removed the keyboard. And being the impatient person I am, I made what was probably the ultimate mistake. I didn't give everything adequate amount of time to dry and tried booting the system back up. There went my computer. Or at least I think.
    Symptoms: It started to bootup, kept beeping, then at a certain point just shut down and wouldn't turn back on.
    Anyway, I'm assuming my laptop went kaput. Now to the point of this thread. I had not undergone a recent backup and can't recall when the last backup was actually done. Assuming that my hard drive is ok, I would like to get all of my data so I saw several possible options:
    -send the system to a data recovery service where I'm not going to pay below $300, but probably 2 to 3 times that
    -buy an equivalent model laptop and put the HDD in there
    -by an external SATA hard drive enclosure and attach it via USB to another computer
    I bought an external enclosure and assembled it this evening. I had read about difficulty accessing data with a non-Lenovo system because of data encryption. I proved that out by attaching it to my work laptop (a Dell) and I couldn't access my data directories. If I have access to another Lenovo Thinkpad, will I be able to access the data if connected via USB? I'd read that I can access the hard drive contents if it is connected to another Thinkpad, but I wasn't sure if that means I have to have it interfaced via the SATA connection or if it will still work via USB.
    I'll appreciate any suggestions for accessing my data.
    Best Regards!
    Solved!
    Go to Solution.

    I didn't have a password on the drive itself, but I did have a Windows password.
    Connecting the drive to a Dell via SATA external usb enclosure and attempting to access the data directory gives the below prompt (See image below). I understand that I could click continue and try to gain permanent access, but I haven't attemped yet because I also don't want to permanently mess something up so that I can't access.
    So this was connected to my work computer, which is a Dell. I do have access to another Thinkpad (X200 series tablet) with the same results. I'm concerned that if I do follow the steps to gain permission to the folder that the data will also be encrypted. I read at this Lenovo link http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&LegacyDocID=MIGR-69621 about full data encryption. I don't recall ever manually setting up encryption.
    Alternatively, could I boot from the old drive using the X200?
    Any help appreciated.
    Thanks again.

  • How to access biz data of process instances in workspace at any time in 11g

    Hi,
    We are using Oracle BPM Suite 11g.
    Our users want to be able to check and search the business data associated with the process instance at any time (i.e. even after the instance is completed. And the business data should be included in the task list or search result list in the BPM workspace.
    I am new to Oracle BPM 11g. Please help. For the data to be displayed in the workspace, should I define them as “Process Data Objects”?
    Regarding to how to display the data, I find something about Flexfield. But the Oracle document says the Flexfield is for the data that saved in human workflow database schema. When the process instance is completed, will the data in human workflow database for this instance be removed? Can I setup flexfield for the Process Data Objects?

    Hi Ramandeep,
    Apparently I am not getting the required exception.
    I have a TF that outputs an Invalid Region Site when I run it and the when I run it I only got the loading page image of ADF.
    Looking at JDEV logs, I see an Invalid Region Site error
    Here's what I did, I created a TF template with only one view in it like this.
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-template id="TFTemplate">
        <default-activity id="__7">errorPage</default-activity>
        <exception-handler id="__14">errorPage</exception-handler>
        <view id="errorPage">
          <page>/com/test/errorPage.jsff</page>
        </view>
        <use-page-fragments/>
      </task-flow-template>
    </adfc-config>My error page as this:
    <af:panelGroupLayout id="pgl1">
         <af:outputText value="Error has occurred!" id="ot2"/>
         <af:outputText value="#{pageFlowScope.MyErrorHandler.stacktrace}" id="ot1"/>
    </af:panelGroupLayout>...and my bean.
    public class MyErrorHandler
      public String getStacktrace() { 
        ControllerContext context = ControllerContext.getInstance();
        ViewPortContext currentRootViewPort = context.getCurrentRootViewPort();
        Exception exceptionData = currentRootViewPort.getExceptionData();
        if (currentRootViewPort.isExceptionPresent())
          if(exceptionData!=null)
            return exceptionData.getMessage();
        return null;
      }But exception data still returns null.
    I exactly wanted to show this invalid region site but it seems I cannot catch it.
    Any idea why?

  • How to access SAP Discovery system V4

    Hi,
    Can anone accessed SAP Discovery system V4? if so how to get the SAP discovery system server details and log-in credentials?
    Thanks,
    Sivapratap

    Hello,
    Try going though this
    http://www.sdn.sap.com/irj/sdn/discoverysystem-user
    regards.
    roberti

  • How to access Master Data in ERP2005 for SD

    Hi All,
    I installed ERP2005 in my system with MS SQL.
    I do not know how to Access the Master Data in the system for SD.
    Can anybody guide me.
    Thank you,
    Ravi.

    Hi Ravi,
    Firstly, have you created any Master Data. If yes, you will be able to access the same.
    Sales Order Management Transactions Codes:
    <b>GENERAL ORDER MANAGEMENT</b>
    Reviewing Document Flow VA03
    Searching for a Customer Sales Order by Serial Number ZV11
    Order Inquiry ZV33
    <b>SALES ORDER PROCESSING</b>
    Creating Sales Order VA01
    Maintaining a Sales Order VA02
    Displaying a Sales Order VA03
    Releasing an Order or Delivery from Credit Hold: Non-Flooring VKM1
    Releasing an Order or Delivery from Flooring Hold ZKM1
    Manually Pre-authorizing Blocked Credit Card Orders Z.14
    Display List of RMAs by Customer VA05
    Confirm RMA Goods Receipt VL02
    Generate list of open return orders for deletion VA05
    Display Customer returns eligibility MCSI
    Removing a Billing Block (Approving Credit/Debit Requests) V.23
    <u><b>PRICING MASTER DATA</b></u>
    Create Pricing VK11
    Creating a Sales Deal VB21
    Maintaining a Sales Deal VB22
    Displaying a Sales Deal VB23
    Maintaining Prices VK12
    Displaying Prices VK13
    <u><b>MATERIAL MASTER DATA</b></u>
    Creating Material Substitution Master Data VB11
    Maintaining/Deleting Material Substitution Master Data VB12
    Displaying Material Substitution Master Data VB13
    Creating a Bundled Master MM01
    Creating a Sales BOM CS01
    Maintaining a Sales BOM CS02
    Displaying a Sales BOM CS03
    <u><b>CUSTOMER MASTER DATA</b></u>
    Creating Partner Records XD01
    Maintaining Customer Master Data XD02
    Displaying Customer Master Data XD03
    Deactivating a Partner VD06
    CUSTOMER CREDIT INFO
    Creating/Maintaining New Customer Credit Information FD32
    Displaying Customer Credit Information FD33
    Blocking or Unblocking a Customer VD05
    <b>SHIPPING</b>
    Creating a Delivery VL01
    Displaying a Delivery VL03
    Deleting a Delivery VL02
    Shipment Inquiry / Display VT03
    Adjusting Transfer Order - Confirmation Quantity LT12
    Collectively Confirm Transfer Order LT25
    Batch Shipment Confirmation VL19
    Creating Service Provider/Carrier Master Data XK01
    Maintaining Serive Provider/Carrier Master Data XK02
    Displaying Service Provider/Carrier Master Data XK03
    Maintaining Product Master/Serial # Profile/Unit of Measure/Shipping Unit MM02
    IDoc Inquiry WE02 / WE05
    Workflow Instructions
    <b>BILLING</b>
    Invoicing a Customer Shipment VF01
    Reprinting an Invoice VF31
    Releasing a Sales Order for Billing V.23
    Creating an Invoice by Using the Billing Due List VF04
    Checking Open Billing Documents VF05
    Create Credit/Debit Memo FB01
    <b>A/R</b>
    Controlling Total Debit/Credit bkgs F.03
    Generate FI Account balance F.08
    Generate Month-to-date Inv. register F.02
    Process payments FBZ1
    Rqst Individual Customer Corresp. FB12
    Generate Customer Correspondence F.61
    Enter Batch totals under Control ttl FB07
    Display G/L Acct. totals FBL3
    Reverse Posted Amounts FB08
    Customer Refunds FBL6
    Customer Refund to other than Payer FB05
    Clearing Debit/Credit on Cust. acct. FB1D
    Customer Balance in Local Currency F.23
    G/L Account Balance Report F.08
    Create Invoice - legal entity adjust FB01
    Generate Cust. Acct. statements F.27
    Generate Dunning Letters F150
    Generate Billing Due List VF04
    Generate Blocked Billing Doc list VFX3
    Inq. via Credit Release Screen VKM1
    List orders by partner VA05
    Past Due invoices by customer FD11
    Check number info by G/L account FBL3
    Display customer Line items FBL5
    TREASURY - CASH APPLICATION:
    Post Customer payments FF68
    Verify if A/R is updated FB03
    Hope The above details helps you.
    Regards,
    Rajesh Banka

  • How to Access SAP ECC 6.0 using HP model Omni 10 (with windows 8.1) tab

    Dear Experts
    can anybody guide me to access SAP using TAB, where it has windows 8.1 o/s and manufactures are claimed it support all applications.
    which SAP client version to be loaded in this tab, what are the config steps to be followed etc
    Kindly revert.
    Thanks
    Venugopal

    Hi Ravidra
    Have u solved the probelm I also have the same problem when i move the groups from node1 to node2 manually my 2 servrces 00 and 01 are failed not able to bring up again. If You solve the problem please guide me the solution to solve this.
    THanks in advance

  • Access SAP data from xMII 12.1 without RFC or JCO

    Hi All,
    Is it possible to access/get data from SAP in xMII without RFC/ JCO call?
    Let me know if there is other option available..
    Regards,
    Sachin

    Sachin,
    As far my knowledge goes the primarily used forms of achieving MII to ERP connectivity,
    1) MII -- ERP (via RFC, IDOC's, BAPI's)
    2) MII -- PI(XI) -- ERP
    3) MII -- ESR -- ERP (Web-services)
    But, I completely concur with Mike on this, you do not need to create any function modules unless you have no other choice.
    Check this link for List of Bapi's available and their description
    [BAPI List|http://www.sapbapi.com/bapi-list/]
    If none of the BAPI's really meets your requirement then you can go for "RFC_READ_TABLE" this RFC accepts the SAP table name and desired column names. (in a way you will be accessing the SAP DB you are looking for...)
    Yet, if none of the above options suffices your requirement only then you go for writing a custom Function module.
    [Writing Function Module|http://abaplovers.blogspot.com/2008/02/creating-function-module-in-sap-abap.html]
    Good Luck!!
    Regards,
    Adarsh

Maybe you are looking for

  • I can't sync some albums/songs from iTunes 12.1 on my Mac to my iPad running iOS 8.2

    In brief, when I drag content from iTunes to my iPad icon it will not transfer. It doesn't happen to all albums and songs but quite a few. I also have an iPod touch 5th gen iOS 8.2 and the same albums seem to move across ok? Most pf the time it say's

  • How do I save a chart as a jpeg?

    How do I save a chart as a jpeg. In excel I right click, "save as picture." Not seeing anything like that in Numbers.

  • Photoshop Web Gallery and Dreamweaver

    I created a web gallery in photoshop 9 and i'm trying to edit in Dreamweaver but the message that appears is: "You must enable Javascript to view this content."... where should i do this? i downloaded the Java programa from Sun but it seems not to wo

  • Can't Send MAIL..... again

    hey... can;t send mail.. 10.4.10 on a macbook.. can send mail on my .MAC account, but my MAIL 2.0 is no good. it used to work fine... i travel for a living, could the different log-on places have something to do with it.? tried all the fixes on the A

  • HFM Cluster Question

    We are having some issues with cluster configuration. We have two servers A and B. As there is no round-robin algorithm followed by HFM server every time a user logs on he is assigned a fixed server. We want to know how to overcome this issue as we d