Skip to Content
0
Former Member
Jan 05, 2016 at 09:30 AM

Reading Tables from FM

306 Views

Hi all,

I am a (almost) Newcomer in ABAP programming. Now I have a problem with the FM "BAPI_MATERIAL_STOCK_REQ_LIST".
The FM I'll call as follows.

CALL FUNCTION 'BAPI_MATERIAL_STOCK_REQ_LIST' "Material - Current Requirements/Stock List
EXPORTING
material = i_line-matnr " bapi_mrp_mat_param-material Material Number
plant = s_plant " bapi_mrp_mat_param-plant Plant
mrp_area = '' " bapi_mrp_mat_param-mrp_area MRP Area
plan_scenario = '000' " bapi_mrp_mat_param-plan_scenario Planning Scenario of Long-Term Planning
selection_rule = '' " bapi_mrp_list_param-selection_rule Selection Rule
display_filter = '' " bapi_mrp_list_param-display_filter Name of Display Filter
period_indicator = '' " bapi_mrp_list_param-period_indicator Internal Period Indicator
get_item_details = '' " bapi_mrp_list_param-get_item_details Indicator: Determination of Detail Display for MRP Elements
get_ind_lines = '' " bapi_mrp_list_param-get_ind_lines Indicator: Determination of Single-Line Display
get_total_lines = 'X' " bapi_mrp_list_param-get_total_lines Indicator: Determination of Period Totals Display
* ignore_buffer = " bapi_mrp_list_param-ignore_buffer Indicator: Data Determination of Database (Not from Buffer)
IMPORTING
mrp_list = z_mrp_list " bapi_mrp_list MRP: MRP List
mrp_control_param = z_mrp_control_param " bapi_mrp_control_param Material Requirements Planning: Control Parameters for Material
mrp_stock_detail = z_mrp_stock_detail " bapi_mrp_stock_detail MRP: Statistics Fields for Stocks
return = z_return " bapiret2 Return Parameters
TABLES
mrp_items = z_mrp_items " bapi_mrp_items MRP: MRP Document Item
mrp_ind_lines = z_mrp_ind_lines " bapi_mrp_ind_lines MRP: Single Lines of MRP Elements
mrp_total_lines = z_mrp_total_line " bapi_mrp_total_lines MRP: Totals Line MRP Elements
* extensionout = " bapiparex Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
. " BAPI_MATERIAL_STOCK_REQ_LIST

When I test the FM I see the required data in the tables "z_mrp_total_lines".
Now the question: How can I read this chart?
I only need the first record where the "Sort_dat"> = the current day.

Who of you has a workaround for me?
Greetings from Paderborn Rolf