Application Development and Automation 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: 
Read only

BAPI FUNCTIONS

former_member780881
Participant
0 Likes
1,483

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
Read only

former_member688242
Participant
1,279

Link please check this

5 REPLIES 5
Read only

former_member688242
Participant
1,280

Link please check this

Read only

0 Likes
1,279

Thanks for your comment. This link really help to me

Read only

Sandra_Rossi
Active Contributor
1,279

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

Read only

former_member780881
Participant
0 Likes
1,279

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.
Read only

0 Likes
1,279

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 .