Skip to Content
author's profile photo Former Member
Former Member

abap

hi all i have one req i need to find out the batches for particular storage location and find out the persentages of the stock.

so i did like this like i have taken the material no into an internal table as per parameter onselection-screen.

next i did like for that material no i selected labst into another it.

next i selected charg(batch) depending on that mat no into another it.

next i am looping both the internal tables is it rt.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 09:12 AM

    U would get your information from MCHB table.

    SELECT matnr werks lgort charg clabs into table itab

    from mchb

    where matnr in so_matnr.

    SELECT matnr werks lgort Sum(clabs) into table isum

    from mchb

    where matnr in so_matnr.

    Loop at itab.

    at end of lgort.

    sum.

    read table isum with key matnr = itab-matnr

    werks = itab-werks lgort = itab-lgort.

    if sy-subrc = 0.

    lperc = itab-clabs / isum-clabs.

    else.

    lperc = 0.

    endif.

    lperc = lperc * 100.

    write : / itab-lgort, itab-charg, lperc.

    endat.

    Endloop.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2006 at 09:21 AM

    If u r selecting LABST from table MARD correspdog to material no. , plant and storage location.

    and selecting Batch from mch1 correspoding to matnr...nd now merging the two internal tables...then u r right

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.