2006 Sep 13 9:57 AM
Hi, all:
i use BDC to extent material between plants by MM01.
You know, there are some fields that will be gray if it has been filled in one plant,such as MARA-SPART,MARA-MTVFP.
So when i use BDC i have to check if this field has value in table mara as one material.
the code like this:
sales/plant
......
perform bdc_dynpro using 'SAPLMGMM' '5000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
clear tempc1.
select single MTVFP from marc into tempc1 where matnr = SEQ_FILEH-matnr
and werks = SEQ_FILEH-werks.
if sy-subrc = 0 and not tempc1 is initial.
else.
perform bdc_field using 'MARC-MTVFP'
SEQ_FILEH-MTVFP.
endif.
.......
above code runs well by call transaction. But when i use it in SM35, all materials can not be extended, because it gives the 'MARC-MTVFP' is not input field.
this maybe the DB(mara) does not updated in-phase,
any advice?
Hi, all:
i use BDC to extent material between plants by MM01.
You know, there are some fields that will be gray if it has been filled in one plant,such as MARA-SPART,MARA-MTVFP.
So when i use BDC i have to check if this field has value in table mara as one material.
the code like this:
sales/plant
......
perform bdc_dynpro using 'SAPLMGMM' '5000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
clear tempc1.
select single MTVFP from marc into tempc1 where matnr = SEQ_FILEH-matnr
and werks = SEQ_FILEH-werks.
if sy-subrc = 0 and not tempc1 is initial.
else.
perform bdc_field using 'MARC-MTVFP'
SEQ_FILEH-MTVFP.
endif.
.......
above code runs well by call transaction. But when i use it in SM35, all materials can not be extended, because it gives the 'MARC-MTVFP' is not input field.
this maybe the DB(mara) does not updated in-phase,
any advice?
2006 Sep 13 11:10 AM
Hi,
I have encountered similar issues while updating some data in sales orders..Now call transaction works becoz the messages r suppressed.But iam doubtful about this as well if the values r being updated in MARA or not. Please check the bdcmsgcol table if ur getting the message which says "field not avaialable for input".
In general for this error maybe u can try to put validations for the cases when this field will be greyed out.U can skip that screen or not populate that field for this case.
I hope it helps.
Varun
2006 Sep 13 3:41 PM