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

CSAP_MAT_BOM_MAINTAIN

Former Member
0 Likes
1,204

Hi All

I am using CSAP_MAT_BOM_MAINTAIN for updating BOM components.

Can anyone provide a sample code for open BOM, read BOM, delete the component, and add a new component. I am not sure about the program flow to follow to update a BOM. Please help me out

Thanks

Hi All

I am using CSAP_MAT_BOM_MAINTAIN for updating BOM components.

Can anyone provide a sample code for open BOM, read BOM, delete the component, and add a new component. I am not sure about the program flow to follow to update a BOM. Please help me out

Thanks

6 REPLIES 6
Read only

Former Member
0 Likes
1,032

Hi

See the following std programs/fun modules where this is used

LCDESKU52

LCONVTU02

LCONVTU22

LCSDSU02

LCSULU01

and do accordingly

Regards

Anji

Read only

0 Likes
1,032

Any sample code and process flow for the program is helpful.. I am new to the process of BOM changes

Thanks

Read only

0 Likes
1,032

I am expecting a simple program code with the correct flow. How to open the BOM, read BOM, change and close.The standard programs are too complex to understand the program flow.

Thanks

Read only

0 Likes
1,032

Hi

see the sample for read, similarly just go throughthe above mentioned std programs and take the fun module related code

CSAP_MAT_BOM_READ

Sample (from http://www.erpgenie.com/abap/functions.htm)

data: begin of tstk2 occurs 0.

include structure stko_api02.

data: end of tstk2.

data: begin of tstp2 occurs 0.

include structure stpo_api02.

data: end of tstp2.

data: begin of tdep_data occurs 0.

include structure csdep_data.

data: end of tdep_data.

data: begin of tdep_descr occurs 0.

include structure csdep_descr.

data: end of tdep_descr.

data: begin of tdep_source occurs 0.

include structure csdep_source.

data: end of tdep_source.

data: begin of tdep_order occurs 0.

include structure csdep_order.

data: end of tdep_order.

data: begin of tdep_doc occurs 0.

include structure csdep_doc.

data: end of tdep_doc.

data: flg_warning like capiflag-flwarning.

call function 'CSAP_MAT_BOM_READ'

exporting

material = 'MAT100'

plant = '0001'

bom_usage = '1'

valid_from = '20.12.1996'

  • valid_to

importing

fl_warning = flg_warning

tables

t_stko = tstk2

t_stpo = tstp2

t_dep_data = tdep_data

t_dep_descr = tdep_descr

t_dep_source = tdep_source

t_dep_order = tdep_order

t_dep_doc = tdep_doc

exceptions

error = 1.

Reward if useful

Anji

Read only

0 Likes
1,032

Thanks Everyone for the help. I am still not able to find any help in

all the standard codes. The BOM read is simple. But What I understand is this is a pre-requisite to calling CSAP_MAT_BOM_MAINTAIN FM. The standard code in SAP IDOC_BOMMAT function module and all are really scary ones since they dig in depth for finding the right BOM and posnr to update the BOM. But I want a program which someone has written in a simple way to identify the right BOM to update with the new record. I am looking for the exact logic and way to change the BOM component in a position number with the new ones. This change could be the component itself, or just the quantity without changing the component etc and all these with a change number having same valid from or different valid from date. Please help me out since I am pretty new to BOMs and business processes involving BOM changes and creation.

Thanks a lot. Appreciate if anyone can help me out

Ricky

Read only

0 Likes
1,032

Anybody who had got experience in BOM changes using CSAP_MAT_BOM_MAINTAIN. If there are no programs available, then atleast please help me with some pseudo code with correct logic to maintain BOM.

Its already getting late for starting on this. Appreciate any help

Thanks

Ricky