How to Record HTTP Requests and POST data

Hai all..
Can anyone help me to solve this issue..
How to Record HTTP Requests and POST data by using java..
regards
Ranjith Nair

You should read about TCP and splitting data stream into packets and learn how to understand packet header to assemble stream from packets.
Actually there are few different stages:
1. detect handshake to start new empty stream within your code;
2. detect subsequent packets and assemble stream (there are counters within packet header and they will help).
After creating start of TCP stream (usually 1KB is enough) you'll be able to detect is it HTTP request/header or no and start logging or ignoring packets for this connection.

Similar Messages

  • How to monitor Http Request and Response when load testing is going on

    Hi,
    can any one please let me know how to monitor http request sent and response received for each virtual ID when a load test is going on ?
    Thanks,

    You used to be able to see what the VUs "see" using the "VU Monitor" (it would only do a simple rendering of the HTML but it served it's purpose). However this was replaced (in v12 I think?) by the "VU Log". While this offers simlilar functionality, I have had problems getting to see the same level of detail. You may need to use the "debug" modes. Also check the "Content" tab within the VU Logs (it is the closest equivalent to the HTML you would see in the responses in the old VU Monitor).

  • HTTP Request in post

    Hi all,
        I want to implement an interface between SAP and a bank.
        The bank provide a HTTP server, when I sent a HTTP request in post method with an XML body to the server, it will answer a response with an XML body to me.
        I search lots of topic about HTTP request in ABAP, then I know I must create a object ref to IF_HTTP_CLIENT, but I don't know which parameter I need to input, and how can I receive the response, and so on.....
        So, I want some simple code, can you help me? thanks in advance!
        PS: Does I need to configure a HTTP Adapter? I never use XI so I don't know any adapter, I just want to sent a request and receive a response in ABAP
    Edited by: Wei Jie Pan on Mar 23, 2009 3:54 AM

    you can use HttpURLConnection to POST or GET request in your backing bean
    See this example
        public void youTubeServerAction(ClientEvent clientEvent) {
          URL               url;
          HttpURLConnection conn;
          StringBuffer strBuffer = new StringBuffer();
            try {
                url = new URL("http://gdata.youtube.com/feeds/users/thomasthiele/uploads?alt=json-in-script&callback=showMyVideos&max-results=50");
                conn = (HttpURLConnection) url.openConnection();
                conn.setDoOutput(true);
                conn.setRequestMethod("GET");                   // >> set here POST request
                InputStream in = conn.getInputStream();
                int c;
                while ((c = in.read()) != -1)
                    strBuffer.append((char)c);
                System.out.println(strBuffer.toString());
                in.close();
                conn.disconnect();           
            } catch (Exception e) {
                e.printStackTrace();
            FacesContext fctx = FacesContext.getCurrentInstance();
            ExtendedRenderKitService serv =
                Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
            System.out.println("SOURCE " + strBuffer.toString());
            serv.addScript(fctx, strBuffer.toString());       
        }Good luck.
    Thomas

  • I forgot my passcode to reset and erase the data . how i have to reset and erase data on my ipad mini

    i forgot my passcode to reset and erase the data . how i have to reset and erase data on my ipad mini

    Do you have a question? Is your iPad disabled?
    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • My iPhone 5 has broken and is being replaced with a new iPhone tomorrow. However, My carrier (orange) will b picking up my broken iPhone and I am unsure how to secure the content and icloud data on the broken phone. Is there a way to display the data?

    My iPhone 5 has broken and is being replaced with a new iPhone tomorrow. However, My carrier (orange) will b picking up my broken iPhone and I am unsure how to secure the content and icloud data on the broken phone. Is there a way to disable the data held on it and ensure that if it is fixed, nobody can use/see my data and access my account?

    Hi Gazpan,
    Thanks for visiting Apple Support Communities.
    I recommend using the steps in this article to back up your iPhone if possible:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/ht1766
    You may also find this advice helpful for your situation:
    What to do before selling or giving away your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/ht5661
    If you no longer have your iOS device
    If you're using iCloud and Find My iPhone on the device, you can erase the device remotely and remove it from your account by signing in to icloud.com/find, selecting the device, and clicking Erase. When the device has been erased, click Remove from Account.
    If you're unable to complete either of the above steps, you should change your Apple ID password. Changing your password won't remove any personal information that is cached on the device, but it will make sure that the new owner can't delete your information from iCloud.
    Cheers,
    Jeremy

  • FA-retirement-Asset value date and posting date are not in same fisc year

    Hello,
    I would like to post retirement in the new fiscal year but with asset value date in the previous year so that NBV is calculated correctly. It is not possible neither in ABAON nor in ABAVN with any transaction type.
    I always get message 'Asset value date and posting date are not in same fiscal year'.
    Is there any way how to handle this?
    Thank you,
    Jan

    Hi,
    I have tried this but the settings of our Depr keys works in the way. That if you use asset value date in the new month it will calculate depreciation for the whole month.
    This means if I retire with asset value date 31.12.2008 - NBV will be calculated as at 31.12.2008.
    If I retire with asset value date 1.1.2008 - NBV will be calculated as at 31.1.2009.
    Thank you anyway!

  • Asset value date and posting date are not in same fiscal year

    Hi,
    Our business user has created an asset under an incorrect asset class, which he is trying to transfer to a new asset whcih was created under correct asset class. However system is restricting user with the error message "Asset value date and posting date are not in same fiscal year". Can you please advise me how we can proceed further with this error.
    Regards,
    Asam.

    Hi,
    To transfer one asset to another asset within a company code can be done through ABUMN only.
    While doing this transfer you have enter the document date, posting date, and value date for the transaction, but all these dates should be in same fiscal year only.
    In your case you must have been entered the dates for asset value date and posting date , and these two dates are in diff financial years.
    Please make sure that both the dates are in same FY.
    Hope this will fix your issue.
    Thanks,
    Srinu

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • Vendor 800040 and posting data have different withholding tax types

    HI
    need some help..
    i ve created the lease in contract but unable to activate it... getting the following error
    Vendor 800040 and posting data have different withholding tax types...
    how to solve this issue,,

    Hi,
    could you please add the error message ID and error message number.
    Thank you.
    Regards, Franz

  • What are  Pre Database Copy and Post data base copy activity list, Pre Migration and Post Migration activity list from SAP BW 7.0 to SAP BW 7.4 SPS6.

    BW on HANA :  Pre Database Copy and Post data base copy activity list, Pre Migration and Post Migration activity list from SAP BW 7.0 to SAP BW 7.4 SPS6.
    We are trying to copy database from SAP BW7.0 to SAP BW on HANA 7.4 SPS6 so we are in search for list of steps or activities during database copy both pre and post steps.
    Along with the above we are in search of Pre and post migration steps ones database is transferred successfully from oracle to HANA on 7.4 SPS6.
    Kindly help us in getting the exact course of action as requested.
    Thanks and Regards,
    Lavina Joshi

    Hi Lavina,
    try this link for starters: Upgrade and Migration - BW on HANA | SAP HANA
    Points to remember are:
    Preparation:
         -- Hardware Sizing
         -- Preparation of Data Centres
         -- HANA Hardware preparation
         -- System Landscape Readiness (upgrade software downloads, system readiness checks, etc)
         -- House Keeping activities on BW system (data clean up, etc)
    Post Installation:
         -- Sanity checks / Preparation and License checks
         -- JAVA Configurations
         -- Infoprovider conversions 
    Overall Stages are described below:
    # Environmental setup (HANA box)
         -- Initial system checks and Building Activities (system copy, Appln server setups, etc)
    # System readiness
                   - ZBW_HANA_COCKPIT Tool
                   - ZBW_HANA_CHECKLIST Tool
                   - ZBW_ABAP_ANALYZER Tool
                   - ZBW_TRANSFORM_FINDER Tool
                   - SIZING Report
                   - System Clean up Activities
                   - Impact of 7.4 on source system checks
                   - Java Upgrade for portal
    # DMO Stages
                   - Preparation & Pre Migration checks
                   - Execution / Migration
                   - Post Migration Activities
    # Testing Phase
                   - Source system checks/Activities
                   - System and Integration Testing
                   - End to End Testing
                   - Performance testing
                   - Reports
                   - BO reports / Interfaces
    Do let me know if you require any further information.
    Regards,
    Naren

  • MIR7 - Invoice and Posting date must be = PO Date

    Dear All,
    In MIR7 Invoice Date and Posting date is allowed prior to PO date.
    e.g.
    PO Date : 21.05.2010
    We can make MIR7 in back date i.e. 20.05.2010 or any back date.
    How to restrict this.
    We don't want to allow invoice date and Posting date < PO Date.
    Thanks and Regards,
    Nirav

    Please check this answered link:
    posting date
    Invoice posting not permissible after posting MIGO
    validation
    miro problem
    Edited by: Afshad Irani on May 23, 2010 10:39 AM

  • How can Siri still tweet and post to Facebook if I just changed my password from the respective websites, with out the iphone "knowing" I changed my passwords?

    How can Siri still tweet and post to Facebook if I just changed my password from the respective websites, with out the iphone "knowing" I changed my passwords?

    If you buy an iLife '11 install DVD (eBay, Amazon) you could upgrade your iPhoto right away. The earlier iPhoto '11 versions are compatible with MacOS X 10.6.8.
    but I can't until I upgrade from OS X 10.6.8.  Trying to figure out how to do that...
    To upgrade to Mt. Lion see here:  You can buy it and download it from the appStore, if your mac is compatible:
    http://www.apple.com/osx/how-to-upgrade/

  • How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?

    I do enjoy using Mozilla's Firefox as my default browser, BUT, I don't enjoy the details of my life, to include my Internet activity, to be archived by Google, or anyone else, via Mozilla's/Firefox's sharing of my Internet browsing and/or search engine activity with any aspect or facet of the Google organization. With all of this said, my question is, "How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?"

    Firefox's default behavior includes no automatic interaction with Google.
    We do use Google as default search engine and to report web forgery in the 'help' menu, but no data are sent to Google without your knowledge, and you can change your preferred search engine at will.
    However many websites themselves make use of Google Ads which do cause interaction with Google when you load the webpages. This is visible in status bar and happens in any browser. The [https://addons.mozilla.org/en-US/firefox/addon/noscript NoScript] add-on for Firefox can largely save you from this problem.
    If you see things happening otherwise, please reply with details on what you see.

  • Doubts about HTTPS requests and Java proxy

    Hello,
    I need help about SSL connections and Java.
    I'm developing a HTTP/S proxy with Java. To test my proxy, I use Firefox. I configure the proxy option in the browser. The proxy works good with HTTP requests, but with HTTPS requests doesn't work and I don't know why.
    I explain the steps that I do for a HTTPS request:
    * The browser sends a CONNECT message to the proxy.
    I check that the proxy receives the CONNECT request correctly.
    * The proxy establish a secure connection with the content server.
    I use an SSLSocket to connect with my content server, and the SSL handshake is succesful.
    * The proxy sends a 200 HTTP response to the client:
    I send
    HTTP/1.0 200 Connection established[CRLF]
    [CRLF]
    to the application client (Firefox)
    * The proxy sends/receive data to/from Firefox/content server
    I have a Socket between Firefox and my proxy, and a SSLSocket between my proxy and my content server. I use two threads to communicate the client and the server.
    Java code:
    //Thead server-->proxy-->application(Firefox)
    ThreadComm tpa = new ThreadComm(bis_serverSSL, bos_app);
    //Thread application(Firefox)-->proxy-->server
    ThreadComm tap = new ThreadComm(bis_app, bos_serverSSL);
    The "tpa" thread reads from the SSLSocket between the proxy and the server and sends data to the Socket between the proxy and Firefox.
    The "tap" thread reads from the Socket between the proxy and Firefox and sends data to the SSLSocket between the proxy and the server.
    This is the class ThreadComm:
    public class ThreadComm extends Thread{
        private BufferedInputStream bis = null;
        private BufferedOutputStream bos = null;
        public ThreadComm(BufferedInputStream bis, BufferedOutputStream bos) {
            this.bis = bis;
            this.bos = bos;
        @Override
        public void run() {
            int b = -1;
            FileOutputStream fos = null;
              do {
                   try {
                        b = bis.read();
                        System.out.print((char) b);
                        fos.write(b);
                        bos.write(b);
                        bos.flush();
                   } catch (Exception ex) {
                        Logger.getLogger(ThreadAplicacionProxy.class.getName()).log(Level.SEVERE, null, ex);
                        //b=-1;
              } while (b != -1);
        }But this doesn't work and I don't know why.      
    I have an Apache server with the mod_ssl enabled as content server, I can send requests (with Firefox) to the port 80(HTTP request) and 443(HTTPS request) without use my proxy and it works. If I use my proxy, HTTP request works but with HTTPS request doesn't work, I look the log of Apache and I see:
    [Tue Apr 27 17:32:03 2010] [info] Initial (No.1) HTTPS request received for child 62 (server localhost:443)
    [Tue Apr 27 17:32:03 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue Apr 27 17:32:03 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue Apr 27 17:32:03 2010] [info] [client 127.0.0.1] Connection closed to child 62 with standard shutdown (server localhost:443)
    Why it say? Invalid method in request \x80\x7f\x01\x03\x01 , my proxy sends the data that the Firefox sends.
    I think than I have follow the explanations of [1] but doesn't work, I have problems in implementation in Java but I don't know where.
    I appreciate any suggestions.
    Thanks for your time.
    [1] http://www.web-cache.com/Writings/Internet-Drafts/draft-luotonen-web-proxy-tunneling-01.txt

    ejp, I have checked the socket between the proxy and server and ... You are right! , I was using the port 80 instead of the 443 (incredible mistake!, I'm sorry). I was convinced that I was using the port 443... Well, is a little step, but I still have not won the war :)
    If I see the log files of Apache, We can see that something goes wrong.
    localhost-access.log
    >
    127.0.0.1 - - [04/May/2010:17:44:48 +0200] "\x 80\x 7f\x01\x03\x01" 501 219
    >
    localhost-error.log
    >
    [Tue May 04 17:44:48 2010] [info] Initial (No.1) HTTPS request received for child 63 (server localhost:443)
    [Tue May 04 17:44:48 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue May 04 17:44:48 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 17:44:48 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    I think that this happens because Apache receives the data without decrypt, this is the reason because in the log we can see the "Invalid method in request \x80\x7f\x01\x03\x01". This supposition is true?
    ejp, you say that the "Termination is quite tricky." I have changed my code following yours suggestions (using the join and the shutdownOutput) but the threads don't die.
    I explain you what I do:
    (in time 1)
    I launch the thread (threadFirefoxToApache) that reads data from Firefox and sends to Apache.
    I launch the thread (threadApacheToFirefox) that reads data from Apache and sends to Firefox.
    (in time 2)
    threadFirefoxToApache sends the firts data to the server.
    threadApacheToFirefox is waiting that the server says something.
    (in time 3)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox sends data to Firefox.
    (in time 4)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox is waiting that Firefox says something.
    and they are waiting... and never finish.
    In time 2, these first data are encrypted. The server receives these data and It doesn't understand. In time 3, the server sends a HTTP response "501 Method Not Implemented", here there is a problem because this data must be encrypt. According to the documentation that I read, the proxy cannot "understand" this data but I can "understand" this data. What's happen?
    Firefox encrypt the data and send to the proxy. This It's correct.
    The proxy encrypt the data another time, because I use the SSLSocket to send the data to the server. Then the server receives the data encrypted two times, when decrypt the data gets the data encrypted one time. And this is the reason why the server doesn't understand the data that sends Firefox. It's correct? May be.
    Then If I want that the server receives the data encrypted one time I need to use the socketToServer, It's correct?
    I will supposed that yes. If I use the socketToServer, the proxy doesn't understand nothing, because the data received from the socketToServer are encrypted (I only see simbols), but the Apache log says that there is a problem with the version? (If I use the socketToServer the threads die)
    >
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write change cipher spec A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1756): OpenSSL: Handshake: done
    [Tue May 04 19:55:42 2010] [info] Connection: Client IP: 127.0.0.1, Protocol: TLSv1, Cipher: RC4-MD5 (128/128 bits)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#29bd910 [mem: 29ea0a8] (BIO dump follows)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1750): -------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1789): | 0000: 80 7f 01 03 .... |
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1793): | 0005 - <SPACES/NULS>
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1795): ------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] SSL library error 1 reading data
    [Tue May 04 19:55:42 2010] [info] SSL Library Error: 336130315 error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    What option is the correct? I need use the SSLSocketToServer or socketToServer to send/read the data to/from the server?. Use the SSLSocket has sense because the data travel in a secure socket, but use the Socket also has sense because the data are encrypted and they are protected by this encription. It's complicated...

  • GR/IR from miro document and posting date.

    Hi experts,
    Is there any proper way to selecting data.
    My purpose is getting GR/IR on Miro Document and Posting date basis.
    THE CODE IS.
    TABLES : bkpf, rseg, bseg.
    DATA : BEGIN OF it_bkpf OCCURS 0.
            INCLUDE STRUCTURE bkpf.
    DATA : bbelnr TYPE bkpf-belnr,
          bgjahr TYPE bkpf-gjahr.
    DATA : END OF it_bkpf.
    *data : it_bkpf like bkpf OCCURS 0 WITH HEADER LINE.
    DATA : it_rseg LIKE rseg OCCURS 0 WITH HEADER LINE.
    DATA : it_bseg LIKE bseg OCCURS 0 WITH HEADER LINE.
    DATA : bbelnr TYPE bkpf-belnr.
    DATA : bgjahr TYPE bkpf-gjahr.
    DATA : bawkey TYPE bkpf-awkey.
    data : dmbtr1 type bseg-dmbtr.
    data : dmbtr2 type bseg-dmbtr.
    PARAMETERS : p_budat LIKE bkpf-budat.
    SELECT SINGLE * FROM bkpf
      WHERE budat = p_budat
      AND blart = 'RE'.
    WRITE :/ bkpf-awkey(10).
    WRITE :/20 'I/R'.
    WRITE :/20 sy-uline(30).
    SELECT * FROM bseg
      WHERE belnr = bkpf-belnr
        AND gjahr = bkpf-gjahr.
      IF bseg-shkzg ='H'.
        bseg-dmbtr = bseg-dmbtr * -1.
      ENDIF.
        dmbtr1 = dmbtr1 + bseg-dmbtr.
      WRITE :/20 bseg-belnr, bseg-dmbtr.
    ENDSELECT.
    bbelnr = bkpf-awkey(10).
    bgjahr = bkpf-awkey+10(4).
    SELECT SINGLE * FROM rseg
      WHERE belnr = bbelnr
      AND gjahr = bgjahr.
    SKIP 2.
    CONCATENATE rseg-lfbnr rseg-lfgja INTO bawkey.
    SELECT SINGLE * FROM bkpf
      WHERE awkey = bawkey.
    WRITE :/20 'G/R'.
    WRITE :/20 sy-uline(30).
    SELECT * FROM bseg
      WHERE belnr = bkpf-belnr
        AND gjahr = bkpf-gjahr.
      IF bseg-shkzg ='H'.
        bseg-dmbtr = bseg-dmbtr * -1.
      ENDIF.
        dmbtr2 = dmbtr2 + bseg-dmbtr.
      WRITE :/20 bseg-belnr, bseg-dmbtr.
    ENDSELECT.
    dmbtr1 = dmbtr1 - dmbtr2.
    skip 2.
    write :/ dmbtr1.

    self solved

Maybe you are looking for

  • How do I sync multiple iPhones to different Macs and still share calendars?

    In my household, we have 4 macs, 2 iPhones and 2 iPods (Touch). We also have a Family MobileMe account. What I would like to do is sync some services to ALL the macs and devices and some services to the mac and device of ONLY THAT USER. The set up wo

  • Lost receipt help!

    Bought a prepaid mobile phone three days ago and the device was not working at my home. I wanted to return the device but I cannot locate the receipt and paid in cash. I can provide the location time and date that the purchase was made but no one see

  • Post Installation steps of SAP Data services

    Hi, Could someone provide screenshots/steps  of the post installation of SAP Data services on Unix. Thanks, Rajiv

  • How to make a screenshot of my menu?

    I would like to save my menu as a still image. To make a screenshot of my menu. I can't find the way to do it...

  • IPod stops playing in the middle

    I recently got a new laptop and moved all my media from the old to the new.  I deauthorized the old computer and authorized the new one.  New computer is running iTunes on Windows 8. Any song that I purchased from iTunes will not play correctly on my