Skip to Content

Screen exit for Purchase requisition header

I am trying to add a custom field in a separate tab in the header or a purchase requisition.

I have added this custom field in CI_EBANDB & CI_EBANMEM and used user exit - EXIT_SAPLMEREQ_001 .

TABLES : ci_ebandb, eban.
DATA : lv_mereq_item TYPE mereq_item. "gv_trtyp type AKTVT.

data : t_pur_req_hdr TYPE REF TO IF_PURCHASE_REQUISITION.


CALL METHOD im_req_item->get_activity
  RECEIVING re_aktvt = gv_trtyp.

CASE gv_trtyp.
  WHEN 'A'.
  FL_INPUT = SPACE. "Output only
  WHEN 'V'.
  FL_INPUT = 'X'.          "Input/Output
ENDCASE.

IF im_req_item IS INITIAL.
CLEAR: ci_ebandb.
  ELSE.
lv_mereq_item = im_req_item->get_data( ).
MOVE-CORRESPONDING lv_mereq_item TO ci_ebandb.
endif.

But the problem is this custom field and tab (Function group XM02 Screen 0111) shows up on the item screen and not the header.

How will I have this field come up on the header?

Thanks,

Shareen

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 23, 2012 at 10:52 PM

    Hi Shareen Hegde,

    I think we also need to implement EXIT_SAPLMEREQ_003.

    Try:

    DATA: ls_mereq_item TYPE mereq_item.
    
    *get values if PReq item exists
    IF NOT im_req_item IS INITIAL.
    *read item data from system
      ls_mereq_item = im_req_item->get_data( ).
    
      ls_mereq_item-zz_your_custom_field = ci_ebandb-zz_your_custom_field.
    
      CALL METHOD im_req_item->set_data( ls_mereq_item ).
      
      ex_changed = 'X'.
    
      *eban-zz_your_custom_field = ls_mereq_item-zz_your_custom_field.
    ENDIF.
    

    Regards

    Bruno Xavier.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.