Changing contents of the Standard Field while creating PR
2024-1-5 20:23:28 Author: blogs.sap.com(查看原文) 阅读量:4 收藏

Business Scenario

Content of the Standard Field needs to be changed (depending upon some conditions) while creating the PR.

Implementation

This Structure MEREQ_ITEM_S_CUST_ALLOWED contains the Standard Fields which could be changed during the runtime. If the Standard field which needs to be changed is not available in this Structure, then using the Append Structure, the standard field needs to be added in this structure.

If however a custom field needs to be changed, for that there is already an Include CI_EBANMEM which could be created and the custom fields could be added. However When Standard field is added into this structure, it does not work, Since it is for Custom Fields.

Badi :ME_PROCESS_REQ_CUST

Method : Process_item

Coding

DATA : l_item TYPE mereq_item.

CALL METHOD im_item->get_data
      RECEIVING
        re_data = l_item.


*Perform checks

*Standard Field value must be changed
l_item-estkz = 'S'.
CALL METHOD im_item->set_data
   EXPORTING
      im_data = l_item.

Thanks

Ketan


文章来源: https://blogs.sap.com/2024/01/05/changing-contents-of-the-standard-field-while-creating-pr/
如有侵权请联系:admin#unsafe.sh