Program to select material inventory

Hi,
I have written a program, that should select the material inventory, increase, outflow in a specific month and show it in an ALV. there should be an option to export the results as a csv file.
I have finished the ALV and the csv-file stuff, but I have problems to get the right data-field for the material inventory for the specific month....
It should show the same result, as You would use the transaction "MCBC" and select for the specific month.
Now, I have selected all entries from Mara to get all materials. After that I have selected the fields mzubb, wzubb, magbb, wagbb from s032 for the specific month/year (spmon). The third selection, I have made, was the fields lbkum and salk3 from mbewh for the specific month (lfmon) and the year (lfja).
After all I have merged the results together in one table....
But the fields salk3 and lbkum from mbewh aren´t the right fields.... In the mcbc I get different values.
Can anybody help me?
Cheers Arne

Hello Arne,
The field u have chose has different meaning in S032 it is running total. in mbewh it is the actual transaction.
e.g u have received 100 in May 05 & 200 Jan 06 then ur mbewh would show...
one entry as 100 in May period and 200 in Jan period whereas in MCBC trx it would show for the selected period (11.2005 - 02.2006) as
11.2005 --- 100
12.2005 --- 100  as there has been no trx
01.2006 --- 300  as receipt in January
02.2006 --- 300
where as the s032 would have 300 in valuated stock field.
So u need to decide which one u want to display.

