Skip to Content

Like to create a new report by Copying RCS15001(CS15 Tcode)?


I have 2 questions.

1)I would like have a new report which allows us to enter several material numbers and get the information, right now CS15 allows only one material to enter.

2) And I would like to add several new fields in the layouts for above new report created.

For this can I copy program RCS15001 and create new report, but I am not sure how to achieve to enter multiple material numbers and new fileds in the report. Please advice.


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 02, 2016 at 11:34 AM

    Mad Monk (nice name!!!)

    Rather than copying CS15. create your own program that has a selection-screen field for materials.

    Then loop through this list and call CS15 programatically.

    Below is some of my own code from an old program.


    loop at gt_mattab into gw_mattab.

    export l_mode = c_e to memory id 'ALV_EXTRACT_MODE'.

    * Call CS15 for aech material

    submit rcs15001

    with pm_idnrk = gw_mattab-matnr

    with pm_werks = gw_mattab-werks

    with pm_dirkt = c_x

    with pm_equtp = p_equnr

    with pm_tpltp = p_tplnr

    with pm_mattp = p_matnr

    and return.

    *Import CS15 results

    clear gt_outtab_t.

    refresh gt_outtab_t.

    import it_outtab = gt_outtab_t from memory id 'ALV_EXTRACT_TABLE'.

    if sy-subrc <> 0.

    clear gw_outtab_t.

    gw_outtab_t-werks = gw_mattab-werks.

    gw_outtab_t-idnrk = gw_mattab-matnr.

    gw_outtab_t-bmtyp = c_n.

    gw_outtab_t-stlty = c_n.

    gw_outtab_t-objic = '@02@'.

    append gw_outtab_t to gt_outtab.


    free memory id 'ALV_EXTRACT_MODE'.

    free memory id 'ALV_EXTRACT_TABLE'.

    loop at gt_outtab_t into gw_outtab_t.

    append gw_outtab_t to gt_outtab.


    clear gw_mattab.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 02, 2016 at 04:39 AM


    I feel your query can be best handled in the Technical Forum.

    Additionally, rather than copying the entire program, if you are able to find out the logic for your requirement like identify whether the material is used in Equipment BOm or Material etc, it will be very easy for your abaper to code.

    A very good abaper will need only logic but some need table details and flow. 😊



    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.