Can we know the call was BAPI or else?

Hello friends,
I have a requirement to create PO.
I want to create it with online session (Not in a BAPI call, BDC or a background job)
I can check the logic for BDC --> SY-BINPT and Backgrond job -->SY-BATCH.
But anybody can tell me how would I know the call is in BAPI??
Regards,
Ronny

Find BAPI in BAPI transaction

Similar Messages

  • Can I know the caller method from callee

    Hi,
    I have a method which is called from multiple methods. Is it possible to know the method which called it wihtout sending the parameter to specify which method called it. i.e. without using something like send 1 for method 2 for other.
    One way I thnk is build an exception. Throw & catch it in the same method & get the stackTrace();

    I would respectfully remark that it isn't your
    method's job to police the callers. It still
    shouldn't be concerned with who the caller
    was. It should just throw an appropriate exception
    indicating invalid parameters were passed. Then it's
    the caller's responsiblity to do something about it.Yeah... that is why exceptions exist. Throw an IlegalArgumentException and then (since it's unchecked) if you want to watch out for it, watch for it in the calling method, which is after all the method in charge.
    It is easy to get carried away with the "spot checking" philosophy and try to handle all errors exactly where they occur, but if you think about it, where did the error really occur? Up the stack at the caller.. that is where the bad arguments came from.
    Also, strictly speaking, it should be a rare case when code throws an IllegalArgumentException. For the most part exceptions should represent just that - exceptions. It is not really in best form for them to be used as conditionals.
    For example, instead of getting input from the user and then forcing it down the method's throat without checks, you should run your own checks on it first - for example, by telling the JTextField that it is not allowed to accept characters that would result in an IllegalArgumentException.
    Exceptions should represent just that; hence, except for certain weird cases, a body of classes that you write that interact exclusively with each other should be designed to (almost) never throw exceptions.
    When someone else starts using your classes, all bets are off.
    Drake

  • Can I know the caller number on M127fn printer screen?

    Hello, I configured my fax in printer m127fn to receive both voice calls and fax transmissions (Fax/Tel). When someone is calling, the printer screen show this message (Incoming voice call, Pick up headset) without showing the caller number whether on printer screen or the phone screen itself. My question is can I configure the printer to show up the number of the voice caller? Thank you.

    Hey @MI99,
    Welcome to the HP Support Forums!
    I understand that you would like your HP LaserJet Pro MFP M127fn to display the phone number of who is calling on the display of the printer, rather than just showing 'Incoming Voice call, Pick Up Headset'. This option should work just fine if you subscribe to a Caller ID service from your phone company. As long as you have that Caller ID service on the phone line that the fax and phone share than your HP Laserjet fax machine should display the phone numbers much like a telephone would.
    Please let me know if this clears up any confusion.  Have a nice day!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • Can you hear me now? No you can't because the call was dropped.

    Hi,
    I switched to verizon about one year ago, excited about the great coverage they advertise. But coverage has recently stopped in my area, which is close to a large city plus I used to have great coverage.  When I call tech support they say that I should have coverage and it must be my phone because no one else has called them about this issue. Keep in mind that all phones in my contract have experienced this loss in service at the same time, which tech support admitted it unlikely they "broke" at the same time, same way, yet are magically unbroken in every other city/area (my phone works awesome everywhere else and I don't want to give up my working "baby" aka galaxy for a refurbished one needlessly). My husband took a trip to our local verizon store who informed us that people in our area ARE indeed having the same problem as us, as a tower was removed from our area. (thats odd, tech support was pretty confident when they said that I am the ONLY one and that their towers are great, no changes recently).
    Now I don't mind things that are out of Verizon's control such as disputes between verizon and the city, but I do mind being lied to and told its my or my device's issue. So, can verizon verify this tower issue or does anyone else know how to find out the status of a tower (not really sure how that works). Yesterday I took a bike ride around my city and no service anywhere. I start dropping calls as I approach my town. It's like a bad joke or a ploy to make me keep my landline (just kidding but seriously that's why I have to keep my landline ).
    I want this to work between us Verizon, I really do. But I don't have any more time to sit on the phone with tech support (literally I don't have the time).
    Zip Code: 53110

    Verizon opened a ticket twice. It wasn't my phone. The city sent out a letter stating that Verizon tower was taken down to them painting the water tower and that Cudahy tried to reach out to Verizon to reinstall due to complaints from Verizon customers, who were the only wireless customers to have the issue (as stated in the city's letter). It seems like the service has improved so maybe the tower is back up now.  Still, my conversations with Verizon tech support during this service-less time left me with a very bitter taste.  I guess I wasn't the only one to complain contrary to what one tech support employee told me. Thanks for responding.

  • How can i know the phone is in a call or not?

    How can i know the phone is in a call or not?
    I need to detect it and then send alert to the phone.
    Should i use AXL or JTAPI?

    If you are pushing text or audio to an IP phone, using CiscoIPPhoneExecute, you can use "Priority" as "2", then it will not execute that command.
    0 = Execute Immediately
    The URL executes regardless of the state of the phone. If the Priority attribute does not get specified in the , the default priority gets set to zero for backward compatibility.
    1 = Execute When Idle
    The URL gets delayed until the phone goes idle, at which time it executes.
    2 = Execute If Idle
    The URL executes on an idle phone; otherwise, it does not get executed (it does not get delayed).

  • Can i disable the call forwarding feature?

    can i disable the call forwarding feature?

    I have read the thread, I wrote it.
    When you have read the thread you will see that it was suggested that you can't restrict this because it is part of the iOS. I then pointed out that there are a nomber of features which are part of the iOS which can be disabled or restricted either using the restrictions setting on the phone or the iPhone configuration tool, so this comment alone does not mean that it is not possible.
    You then suggested that i download the config tool and let you know if this worked.
    So as of this moment we still have no positive confirmation from anybody that this is not possible.

  • How can i Know the email linked to icloud

    Please can anyone help me how to know teh email linked to my phone ??
    it shows me h********@hotmail.com i tried to logged in with my account that belong to h********@hotmail.com and it says inocrrect password or email i tried to reset my id but no reset mail was sent to my email ..
    so i tried to creat a new with the existing email addreess and it works and verified and finally i tried to activate it with h********@hotmail.com with the new passs and it says account cannot be activate with h********@hotmail.com it is linked to another account ..
    so please how can i know the linked email to my phone
    Thank you

    Welcome to the Apple community jorjh.
    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • How can we know the affected reports when i remove object from universe

    Hi All,
    If i remove any objects from the universe.
    How can i know the list of affected reports.

    Thanks for your update.
    It shows what are all the reports has been created  by using that particular universe.
    But my question was, if i remove any object from the universe, Then what are all the reports affected(We may not use that deleted object in all the reports)

  • How can we know the return code of BDC Program ?

    Hi All,
    Please tell me : How can we know the return code of BDC Program when being exceuted in Session or in Transaction mode.
    In my program, we are uploading data from Excel sheet to SAP via BDC
    The records that are not updated we want to create a log file.
    Now to know whether a record is updated ot not, wat syst field shloud be used?
    Its urgent....
    <b>Reward Point will be there ....</b>
    Thanks,
    Harish

    Hi harish,
    try the logic in this code ...
    i had attached input file in the end.
    TYPES: begin of errmess,
            msgnr type t100-msgnr,
            text type t100-text,
           end of errmess.
    TABLES : t100.
    DATA: BEGIN OF DD_VA01,
           AUART TYPE VBAK-AUART,
           KUNNR TYPE RV45A-KUNNR,
           BSTKD TYPE VBKD-BSTKD,
           MABNR TYPE RV45A-MABNR,
           KWMENG(2) type C,
           KBETR(2) type C,
          END OF DD_VA01.
    DATA:IT_VA01     Like TABLE OF DD_VA01,
         WA_VA01     Like LINE  OF IT_VA01,
         WA_VA01_F   Like LINE  OF IT_VA01,
         IT_BDCDATA  TYPE TABLE OF BDCDATA,
         WA_BDCDATA  Like Line  OF IT_BDCDATA,
         W_FNAME     TYPE STRING,
         messtab like bdcmsgcoll occurs 0 with header line,
         it_errmess type table of errmess,
         wa_errmess like line of it_errmess,
         err_message type string.
    data: zf1 type i,
          zc1 type c value '2',
          fn(20) type c.
    Main Code ************************************************************
    PERFORM get_input using 'C:\Documents and Settings\ic881592\Desktop\Daran_bdc_VA01-e.txt'.
    SORT IT_VA01 BY AUART KUNNR BSTKD.
    LOOP AT IT_VA01 INTO WA_VA01.
      if WA_VA01_F-AUART <> WA_VA01-AUART OR
         WA_VA01_F-KUNNR <> WA_VA01-KUNNR OR
         WA_VA01_F-BSTKD <> WA_VA01-BSTKD.
           PERFORM set_header_flag.
           PERFORM create_bdc_header_data.
      endif.
      PERFORM create_bdc_item_data.
    ENDLOOP.
    PERFORM call_transaction.
    PERFORM errorlog.
    Procedures ***********************************************************
    form get_input using w_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = W_FNAME
          HAS_FIELD_SEPARATOR = '#'
        TABLES
          DATA_TAB            = IT_VA01.
    endform.
    form call_transaction.
        PERFORM bdc_field       using 'BDC_OKCODE' '/11'.
        CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A' messages into messtab.
        refresh it_bdcdata.
    endform.
    FORM set_header_flag.
           WA_VA01_F-AUART = WA_VA01-AUART.
           WA_VA01_F-KUNNR = WA_VA01-KUNNR.
           WA_VA01_F-BSTKD = WA_VA01-BSTKD.
           if zf1 = 1.
               PERFORM call_transaction.
           endif.
           zf1 = 1.
    endform.   "set_header_flag.
    form create_bdc_header_data.
         perform bdc_dynpro      using 'SAPMV45A' '0101'.
         perform bdc_field       using 'VBAK-AUART' WA_VA01-AUART.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         perform bdc_field       using 'KUAGV-KUNNR' WA_VA01-KUNNR.
         perform bdc_field       using 'VBKD-BSTKD' WA_VA01-BSTKD.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMSSY0' '0120'.
         perform bdc_field       using 'BDC_CURSOR' '04/06'.
         perform bdc_field       using 'BDC_OKCODE' '=CHOO'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    endform. "create_bdcdata
    FORM create_bdc_item_data.
         CONCATENATE 'RV45A-KWMENG(' zc1 ')' INTO FN.
         perform bdc_field       using 'BDC_CURSOR' FN.
         perform bdc_field       using FN WA_VA01-KWMENG.
         CONCATENATE 'KOMV-KBETR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-KBETR.
         CONCATENATE 'RV45A-MABNR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-MABNR.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    ENDFORM.
    form errorlog.
      LOOP AT MESSTAB .
        if MESSTAB-MSGNR = '311' or MESSTAB-MSGTYP = 'E'.
            SELECT SINGLE msgnr text FROM T100
                            into wa_errmess
                            WHERE SPRSL = MESSTAB-MSGSPRA
                              AND ARBGB = MESSTAB-MSGID
                              AND MSGNR = MESSTAB-MSGNR.
            IF SY-SUBRC = 0.
              err_message = wa_errmess-TEXT.
              IF err_message CS '&1'.
                REPLACE '&1' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&2' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&3' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&4' WITH MESSTAB-MSGV4 INTO err_message.
              ELSE.
                REPLACE '&' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV4 INTO err_message.
              ENDIF.
              CONDENSE err_message.
              WRITE: / MESSTAB-MSGTYP, err_message .
            ELSE.
              WRITE: / MESSTAB.
            ENDIF.
        endif.
      ENDLOOP.
    endform. "errorlog
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    input file :
    OR     2148     0001235     R-1162     8     17
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     6     25
    OR     2148     0001235     R-1162     4     12
    OR     2148     0001236     R-1162     3     12
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     1     25
    OR     2148     0001236     R-1162     7     12
    OR     2148     0001236     R-1161     8     30
    OR     2148     0001236     100-400     10     25
    OR     2148     0001235     R-1161     5     30
    OR     2148     0001235     100-400     2     25
    OR     2148     0001235     R-11621     3     12
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     1     25
    OR     2148     0001235     R-1162     7     12
    OR     2148     0001235     R-1161     8     30
    OR     2148     0001235     100-400     10     25
    OR     2148     0001236     R-1162     8     17
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     6     25
    OR     2148     0001236     R-1162     4     12
    OR     2148     0001236     R-1161     5     30
    OR     2148     0001236     100-400     2     25

  • Since updating my Iphone to ios 8, my hands free in the car (Radiosat) is not working correctly.  The phone pairs ok with car, and my phone is recognised but then it cuts off the radio and says that I'm in a call, I can't cancel the call or do anyth

    Since updating my Iphone to ios 8, my hands free in the car (Radiosat) is not working correctly.  The phone pairs ok with car, and my phone is recognised but then it cuts off the radio and says that I'm in a call, I can't cancel the call or do anything.  I have taken my car to my local dealer but they say the Radiosat is working ok?

    Hello there stidhambr15,
    I was researching the issue you are having and recommend a couple of things. First it might be a good idea to reset the device following iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting found here http://support.apple.com/kb/ht1430
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't quite get the device going again, I recommend restoring the device.
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Might even be a good idea to turn off the phone, reseat the SIM card, and turn it back on.
    iPhone and iPad: How to remove the SIM card
    http://support.apple.com/kb/ht5163
    iPhone 4 (GSM model)
    iPhone 4S
    Cheers,
    Sterling

  • How can i know the version of autoconfig ?

    hi
    I am on 12.1.1
    to determine my autopatch version i used Note 390666.1
    i ran
    SET head off Lines 120 pages 100
    col n_patch format A10
    col bug_number format A10
    col patch_name format A10
    spool LACF_ptch_level.txt
    select ' LACF ' FROM dual;
    select bug_number, decode(bug_number,
    '4494373' ,'R12.TXK.A'
    ,'5872965' ,'R12.OAM.A'
    ,'5909746' ,'R12.TXK.A.1'
    ,'5917601' ,'R12.TXK.A.2'
    ,'6077487' ,'R12.TXK.A.DELTA.3'
    ,'6145693' ,'R12.Rapidclone Cons Jan2008'
    ,'6776948' ,'R12.Rapidclone CONSOLIDATED'
    ) n_patch, last_update_date
    FROM ad_bugs
    WHERE bug_number IN ( '4494373', '5872965', '5909746', '5917601', '6077487', '6145693', '6776948' );
    the output was
    4494373 R12.TXK.A 04-JAN-07
    4494373 R12.TXK.A 22-JAN-08
    5872965 R12.OAM.A 22-OCT-07
    5872965 R12.OAM.A 22-OCT-07
    5909746 R12.TXK.A. 22-OCT-07
    1
    5909746 R12.TXK.A. 21-JAN-08
    1
    5917601 R12.TXK.A. 22-OCT-07
    2
    5917601 R12.TXK.A. 21-JAN-08
    2
    6077487 R12.TXK.A. 22-OCT-07
    DELTA.3
    6077487 R12.TXK.A. 21-JAN-08
    DELTA.3
    6145693 R12.Rapidc 06-NOV-08
    lone Cons
    Jan2008
    how can i know the version of autoconfig from that?
    Thanks

    Hi,
    4494373 R12.TXK.A 04-JAN-07
    4494373 R12.TXK.A 22-JAN-08
    5872965 R12.OAM.A 22-OCT-07
    5872965 R12.OAM.A 22-OCT-07
    5909746 R12.TXK.A. 22-OCT-07
    5909746 R12.TXK.A. 21-JAN-08
    5917601 R12.TXK.A. 22-OCT-07
    5917601 R12.TXK.A. 21-JAN-08
    6077487 R12.TXK.A. 22-OCT-07
    6077487 R12.TXK.A. 21-JAN-08
    6145693 R12.Rapidc 06-NOV-08
    how can i know the version of autoconfig from that?The above indicates that the latest patches applied are 6077487 and 6145693.
    To find the latest AutoConfig and Rapid Clone patches on R12, please refer to:
    Note: 387859.1 - Using AutoConfig to Manage System Configurations in Oracle E-Business Suite Release 12
    Note: 406982.1 - Cloning Oracle Applications Release 12 with Rapid Clone
    Thanks,
    Hussein

  • Can't Connect, can't complete the call. Check your...

    Greetings guys,
    My phone was PERFECT until I updated to Lumia Black, since then I get the error:
    Can't Connect
    Can't complete the call. Check your cellular signal and the number, and try again.
    at random times; this is specially bad when driving and wanting to make a quick call via voice command; it's just not possible.
    This is the list of things I've done to try and fix it without luck.
    Resetted the phone
    Upgraded to pre-8.1 alpha
    Upgraded to 8.1 alpha
    I can also confirm that when trying to call via voice with Cortana (and until I toggle flight Airplane mode) it gives me the same error message.
    I want to add that I am not the only one, I've heard from two lumia 920 users and one lumia 820 issue and have the screenshots they sent me in case it's of any help (i've attached mine - obscured)...
    Does anyone have any recommendations or ideas?
    Thanks tons,
    Geo
    Solved!
    Go to Solution.
    Attachments:
    wp_ss_20140503_0001.jpg ‏76 KB

    Sadly i stilll have the issue. As you mentioned gtejeda, it is way better now, but is still there speccially when you more need a quick call. I have updated my phone to the latest release, but still hoping poeple to see this and realize that it is not 100%. They are on the right track, but need to keep working on it. 
    Attachments:
    wp_ss_20140609_0001.png ‏131 KB

  • How can I know the purchase date of my notebook?

    Hello guys
    I bought a Toshiba notebook from Extra Company @ Jeddah, Saudia Arabia
    & I want to know how can I know the Purchase Date Of it because I missed the payment bill & when I register my notebook Toshiba web site it asks me about the Purchase Date.
    Please help me
    Thanks a lot
    Bye

    Dont think you can find out the date of purchase!
    Where should know this without a payment bills or sales checks.
    What you can do is to find out when the notebook was registered on the Toshiba page.
    [Toshiba Warranty Lookup |http://computers2.toshiba.co.uk/toshiba/formsv3.nsf/WarrantyEntitlementLookup?OpenForm]

  • How Can i know the orders source. ?? IDOC or VA01

    Dear All,
    sometimes we create a new order with reference to the order which was created by using IDOC.
    How can I know the difference between ..
    1) Order created with VA01. (Some of the fields may copied from order created by IDoc.)
    2) orders created with IDOC.
    Please let me know.
    Thank you
    Madhu

    Thank you for your reply, but the suggestion you have given may work for us. as when we create a order with reference to other order or when we create a order using we19. the newly created order will have all the details of older order and that information will be in EDIDC, which will not be correct.
    regards
    madhu

  • Hi experts . how can we know the stock details for a perticular plant?

    hi experts . how can we know the stock details for a perticular plant

    check this code
    REPORT  YSG_MATSTK_REP    LINE-SIZE 220
                              LINE-COUNT 50(5).
    *&                       DATA DECLARATION                              *
    TABLES: MARA,              "GENERAL MASTER DATA
            MARC,              "PLANT DATA FOR MATERIAL
            MARD,              "STORAGE LOCATION DATA FOR MATERIAL
            MBEW,              "MATERIAL VALUATION
            MVKE,              "SALES DATA FOR MATERIAL
            MAKT.              "MATERIAL DESCRIPTION
    DATA: BEGIN OF I_MARA OCCURS 0,
               MATNR LIKE MARA-MATNR,"MATERIAL NUMBER
               MBRSH LIKE MARA-MBRSH,"INDUSTRY SECTOR
               MEINS LIKE MARA-MEINS,"BASE UNIT OF MEASURE
          END OF I_MARA.
    DATA: BEGIN OF I_MARC OCCURS 0,
              MATNR LIKE MARC-MATNR,"MATERIAL NUMBER
              WERKS LIKE MARC-WERKS,"PLANT
              LVORM LIKE MARC-LVORM,"FLAG MATERIAL FOR DELETION AT PLANT
                                    "LEVEL
              PSTAT LIKE MARC-PSTAT,"MAINTENANCE STATUS
              DISPO LIKE MARC-DISPO,"MRP CONTROLLER
          END OF I_MARC.
    DATA: BEGIN OF I_MAKT OCCURS 0,
               MATNR LIKE MAKT-MATNR,"MATERIAL NUMBER
               MAKTX LIKE MAKT-MAKTX,"MATERIAL DESCRIPTION
          END OF I_MAKT.
    DATA: BEGIN OF I_MVKE OCCURS 0,
               MATNR LIKE MVKE-MATNR,"MATERIAL NUMBER
               VKORG LIKE MVKE-VKORG,"SALES ORGANIZATION
               VTWEG LIKE MVKE-VTWEG,"DISTRIBUTION CHANNEL
          END OF I_MVKE.
    DATA: BEGIN OF I_MARD OCCURS 0,
               MATNR LIKE MARD-MATNR,"MATERIAL NUMBER
               LGORT LIKE MARD-LGORT,"STORAGE LOCATION
               LABST LIKE MARD-LABST,"VALUATED STOCK WITH UNRESTRICTED USE
          END OF I_MARD.
    DATA: BEGIN OF I_OUT OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            LVORM LIKE MARC-LVORM,
            PSTAT LIKE MARC-PSTAT,
            DISPO LIKE MARC-DISPO,
            MBRSH LIKE MARA-MBRSH,
            MEINS LIKE MARA-MEINS,
            MAKTX LIKE MAKT-MAKTX,
            VKORG LIKE MVKE-VKORG,
            VTWEG LIKE MVKE-VTWEG,
            LGORT LIKE MARD-LGORT,
            LABST LIKE MARD-LABST,
          END OF I_OUT.
    DATA : TOT TYPE I. " TOT - TOTAL TO PRINT STOCK
    *&                   S E L E C T I O N - S C R E E N                   *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY.
    PARAMETERS: P_WERKS LIKE MARC-WERKS OBLIGATORY.
    SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
                    S_DISPO FOR MARC-DISPO.
    SELECTION-SCREEN END OF BLOCK B1.
    *&                  I N I T I A L I Z A T I O N                      *
    INITIALIZATION.
      S_MATNR-SIGN = 'I'.
      S_MATNR-OPTION = 'EQ'.
      S_MATNR-LOW = 'M-14'.
      S_MATNR-HIGH = 'M-18'.
      P_WERKS = '3000'.
      S_LGORT-SIGN = 'I'.
      S_LGORT-OPTION = 'EQ'.
      S_LGORT-LOW = '0001'.
      S_LGORT-HIGH = '0004'.
      S_DISPO-SIGN = 'I'.
      S_DISPO-OPTION = 'EQ'.
      S_DISPO-LOW = '001'.
      S_DISPO-HIGH = '002'.
      APPEND S_DISPO.
      APPEND S_LGORT.
      APPEND S_MATNR.
      CLEAR S_DISPO.
      CLEAR S_LGORT.
      CLEAR S_MATNR.
    *&             S T A R T - O F - S E L E C T I O N                     *
    START-OF-SELECTION.
      SELECT MATNR WERKS LVORM DISPO FROM MARC
      INTO CORRESPONDING FIELDS OF TABLE I_MARC
                          WHERE WERKS EQ P_WERKS
                          AND MATNR IN S_MATNR
                          AND DISPO IN S_DISPO
                          AND WERKS = P_WERKS.
      IF I_MARC[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
        EXIT.
      ENDIF.
      SELECT MATNR LGORT LABST FROM MARD INTO TABLE  I_MARD
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR
                          AND WERKS EQ P_WERKS
                          AND LGORT IN S_LGORT.
      IF I_MARD[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
        EXIT.
      ENDIF.
      SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR.
    IF I_MVKE[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
        EXIT.
      ENDIF.
      LOOP AT I_MARC.
        MOVE-CORRESPONDING I_MARC TO I_OUT.
        CLEAR MARC.
        SELECT SINGLE MATNR MBRSH MEINS FROM MARA
                         INTO CORRESPONDING FIELDS OF MARA
                         WHERE MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MARA-MBRSH TO I_OUT-MBRSH,
                MARA-MEINS TO I_OUT-MEINS.
        ELSE.
          CONTINUE.
        ENDIF.
        SELECT SINGLE MATNR MAKTX FROM MAKT
                        INTO  CORRESPONDING FIELDS OF MAKT
                        WHERE  MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MAKT-MAKTX TO I_OUT-MAKTX.
        ELSE.
          CONTINUE.
        ENDIF.
        LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MARD-LABST TO I_OUT-LABST,
                I_MARD-LGORT TO I_OUT-LGORT.
          APPEND I_OUT.
        ENDLOOP.
        LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
                I_MVKE-VTWEG TO I_OUT-VTWEG.
          APPEND I_OUT.
        ENDLOOP.
        CLEAR I_OUT.
      ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME = 'C:\matstk.TXT'
       FILETYPE                        = 'ASC'
      TABLES
        DATA_TAB                        = I_OUT.
    *&                  T O P - O F - P A G E                              *
    TOP-OF-PAGE.
      WRITE:/ 'DATE:' ,SY-DATUM.
    *&                  E N D - O F - P A G E                              *
    END-OF-PAGE.
      WRITE: / SY-ULINE,
             /100 'PAGNO: ',SY-PAGNO,
             SY-ULINE.
    *&        E N D -- O F --  S E L E C T I O N                           *
    END-OF-SELECTION.
      LOOP AT I_OUT.
        AT FIRST.
          WRITE :/ 'MATERIAL EXTRACTION REPORT',
                   SY-ULINE.
        ENDAT.
        WRITE:/    SY-VLINE,
                   I_OUT-MATNR,SY-VLINE,
                   I_OUT-MEINS,SY-VLINE,
                   I_OUT-WERKS,SY-VLINE,
                   I_OUT-LVORM,SY-VLINE,
                   I_OUT-PSTAT,SY-VLINE,
                   I_OUT-DISPO,SY-VLINE,
                   I_OUT-MBRSH,SY-VLINE,
                   I_OUT-MAKTX,SY-VLINE,
                   I_OUT-VKORG,SY-VLINE,
                   I_OUT-VTWEG,SY-VLINE,
                   I_OUT-LGORT,SY-VLINE,
                   I_OUT-LABST,SY-VLINE.
        TOT = TOT + I_OUT-LABST.
        AT NEW MATNR.
          WRITE : 'NEW RECORD',
                   SY-VLINE.
        ENDAT.
        AT END OF LABST.
          WRITE : 'STOCK = ',
                   TOT,
                   SY-VLINE,
                   SY-ULINE.
        ENDAT.
        AT LAST.
          FORMAT COLOR 7 INTENSIFIED OFF.
          WRITE : /159 'TOTAL STOCK = ',
                     TOT.
        ENDAT.
      ENDLOOP.
        WRITE : /159 'TOTAL STOCK = ',
                     TOT.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

Maybe you are looking for

  • Open confirmation in SRM PO

    Hi, I have a SRM  PO, wherein the GR is posted for complete PO quanitty.  However, when we run the query in SRM portal "PO with open confirmation", this PO is apppearing again. Back end PO is flagged for GR IND, IR ind. BBP_PD is updated with GR quan

  • How to configure DNS to support ipv4 and ipv6

    I have a 2008 r2 domain controller in my lab. i'm doing Exchange 2007, 2010 and 2013. I have mix Windows 2008 r2 servers for other applications. i'm running into issues where i'm thinking it is time to have both IPV4 & IPV6 to run on all lab machines

  • PDF Printing with BI Publisher makes empty document

    Hi all, We have installed the BI Publisher. And configured apex to use it as printer server. In Apex we created a report query. The query I exported to an xml file. And I also exported the xml schema. These two files I imported in Word with the BI Pu

  • How can I most quickly delete a large number of outlook messages from my iphone?

    How can I most quickly delete a large number of outlook messages from my iphone?

  • 11g write-back drop down box

    Hi, I have enabled write back in OBIEE 11g dashboard. I would like to know if it is possible to create a drop down box within the write-back enabled column?