Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

PO Item Customization not working properly

$
0
0

Hello Experts,

 

I have developed a custom flow where A Particular type of PO will have subsequent STO at it's each line item. And once the PO  quantity/deletion flag/delivery date/ batch of each PO line item is updated, its subsequent STO should also be updated.

 

Current Flow is like this,

 

We have custom tab at PO line item where user fills some details and press save in ME21N, then subsequent STO is created, and STO number is updated in the same custom tab. I have done this part and implemented my logic in the BADI ME_PROCESS_PO_CUST under method IF_EX_ME_PROCESS_PO_CUST~CLOSE.

 

I am facing the problem while updating the STO for changes happened in PO as mentioned above. I have developed the STO updating logic under method IF_EX_ME_PROCESS_PO_CUST~POST using BAPI_PO_CHANGE, But when i change PO quantity and check the subsequent STO updating, a dump occurs from standard program as below.

*******************************************************************************************************

Termination occurred in the ABAP program "CL_HANDLE_MANAGER_MM==========CP" -

  in "GET".

The main program was "RM_MEPO_GUI ".

 

 

In the source code you have the termination point in line 13

of the (Include) program "CL_HANDLE_MANAGER_MM==========CM005".

    2 METHOD get.

    3

    4   IF my_manager is initial.

    5     CALL METHOD get_manager.

    6   ENDIF.

    7

    8   CALL METHOD my_manager->search EXPORTING im_id = im_id

    9                                  IMPORTING ex_handle = ex_handle

   10                                  EXCEPTIONS failure  = 01.

   11

   12   IF sy-subrc ne 0.

>>>>>     RAISE failure.

   14   ENDIF.

   15

   16 ENDMETHOD.

*******************************************************************************************************

When i comment out this STO updating logic (BAPI_PO_CHANGE & BAPI_TRANSACTION_COMMIT) the porgram works fine. I also tried implementing the same code in user exit  EXIT_SAPMM06E_013. Here also it throws the same dump.

 

But when I develop the same logic in method IF_EX_ME_PROCESS_PO_CUST~CLOSE, no dump occurs. But here the main problem is that this method gets invoked when user enter the PO through ME22N/ME23N for the first time. It does not get triggered at the time when PO changes are saved.So no STO updating happens there.

 

Could you please let me know if there is any method where I can develop my logic to update STO at the time of PO save.

 

Thanks & Regards,

Nirmal Deep Singh


Viewing all articles
Browse latest Browse all 8950

Trending Articles