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: 

FM WTYSC01_COLLECT_DIP_ITEMS gives DYNAMIC_ITEM_ERROR

0 Kudos

Hi Gurus,

I am trying to TECO a production order with warranty items.

While calling the below FM to collect all warranty related items for the order, I am getting error (sy-subrc = 1) dynamic_item_error. The DIP profile has been attached and maintained correctly.

CALL FUNCTION 'WTYSC01_COLLECT_DIP_ITEMS'

               EXPORTING

                 i_aufnr            = Order Number

                 i_date_to          = sy-datum

                 i_check            = 'X'

               TABLES

                 et_claim_items     = it_claim_items

                 et_dlinr_order     = it_dlinr_order

               EXCEPTIONS

                 dynamic_item_error = 1

                 error_with_csorder = 2

                 dip_error          = 3

                 no_data            = 4

                 OTHERS             = 5.


Any idea on what might be causing the error??


P.S. I have done some deep debugging and made some findings but they have hardly been of any help, So I want expert views on this first.

1 ACCEPTED SOLUTION

0 Kudos

I have done some deep debugging to find out that the problem is occurring in a call to FM K_ORDER_READ. It holds some entries in one of the global variables (scope function group) buffer populated in some earlier steps of the flow. So in this entry in BUFFER sales order number (KDAUF) and item number (KDPOS) are empty. As the program finds entry in this buffer it does not fetch the complete AUFK structure for the order number and hence the Sales order number and item number remain empty causing the problem in later stages.

Please take reference of the following thread for details

I have thought about putting an enhancement in K_ORDER_READ to not use the entries in buffer when this particular flow is hit. Hope that will solve the problem.

If anybody has any better/easier solution to this kindly share with me.

regards,

Jeet

1 REPLY 1

0 Kudos

I have done some deep debugging to find out that the problem is occurring in a call to FM K_ORDER_READ. It holds some entries in one of the global variables (scope function group) buffer populated in some earlier steps of the flow. So in this entry in BUFFER sales order number (KDAUF) and item number (KDPOS) are empty. As the program finds entry in this buffer it does not fetch the complete AUFK structure for the order number and hence the Sales order number and item number remain empty causing the problem in later stages.

Please take reference of the following thread for details

I have thought about putting an enhancement in K_ORDER_READ to not use the entries in buffer when this particular flow is hit. Hope that will solve the problem.

If anybody has any better/easier solution to this kindly share with me.

regards,

Jeet