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: 

Write data with setdata from the badi for purchase requisition (POST METHOD) ?

thillu
Explorer
303

Hello,

I'm trying to write data, from the post method of the badi "Z_PROCESS_PREQ" (purchase requisition).

I would like to mark the PR as incomplete ("On hold").

I have written the code below but it doesn't work.

What's wrong in my code ? Something is missing ?

Thanks for your help 🙂

LS_HEADER = IM_HEADER->get_data( ).
LS_HEADER-MEMORY = 'X'.
LS_HEADER-MEMORYTYPE = 'H'. " ON HOLD
IM_HEADER->SET_DATA(
EXPORTING
IM_DATA = LS_HEADER " HEADER DATA
).

LS_HEADERX = IM_HEADER->get_datax( ).
LS_HEADERX-MEMORY = 'X'.
LS_HEADERX-MEMORYTYPE = 'X'.
IM_HEADER->SET_DATAX( IM_DATAX = LS_HEADERX ).

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos
218
  • Z_PROCESS_PREQ is not a BAdI but may be an implementation, of BAdI ME_PROCESS_REQ_CUST, I suppose?
  • Usually POST methods are executed too late to change standard data, did you try method CHECK.

thillu
Explorer
0 Kudos
218

Hello, yes, it's an implementation, of BAdI ME_PROCESS_REQ_CUST.

I tried to move my code in the check method, but it still does't work.

Do you know if something is missing ? I need to do something to commit ?