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

select problem during excuting SM35

Former Member
0 Likes
509

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?

2 REPLIES 2
Read only

Former Member
0 Likes
478

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

Read only

Former Member
0 Likes
478

Hi Gang,

Use Synchronous method to update the data.

Regards

Arun