on 08-01-2016 5:14 PM
Hello,
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.
Thanks
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.
PeteA
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.
endif.
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.
endloop.
clear gw_mattab.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.
Regards
Terence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.