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: 

Change pointer,message type MATMAS_GDS, field MARA-MSTAV

Former Member
0 Kudos

Hi,

I have exteded the MATMAS05 idoc type with new custom fields.

I want to send a IDOC only once using change pointer technique, when MSTAV(X-distribution status) status changes to 'E'.

Further changes to this status, that is ..From 'E' to anyother status, I should not send or trigger the Idoc.

I have checked the transaction BD50(Change pointer is activated for Message type MATMAS_GDS) and BD52(The entry is created for MARA-MSTAV).

But in BD60, I have assigned the FM MASTERIDOC_CREATE_SMD_MATMAS because there is no FM for MATMAS_GDS.

Could you please help on this.

REgards,

Sankar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Shankar,

You may need to use BADI BDCP_BEFORE_WRITE to control the creation of change pointer.

Regards,

Atish

6 REPLIES 6

Former Member
0 Kudos

Hi Shankar,

You may need to use BADI BDCP_BEFORE_WRITE to control the creation of change pointer.

Regards,

Atish

Former Member
0 Kudos

Hi,

I have tried to implement this BADI and call this BADI, but I am not able to call this BADI while excuting the program RBDMIDOC.

I make sure that only one active implementation for this BADI.

Could you please tell why it is not calling the BADI or the control is not going to this BADI when it writes the change pointer..

Thanks in advance.

Regards,

Sankar

0 Kudos

Hi Shankar,

This BADi is not called when you run RBDMIDOC.

This is called when some changes happen to the actual data, i.e during writing data to the change tables CDPOS CDHDR. So you can control, which data should be written to change tables.

RBDMIDOC will create IDOC for all the data in change tables.

Regards,

Atish

former_member186099
Contributor
0 Kudos

Hi Shankar,

Create the filter for ur message type and attach that in model view u created for this interface.

while creating the filter mention the condition that the idoc should be sent only if the value of ur field is 'E' and else dont send.

I hope it helps you.

Reward Points

Thanks,

Prasanna

Former Member
0 Kudos

Thanks . But when I change material data for example MATMAS message type , I have implemented the BADI like following..

method IF_EX_BDCP_BEFORE_WRITE~FILTER_BDCPV_BEFORE_WRITE .

DATA: w_chpointer TYPE bdcpv,

w_matnr type matnr,

w_mtart type mtart.

IF flt_val = 'MATMAS'.

  • Check the change document header.

  • Upon creation or change of only N103, N104, N110, N101 and N102

*Validate the material type

  • of the material on the change pointers.

w_matnr = CHANGE_DOCUMENT_HEADER-objectid(18).

select single mtart from mara into w_mtart

where matnr = w_matnr.

if sy-subrc = 0 and

not ( w_mtart = 'N103' or w_mtart = 'N104' or w_mtart = 'N110' or

w_mtart = 'N101' or w_mtart = 'N102' ).

delete change_pointers where MESTYPE = 'MATMAS'.

endif.

ENDIF.

endmethod.

But when I change the material, As you said,the control should come to this BADI . I have put a break point in stmt IF flt_val = 'MATMAS'.. but this break point is not working.

Thanks.

0 Kudos

Hi Shankar,

I am facing the same issue. BDCP_BEFORE_WRITE badi is not being triggered on change of MARA-MSTAV. Can you please help me with the solution. Thanks!

Regards,

Shilpi