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: 

Set KBETR in purchase order conditions with SET_CONDITIONS

0 Kudos

Hello, my question is:

This is my code at a system with Netweaver 7.01

LOOP AT lt_conditions INTO ls_conditions.

CASE ls_conditions-kschl.

WHEN '[condition]'.

ls_conditions-kbetr = '9.999'.

MODIFY lt_conditions FROM ls_conditions TRANSPORTING kbetr.

CALL METHOD im_item->set_conditions

EXPORTING

im_conditions = lt_conditions.

ENDCASE.

ENDLOOP.

Here is the error messages from the system.

Data from Business Add-In ME_PROCESS_PO_CUST not adopted

Message no. MEPO151

Diagnosis

An endless loop occurred during the processing of the Business Add-In ME_PROCESS_PO_CUST. The system terminated the processing.

Procedure

Contact your system administrator.

Procedure for System Administration

Check whether standard fields are changed in the implementation of the Business Add-In ME_PROCESS_PO_CUST.

Changes to standard fields that are part of the Include structure MEPOITEM_TECH and/or MEPOSCHEDULE_TECH are generally not allowed. In addition, no field values that are not changeable through the field settings in the Enjoy transactions can be changed in the BAdI. Correct the implementation accordingly.

The note

Note 803749 - ME_PROCESS_PO_CUST Business Add-In: Endless loop

makes reference to the structures MEPOITEM_TECH and MEPOSCHEDULE_TECH but neither of both structures have KBETR, whereby don't exist any reason for the error.

Any idea for modify KBETR at PROCESS_ITEM or dodge the error.

Thanks in advance.

Edited by: Pedro Pablo López Pérez on Sep 21, 2011 2:00 AM

2 REPLIES 2

Former Member
0 Kudos

Hi

You need not use Loop and currently there in no Exit statement in DO after processing the Case statement.

Get the condition table using the

you can read the table with condition type and then change it using the method SET_CONDITIONS.

I think you can use method PROCESS_ITEM, but you need to verify whether this is the correct method for you or PROCESS_ACCOUNT

Shiva

0 Kudos

I need to modify the KBETR field at some conditions, like at the code example. PROCESS_ACCOUNT isn't triggered during condition modification whereby this method don't work for me at this point.

Anyway, thanks for the answer.