Similar Messages

  • Material inventory function module

    Hallo,
    I have to create a z-program that fill all screen of transaction MI02 from an internal table. So I create a material inventory document.
    How can I proceded? Is better calling transaction MI02 or exists a funcion module that fill all item of materila inventory?

    HI Gilbert
    you can use BDC for that you have to record the transactiion in SHDB by entering the required fields.
    for this you can do this in two ways.
    one is convert the excel file into intetnal table and the other the save the excel file as tab delimited text file and upload it into internal table.
    i am posting the sample code for the two methods.
    <b>EXCEL:</b>
    REPORT  UPLOAD_EXCEL no standard page heading.
    *Data Declaration
    data: itab like alsmex_tabline occurs 0 with header line.
    Has the following format:
                Row number   | Colum Number   |   Value
         i.e.     1                 1             Name1
                  2                 1             Joe
    TYPES: Begin of t_record,
        name1 like itab-value,
        name2 like itab-value,
        age   like itab-value,
        End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
          wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = p_infile
                i_begin_col             = '1'
                i_begin_row             = '2'  "Do not require headings
                i_end_col               = '14'
                i_end_row               = '31'
           tables
                intern                  = itab
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading Excel Spreadsheet
      endif.
    Sort table by rows and colums
      sort itab by row col.
    Get first row retrieved
      read table itab index 1.
    Set first row retrieved to current row
      gd_currentrow = itab-row.
      loop at itab.
      Reset values for next row
        if itab-row ne gd_currentrow.
          append wa_record to it_record.
          clear wa_record.
          gd_currentrow = itab-row.
        endif.
        case itab-col.
          when '0001'.                              "First name
            wa_record-name1 = itab-value.
          when '0002'.                              "Surname
            wa_record-name2 = itab-value.
          when '0003'.                              "Age
            wa_record-age   = itab-value.
        endcase.
      endloop.
      append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.
    TAB-DELIMITED:
    REPORT  ZBDCAPPL.
    parameters: V_DATA(132) lower case.
    data: begin of record OCCURS 0,
    data element: MATNR
            MATNR_001(018),
    data element: MBRSH
            MBRSH_002(001),
    data element: MTART
            MTART_003(004),
    data element: XFELD
            KZSEL_01_004(001),
    data element: MAKTX
            MAKTX_005(040),
    data element: MEINS
            MEINS_006(003),
    data element: MATKL
            MATKL_007(009),
    data element: SPART
            SPART_008(002),
          end of record.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'D:\ABAP\material.txt'
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = RECORD
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    regards
    kishore

  • Customer Material Inventory Report

    Hi All,
    I would just like to ask if there is a tcode in sap or a report that shows a Customer Material inventory report.
    Thanks all

    Hi Rich,
    Thanks.
    May I ask further how do I go about the selection screen for MBBS.
    Best regards,
    Kevin

  • Raw material inventory report

    Hi SAP GURUS,
    1) Is there any standard Raw Material Inventory report that shows value by inventory type (scrap, alloys, principal supplies,  spare parts and minor supplies, WIP, finished goods, graphite, and the reserves for those material types
    2) A report that shows Scrap receipts by plant u2013 by material and also a report that shows the recycled scrap receipts by type.  Would like it to show quantity in lbs and gross tons as well as the value and average cost per gross ton
    Thanks
    Anusha
    Edited by: anusha vemulapati on Jan 19, 2009 3:25 PM
    Edited by: anusha vemulapati on Jan 19, 2009 3:25 PM

    You try with this report. And selection option is there, select which option you required
    Tcode: S_P00_07000139.
    It may help full.
    Regards
    Jrp.

  • Performance issue while selecting material documents MKPF & MSEG

    Hello,
    I'm facing performance issues in production while selecting Material documents for Sales order and item based on the Sales order Stock.
    Here is the query :
    I'm first selecting data from ebew table which is the Sales order Stock table then this query.
        IF ibew[] IS NOT INITIAL AND ignore_material_documents IS INITIAL.
    *     Select the Material documents created for the the sales orders.
          SELECT mkpf~mblnr mkpf~budat
                 mseg~matnr mseg~mat_kdauf mseg~mat_kdpos mseg~shkzg
                 mseg~dmbtr mseg~menge
           INTO  CORRESPONDING FIELDS OF TABLE i_mseg
           FROM  mkpf INNER JOIN mseg
           ON    mkpf~mandt = mseg~mandt
           AND   mkpf~mblnr = mseg~mblnr
           AND   mkpf~mjahr = mseg~mjahr
           FOR   ALL entries IN ibew
           WHERE mseg~matnr      = ibew-matnr
           AND   mseg~werks         = ibew-bwkey
           AND   mseg~mat_kdauf   = ibew-vbeln
           AND   mseg~mat_kdpos  = ibew-posnr.
          SORT i_mseg BY mat_kdauf ASCENDING
                         mat_kdpos ASCENDING
                         budat     DESCENDING.
        ENDIF.
    I need to select the material documents because the end users want to see the stock as on certain date for the sales orders and only material document lines can give this information. Also EBEW table gives Stock only for current date.
    For Example :
    If the report was run for Stock date 30th Sept 2008, but  on the 5th Oct 2008, then I need to consider the goods movements after 30th Sept and add if stock was issued or subtract if stock was added.
    I know there is an Index MSEG~M in database system on mseg, however I don't know the Storage location LGORT and Movement types BWART that should be considered, so I tried to use all the Storage locations and Movement types available in the system, but this caused the query to run even slower than before.
    I could create an index for the fields mentioned in where clause , but it would be an overhead anyways.
    Your help will be appreciated. Thanks in advance
    regards,
    Advait

    Hi Thomas,
    Thanks for your reply. the performance of the query has significantly improved than before after switching the join from mseg join mkpf.
    Actually, I even tried without join and looped using field symbols ,this is working slightly faster than the switched join.
    Here are the result ,  tried with 371 records as our sandbox doesn't have too many entries unfortunately ,
    Results before switching the join  146036 microseconds
    Results after swithing the join        38029 microseconds
    Results w/o join                           28068 microseconds for selection and 5725 microseconds for looping
    Thanks again.
    regards,
    Advait

  • Submit program B and return to program A selection screen

    Dear all,
    I have program A with selection screen and this program display listing.
    In program A, when user choose the option to display another report listing in selection screen, then in program A, will have submit program B with ... and return
    May I know how can make the program B after showing the listing go back to program A selection screen and not continue to display program A report listing?
    Thanks
    Rgds

    Like this
    REPORT  z_a.
    PARAMETERS: pa_a(10) TYPE c,
                pa_callb AS CHECKBOX.
    IF pa_callb = 'X'.
      SUBMIT z_b WITH pa_b = pa_a
            AND RETURN.
      EXIT.
    ENDIF.
    WRITE: / 'Here is program A, the parameter value is: ',pa_a .
    REPORT  Z_B.
    PARAMETERS pa_b(10) type c.
    write: / 'Here is program B, the parameter value passed from A is: ',pa_b .
    Regards
    Marcin

  • Selecting material based on date

    Hello Experts,
    I have requirement where i want to give material and date.
    i have to select materia, condition record number based on date.
    In database table field is stored like material , validity from date and validity to date.
    Same material number is there but validity date and condtion record number is different.
    Matno        from date                 to date                      Condition record no
    1234       01.01.2009                31.12.2009                       23456
    1234       01.01.2008                31.12.2008                       12367
    if user enter date 12.09.2009 it should fetch me first record. ( because date is between 01.01.2009 to 31.12.2009)
    if user enter date 20.08.2008 it should fetch me first record. ( because date is between 01.01.2008 to 31.12.2008)
    field for input date is fkdate.
    So how i have to query in select statement to get this requirement.
    Thanks in advance.
    Best regards,
    Sai

    select * "or the fields you need
           from abcd
            into table itab
            where matnr in s_matnr "if you have it in sel screen or remove it..
                 and dat_fr GE p_fkdat
                 and dat_to LE p_fkdat.
    but if the dates are not keys...
    better not use them in select...
    delete the unnecessary items after the select using DELETE ITAB where...

  • Submit program with selection screen parameters - getting blank values

    Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN  )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN  ) but the value is blank in selection screen. I'm using the below code for this.
    SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR   SIGN 'I'
                      WITH WERKS_GL EQ I_WERKS   SIGN 'I'
                      WITH PLSCN    EQ I_TPLSCN  SIGN 'I'
        via selection-screen        AND RETURN.
    Could anyone please help me how to display value '000' rather than blanks.
    thanks in advance.

    If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
    SUBMIT rmcpamrp
      WITH matnr_gl = i_matnr
      WITH plscn    = i_tplscn
      WITH werks_gl = i_werks
      via selection-screen       
       AND RETURN .
    If I_MATNR, I_TPLSCN and I_WERKS are of type range then try  with
    SUBMIT rmcpamrp
      WITH matnr_gl IN i_matnr
      WITH plscn    IN i_tplscn
      WITH werks_gl IN i_werks
    via selection-screen       
       AND RETURN
    Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM

  • How to pass Selection screen values to another program's selection screen

    Hello,
    I have a requriement where in which i need to pass the selection screen values (say list of pernrs) and few others of one program to selection screen of another. 
    One option that i came across is using Submit. But am unware how to pass only the selection screen values (there wont be any data processing or filtering).  Just the values of one prgm's selection screen are to be sent to another.
    Thanks
    RK

    prog1.
    data:lt_params type table of RSPARAMS.
    data:wa like line of lt_params.
    parameters:pa1 type sy-datum.
    select-options:so1 type sy-dtaum.
    wa-SELNAME = 'PA2'.               "Seletion screen field name
    wa-KIND     = 'P'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = pa1.                    "Selection Option Low,Parameter value
    append wa to lt_params.
    loop at so1.
    wa-SELNAME = 'SO2'.               "Seletion screen field name
    wa-KIND     = 'S'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = so1-low.               "Selection Option Low,Parameter value
    wa-HIGH     = so1-high.               "Selection Option Low,Parameter value
    append wa to lt_params.
    endloop.
    CALL FUNCTION 'SUBMIT_REPORT'
      EXPORTING
        report                 = 'ZPROG2.'   "report name of ur tocde
        RET_VIA_LEAVE          = ''            "IF 'X' returns to the called program after execution
        SKIP_SELSCREEN         = 'X'       "If 'X' selection screen of called program is not displayed
    TABLES
       SELECTION_TABLE        = lt_params       "Contains values to the selection screen
    EXCEPTIONS
      JUST_VIA_VARIANT       = 1
      NO_SUBMIT_AUTH         = 2
      OTHERS                 = 3
    Prog2.
    parameters:pa2 type sy-datum.
    select-options:so2 type sy-dtaum.
    write pa2.
    skip 1.
    loop at so2.
    write:so2-low,so2-high.
    skip 1.
    endloop.
    Edited by: Keshu Thekkillam on Aug 20, 2009 3:22 PM

  • MB51 and BW Material Inventory 0IC_C03_Q0006 values do not match

    Hello BW experts,
    We recently implemented the standard material inventory extractors to our BW system.  When I compare the values between MB51 and 0IC_C03_Q0006, the quantities are the same but the values are different.
    For a particular material/plant, I exported MB51 to excel and did a sum on "Qty in Un. of Entry" and "Amount in LC"
    qty:  2104  Value: 8073.51
    Here's what the query looks like in Bex Analyzer for the same material/plant:
    Is ValStockValue not the same as Amount in LC?  If not, what should I be using to make sure ECC and BW are matching up?
    Thank you for your help,
    Susan

    Hi Susan,
    For Closing Stock quantity use 0TOTALSTCK which is Ncum value of in flow (0RECTOTSTCK)and out flow (0ISSTOTSTCK). For that your values are matching.
    And for Closing Stock Value use 0VALSTCKVAL which is Ncum value of in flow (0RECVS_VAL)and out flow (0ISSVS_VAL).
    In case if you need to calculate opening stock quantity & value use below formulas:
    Opening stock quantity = Closing(0TOTALSTCK) + Issued(0ISSTOTSTCK) - Receipt(0RECTOTSTCK)
    Opening stock value = Closing(0VALSTCKVAL) + Issued(0ISSVS_VAL) - Receipt(0RECVS_VAL)
    Also use can use MC.9 with MB5B for matching data.
    Regards,
    Abdullah

  • J_1HSTCD -Stock card and material inventory  Document needed

    I need some documentation for report J_1HSTCD -Stock card and material inventory report.
    Does any body know more about this.
    No TC is assigned.
    Its urgent!!!!!!!!!
    Regards,
    Vibhuti

    resolved

  • How to create tcode for modulepool program with selection screen?

    hi,
       How to create tcode for modulepool program with selection screen?
    thanks,
    sagar

    Hi,
    We need to goto SE80.
    In our program we right click on object name and goto create
    -> transaction. Enter the module pool program and screen number and save and activate.
    Or by SE93 also we can create a transaction code for our program.
    Hope ths helps.
    plz reward if useful.
    thanks,
    dhanashri..
    Edited by: Dhanashri Pawar on Jul 22, 2008 8:29 AM

  • Would like to include additional attributre from AddRemove program to the Hardware inventory

    Hi,
    I know how to extent the inventory to pickup custom info.  I would like now to add 1 field to existing inventory that picks up the add/remove program info.  By default following fields are collected: Prod ID; DisplayName; InstallDate; Publisher;
    Version.  I would like to add the "InstallSource".
    I've updated configuration.mof and added the field to the section at the top, copied to my CAS, checked dataldr.log all fine. imported *.mof to my test machine running wbemtest I can see the additional field, now when I try to either import/add from
    Client default setting, i'm not able to do so, as this is greyed out and I'm not able to select additional field.
    extract from my configuration.mof
    class Win32Reg_AddRemovePrograms
        [key]
            string    ProdID;
        [PropertyContext("DisplayName")]
            string    DisplayName;
        [PropertyContext("InstallDate")]
            string    InstallDate;
        [PropertyContext("Publisher")  ]
            string    Publisher;
        [PropertyContext("DisplayVersion")]
            string    Version;
        [PropertyContext("InstallSource")]     //custom info added
            string    InstallSource;                      //custom info added
    Does anybody have any suggestion how to do this?  I don't want to create additional table/custom section to my configuration.mof that would pickup this info (if possible)

    Yes, I know this is an old post, just trying to clean them up, did you figure this out? If so how?
    I don’t recommend that you edit the built-in ARP class, I recommend that you create your own class with is a duplicate of the ARP class and add your extra attribute there. Very Bad thing scan happen if you incorrectly edit an existing
    built-in class.
    http://www.enhansoft.com/

  • Problem while selecting material with *

    Hi,
      We have made a RFC to search the material now my requiremen is if there is any * in the matnr filed system should select all the material like matnr  the code is below
    FUNCTION ZMS_MATERIAL_SEARCH.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(MATNR) TYPE  MATNR OPTIONAL
    *"     VALUE(MAKTG) TYPE  MAKTG OPTIONAL
    *"     VALUE(MATKL) TYPE  MATKL OPTIONAL
    *"     VALUE(WERKS) TYPE  WERKS_D OPTIONAL
    *"     VALUE(MTART) TYPE  MTART OPTIONAL
    *"     VALUE(DISMM) TYPE  DISMM OPTIONAL
    *"     VALUE(MVGR2) TYPE  MVGR2 OPTIONAL
    *"  TABLES
    *"      FINAL STRUCTURE  ZMATERIAL_SEARCH OPTIONAL
    IF MATNR IS INITIAL.
        MATNR = '*'.
    ENDIF.
    IF MAKTG IS INITIAL.
        MAKTG = '*'.
    ENDIF.
    IF MATKL IS INITIAL.
        MATKL = '*'.
      ENDIF.
      IF MTART IS INITIAL.
         MTART = '*'.
      ENDIF.
      IF DISMM IS INITIAL.
         DISMM = '*'.
      ENDIF.
      IF MVGR2 IS INITIAL.
         MVGR2 = '*'.
      ENDIF.
      IF MATNR CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN MATNR WITH '%' .
        TRANSLATE MATNR TO UPPER CASE.
      ENDIF.
      IF MAKTG CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN MAKTG WITH '%' .
        TRANSLATE MAKTG TO UPPER CASE.
      ENDIF.
      IF MATKL CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN MATKL WITH '%' .
        TRANSLATE MATKL TO UPPER CASE.
      ENDIF.
      IF MTART CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN MTART WITH '%' .
        TRANSLATE MTART TO UPPER CASE.
      ENDIF.
      IF DISMM CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN DISMM WITH '%' .
        TRANSLATE DISMM TO UPPER CASE.
      ENDIF.
      IF MVGR2 CA '*'.
          REPLACE ALL OCCURRENCES OF '*' IN MVGR2 WITH '%' .
        TRANSLATE MVGR2 TO UPPER CASE.
      ENDIF.
      SELECT AMATNR AMTART AMATKL BMAKTG CDISMM CWERKS D~MVGR2
             FROM MARA AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
             INNER JOIN MARC AS C ON AMATNR = CMATNR
             INNER JOIN MVKE AS D ON AMATNR = DMATNR INTO CORRESPONDING FIELDS OF TABLE FINAL
              WHERE    A~MATNR LIKE MATNR
                 AND   A~MATKL LIKE MATKL
                 AND   A~MTART LIKE MTART
                 AND   B~MAKTG LIKE MAKTG
                 AND   C~WERKS EQ   WERKS
                 AND   C~DISMM LIKE DISMM
                 AND   D~VKORG EQ   WERKS
                 AND   D~MVGR2 LIKE MVGR2.
    ENDFUNCTION.
    now my problem is I have Two material 4110  and 4110V1  when i search material with 4110*  in output it is giving only 4110V1  as material, my requirement is in output it should give 4110  and 4110V1  for the input as 4110*
    so what modification i need in my program
    regards,
    zafar

    Apart from Bulent's good answer there's one more obvious thing you should do (and I'm assuming that the odd-looking selection D~VKORG EQ WERKS actually makes sense due to the functional usage of those organizational units in your system)...
    I'd say the best candidate for checking is how your material numbers are stored. Based on your results I'd bet that your system is configured to store numeric material numbers with leading zeros (you can check that easily via customizing or via SE16 with switching off all conversion exits). In that case you're numeric only material number 4110 would actually be stored on the database as 000000000000004110 and your selection with 4110% is obviously not matching that material number.
    So if that's the case in your system, then you're in for some ugly searching, whenever a numeric material number pattern is specified. If your numeric material numbers have different lengths (and looking at the 4 digits you're giving I'm assuming this), then you'd basically need to create quite a few patterns (probably best generated/stored in a select-option), where you'd prefix all possible numbers of zeros in front of your pattern. So in your case you'd need the following patterns (substitute the % with a * if you use select-options):
    4110%
    04110%
    004110%
    0004110%
    00000000000004110%
    000000000000004110
    The approach to use a more generic pattern like %4110% and then use some additional ABAP coding to remove the false matches is most likely more inefficient. I.e. even if your result set would be small, the database selection would still require a full index (or table) scan to figure out the matching material numbers.
    If all of that sounds unfamiliar to you, I strongly recommend reading up on [conversion exits|http://help.sap.com/abapdocu_70/en/ABENCONVERSION_EXITS.htm], which is ABAP 101...
    Cheers, harald
    p.s.: I leave it as an exercise to the reader if my answer contains any wrong material number (pattern), where I accidentally didn't count the number of zeros properly. I'm too lazy to check that.

  • Requirement to select material and plant ?

    Hi,
    i have below requirement .
    I have selection screen ..in which material number as selections option and plant as parameters.
    when ever user executes report i have store the material , plant , stlal(this field is in MAST table ) which are in selection screen in to one  internal table based on following conditions.
    stlan = 1 (BOM usage - in table MAST)
    mtart = AA or UT (In Mara table)
    stlal which is having minimum value.
    I think i have to use inner join on these tables ...
    please give me sample code ..please help...
    thanks
    satish

    Check the sample program :
    REPORT  ZTEST_AMEM1.
    tables : lfa1.
    data : begin of i_lfa1 occurs 0 ,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of i_lfa1.
    start-of-selection.
    select lifnr
           name1
           land1 from lfa1
           into table i_lfa1 up to 100 rows.
    Export
    export i_lfa1 to memory id 'SAP'.
    submit ztest_amem2 and return.
    write:/ 'hello'.
    *& Report  ZTEST_AMEM2
    REPORT  ZTEST_AMEM2.
    data : begin of j_lfa1 occurs 0,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of j_lfa1.
    start-of-selection.
    import i_lfa1 to j_lfa1 from memory id 'SAP'.
    loop at j_lfa1.
    write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.
    endloop.
    Use submit command ,please press f1 on submit ,you get good documentation.
    Thanks
    Seshu

Maybe you are looking for

  • Petstore 1.3 on Weblogic 7.0 with Oracle 8.1.7

    Hi, I am trying to get petstore 1.3 working on Weblogic7.0 with Oracle 8.1.7 database on HPUX. I made some modifications to the source files and regenerated the EAR files. When I copied the four EAR files to the applications sub-directory, two .ear f

  • Dynamic text variable

    I have a dynamic text box call "color.txt" at the root and two Movie clip buttons one called Red and one called Yellow. When I press the button the name of the button is passed to the text box. When I press the second button the name is not replaced.

  • Quicklink for WebDynpro application

    Hi everybody, I'd like to set up a quicklink to access my WebDynpro application as I can access for example the UME (http://<server>:<port>/useradmin) How can I build a URI like http://<server>:<port>/myApplication? thanks in advance regards Jan

  • DSLR cameras in general

    I have never owned a DSLR but now that they shoot HD video, I have started to think about it. Just one impression stands out over everything else. Am I correct? Is this a huge TRAP? I see the ad from B&H for the Nikon D600 Full-Frame SLR Camera. The

  • ANNOUNCE:::::::: EJB job scheduler for Weblogic

    Paramus, NJ - June 26, 2001 - Indus Consultancy Services today announced an upgrade release of its Java scheduling product. Kronos Enterprise Scheduler is a full-featured job scheduling system written for the Enterprise Java (J2EE) environment. As a