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: 

Problem with CSAP_MAT_BOM_READ FM

Former Member
0 Kudos
632

Hi,

I'm using the CSAP_MAT_BOM_READ fm in an abap code and it works fine for most of the materials that I'm giving to the funcion. However, it returns an error for two materials.

If I check this materials in the MAST table I see that both of them are in the table. I also check them in the CS03 transaction to see if they have a list of materials and actually they have a list of materials.

At this moment I don't know what can be the problem because this materials are equal to the rest, I think.

Can anybody help me?

Thanks in advance.

Regards.

3 REPLIES 3

Former Member
0 Kudos
173

Hi David,

Which error are you getting?

Regards,

Felipe

0 Kudos
173

Hi Felipe,

I've a code similar to this:

CALL FUNCTION 'CSAP_MAT_BOM_READ'
       EXPORTING
         material    = ematnr
         plant       = '3000'
         bom_usage   = '1'
*        alternative = '01'
*        valid_from  = valid_from
       TABLES
         t_stko      = t_stko
         t_stpo      = t_stpo
       EXCEPTIONS
         error       = 1
         OTHERS      = 2.
     IF sy-subrc <> 0.
       MESSAGE e398(00) WITH 'The list of materials does not exist'.
     ENDIF.

So I don't know exactly what is the error because I don't manage the different types of errors.

Is there any way to know what is the error?

Thanks a lot.

0 Kudos
173

Hi Felipe,

I'm getting the error:

'Alternative 1 does not exist'

Any suggestion?

Regards.