Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI FUNCTIONS

former_member780881
Participant
0 Kudos

Hi experts,

I want to learn how to use bapi functions. I searched bapi structures and I guess , I understand but if you will share example about bapi I can use easily in my programs.

Can you help on this point 🙂

Best Regardss

1 ACCEPTED SOLUTION

former_member688242
Participant

Link please check this

5 REPLIES 5

former_member688242
Participant

Link please check this

0 Kudos

Thanks for your comment. This link really help to me

Sandra_Rossi
Active Contributor

This question has already been asked, you can find existing answers there.

former_member780881
Participant
0 Kudos

selection-screen: begin of block b1 with frame title text-001.

select-options: p_mtrl for mara-matnr.

parameters: p_werks like bapi_mrp_mat_param-plant.
selection-screen: end of block b1.
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
data: gs_itab like line of itab.
data: bapi_mtrl like bapi_mrp_mat_param-material.
data:ls_head like bapi_mrp_mat_param.
data:ls_mrp_list like bapi_mrp_list occurs 0 with header line.
data:wa_mrp_lists like line of ls_mrp_list.
data:extensionout like bapiparex occurs 0 with header line.
data:wa_extensionout like line of extensionout .
data: ld_mrp_statistic type bapi_mrp_statistic ,
ld_return type bapiret2 .
start-of-selection.
loop at p_mtrl .
clear : itab[],itab,gs_itab.
gs_itab-matnr = p_mtrl-low.
bapi_mtrl = gs_itab-matnr.
ls_head-material = bapi_mtrl.
ls_head-plant = p_werks.
call function 'BAPI_MATERIAL_PLANNING'
exporting
material = ls_head-material
plant = ls_head-plant
tables
mrp_lists = ls_mrp_list
extensionout = extensionout.
commit work and wait.
check sy-subrc eq 0.

0 Kudos

For example; that code part is solution about Multiple MRP for material.

In selection-screen ; we import material number/numbers and plants, BAPI explore to MRP .