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>

Similar Messages

  • How can I know the right component for a transaction?

    Hi, I have a question
    When creating a new message in Solution Manager, notif_create, how can I know the right component given the transaction code or program name?
    Thanks in advance
    Edited by: María Valdés on Aug 19, 2008 6:25 PM

    Hello Maria,
    Well, in the Support Message window, place the cursor in Component box and press F4. This will brings up another window which contains the components list to which you are authorized. From that list you can choose about which component you want to create that particular support message.
    For example, if you are from Quality department, the following can be visible when you press F4.
    QM - Quality Management
      -- QM-ADB Adobe Forms
           -- QM-ADB-PRN Print Forms
      For the Print Forms, the component will be QM-ADB-PRN
    I hope it helps.
    Cheers,
    Satish.

  • How can I know the delta field for CO-PA datasource?

    Hi,folks:
        How can I know which is the field assigned as the delta field for CO-PA datasource,as is noticed in the note that after PI2004 the logic has been turned to general datasource,but I can't find the datasource through RSO2.
        Full points will be given to u.
    Martin Xie

    Dear Martin,
    The CO-PA DataSources generated use a separate time stamp method for the delta procedure. This procedure means that client-independent DataSources in CO-PA are normally restricted to the clients in which they were generated.
    See this link...
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/97/6f4d40cef71059e10000000a155106/frameset.htm
    Also check ROOSOURCE in R3, asmentioned by Dinesh.
    Hope it helps.

  • How to find out the logout details for a perticular user .

    Hi,
    I have an requirement to write a report which will run for hourly basis. using this program  i need to find out the logon & logout details so that i can calculate  the total productive hour for a perticular user. using table usr41 i can find out the logon detail. but i need to know the logout detail also to calculate the productive hour.
    pls suggest.

    Hi,
    Check these below threads:
    user log in & log out time SAO
    How to find user log-out time ?
    Regards,
    Nitin

  • How can I know the encoding format for a file.

    I have files encoded in English, Spanish, Japanese etc. I want to know which file has which encoding format while reading.
    Can anyone suggest.
    Ashish

    Language is different from "encoding"...if you mean character encoding. Multiple languages can be represented by a single encoding. The fact that you mix language and encoding in your question confuses me about what you are asking.
    If you want to know what language a file uses, you can always use a meta-tag. Or you can do some kind of text analysis based on dictionary lookups to determine language...too complex for my tastes. I think a simple language tag in the file makes more sense.
    As for character encoding, you either standardize on a single encoding for all files or again use a meta-tag. If you standardize on a single encoding, you should probably consider one of the Unicode encodings instead of any other character set encoding.
    Regards,
    John O'Conner

  • How can i know the price for iphone s5 in Middle East in Oman

    hi..
    please help me
    i want to buy an iphone 5s. how can i buy it from apple store?
    how can i know the real price for my country, aware that i am in Middle East exactly in Oman?
    and how many time it will take to reach in my country Oman?
    please help as soon as you can..
    thank you

    As I said, if you want to buy it from the USA online Apple store, you will need to have a credit card issued by an American Bank or financial company, you will have to have a USA billing address associated with that card, and you will have to have it shipped to a USA street address.
    Aramax is a shipping company - you do not have a credit card from them and they cannot pay for your purchase.  Having an account with a shipping company doesn't provide you with a USA source of payment for your purchase.
    As I understand it, the Oman government does not allow the iPhone to be sold in Oman, there are no official service providers for it, and thus there is no legitimate source to buy an iPhone from within Oman.
    Online Apple stores do not allow payment by foreign means or in foreign currency, they do not do currency exchange, nor do they ship internationally.

  • How can we know the usage log information in BW?

    Hi,
    How can we know the usage log for Infocubes & ODS in BW ?
    What transactions/tables can we use?
    Plz help.

    Hi,
    you have to activate the BW Statistics
    Use the BW Statistics tables
    RSDDSTAT          
    RSDDSTATAGGR      
    RSDDSTATAGGRDEF   
    RSDDSTATBCACT     
    RSDDSTATCOND      
    RSDDSTATDELE      
    RSDDSTATEXTRACT   
    RSDDSTATLOG       
    RSDDSTATWHM
    Happy Tony

  • How can we restrict the users/planners for a planning book?

    Hi experts,
    How can we restrict the users/planners for a planning book?
    Thanks,
    Naga.

    Hi Naga,
    we describe this in our SAP Demand and Supply Network Planning rapid-deployment solution.
    Access this area directly via
    http://service.sap.com
    /rds-dpa
    In the configuration guide Demand Planning Settings, Macros and Chart
    Engine (DP3) read Appendix: Setting up Roles and
    Authorizations.
    BR Frank

  • If i Know the Interface name of the badi ,how can i know the badi definitio

    Hi Experts,
         1. If i Know the Interface name of the badi ,how can i know the badi definition name?
         2. And also if i know the name of the  implimentation class,how can i know the implimantation name and definitin name
    Thanks&Regards
    Ramakrishna L

    Hi,
    in order to find BAdI definition starting from the interface, you should perform a "Where used List" from SE24.
    Type your interface name and then, in the where used dialog box, tick the 'Business Add-in" check box.
    1.But is there any table which stores Implimentation name and Implimentation class name?
    2.And also any table that stores BADI Definitiion name and Implimentation names.
    1. SXC_CLASS table; Exit, implementation side: Class assignment (multiple)
    2. SXC_EXIT table: Exit: Implementation side: Assignment: Exit - Implementation
    Regards,
    Andrea

  • Hi how can i know the memory allocation of occurs 10 or 100

    hii
    experts,
    how can i know how much memory is being allocated for for occurs n(10 ,100)
    for an internal table declaration.is there any tcode to know that??
    plz help.
    thank you

    Hi,
    welcome to sdn,
    Occurs 10 means the internal table allocates space for 10 rows initially....after filling these rows it allocates for the next 10 lines...similarly occurs 100.
    But if you give occurs 0 ,the internal table allocates 8kb space initially...
    these are the major difference....i think you can check the memory allocation of the internal table in the debugging mode instead of using a separate transaction...
    <b>Reward points if helpful,</b>
    regards,
    Jinesh

  • How can i know the RPM of my HD?

    I guys...
    Simple question...
    How can i know the RPM of my HD?
    I have a Mac mini and i would like to know that.
    Any ideas?.
    Thanks so much!!!

    Hi!!
    It doesn't show...
    Vendor:          NVidia
      Product:          MCP79 AHCI
      Link Speed:          3 Gigabit
      Negotiated Link Speed:          1.5 Gigabit
      Description:          AHCI Version 1.20 Supported
    FUJITSU MHZ2120BH G1:
      Capacity:          120.03 GB (120,034,123,776 bytes)
      Model:          FUJITSU MHZ2120BH G1                   
      Revision:          00810009
      Serial Number:                  K64PT9427599
      Native Command Queuing:          Yes
      Queue Depth:          32
      Removable Media:          No
      Detachable Drive:          No
      BSD Name:          disk0
      Medium Type:          Rotational
      Bay Name:          Lower
      Partition Map Type:          GPT (GUID Partition Table)
      S.M.A.R.T. status:          Verified
      Volumes:
      Capacity:          209.7 MB (209,715,200 bytes)
      Writable:          Yes
      BSD Name:          disk0s1
    Macintosh HD:
      Capacity:          119.69 GB (119,690,149,888 bytes)
      Available:          21.38 GB (21,376,569,344 bytes)
      Writable:          Yes
      File System:          Journaled HFS+
      BSD Name:          disk0s2
      Mount Point:          /
    FUJITSU MHZ2120BH G1:
      Capacity:          120.03 GB (120,034,123,776 bytes)
      Model:          FUJITSU MHZ2120BH G1                   
      Revision:          00810009
      Serial Number:                  K64PT9427599
      Native Command Queuing:          Yes
      Queue Depth:          32
      Removable Media:          No
      Detachable Drive:          No
      BSD Name:          disk0
      Medium Type:          Rotational
      Bay Name:          Lower
      Partition Map Type:          GPT (GUID Partition Table)
      S.M.A.R.T. status:          Verified
      Volumes:
      Capacity:          209.7 MB (209,715,200 bytes)
      Writable:          Yes
      BSD Name:          disk0s1
    Macintosh HD:
      Capacity:          119.69 GB (119,690,149,888 bytes)
      Available:          21.38 GB (21,376,569,344 bytes)
      Writable:          Yes
      File System:          Journaled HFS+
      BSD Name:          disk0s2
      Mount Point:          /
    Those are the 2 texts...
    Any idea?
    Thanks!!

  • 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

  • How can we print the Stock Transfer Purchase Order

    Hi,
    How can we print the Stock Transfer Purchase Order??
    Because from Transaction ME9L & ME9F, we can print simple PO's like NB, MPR etc..but Stock Transfer PO could not print.
    Plz guide, from where we can do it...

    Messages for PO are set in MN04. For details on how to follow this link:
    Re: Problem with PO output determination MN04
    Once the record is set here you will see the records in ME23n under messages button in header.
    Edited by: Afshad Irani on Apr 30, 2010 10:09 AM

Maybe you are looking for