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

Error after calling function module

former_member925838
Participant
0 Likes
698

Dear Experts,

I am calling function module CS_BOM_EXPL_MAT_V2 to get bom details.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
       EXPORTING
         aumgb                 = c_x
         capid                 = c_pp01
         datuv                 = sy-datum
         ehndl                 = c_1
         mbwls                 = c_x
         mehrs                 = c_x
         mtnrv                 = p_matnr
         stpst                 = c_0
         werks                 = p_werks
         rndkz                 = c_1
       TABLES
         stb                   = t_stb
         matcat                = t_matcat
       EXCEPTIONS
         alt_not_found         = 1
         call_invalid          = 2
         material_not_found    = 3
         missing_authorization = 4
         no_bom_found          = 5
         no_plant_data         = 6
         no_suitable_bom_found = 7
         conversion_error      = 8
         OTHERS                = 9.

     IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
     ENDIF.

but when i execute this on production and if sy-subrc is non zero then some problem occurs.

if i took a material(say xyz) and execute it and if sy-subrc is non zero program gets terminated. giving error: message type unknown.

when i debugged it i found that sy-msgid, sy-msgno , sy-msgty all are initial, thats why it shows error.

but if i execute report again with same material (xyz)  it wont get terminated and all

sy-msgid, sy-msgno , sy-msgty are populated.

it is happening for all cases, on 1st execution it is giving dump and on 2nd execution it is working fine.

please suggest possible reasons and solution for case.

Note: This works perfectly on development and quality server.

         Problem in production server only.

Thanks,

Amar


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
479

Hello,

I think you need to look for SAP Notes.

For example:

Note 1477322 - Imcomplete/incorrect message output in BOMBOS

1 REPLY 1
Read only

Former Member
0 Likes
480

Hello,

I think you need to look for SAP Notes.

For example:

Note 1477322 - Imcomplete/incorrect message output in BOMBOS