cancel
Showing results for 
Search instead for 
Did you mean: 

BOM Item Changes

Former Member
0 Kudos

LOOP AT it_temp.

CLEAR : it_stko, it_stpo.

REFRESH it_stpo.

CALL FUNCTION 'CSAP_MAT_BOM_OPEN'

EXPORTING

MATERIAL = it_temp-matnr

PLANT = it_temp-werks

BOM_USAGE = it_temp-stlan

  • ALTERNATIVE =

VALID_FROM = it_temp-datuv

  • CHANGE_NO =

  • REVISION_LEVEL =

  • FL_NO_CHANGE_DOC = ' '

IMPORTING

O_STKO = it_stko

FL_WARNING = FL_WARNING

TABLES

T_STPO = it_stpo

EXCEPTIONS

ERROR = 1.

SORT it_data by stlnr idrnk.

LOOP AT it_stpo.

clear it_data.

READ TABLE it_data with key stlnr = it_stpo-bom_no

idrnk = it_stpo-component BINARY SEARCH.

if sy-subrc eq 0.

if not it_stpo-supplyarea is initial and it_stpo-issue_loc is not initial.

  • it_stpo-issue_loc = it_data-lgort.

  • it_stpo-supplyarea = it_data-prvbe.

move space to it_stpo-issue_loc.

move space to it_stpo-supplyarea.

endif.

CALL FUNCTION 'CSAP_BOM_ITEM_MAINTAIN'

EXPORTING

I_STPO = it_stpo

  • FL_DEP_ALE_CONFORM = ' '

IMPORTING

O_STPO = mo_stpo "inserted

FL_WARNING = FL_WARNING

EXCEPTIONS

ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

call function 'FORMAT_MESSAGE'

exporting

id = sy-msgid

lang = sy-langu

no = sy-msgno

v1 = sy-msgv1

v2 = sy-msgv2

v3 = sy-msgv3

v4 = sy-msgv4

importing

msg = g_msg

exceptions

others = 0.

if sy-msgty = 'E'.

write : / g_msg.

endif.

ENDIF.

endif.

ENDLOOP.

call function 'CSAP_MAT_BOM_CLOSE'

importing

fl_warning = fl_warning

exceptions

error = 1.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Iam not able to modify the Supplying area and Storage loc since i have to pass the blank values in both these fields.While iam changing the values after bapi execution it is working fine, but for initial values i have to pass in those two fields. Pls help me.

former_member351627
Discoverer
0 Kudos

Hi,

Many years after you, I have the same problem

Did you finally solve this problem ?